@jup-ag/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +47 -0
- package/dist/index.js +2091 -0
- package/docs/config.md +22 -0
- package/docs/keys.md +64 -0
- package/docs/setup.md +41 -0
- package/docs/spot.md +151 -0
- package/llms.txt +17 -0
- package/package.json +43 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2091 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as MG}from"node:module";var LG=Object.create;var{getPrototypeOf:BG,defineProperty:x6,getOwnPropertyNames:RG}=Object;var IG=Object.prototype.hasOwnProperty;function wG(D){return this[D]}var OG,TG,b6=(D,$,J)=>{var Q=D!=null&&typeof D==="object";if(Q){var G=$?OG??=new WeakMap:TG??=new WeakMap,q=G.get(D);if(q)return q}J=D!=null?LG(BG(D)):{};let X=$||!D||!D.__esModule?x6(J,"default",{value:D,enumerable:!0}):J;for(let Y of RG(D))if(!IG.call(X,Y))x6(X,Y,{get:wG.bind(D,Y),enumerable:!0});if(Q)G.set(D,X);return X};var c=(D,$)=>()=>($||D(($={exports:{}}).exports,$),$.exports);var z0=MG(import.meta.url);var $8=c((PG)=>{class I9 extends Error{constructor(D,$,J){super(J);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=$,this.exitCode=D,this.nestedError=void 0}}class h6 extends I9{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}PG.CommanderError=I9;PG.InvalidArgumentError=h6});var x8=c((xG)=>{var{InvalidArgumentError:kG}=$8();class v6{constructor(D,$){switch(this.description=$||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,D[0]){case"<":this.required=!0,this._name=D.slice(1,-1);break;case"[":this.required=!1,this._name=D.slice(1,-1);break;default:this.required=!0,this._name=D;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue(D,$){if($===this.defaultValue||!Array.isArray($))return[D];return $.push(D),$}default(D,$){return this.defaultValue=D,this.defaultValueDescription=$,this}argParser(D){return this.parseArg=D,this}choices(D){return this.argChoices=D.slice(),this.parseArg=($,J)=>{if(!this.argChoices.includes($))throw new kG(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue($,J);return $},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function AG(D){let $=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+$+">":"["+$+"]"}xG.Argument=v6;xG.humanReadableArgName=AG});var w9=c((yG)=>{var{humanReadableArgName:vG}=x8();class y6{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(D){this.helpWidth=this.helpWidth??D.helpWidth??80}visibleCommands(D){let $=D.commands.filter((Q)=>!Q._hidden),J=D._getHelpCommand();if(J&&!J._hidden)$.push(J);if(this.sortSubcommands)$.sort((Q,G)=>{return Q.name().localeCompare(G.name())});return $}compareOptions(D,$){let J=(Q)=>{return Q.short?Q.short.replace(/^-/,""):Q.long.replace(/^--/,"")};return J(D).localeCompare(J($))}visibleOptions(D){let $=D.options.filter((Q)=>!Q.hidden),J=D._getHelpOption();if(J&&!J.hidden){let Q=J.short&&D._findOption(J.short),G=J.long&&D._findOption(J.long);if(!Q&&!G)$.push(J);else if(J.long&&!G)$.push(D.createOption(J.long,J.description));else if(J.short&&!Q)$.push(D.createOption(J.short,J.description))}if(this.sortOptions)$.sort(this.compareOptions);return $}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let $=[];for(let J=D.parent;J;J=J.parent){let Q=J.options.filter((G)=>!G.hidden);$.push(...Q)}if(this.sortOptions)$.sort(this.compareOptions);return $}visibleArguments(D){if(D._argsDescription)D.registeredArguments.forEach(($)=>{$.description=$.description||D._argsDescription[$.name()]||""});if(D.registeredArguments.find(($)=>$.description))return D.registeredArguments;return[]}subcommandTerm(D){let $=D.registeredArguments.map((J)=>vG(J)).join(" ");return D._name+(D._aliases[0]?"|"+D._aliases[0]:"")+(D.options.length?" [options]":"")+($?" "+$:"")}optionTerm(D){return D.flags}argumentTerm(D){return D.name()}longestSubcommandTermLength(D,$){return $.visibleCommands(D).reduce((J,Q)=>{return Math.max(J,this.displayWidth($.styleSubcommandTerm($.subcommandTerm(Q))))},0)}longestOptionTermLength(D,$){return $.visibleOptions(D).reduce((J,Q)=>{return Math.max(J,this.displayWidth($.styleOptionTerm($.optionTerm(Q))))},0)}longestGlobalOptionTermLength(D,$){return $.visibleGlobalOptions(D).reduce((J,Q)=>{return Math.max(J,this.displayWidth($.styleOptionTerm($.optionTerm(Q))))},0)}longestArgumentTermLength(D,$){return $.visibleArguments(D).reduce((J,Q)=>{return Math.max(J,this.displayWidth($.styleArgumentTerm($.argumentTerm(Q))))},0)}commandUsage(D){let $=D._name;if(D._aliases[0])$=$+"|"+D._aliases[0];let J="";for(let Q=D.parent;Q;Q=Q.parent)J=Q.name()+" "+J;return J+$+" "+D.usage()}commandDescription(D){return D.description()}subcommandDescription(D){return D.summary()||D.description()}optionDescription(D){let $=[];if(D.argChoices)$.push(`choices: ${D.argChoices.map((J)=>JSON.stringify(J)).join(", ")}`);if(D.defaultValue!==void 0){if(D.required||D.optional||D.isBoolean()&&typeof D.defaultValue==="boolean")$.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`)}if(D.presetArg!==void 0&&D.optional)$.push(`preset: ${JSON.stringify(D.presetArg)}`);if(D.envVar!==void 0)$.push(`env: ${D.envVar}`);if($.length>0){let J=`(${$.join(", ")})`;if(D.description)return`${D.description} ${J}`;return J}return D.description}argumentDescription(D){let $=[];if(D.argChoices)$.push(`choices: ${D.argChoices.map((J)=>JSON.stringify(J)).join(", ")}`);if(D.defaultValue!==void 0)$.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if($.length>0){let J=`(${$.join(", ")})`;if(D.description)return`${D.description} ${J}`;return J}return D.description}formatItemList(D,$,J){if($.length===0)return[];return[J.styleTitle(D),...$,""]}groupItems(D,$,J){let Q=new Map;return D.forEach((G)=>{let q=J(G);if(!Q.has(q))Q.set(q,[])}),$.forEach((G)=>{let q=J(G);if(!Q.has(q))Q.set(q,[]);Q.get(q).push(G)}),Q}formatHelp(D,$){let J=$.padWidth(D,$),Q=$.helpWidth??80;function G(j,U){return $.formatItem(j,J,U,$)}let q=[`${$.styleTitle("Usage:")} ${$.styleUsage($.commandUsage(D))}`,""],X=$.commandDescription(D);if(X.length>0)q=q.concat([$.boxWrap($.styleCommandDescription(X),Q),""]);let Y=$.visibleArguments(D).map((j)=>{return G($.styleArgumentTerm($.argumentTerm(j)),$.styleArgumentDescription($.argumentDescription(j)))});if(q=q.concat(this.formatItemList("Arguments:",Y,$)),this.groupItems(D.options,$.visibleOptions(D),(j)=>j.helpGroupHeading??"Options:").forEach((j,U)=>{let C=j.map((z)=>{return G($.styleOptionTerm($.optionTerm(z)),$.styleOptionDescription($.optionDescription(z)))});q=q.concat(this.formatItemList(U,C,$))}),$.showGlobalOptions){let j=$.visibleGlobalOptions(D).map((U)=>{return G($.styleOptionTerm($.optionTerm(U)),$.styleOptionDescription($.optionDescription(U)))});q=q.concat(this.formatItemList("Global Options:",j,$))}return this.groupItems(D.commands,$.visibleCommands(D),(j)=>j.helpGroup()||"Commands:").forEach((j,U)=>{let C=j.map((z)=>{return G($.styleSubcommandTerm($.subcommandTerm(z)),$.styleSubcommandDescription($.subcommandDescription(z)))});q=q.concat(this.formatItemList(U,C,$))}),q.join(`
|
|
3
|
+
`)}displayWidth(D){return f6(D).length}styleTitle(D){return D}styleUsage(D){return D.split(" ").map(($)=>{if($==="[options]")return this.styleOptionText($);if($==="[command]")return this.styleSubcommandText($);if($[0]==="["||$[0]==="<")return this.styleArgumentText($);return this.styleCommandText($)}).join(" ")}styleCommandDescription(D){return this.styleDescriptionText(D)}styleOptionDescription(D){return this.styleDescriptionText(D)}styleSubcommandDescription(D){return this.styleDescriptionText(D)}styleArgumentDescription(D){return this.styleDescriptionText(D)}styleDescriptionText(D){return D}styleOptionTerm(D){return this.styleOptionText(D)}styleSubcommandTerm(D){return D.split(" ").map(($)=>{if($==="[options]")return this.styleOptionText($);if($[0]==="["||$[0]==="<")return this.styleArgumentText($);return this.styleSubcommandText($)}).join(" ")}styleArgumentTerm(D){return this.styleArgumentText(D)}styleOptionText(D){return D}styleArgumentText(D){return D}styleSubcommandText(D){return D}styleCommandText(D){return D}padWidth(D,$){return Math.max($.longestOptionTermLength(D,$),$.longestGlobalOptionTermLength(D,$),$.longestSubcommandTermLength(D,$),$.longestArgumentTermLength(D,$))}preformatted(D){return/\n[^\S\r\n]/.test(D)}formatItem(D,$,J,Q){let q=" ".repeat(2);if(!J)return q+D;let X=D.padEnd($+D.length-Q.displayWidth(D)),Y=2,K=(this.helpWidth??80)-$-Y-2,j;if(K<this.minWidthToWrap||Q.preformatted(J))j=J;else j=Q.boxWrap(J,K).replace(/\n/g,`
|
|
4
|
+
`+" ".repeat($+Y));return q+X+" ".repeat(Y)+j.replace(/\n/g,`
|
|
5
|
+
${q}`)}boxWrap(D,$){if($<this.minWidthToWrap)return D;let J=D.split(/\r\n|\n/),Q=/[\s]*[^\s]+/g,G=[];return J.forEach((q)=>{let X=q.match(Q);if(X===null){G.push("");return}let Y=[X.shift()],Z=this.displayWidth(Y[0]);X.forEach((K)=>{let j=this.displayWidth(K);if(Z+j<=$){Y.push(K),Z+=j;return}G.push(Y.join(""));let U=K.trimStart();Y=[U],Z=this.displayWidth(U)}),G.push(Y.join(""))}),G.join(`
|
|
6
|
+
`)}}function f6(D){let $=/\x1b\[\d*(;\d*)*m/g;return D.replace($,"")}yG.Help=y6;yG.stripColor=f6});var O9=c((lG)=>{var{InvalidArgumentError:uG}=$8();class u6{constructor(D,$){this.flags=D,this.description=$||"",this.required=D.includes("<"),this.optional=D.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(D),this.mandatory=!1;let J=gG(D);if(this.short=J.shortFlag,this.long=J.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(D,$){return this.defaultValue=D,this.defaultValueDescription=$,this}preset(D){return this.presetArg=D,this}conflicts(D){return this.conflictsWith=this.conflictsWith.concat(D),this}implies(D){let $=D;if(typeof D==="string")$={[D]:!0};return this.implied=Object.assign(this.implied||{},$),this}env(D){return this.envVar=D,this}argParser(D){return this.parseArg=D,this}makeOptionMandatory(D=!0){return this.mandatory=!!D,this}hideHelp(D=!0){return this.hidden=!!D,this}_collectValue(D,$){if($===this.defaultValue||!Array.isArray($))return[D];return $.push(D),$}choices(D){return this.argChoices=D.slice(),this.parseArg=($,J)=>{if(!this.argChoices.includes($))throw new uG(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue($,J);return $},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return m6(this.name().replace(/^no-/,""));return m6(this.name())}helpGroup(D){return this.helpGroupHeading=D,this}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class g6{constructor(D){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,D.forEach(($)=>{if($.negate)this.negativeOptions.set($.attributeName(),$);else this.positiveOptions.set($.attributeName(),$)}),this.negativeOptions.forEach(($,J)=>{if(this.positiveOptions.has(J))this.dualOptions.add(J)})}valueFromOption(D,$){let J=$.attributeName();if(!this.dualOptions.has(J))return!0;let Q=this.negativeOptions.get(J).presetArg,G=Q!==void 0?Q:!1;return $.negate===(G===D)}}function m6(D){return D.split("-").reduce(($,J)=>{return $+J[0].toUpperCase()+J.slice(1)})}function gG(D){let $,J,Q=/^-[^-]$/,G=/^--[^-]/,q=D.split(/[ |,]+/).concat("guard");if(Q.test(q[0]))$=q.shift();if(G.test(q[0]))J=q.shift();if(!$&&Q.test(q[0]))$=q.shift();if(!$&&G.test(q[0]))$=J,J=q.shift();if(q[0].startsWith("-")){let X=q[0],Y=`option creation failed due to '${X}' in option flags '${D}'`;if(/^-[^-][^-]/.test(X))throw Error(`${Y}
|
|
7
|
+
- a short flag is a single dash and a single character
|
|
8
|
+
- either use a single dash and a single character (for a short flag)
|
|
9
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(Q.test(X))throw Error(`${Y}
|
|
10
|
+
- too many short flags`);if(G.test(X))throw Error(`${Y}
|
|
11
|
+
- too many long flags`);throw Error(`${Y}
|
|
12
|
+
- unrecognised flag format`)}if($===void 0&&J===void 0)throw Error(`option creation failed due to no flags found in '${D}'.`);return{shortFlag:$,longFlag:J}}lG.Option=u6;lG.DualOptions=g6});var l6=c((iG)=>{function cG(D,$){if(Math.abs(D.length-$.length)>3)return Math.max(D.length,$.length);let J=[];for(let Q=0;Q<=D.length;Q++)J[Q]=[Q];for(let Q=0;Q<=$.length;Q++)J[0][Q]=Q;for(let Q=1;Q<=$.length;Q++)for(let G=1;G<=D.length;G++){let q=1;if(D[G-1]===$[Q-1])q=0;else q=1;if(J[G][Q]=Math.min(J[G-1][Q]+1,J[G][Q-1]+1,J[G-1][Q-1]+q),G>1&&Q>1&&D[G-1]===$[Q-2]&&D[G-2]===$[Q-1])J[G][Q]=Math.min(J[G][Q],J[G-2][Q-2]+1)}return J[D.length][$.length]}function aG(D,$){if(!$||$.length===0)return"";$=Array.from(new Set($));let J=D.startsWith("--");if(J)D=D.slice(2),$=$.map((X)=>X.slice(2));let Q=[],G=3,q=0.4;if($.forEach((X)=>{if(X.length<=1)return;let Y=cG(D,X),Z=Math.max(D.length,X.length);if((Z-Y)/Z>q){if(Y<G)G=Y,Q=[X];else if(Y===G)Q.push(X)}}),Q.sort((X,Y)=>X.localeCompare(Y)),J)Q=Q.map((X)=>`--${X}`);if(Q.length>1)return`
|
|
13
|
+
(Did you mean one of ${Q.join(", ")}?)`;if(Q.length===1)return`
|
|
14
|
+
(Did you mean ${Q[0]}?)`;return""}iG.suggestSimilar=aG});var a6=c(($4)=>{var oG=z0("node:events").EventEmitter,T9=z0("node:child_process"),yD=z0("node:path"),b8=z0("node:fs"),l=z0("node:process"),{Argument:sG,humanReadableArgName:nG}=x8(),{CommanderError:M9}=$8(),{Help:tG,stripColor:eG}=w9(),{Option:p6,DualOptions:D4}=O9(),{suggestSimilar:d6}=l6();class S9 extends oG{constructor(D){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=D||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:($)=>l.stdout.write($),writeErr:($)=>l.stderr.write($),outputError:($,J)=>J($),getOutHelpWidth:()=>l.stdout.isTTY?l.stdout.columns:void 0,getErrHelpWidth:()=>l.stderr.isTTY?l.stderr.columns:void 0,getOutHasColors:()=>P9()??(l.stdout.isTTY&&l.stdout.hasColors?.()),getErrHasColors:()=>P9()??(l.stderr.isTTY&&l.stderr.hasColors?.()),stripColor:($)=>eG($)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(D){return this._outputConfiguration=D._outputConfiguration,this._helpOption=D._helpOption,this._helpCommand=D._helpCommand,this._helpConfiguration=D._helpConfiguration,this._exitCallback=D._exitCallback,this._storeOptionsAsProperties=D._storeOptionsAsProperties,this._combineFlagAndOptionalValue=D._combineFlagAndOptionalValue,this._allowExcessArguments=D._allowExcessArguments,this._enablePositionalOptions=D._enablePositionalOptions,this._showHelpAfterError=D._showHelpAfterError,this._showSuggestionAfterError=D._showSuggestionAfterError,this}_getCommandAndAncestors(){let D=[];for(let $=this;$;$=$.parent)D.push($);return D}command(D,$,J){let Q=$,G=J;if(typeof Q==="object"&&Q!==null)G=Q,Q=null;G=G||{};let[,q,X]=D.match(/([^ ]+) *(.*)/),Y=this.createCommand(q);if(Q)Y.description(Q),Y._executableHandler=!0;if(G.isDefault)this._defaultCommandName=Y._name;if(Y._hidden=!!(G.noHelp||G.hidden),Y._executableFile=G.executableFile||null,X)Y.arguments(X);if(this._registerCommand(Y),Y.parent=this,Y.copyInheritedSettings(this),Q)return this;return Y}createCommand(D){return new S9(D)}createHelp(){return Object.assign(new tG,this.configureHelp())}configureHelp(D){if(D===void 0)return this._helpConfiguration;return this._helpConfiguration=D,this}configureOutput(D){if(D===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...D},this}showHelpAfterError(D=!0){if(typeof D!=="string")D=!!D;return this._showHelpAfterError=D,this}showSuggestionAfterError(D=!0){return this._showSuggestionAfterError=!!D,this}addCommand(D,$){if(!D._name)throw Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);if($=$||{},$.isDefault)this._defaultCommandName=D._name;if($.noHelp||$.hidden)D._hidden=!0;return this._registerCommand(D),D.parent=this,D._checkForBrokenPassThrough(),this}createArgument(D,$){return new sG(D,$)}argument(D,$,J,Q){let G=this.createArgument(D,$);if(typeof J==="function")G.default(Q).argParser(J);else G.default(J);return this.addArgument(G),this}arguments(D){return D.trim().split(/ +/).forEach(($)=>{this.argument($)}),this}addArgument(D){let $=this.registeredArguments.slice(-1)[0];if($?.variadic)throw Error(`only the last argument can be variadic '${$.name()}'`);if(D.required&&D.defaultValue!==void 0&&D.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${D.name()}'`);return this.registeredArguments.push(D),this}helpCommand(D,$){if(typeof D==="boolean"){if(this._addImplicitHelpCommand=D,D&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let J=D??"help [command]",[,Q,G]=J.match(/([^ ]+) *(.*)/),q=$??"display help for command",X=this.createCommand(Q);if(X.helpOption(!1),G)X.arguments(G);if(q)X.description(q);if(this._addImplicitHelpCommand=!0,this._helpCommand=X,D||$)this._initCommandGroup(X);return this}addHelpCommand(D,$){if(typeof D!=="object")return this.helpCommand(D,$),this;return this._addImplicitHelpCommand=!0,this._helpCommand=D,this._initCommandGroup(D),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(D,$){let J=["preSubcommand","preAction","postAction"];if(!J.includes(D))throw Error(`Unexpected value for event passed to hook : '${D}'.
|
|
16
|
+
Expecting one of '${J.join("', '")}'`);if(this._lifeCycleHooks[D])this._lifeCycleHooks[D].push($);else this._lifeCycleHooks[D]=[$];return this}exitOverride(D){if(D)this._exitCallback=D;else this._exitCallback=($)=>{if($.code!=="commander.executeSubCommandAsync")throw $};return this}_exit(D,$,J){if(this._exitCallback)this._exitCallback(new M9(D,$,J));l.exit(D)}action(D){let $=(J)=>{let Q=this.registeredArguments.length,G=J.slice(0,Q);if(this._storeOptionsAsProperties)G[Q]=this;else G[Q]=this.opts();return G.push(this),D.apply(this,G)};return this._actionHandler=$,this}createOption(D,$){return new p6(D,$)}_callParseArg(D,$,J,Q){try{return D.parseArg($,J)}catch(G){if(G.code==="commander.invalidArgument"){let q=`${Q} ${G.message}`;this.error(q,{exitCode:G.exitCode,code:G.code})}throw G}}_registerOption(D){let $=D.short&&this._findOption(D.short)||D.long&&this._findOption(D.long);if($){let J=D.long&&this._findOption(D.long)?D.long:D.short;throw Error(`Cannot add option '${D.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${J}'
|
|
17
|
+
- already used by option '${$.flags}'`)}this._initOptionGroup(D),this.options.push(D)}_registerCommand(D){let $=(Q)=>{return[Q.name()].concat(Q.aliases())},J=$(D).find((Q)=>this._findCommand(Q));if(J){let Q=$(this._findCommand(J)).join("|"),G=$(D).join("|");throw Error(`cannot add command '${G}' as already have command '${Q}'`)}this._initCommandGroup(D),this.commands.push(D)}addOption(D){this._registerOption(D);let $=D.name(),J=D.attributeName();if(D.negate){let G=D.long.replace(/^--no-/,"--");if(!this._findOption(G))this.setOptionValueWithSource(J,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(J,D.defaultValue,"default");let Q=(G,q,X)=>{if(G==null&&D.presetArg!==void 0)G=D.presetArg;let Y=this.getOptionValue(J);if(G!==null&&D.parseArg)G=this._callParseArg(D,G,Y,q);else if(G!==null&&D.variadic)G=D._collectValue(G,Y);if(G==null)if(D.negate)G=!1;else if(D.isBoolean()||D.optional)G=!0;else G="";this.setOptionValueWithSource(J,G,X)};if(this.on("option:"+$,(G)=>{let q=`error: option '${D.flags}' argument '${G}' is invalid.`;Q(G,q,"cli")}),D.envVar)this.on("optionEnv:"+$,(G)=>{let q=`error: option '${D.flags}' value '${G}' from env '${D.envVar}' is invalid.`;Q(G,q,"env")});return this}_optionEx(D,$,J,Q,G){if(typeof $==="object"&&$ instanceof p6)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let q=this.createOption($,J);if(q.makeOptionMandatory(!!D.mandatory),typeof Q==="function")q.default(G).argParser(Q);else if(Q instanceof RegExp){let X=Q;Q=(Y,Z)=>{let K=X.exec(Y);return K?K[0]:Z},q.default(G).argParser(Q)}else q.default(Q);return this.addOption(q)}option(D,$,J,Q){return this._optionEx({},D,$,J,Q)}requiredOption(D,$,J,Q){return this._optionEx({mandatory:!0},D,$,J,Q)}combineFlagAndOptionalValue(D=!0){return this._combineFlagAndOptionalValue=!!D,this}allowUnknownOption(D=!0){return this._allowUnknownOption=!!D,this}allowExcessArguments(D=!0){return this._allowExcessArguments=!!D,this}enablePositionalOptions(D=!0){return this._enablePositionalOptions=!!D,this}passThroughOptions(D=!0){return this._passThroughOptions=!!D,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(D=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!D,this}getOptionValue(D){if(this._storeOptionsAsProperties)return this[D];return this._optionValues[D]}setOptionValue(D,$){return this.setOptionValueWithSource(D,$,void 0)}setOptionValueWithSource(D,$,J){if(this._storeOptionsAsProperties)this[D]=$;else this._optionValues[D]=$;return this._optionValueSources[D]=J,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let $;return this._getCommandAndAncestors().forEach((J)=>{if(J.getOptionValueSource(D)!==void 0)$=J.getOptionValueSource(D)}),$}_prepareUserArgs(D,$){if(D!==void 0&&!Array.isArray(D))throw Error("first parameter to parse must be array or undefined");if($=$||{},D===void 0&&$.from===void 0){if(l.versions?.electron)$.from="electron";let Q=l.execArgv??[];if(Q.includes("-e")||Q.includes("--eval")||Q.includes("-p")||Q.includes("--print"))$.from="eval"}if(D===void 0)D=l.argv;this.rawArgs=D.slice();let J;switch($.from){case void 0:case"node":this._scriptPath=D[1],J=D.slice(2);break;case"electron":if(l.defaultApp)this._scriptPath=D[1],J=D.slice(2);else J=D.slice(1);break;case"user":J=D.slice(0);break;case"eval":J=D.slice(1);break;default:throw Error(`unexpected parse option { from: '${$.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",J}parse(D,$){this._prepareForParse();let J=this._prepareUserArgs(D,$);return this._parseCommand([],J),this}async parseAsync(D,$){this._prepareForParse();let J=this._prepareUserArgs(D,$);return await this._parseCommand([],J),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
18
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(D,$,J){if(b8.existsSync(D))return;let Q=$?`searched for local subcommand relative to directory '${$}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",G=`'${D}' does not exist
|
|
19
|
+
- if '${J}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
+
- ${Q}`;throw Error(G)}_executeSubCommand(D,$){$=$.slice();let J=!1,Q=[".js",".ts",".tsx",".mjs",".cjs"];function G(K,j){let U=yD.resolve(K,j);if(b8.existsSync(U))return U;if(Q.includes(yD.extname(j)))return;let C=Q.find((z)=>b8.existsSync(`${U}${z}`));if(C)return`${U}${C}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let q=D._executableFile||`${this._name}-${D._name}`,X=this._executableDir||"";if(this._scriptPath){let K;try{K=b8.realpathSync(this._scriptPath)}catch{K=this._scriptPath}X=yD.resolve(yD.dirname(K),X)}if(X){let K=G(X,q);if(!K&&!D._executableFile&&this._scriptPath){let j=yD.basename(this._scriptPath,yD.extname(this._scriptPath));if(j!==this._name)K=G(X,`${j}-${D._name}`)}q=K||q}J=Q.includes(yD.extname(q));let Y;if(l.platform!=="win32")if(J)$.unshift(q),$=c6(l.execArgv).concat($),Y=T9.spawn(l.argv[0],$,{stdio:"inherit"});else Y=T9.spawn(q,$,{stdio:"inherit"});else this._checkForMissingExecutable(q,X,D._name),$.unshift(q),$=c6(l.execArgv).concat($),Y=T9.spawn(l.execPath,$,{stdio:"inherit"});if(!Y.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((j)=>{l.on(j,()=>{if(Y.killed===!1&&Y.exitCode===null)Y.kill(j)})});let Z=this._exitCallback;Y.on("close",(K)=>{if(K=K??1,!Z)l.exit(K);else Z(new M9(K,"commander.executeSubCommandAsync","(close)"))}),Y.on("error",(K)=>{if(K.code==="ENOENT")this._checkForMissingExecutable(q,X,D._name);else if(K.code==="EACCES")throw Error(`'${q}' not executable`);if(!Z)l.exit(1);else{let j=new M9(1,"commander.executeSubCommandAsync","(error)");j.nestedError=K,Z(j)}}),this.runningCommand=Y}_dispatchSubcommand(D,$,J){let Q=this._findCommand(D);if(!Q)this.help({error:!0});Q._prepareForParse();let G;return G=this._chainOrCallSubCommandHook(G,Q,"preSubcommand"),G=this._chainOrCall(G,()=>{if(Q._executableHandler)this._executeSubCommand(Q,$.concat(J));else return Q._parseCommand($,J)}),G}_dispatchHelpCommand(D){if(!D)this.help();let $=this._findCommand(D);if($&&!$._executableHandler)$.help();return this._dispatchSubcommand(D,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((D,$)=>{if(D.required&&this.args[$]==null)this.missingArgument(D.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let D=(J,Q,G)=>{let q=Q;if(Q!==null&&J.parseArg){let X=`error: command-argument value '${Q}' is invalid for argument '${J.name()}'.`;q=this._callParseArg(J,Q,G,X)}return q};this._checkNumberOfArguments();let $=[];this.registeredArguments.forEach((J,Q)=>{let G=J.defaultValue;if(J.variadic){if(Q<this.args.length){if(G=this.args.slice(Q),J.parseArg)G=G.reduce((q,X)=>{return D(J,X,q)},J.defaultValue)}else if(G===void 0)G=[]}else if(Q<this.args.length){if(G=this.args[Q],J.parseArg)G=D(J,G,J.defaultValue)}$[Q]=G}),this.processedArgs=$}_chainOrCall(D,$){if(D?.then&&typeof D.then==="function")return D.then(()=>$());return $()}_chainOrCallHooks(D,$){let J=D,Q=[];if(this._getCommandAndAncestors().reverse().filter((G)=>G._lifeCycleHooks[$]!==void 0).forEach((G)=>{G._lifeCycleHooks[$].forEach((q)=>{Q.push({hookedCommand:G,callback:q})})}),$==="postAction")Q.reverse();return Q.forEach((G)=>{J=this._chainOrCall(J,()=>{return G.callback(G.hookedCommand,this)})}),J}_chainOrCallSubCommandHook(D,$,J){let Q=D;if(this._lifeCycleHooks[J]!==void 0)this._lifeCycleHooks[J].forEach((G)=>{Q=this._chainOrCall(Q,()=>{return G(this,$)})});return Q}_parseCommand(D,$){let J=this.parseOptions($);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(J.operands),$=J.unknown,this.args=D.concat($),D&&this._findCommand(D[0]))return this._dispatchSubcommand(D[0],D.slice(1),$);if(this._getHelpCommand()&&D[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(D[1]);if(this._defaultCommandName)return this._outputHelpIfRequested($),this._dispatchSubcommand(this._defaultCommandName,D,$);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(J.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Q=()=>{if(J.unknown.length>0)this.unknownOption(J.unknown[0])},G=`command:${this.name()}`;if(this._actionHandler){Q(),this._processArguments();let q;if(q=this._chainOrCallHooks(q,"preAction"),q=this._chainOrCall(q,()=>this._actionHandler(this.processedArgs)),this.parent)q=this._chainOrCall(q,()=>{this.parent.emit(G,D,$)});return q=this._chainOrCallHooks(q,"postAction"),q}if(this.parent?.listenerCount(G))Q(),this._processArguments(),this.parent.emit(G,D,$);else if(D.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",D,$);if(this.listenerCount("command:*"))this.emit("command:*",D,$);else if(this.commands.length)this.unknownCommand();else Q(),this._processArguments()}else if(this.commands.length)Q(),this.help({error:!0});else Q(),this._processArguments()}_findCommand(D){if(!D)return;return this.commands.find(($)=>$._name===D||$._aliases.includes(D))}_findOption(D){return this.options.find(($)=>$.is(D))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((D)=>{D.options.forEach(($)=>{if($.mandatory&&D.getOptionValue($.attributeName())===void 0)D.missingMandatoryOptionValue($)})})}_checkForConflictingLocalOptions(){let D=this.options.filter((J)=>{let Q=J.attributeName();if(this.getOptionValue(Q)===void 0)return!1;return this.getOptionValueSource(Q)!=="default"});D.filter((J)=>J.conflictsWith.length>0).forEach((J)=>{let Q=D.find((G)=>J.conflictsWith.includes(G.attributeName()));if(Q)this._conflictingOption(J,Q)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let $=[],J=[],Q=$;function G(K){return K.length>1&&K[0]==="-"}let q=(K)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(K))return!1;return!this._getCommandAndAncestors().some((j)=>j.options.map((U)=>U.short).some((U)=>/^-\d$/.test(U)))},X=null,Y=null,Z=0;while(Z<D.length||Y){let K=Y??D[Z++];if(Y=null,K==="--"){if(Q===J)Q.push(K);Q.push(...D.slice(Z));break}if(X&&(!G(K)||q(K))){this.emit(`option:${X.name()}`,K);continue}if(X=null,G(K)){let j=this._findOption(K);if(j){if(j.required){let U=D[Z++];if(U===void 0)this.optionMissingArgument(j);this.emit(`option:${j.name()}`,U)}else if(j.optional){let U=null;if(Z<D.length&&(!G(D[Z])||q(D[Z])))U=D[Z++];this.emit(`option:${j.name()}`,U)}else this.emit(`option:${j.name()}`);X=j.variadic?j:null;continue}}if(K.length>2&&K[0]==="-"&&K[1]!=="-"){let j=this._findOption(`-${K[1]}`);if(j){if(j.required||j.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${j.name()}`,K.slice(2));else this.emit(`option:${j.name()}`),Y=`-${K.slice(2)}`;continue}}if(/^--[^=]+=/.test(K)){let j=K.indexOf("="),U=this._findOption(K.slice(0,j));if(U&&(U.required||U.optional)){this.emit(`option:${U.name()}`,K.slice(j+1));continue}}if(Q===$&&G(K)&&!(this.commands.length===0&&q(K)))Q=J;if((this._enablePositionalOptions||this._passThroughOptions)&&$.length===0&&J.length===0){if(this._findCommand(K)){$.push(K),J.push(...D.slice(Z));break}else if(this._getHelpCommand()&&K===this._getHelpCommand().name()){$.push(K,...D.slice(Z));break}else if(this._defaultCommandName){J.push(K,...D.slice(Z));break}}if(this._passThroughOptions){Q.push(K,...D.slice(Z));break}Q.push(K)}return{operands:$,unknown:J}}opts(){if(this._storeOptionsAsProperties){let D={},$=this.options.length;for(let J=0;J<$;J++){let Q=this.options[J].attributeName();D[Q]=Q===this._versionOptionName?this._version:this[Q]}return D}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((D,$)=>Object.assign(D,$.opts()),{})}error(D,$){if(this._outputConfiguration.outputError(`${D}
|
|
22
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
|
+
`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
|
|
24
|
+
`),this.outputHelp({error:!0});let J=$||{},Q=J.exitCode||1,G=J.code||"commander.error";this._exit(Q,G,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in l.env){let $=D.attributeName();if(this.getOptionValue($)===void 0||["default","config","env"].includes(this.getOptionValueSource($)))if(D.required||D.optional)this.emit(`optionEnv:${D.name()}`,l.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new D4(this.options),$=(J)=>{return this.getOptionValue(J)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(J))};this.options.filter((J)=>J.implied!==void 0&&$(J.attributeName())&&D.valueFromOption(this.getOptionValue(J.attributeName()),J)).forEach((J)=>{Object.keys(J.implied).filter((Q)=>!$(Q)).forEach((Q)=>{this.setOptionValueWithSource(Q,J.implied[Q],"implied")})})}missingArgument(D){let $=`error: missing required argument '${D}'`;this.error($,{code:"commander.missingArgument"})}optionMissingArgument(D){let $=`error: option '${D.flags}' argument missing`;this.error($,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(D){let $=`error: required option '${D.flags}' not specified`;this.error($,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(D,$){let J=(q)=>{let X=q.attributeName(),Y=this.getOptionValue(X),Z=this.options.find((j)=>j.negate&&X===j.attributeName()),K=this.options.find((j)=>!j.negate&&X===j.attributeName());if(Z&&(Z.presetArg===void 0&&Y===!1||Z.presetArg!==void 0&&Y===Z.presetArg))return Z;return K||q},Q=(q)=>{let X=J(q),Y=X.attributeName();if(this.getOptionValueSource(Y)==="env")return`environment variable '${X.envVar}'`;return`option '${X.flags}'`},G=`error: ${Q(D)} cannot be used with ${Q($)}`;this.error(G,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let $="";if(D.startsWith("--")&&this._showSuggestionAfterError){let Q=[],G=this;do{let q=G.createHelp().visibleOptions(G).filter((X)=>X.long).map((X)=>X.long);Q=Q.concat(q),G=G.parent}while(G&&!G._enablePositionalOptions);$=d6(D,Q)}let J=`error: unknown option '${D}'${$}`;this.error(J,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let $=this.registeredArguments.length,J=$===1?"":"s",G=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${$} argument${J} but got ${D.length}.`;this.error(G,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],$="";if(this._showSuggestionAfterError){let Q=[];this.createHelp().visibleCommands(this).forEach((G)=>{if(Q.push(G.name()),G.alias())Q.push(G.alias())}),$=d6(D,Q)}let J=`error: unknown command '${D}'${$}`;this.error(J,{code:"commander.unknownCommand"})}version(D,$,J){if(D===void 0)return this._version;this._version=D,$=$||"-V, --version",J=J||"output the version number";let Q=this.createOption($,J);return this._versionOptionName=Q.attributeName(),this._registerOption(Q),this.on("option:"+Q.name(),()=>{this._outputConfiguration.writeOut(`${D}
|
|
25
|
+
`),this._exit(0,"commander.version",D)}),this}description(D,$){if(D===void 0&&$===void 0)return this._description;if(this._description=D,$)this._argsDescription=$;return this}summary(D){if(D===void 0)return this._summary;return this._summary=D,this}alias(D){if(D===void 0)return this._aliases[0];let $=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)$=this.commands[this.commands.length-1];if(D===$._name)throw Error("Command alias can't be the same as its name");let J=this.parent?._findCommand(D);if(J){let Q=[J.name()].concat(J.aliases()).join("|");throw Error(`cannot add alias '${D}' to command '${this.name()}' as already have command '${Q}'`)}return $._aliases.push(D),this}aliases(D){if(D===void 0)return this._aliases;return D.forEach(($)=>this.alias($)),this}usage(D){if(D===void 0){if(this._usage)return this._usage;let $=this.registeredArguments.map((J)=>{return nG(J)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?$:[]).join(" ")}return this._usage=D,this}name(D){if(D===void 0)return this._name;return this._name=D,this}helpGroup(D){if(D===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=D,this}commandsGroup(D){if(D===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=D,this}optionsGroup(D){if(D===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=D,this}_initOptionGroup(D){if(this._defaultOptionGroup&&!D.helpGroupHeading)D.helpGroup(this._defaultOptionGroup)}_initCommandGroup(D){if(this._defaultCommandGroup&&!D.helpGroup())D.helpGroup(this._defaultCommandGroup)}nameFromFilename(D){return this._name=yD.basename(D,yD.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let $=this.createHelp(),J=this._getOutputContext(D);$.prepareContext({error:J.error,helpWidth:J.helpWidth,outputHasColors:J.hasColors});let Q=$.formatHelp(this,$);if(J.hasColors)return Q;return this._outputConfiguration.stripColor(Q)}_getOutputContext(D){D=D||{};let $=!!D.error,J,Q,G;if($)J=(X)=>this._outputConfiguration.writeErr(X),Q=this._outputConfiguration.getErrHasColors(),G=this._outputConfiguration.getErrHelpWidth();else J=(X)=>this._outputConfiguration.writeOut(X),Q=this._outputConfiguration.getOutHasColors(),G=this._outputConfiguration.getOutHelpWidth();return{error:$,write:(X)=>{if(!Q)X=this._outputConfiguration.stripColor(X);return J(X)},hasColors:Q,helpWidth:G}}outputHelp(D){let $;if(typeof D==="function")$=D,D=void 0;let J=this._getOutputContext(D),Q={error:J.error,write:J.write,command:this};this._getCommandAndAncestors().reverse().forEach((q)=>q.emit("beforeAllHelp",Q)),this.emit("beforeHelp",Q);let G=this.helpInformation({error:J.error});if($){if(G=$(G),typeof G!=="string"&&!Buffer.isBuffer(G))throw Error("outputHelp callback must return a string or a Buffer")}if(J.write(G),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",Q),this._getCommandAndAncestors().forEach((q)=>q.emit("afterAllHelp",Q))}helpOption(D,$){if(typeof D==="boolean"){if(D){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(D??"-h, --help",$??"display help for command"),D||$)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(D){return this._helpOption=D,this._initOptionGroup(D),this}help(D){this.outputHelp(D);let $=Number(l.exitCode??0);if($===0&&D&&typeof D!=="function"&&D.error)$=1;this._exit($,"commander.help","(outputHelp)")}addHelpText(D,$){let J=["beforeAll","before","after","afterAll"];if(!J.includes(D))throw Error(`Unexpected value for position to addHelpText.
|
|
26
|
+
Expecting one of '${J.join("', '")}'`);let Q=`${D}Help`;return this.on(Q,(G)=>{let q;if(typeof $==="function")q=$({error:G.error,command:G.command});else q=$;if(q)G.write(`${q}
|
|
27
|
+
`)}),this}_outputHelpIfRequested(D){let $=this._getHelpOption();if($&&D.find((Q)=>$.is(Q)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function c6(D){return D.map(($)=>{if(!$.startsWith("--inspect"))return $;let J,Q="127.0.0.1",G="9229",q;if((q=$.match(/^(--inspect(-brk)?)$/))!==null)J=q[1];else if((q=$.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(J=q[1],/^\d+$/.test(q[3]))G=q[3];else Q=q[3];else if((q=$.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)J=q[1],Q=q[3],G=q[4];if(J&&G!=="0")return`${J}=${Q}:${parseInt(G)+1}`;return $})}function P9(){if(l.env.NO_COLOR||l.env.FORCE_COLOR==="0"||l.env.FORCE_COLOR==="false")return!1;if(l.env.FORCE_COLOR||l.env.CLICOLOR_FORCE!==void 0)return!0;return}$4.Command=S9;$4.useColor=P9});var s6=c((X4)=>{var{Argument:i6}=x8(),{Command:_9}=a6(),{CommanderError:G4,InvalidArgumentError:r6}=$8(),{Help:q4}=w9(),{Option:o6}=O9();X4.program=new _9;X4.createCommand=(D)=>new _9(D);X4.createOption=(D,$)=>new o6(D,$);X4.createArgument=(D,$)=>new i6(D,$);X4.Command=_9;X4.Option=o6;X4.Argument=i6;X4.Help=q4;X4.CommanderError=G4;X4.InvalidArgumentError=r6;X4.InvalidOptionArgumentError=r6});var f8=c((vj,E1)=>{var v9=[],W1=0,jD=(D,$)=>{if(W1>=$)v9.push(D)};jD.WARN=1;jD.INFO=2;jD.DEBUG=3;jD.reset=()=>{v9=[]};jD.setDebugLevel=(D)=>{W1=D};jD.warn=(D)=>jD(D,jD.WARN);jD.info=(D)=>jD(D,jD.INFO);jD.debug=(D)=>jD(D,jD.DEBUG);jD.debugMessages=()=>v9;E1.exports=jD});var C1=c((yj,z1)=>{z1.exports=({onlyFirst:D=!1}={})=>{let $=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp($,D?void 0:"g")}});var N1=c((fj,H1)=>{var v4=C1();H1.exports=(D)=>typeof D==="string"?D.replace(v4(),""):D});var F1=c((mj,y9)=>{var V1=(D)=>{if(Number.isNaN(D))return!1;if(D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141))return!0;return!1};y9.exports=V1;y9.exports.default=V1});var B1=c((uj,L1)=>{L1.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var I1=c((gj,f9)=>{var y4=N1(),f4=F1(),m4=B1(),R1=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=y4(D),D.length===0)return 0;D=D.replace(m4()," ");let $=0;for(let J=0;J<D.length;J++){let Q=D.codePointAt(J);if(Q<=31||Q>=127&&Q<=159)continue;if(Q>=768&&Q<=879)continue;if(Q>65535)J++;$+=f4(Q)?2:1}return $};f9.exports=R1;f9.exports.default=R1});var m9=c((lj,M1)=>{var w1=I1();function m8(D){return D?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function kD(D){let $=m8();return(""+D).replace($,"").split(`
|
|
28
|
+
`).reduce(function(G,q){return w1(q)>G?w1(q):G},0)}function G8(D,$){return Array($+1).join(D)}function u4(D,$,J,Q){let G=kD(D);if($+1>=G){let q=$-G;switch(Q){case"right":{D=G8(J,q)+D;break}case"center":{let X=Math.ceil(q/2),Y=q-X;D=G8(J,Y)+D+G8(J,X);break}default:{D=D+G8(J,q);break}}}return D}var k0={};function q8(D,$,J){$="\x1B["+$+"m",J="\x1B["+J+"m",k0[$]={set:D,to:!0},k0[J]={set:D,to:!1},k0[D]={on:$,off:J}}q8("bold",1,22);q8("italics",3,23);q8("underline",4,24);q8("inverse",7,27);q8("strikethrough",9,29);function O1(D,$){let J=$[1]?parseInt($[1].split(";")[0]):0;if(J>=30&&J<=39||J>=90&&J<=97){D.lastForegroundAdded=$[0];return}if(J>=40&&J<=49||J>=100&&J<=107){D.lastBackgroundAdded=$[0];return}if(J===0){for(let G in D)if(Object.prototype.hasOwnProperty.call(D,G))delete D[G];return}let Q=k0[$[0]];if(Q)D[Q.set]=Q.to}function g4(D){let $=m8(!0),J=$.exec(D),Q={};while(J!==null)O1(Q,J),J=$.exec(D);return Q}function T1(D,$){let{lastBackgroundAdded:J,lastForegroundAdded:Q}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(G){if(D[G])$+=k0[G].off}),J&&J!="\x1B[49m")$+="\x1B[49m";if(Q&&Q!="\x1B[39m")$+="\x1B[39m";return $}function l4(D,$){let{lastBackgroundAdded:J,lastForegroundAdded:Q}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(G){if(D[G])$=k0[G].on+$}),J&&J!="\x1B[49m")$=J+$;if(Q&&Q!="\x1B[39m")$=Q+$;return $}function p4(D,$){if(D.length===kD(D))return D.substr(0,$);while(kD(D)>$)D=D.slice(0,-1);return D}function d4(D,$){let J=m8(!0),Q=D.split(m8()),G=0,q=0,X="",Y,Z={};while(q<$){Y=J.exec(D);let K=Q[G];if(G++,q+kD(K)>$)K=p4(K,$-q);if(X+=K,q+=kD(K),q<$){if(!Y)break;X+=Y[0],O1(Z,Y)}}return T1(Z,X)}function c4(D,$,J){if(J=J||"…",kD(D)<=$)return D;$-=kD(J);let G=d4(D,$);G+=J;let q="\x1B]8;;\x07";if(D.includes(q)&&!G.includes(q))G+=q;return G}function a4(){return{chars:{top:"─","top-mid":"┬","top-left":"┌","top-right":"┐",bottom:"─","bottom-mid":"┴","bottom-left":"└","bottom-right":"┘",left:"│","left-mid":"├",mid:"─","mid-mid":"┼",right:"│","right-mid":"┤",middle:"│"},truncate:"…",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function i4(D,$){D=D||{},$=$||a4();let J=Object.assign({},$,D);return J.chars=Object.assign({},$.chars,D.chars),J.style=Object.assign({},$.style,D.style),J}function r4(D,$){let J=[],Q=$.split(/(\s+)/g),G=[],q=0,X;for(let Y=0;Y<Q.length;Y+=2){let Z=Q[Y],K=q+kD(Z);if(q>0&&X)K+=X.length;if(K>D){if(q!==0)J.push(G.join(""));G=[Z],q=kD(Z)}else G.push(X||"",Z),q=K;X=Q[Y+1]}if(q)J.push(G.join(""));return J}function o4(D,$){let J=[],Q="";function G(X,Y){if(Q.length&&Y)Q+=Y;Q+=X;while(Q.length>D)J.push(Q.slice(0,D)),Q=Q.slice(D)}let q=$.split(/(\s+)/g);for(let X=0;X<q.length;X+=2)G(q[X],X&&q[X-1]);if(Q.length)J.push(Q);return J}function s4(D,$,J=!0){let Q=[];$=$.split(`
|
|
29
|
+
`);let G=J?r4:o4;for(let q=0;q<$.length;q++)Q.push.apply(Q,G(D,$[q]));return Q}function n4(D){let $={},J=[];for(let Q=0;Q<D.length;Q++){let G=l4($,D[Q]);$=g4(G);let q=Object.assign({},$);J.push(T1(q,G))}return J}function t4(D,$){return["\x1B]","8",";",";",D||$,"\x07",$,"\x1B]","8",";",";","\x07"].join("")}M1.exports={strlen:kD,repeat:G8,pad:u4,truncate:c4,mergeOptions:i4,wordWrap:s4,colorizeLines:n4,hyperlink:t4}});var k1=c((pj,_1)=>{var S1={};_1.exports=S1;var P1={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(P1).forEach(function(D){var $=P1[D],J=S1[D]=[];J.open="\x1B["+$[0]+"m",J.close="\x1B["+$[1]+"m"})});var x1=c((dj,A1)=>{A1.exports=function(D,$){$=$||process.argv;var J=$.indexOf("--"),Q=/^-{1,2}/.test(D)?"":"--",G=$.indexOf(Q+D);return G!==-1&&(J===-1?!0:G<J)}});var h1=c((cj,b1)=>{var e4=z0("os"),SD=x1(),zD=process.env,A0=void 0;if(SD("no-color")||SD("no-colors")||SD("color=false"))A0=!1;else if(SD("color")||SD("colors")||SD("color=true")||SD("color=always"))A0=!0;if("FORCE_COLOR"in zD)A0=zD.FORCE_COLOR.length===0||parseInt(zD.FORCE_COLOR,10)!==0;function Dq(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function $q(D){if(A0===!1)return 0;if(SD("color=16m")||SD("color=full")||SD("color=truecolor"))return 3;if(SD("color=256"))return 2;if(D&&!D.isTTY&&A0!==!0)return 0;var $=A0?1:0;if(process.platform==="win32"){var J=e4.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in zD){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(G){return G in zD})||zD.CI_NAME==="codeship")return 1;return $}if("TEAMCITY_VERSION"in zD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(zD.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in zD){var Q=parseInt((zD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(zD.TERM_PROGRAM){case"iTerm.app":return Q>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(zD.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(zD.TERM))return 1;if("COLORTERM"in zD)return 1;if(zD.TERM==="dumb")return $;return $}function u9(D){var $=$q(D);return Dq($)}b1.exports={supportsColor:u9,stdout:u9(process.stdout),stderr:u9(process.stderr)}});var y1=c((aj,v1)=>{v1.exports=function($,J){var Q="";$=$||"Run the trap, drop the bass",$=$.split("");var G={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return $.forEach(function(q){q=q.toLowerCase();var X=G[q]||[" "],Y=Math.floor(Math.random()*X.length);if(typeof G[q]<"u")Q+=G[q][Y];else Q+=q}),Q}});var m1=c((ij,f1)=>{f1.exports=function($,J){$=$||" he is here ";var Q={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},G=[].concat(Q.up,Q.down,Q.mid);function q(Z){var K=Math.floor(Math.random()*Z);return K}function X(Z){var K=!1;return G.filter(function(j){K=j===Z}),K}function Y(Z,K){var j="",U,C;K=K||{},K.up=typeof K.up<"u"?K.up:!0,K.mid=typeof K.mid<"u"?K.mid:!0,K.down=typeof K.down<"u"?K.down:!0,K.size=typeof K.size<"u"?K.size:"maxi",Z=Z.split("");for(C in Z){if(X(C))continue;switch(j=j+Z[C],U={up:0,down:0,mid:0},K.size){case"mini":U.up=q(8),U.mid=q(2),U.down=q(8);break;case"maxi":U.up=q(16)+3,U.mid=q(4)+1,U.down=q(64)+3;break;default:U.up=q(8)+1,U.mid=q(6)/2,U.down=q(8)+1;break}var z=["up","mid","down"];for(var E in z){var F=z[E];for(var W=0;W<=U[F];W++)if(K[F])j=j+Q[F][q(Q[F].length)]}}return j}return Y($,J)}});var g1=c((rj,u1)=>{u1.exports=function(D){return function($,J,Q){if($===" ")return $;switch(J%3){case 0:return D.red($);case 1:return D.white($);case 2:return D.blue($)}}}});var p1=c((oj,l1)=>{l1.exports=function(D){return function($,J,Q){return J%2===0?$:D.inverse($)}}});var c1=c((sj,d1)=>{d1.exports=function(D){var $=["red","yellow","green","blue","magenta"];return function(J,Q,G){if(J===" ")return J;else return D[$[Q++%$.length]](J)}}});var i1=c((nj,a1)=>{a1.exports=function(D){var $=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(J,Q,G){return J===" "?J:D[$[Math.round(Math.random()*($.length-2))]](J)}}});var t1=c((ej,n1)=>{var f={};n1.exports=f;f.themes={};var Jq=z0("util"),C0=f.styles=k1(),r1=Object.defineProperties,Qq=new RegExp(/[\r\n]+/g);f.supportsColor=h1().supportsColor;if(typeof f.enabled>"u")f.enabled=f.supportsColor()!==!1;f.enable=function(){f.enabled=!0};f.disable=function(){f.enabled=!1};f.stripColors=f.strip=function(D){return(""+D).replace(/\x1B\[\d+m/g,"")};var tj=f.stylize=function($,J){if(!f.enabled)return $+"";var Q=C0[J];if(!Q&&J in f)return f[J]($);return Q.open+$+Q.close},Gq=/[|\\{}()[\]^$+*?.]/g,qq=function(D){if(typeof D!=="string")throw TypeError("Expected a string");return D.replace(Gq,"\\$&")};function o1(D){var $=function J(){return Yq.apply(J,arguments)};return $._styles=D,$.__proto__=Xq,$}var s1=function(){var D={};return C0.grey=C0.gray,Object.keys(C0).forEach(function($){C0[$].closeRe=new RegExp(qq(C0[$].close),"g"),D[$]={get:function(){return o1(this._styles.concat($))}}}),D}(),Xq=r1(function(){},s1);function Yq(){var D=Array.prototype.slice.call(arguments),$=D.map(function(X){if(X!=null&&X.constructor===String)return X;else return Jq.inspect(X)}).join(" ");if(!f.enabled||!$)return $;var J=$.indexOf(`
|
|
30
|
+
`)!=-1,Q=this._styles,G=Q.length;while(G--){var q=C0[Q[G]];if($=q.open+$.replace(q.closeRe,q.open)+q.close,J)$=$.replace(Qq,function(X){return q.close+X+q.open})}return $}f.setTheme=function(D){if(typeof D==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var $ in D)(function(J){f[J]=function(Q){if(typeof D[J]==="object"){var G=Q;for(var q in D[J])G=f[D[J][q]](G);return G}return f[D[J]](Q)}})($)};function Zq(){var D={};return Object.keys(s1).forEach(function($){D[$]={get:function(){return o1([$])}}}),D}var Kq=function($,J){var Q=J.split("");return Q=Q.map($),Q.join("")};f.trap=y1();f.zalgo=m1();f.maps={};f.maps.america=g1()(f);f.maps.zebra=p1()(f);f.maps.rainbow=c1()(f);f.maps.random=i1()(f);for(g9 in f.maps)(function(D){f[D]=function($){return Kq(f.maps[D],$)}})(g9);var g9;r1(f,Zq())});var D$=c((DU,e1)=>{var jq=t1();e1.exports=jq});var G$=c(($U,l8)=>{var{info:Uq,debug:Q$}=f8(),RD=m9();class X8{constructor(D){this.setOptions(D),this.x=null,this.y=null}setOptions(D){if(["boolean","number","bigint","string"].indexOf(typeof D)!==-1)D={content:""+D};D=D||{},this.options=D;let $=D.content;if(["boolean","number","bigint","string"].indexOf(typeof $)!==-1)this.content=String($);else if(!$)this.content=this.options.href||"";else throw Error("Content needs to be a primitive, got: "+typeof $);if(this.colSpan=D.colSpan||1,this.rowSpan=D.rowSpan||1,this.options.href)Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(D,$){this.cells=$;let J=this.options.chars||{},Q=D.chars,G=this.chars={};Eq.forEach(function(Y){l9(J,Q,Y,G)}),this.truncate=this.options.truncate||D.truncate;let q=this.options.style=this.options.style||{},X=D.style;l9(q,X,"padding-left",this),l9(q,X,"padding-right",this),this.head=q.head||X.head,this.border=q.border||X.border,this.fixedWidth=D.colWidths[this.x],this.lines=this.computeLines(D),this.desiredWidth=RD.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(D){let $=D.wordWrap||D.textWrap,{wordWrap:J=$}=this.options;if(this.fixedWidth&&J){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let q=1;while(q<this.colSpan)this.fixedWidth+=D.colWidths[this.x+q],q++}let{wrapOnWordBoundary:Q=!0}=D,{wrapOnWordBoundary:G=Q}=this.options;return this.wrapLines(RD.wordWrap(this.fixedWidth,this.content,G))}return this.wrapLines(this.content.split(`
|
|
31
|
+
`))}wrapLines(D){let $=RD.colorizeLines(D);if(this.href)return $.map((J)=>RD.hyperlink(this.href,J));return $}init(D){let $=this.x,J=this.y;this.widths=D.colWidths.slice($,$+this.colSpan),this.heights=D.rowHeights.slice(J,J+this.rowSpan),this.width=this.widths.reduce(J$,-1),this.height=this.heights.reduce(J$,-1),this.hAlign=this.options.hAlign||D.colAligns[$],this.vAlign=this.options.vAlign||D.rowAligns[J],this.drawRight=$+this.colSpan==D.colWidths.length}draw(D,$){if(D=="top")return this.drawTop(this.drawRight);if(D=="bottom")return this.drawBottom(this.drawRight);let J=RD.truncate(this.content,10,this.truncate);if(!D)Uq(`${this.y}-${this.x}: ${this.rowSpan-D}x${this.colSpan} Cell ${J}`);let Q=Math.max(this.height-this.lines.length,0),G;switch(this.vAlign){case"center":G=Math.ceil(Q/2);break;case"bottom":G=Q;break;default:G=0}if(D<G||D>=G+this.lines.length)return this.drawEmpty(this.drawRight,$);let q=this.lines.length>this.height&&D+1>=this.height;return this.drawLine(D-G,this.drawRight,q,$)}drawTop(D){let $=[];if(this.cells)this.widths.forEach(function(J,Q){$.push(this._topLeftChar(Q)),$.push(RD.repeat(this.chars[this.y==0?"top":"mid"],J))},this);else $.push(this._topLeftChar(0)),$.push(RD.repeat(this.chars[this.y==0?"top":"mid"],this.width));if(D)$.push(this.chars[this.y==0?"topRight":"rightMid"]);return this.wrapWithStyleColors("border",$.join(""))}_topLeftChar(D){let $=this.x+D,J;if(this.y==0)J=$==0?"topLeft":D==0?"topMid":"top";else if($==0)J="leftMid";else if(J=D==0?"midMid":"bottomMid",this.cells){if(this.cells[this.y-1][$]instanceof X8.ColSpanCell)J=D==0?"topMid":"mid";if(D==0){let G=1;while(this.cells[this.y][$-G]instanceof X8.ColSpanCell)G++;if(this.cells[this.y][$-G]instanceof X8.RowSpanCell)J="leftMid"}}return this.chars[J]}wrapWithStyleColors(D,$){if(this[D]&&this[D].length)try{let J=D$();for(let Q=this[D].length-1;Q>=0;Q--)J=J[this[D][Q]];return J($)}catch(J){return $}else return $}drawLine(D,$,J,Q){let G=this.chars[this.x==0?"left":"middle"];if(this.x&&Q&&this.cells){let U=this.cells[this.y+Q][this.x-1];while(U instanceof u8)U=this.cells[U.y][U.x-1];if(!(U instanceof g8))G=this.chars.rightMid}let q=RD.repeat(" ",this.paddingLeft),X=$?this.chars.right:"",Y=RD.repeat(" ",this.paddingRight),Z=this.lines[D],K=this.width-(this.paddingLeft+this.paddingRight);if(J)Z+=this.truncate||"…";let j=RD.truncate(Z,K,this.truncate);return j=RD.pad(j,K," ",this.hAlign),j=q+j+Y,this.stylizeLine(G,j,X)}stylizeLine(D,$,J){if(D=this.wrapWithStyleColors("border",D),J=this.wrapWithStyleColors("border",J),this.y===0)$=this.wrapWithStyleColors("head",$);return D+$+J}drawBottom(D){let $=this.chars[this.x==0?"bottomLeft":"bottomMid"],J=RD.repeat(this.chars.bottom,this.width),Q=D?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",$+J+Q)}drawEmpty(D,$){let J=this.chars[this.x==0?"left":"middle"];if(this.x&&$&&this.cells){let q=this.cells[this.y+$][this.x-1];while(q instanceof u8)q=this.cells[q.y][q.x-1];if(!(q instanceof g8))J=this.chars.rightMid}let Q=D?this.chars.right:"",G=RD.repeat(" ",this.width);return this.stylizeLine(J,G,Q)}}class u8{constructor(){}draw(D){if(typeof D==="number")Q$(`${this.y}-${this.x}: 1x1 ColSpanCell`);return""}init(){}mergeTableOptions(){}}class g8{constructor(D){this.originalCell=D}init(D){let $=this.y,J=this.originalCell.y;this.cellOffset=$-J,this.offset=Wq(D.rowHeights,J,this.cellOffset)}draw(D){if(D=="top")return this.originalCell.draw(this.offset,this.cellOffset);if(D=="bottom")return this.originalCell.draw("bottom");return Q$(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+D)}mergeTableOptions(){}}function $$(...D){return D.filter(($)=>$!==void 0&&$!==null).shift()}function l9(D,$,J,Q){let G=J.split("-");if(G.length>1)G[1]=G[1].charAt(0).toUpperCase()+G[1].substr(1),G=G.join(""),Q[G]=$$(D[G],D[J],$[G],$[J]);else Q[J]=$$(D[J],$[J])}function Wq(D,$,J){let Q=D[$];for(let G=1;G<J;G++)Q+=1+D[$+G];return Q}function J$(D,$){return D+$+1}var Eq=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];l8.exports=X8;l8.exports.ColSpanCell=u8;l8.exports.RowSpanCell=g8});var Y$=c((JU,X$)=>{var{warn:zq,debug:Cq}=f8(),p9=G$(),{ColSpanCell:Hq,RowSpanCell:Nq}=p9;(function(){function D(z,E){if(z[E]>0)return D(z,E+1);return E}function $(z){let E={};z.forEach(function(F,W){let H=0;F.forEach(function(N){N.y=W,N.x=W?D(E,H):H;let I=N.rowSpan||1,O=N.colSpan||1;if(I>1)for(let y=0;y<O;y++)E[N.x+y]=I;H=N.x+O}),Object.keys(E).forEach((N)=>{if(E[N]--,E[N]<1)delete E[N]})})}function J(z){let E=0;return z.forEach(function(F){F.forEach(function(W){E=Math.max(E,W.x+(W.colSpan||1))})}),E}function Q(z){return z.length}function G(z,E){let F=z.y,W=z.y-1+(z.rowSpan||1),H=E.y,N=E.y-1+(E.rowSpan||1),I=!(F>N||H>W),O=z.x,y=z.x-1+(z.colSpan||1),p=E.x,m=E.x-1+(E.colSpan||1),T=!(O>m||p>y);return I&&T}function q(z,E,F){let W=Math.min(z.length-1,F),H={x:E,y:F};for(let N=0;N<=W;N++){let I=z[N];for(let O=0;O<I.length;O++)if(G(H,I[O]))return!0}return!1}function X(z,E,F,W){for(let H=F;H<W;H++)if(q(z,H,E))return!1;return!0}function Y(z){z.forEach(function(E,F){E.forEach(function(W){for(let H=1;H<W.rowSpan;H++){let N=new Nq(W);N.x=W.x,N.y=W.y+H,N.colSpan=W.colSpan,K(N,z[F+H])}})})}function Z(z){for(let E=z.length-1;E>=0;E--){let F=z[E];for(let W=0;W<F.length;W++){let H=F[W];for(let N=1;N<H.colSpan;N++){let I=new Hq;I.x=H.x+N,I.y=H.y,F.splice(W+1,0,I)}}}}function K(z,E){let F=0;while(F<E.length&&E[F].x<z.x)F++;E.splice(F,0,z)}function j(z){let E=Q(z),F=J(z);Cq(`Max rows: ${E}; Max cols: ${F}`);for(let W=0;W<E;W++)for(let H=0;H<F;H++)if(!q(z,H,W)){let N={x:H,y:W,colSpan:1,rowSpan:1};H++;while(H<F&&!q(z,H,W))N.colSpan++,H++;let I=W+1;while(I<E&&X(z,I,N.x,N.x+N.colSpan))N.rowSpan++,I++;let O=new p9(N);O.x=N.x,O.y=N.y,zq(`Missing cell at ${O.y}-${O.x}.`),K(O,z[W])}}function U(z){return z.map(function(E){if(!Array.isArray(E)){let F=Object.keys(E)[0];if(E=E[F],Array.isArray(E))E=E.slice(),E.unshift(F);else E=[F,E]}return E.map(function(F){return new p9(F)})})}function C(z){let E=U(z);return $(E),j(E),Y(E),Z(E),E}X$.exports={makeTableLayout:C,layoutTable:$,addRowSpanCells:Y,maxWidth:J,fillInTable:j,computeWidths:q$("colSpan","desiredWidth","x",1),computeHeights:q$("rowSpan","desiredHeight","y",1)}})();function q$(D,$,J,Q){return function(G,q){let X=[],Y=[],Z={};q.forEach(function(K){K.forEach(function(j){if((j[D]||1)>1)Y.push(j);else X[j[J]]=Math.max(X[j[J]]||0,j[$]||0,Q)})}),G.forEach(function(K,j){if(typeof K==="number")X[j]=K});for(let K=Y.length-1;K>=0;K--){let j=Y[K],U=j[D],C=j[J],z=X[C],E=typeof G[C]==="number"?0:1;if(typeof z==="number"){for(let F=1;F<U;F++)if(z+=1+X[C+F],typeof G[C+F]!=="number")E++}else if(z=$==="desiredWidth"?j.desiredWidth-1:1,!Z[C]||Z[C]<z)Z[C]=z;if(j[$]>z){let F=0;while(E>0&&j[$]>z){if(typeof G[C+F]!=="number"){let W=Math.round((j[$]-z)/E);z+=W,X[C+F]+=W,E--}F++}}}Object.assign(G,X,Z);for(let K=0;K<G.length;K++)G[K]=Math.max(Q,G[K]||0)}}});var K$=c((QU,Z$)=>{var fD=f8(),Vq=m9(),d9=Y$();class a9 extends Array{constructor(D){super();let $=Vq.mergeOptions(D);if(Object.defineProperty(this,"options",{value:$,enumerable:$.debug}),$.debug){switch(typeof $.debug){case"boolean":fD.setDebugLevel(fD.WARN);break;case"number":fD.setDebugLevel($.debug);break;case"string":fD.setDebugLevel(parseInt($.debug,10));break;default:fD.setDebugLevel(fD.WARN),fD.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof $.debug}`)}Object.defineProperty(this,"messages",{get(){return fD.debugMessages()}})}}toString(){let D=this,$=this.options.head&&this.options.head.length;if($){if(D=[this.options.head],this.length)D.push.apply(D,this)}else this.options.style.head=[];let J=d9.makeTableLayout(D);J.forEach(function(G){G.forEach(function(q){q.mergeTableOptions(this.options,J)},this)},this),d9.computeWidths(this.options.colWidths,J),d9.computeHeights(this.options.rowHeights,J),J.forEach(function(G){G.forEach(function(q){q.init(this.options)},this)},this);let Q=[];for(let G=0;G<J.length;G++){let q=J[G],X=this.options.rowHeights[G];if(G===0||!this.options.style.compact||G==1&&$)c9(q,"top",Q);for(let Y=0;Y<X;Y++)c9(q,Y,Q);if(G+1==J.length)c9(q,"bottom",Q)}return Q.join(`
|
|
32
|
+
`)}get width(){return this.toString().split(`
|
|
33
|
+
`)[0].length}}a9.reset=()=>fD.reset();function c9(D,$,J){let Q=[];D.forEach(function(q){Q.push(q.draw($))});let G=Q.join("");if(G.length)J.push(G)}Z$.exports=a9});var n6=b6(s6(),1),{program:Zj,createCommand:Kj,createArgument:jj,createOption:Uj,CommanderError:Wj,InvalidArgumentError:Ej,InvalidOptionArgumentError:zj,Command:t6,Argument:Cj,Option:Hj,Help:Nj}=n6.default;import{mkdirSync as e6,readFileSync as V4,writeFileSync as F4,existsSync as D1}from"node:fs";import{join as k9}from"node:path";import{homedir as L4}from"node:os";var h8={activeKey:"default",output:"table"};class d{static CONFIG_DIR=k9(L4(),".config","jup");static SETTINGS_FILE=k9(this.CONFIG_DIR,"settings.json");static KEYS_DIR=k9(this.CONFIG_DIR,"keys");static init(){if(e6(this.CONFIG_DIR,{recursive:!0}),e6(this.KEYS_DIR,{recursive:!0}),!D1(this.SETTINGS_FILE))this.save(h8)}static load(){if(!D1(this.SETTINGS_FILE))return{...h8};let D=JSON.parse(V4(this.SETTINGS_FILE,"utf-8"));return{activeKey:typeof D.activeKey==="string"?D.activeKey:h8.activeKey,output:D.output==="table"||D.output==="json"?D.output:h8.output}}static set(D){if(Object.keys(D).length===0)throw Error("No settings provided to update.");let $=this.load();this.save({...$,...D})}static save(D){F4(this.SETTINGS_FILE,JSON.stringify(D,null,2)+`
|
|
34
|
+
`)}}var $1=(D=0)=>($)=>`\x1B[${$+D}m`,J1=(D=0)=>($)=>`\x1B[${38+D};5;${$}m`,Q1=(D=0)=>($,J,Q)=>`\x1B[${38+D};2;${$};${J};${Q}m`,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Ij=Object.keys(i.modifier),B4=Object.keys(i.color),R4=Object.keys(i.bgColor),wj=[...B4,...R4];function I4(){let D=new Map;for(let[$,J]of Object.entries(i)){for(let[Q,G]of Object.entries(J))i[Q]={open:`\x1B[${G[0]}m`,close:`\x1B[${G[1]}m`},J[Q]=i[Q],D.set(G[0],G[1]);Object.defineProperty(i,$,{value:J,enumerable:!1})}return Object.defineProperty(i,"codes",{value:D,enumerable:!1}),i.color.close="\x1B[39m",i.bgColor.close="\x1B[49m",i.color.ansi=$1(),i.color.ansi256=J1(),i.color.ansi16m=Q1(),i.bgColor.ansi=$1(10),i.bgColor.ansi256=J1(10),i.bgColor.ansi16m=Q1(10),Object.defineProperties(i,{rgbToAnsi256:{value($,J,Q){if($===J&&J===Q){if($<8)return 16;if($>248)return 231;return Math.round(($-8)/247*24)+232}return 16+36*Math.round($/255*5)+6*Math.round(J/255*5)+Math.round(Q/255*5)},enumerable:!1},hexToRgb:{value($){let J=/[a-f\d]{6}|[a-f\d]{3}/i.exec($.toString(16));if(!J)return[0,0,0];let[Q]=J;if(Q.length===3)Q=[...Q].map((q)=>q+q).join("");let G=Number.parseInt(Q,16);return[G>>16&255,G>>8&255,G&255]},enumerable:!1},hexToAnsi256:{value:($)=>i.rgbToAnsi256(...i.hexToRgb($)),enumerable:!1},ansi256ToAnsi:{value($){if($<8)return 30+$;if($<16)return 90+($-8);let J,Q,G;if($>=232)J=(($-232)*10+8)/255,Q=J,G=J;else{$-=16;let Y=$%36;J=Math.floor($/36)/5,Q=Math.floor(Y/6)/5,G=Y%6/5}let q=Math.max(J,Q,G)*2;if(q===0)return 30;let X=30+(Math.round(G)<<2|Math.round(Q)<<1|Math.round(J));if(q===2)X+=60;return X},enumerable:!1},rgbToAnsi:{value:($,J,Q)=>i.ansi256ToAnsi(i.rgbToAnsi256($,J,Q)),enumerable:!1},hexToAnsi:{value:($)=>i.ansi256ToAnsi(i.hexToAnsi256($)),enumerable:!1}}),i}var w4=I4(),PD=w4;import A9 from"node:process";import O4 from"node:os";import G1 from"node:tty";function TD(D,$=globalThis.Deno?globalThis.Deno.args:A9.argv){let J=D.startsWith("-")?"":D.length===1?"-":"--",Q=$.indexOf(J+D),G=$.indexOf("--");return Q!==-1&&(G===-1||Q<G)}var{env:r}=A9,v8;if(TD("no-color")||TD("no-colors")||TD("color=false")||TD("color=never"))v8=0;else if(TD("color")||TD("colors")||TD("color=true")||TD("color=always"))v8=1;function T4(){if("FORCE_COLOR"in r){if(r.FORCE_COLOR==="true")return 1;if(r.FORCE_COLOR==="false")return 0;return r.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(r.FORCE_COLOR,10),3)}}function M4(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function P4(D,{streamIsTTY:$,sniffFlags:J=!0}={}){let Q=T4();if(Q!==void 0)v8=Q;let G=J?v8:Q;if(G===0)return 0;if(J){if(TD("color=16m")||TD("color=full")||TD("color=truecolor"))return 3;if(TD("color=256"))return 2}if("TF_BUILD"in r&&"AGENT_NAME"in r)return 1;if(D&&!$&&G===void 0)return 0;let q=G||0;if(r.TERM==="dumb")return q;if(A9.platform==="win32"){let X=O4.release().split(".");if(Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in r){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((X)=>(X in r)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((X)=>(X in r))||r.CI_NAME==="codeship")return 1;return q}if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if(r.TERM==="xterm-kitty")return 3;if(r.TERM==="xterm-ghostty")return 3;if(r.TERM==="wezterm")return 3;if("TERM_PROGRAM"in r){let X=Number.parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return X>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(r.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM))return 1;if("COLORTERM"in r)return 1;return q}function q1(D,$={}){let J=P4(D,{streamIsTTY:D&&D.isTTY,...$});return M4(J)}var S4={stdout:q1({isTTY:G1.isatty(1)}),stderr:q1({isTTY:G1.isatty(2)})},X1=S4;function Y1(D,$,J){let Q=D.indexOf($);if(Q===-1)return D;let G=$.length,q=0,X="";do X+=D.slice(q,Q)+$+J,q=Q+G,Q=D.indexOf($,q);while(Q!==-1);return X+=D.slice(q),X}function Z1(D,$,J,Q){let G=0,q="";do{let X=D[Q-1]==="\r";q+=D.slice(G,X?Q-1:Q)+$+(X?`\r
|
|
35
|
+
`:`
|
|
36
|
+
`)+J,G=Q+1,Q=D.indexOf(`
|
|
37
|
+
`,G)}while(Q!==-1);return q+=D.slice(G),q}var{stdout:K1,stderr:j1}=X1,x9=Symbol("GENERATOR"),S0=Symbol("STYLER"),J8=Symbol("IS_EMPTY"),U1=["ansi","ansi","ansi256","ansi16m"],_0=Object.create(null),_4=(D,$={})=>{if($.level&&!(Number.isInteger($.level)&&$.level>=0&&$.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let J=K1?K1.level:0;D.level=$.level===void 0?J:$.level};var k4=(D)=>{let $=(...J)=>J.join(" ");return _4($,D),Object.setPrototypeOf($,Q8.prototype),$};function Q8(D){return k4(D)}Object.setPrototypeOf(Q8.prototype,Function.prototype);for(let[D,$]of Object.entries(PD))_0[D]={get(){let J=y8(this,h9($.open,$.close,this[S0]),this[J8]);return Object.defineProperty(this,D,{value:J}),J}};_0.visible={get(){let D=y8(this,this[S0],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var b9=(D,$,J,...Q)=>{if(D==="rgb"){if($==="ansi16m")return PD[J].ansi16m(...Q);if($==="ansi256")return PD[J].ansi256(PD.rgbToAnsi256(...Q));return PD[J].ansi(PD.rgbToAnsi(...Q))}if(D==="hex")return b9("rgb",$,J,...PD.hexToRgb(...Q));return PD[J][D](...Q)},A4=["rgb","hex","ansi256"];for(let D of A4){_0[D]={get(){let{level:J}=this;return function(...Q){let G=h9(b9(D,U1[J],"color",...Q),PD.color.close,this[S0]);return y8(this,G,this[J8])}}};let $="bg"+D[0].toUpperCase()+D.slice(1);_0[$]={get(){let{level:J}=this;return function(...Q){let G=h9(b9(D,U1[J],"bgColor",...Q),PD.bgColor.close,this[S0]);return y8(this,G,this[J8])}}}}var x4=Object.defineProperties(()=>{},{..._0,level:{enumerable:!0,get(){return this[x9].level},set(D){this[x9].level=D}}}),h9=(D,$,J)=>{let Q,G;if(J===void 0)Q=D,G=$;else Q=J.openAll+D,G=$+J.closeAll;return{open:D,close:$,openAll:Q,closeAll:G,parent:J}},y8=(D,$,J)=>{let Q=(...G)=>b4(Q,G.length===1?""+G[0]:G.join(" "));return Object.setPrototypeOf(Q,x4),Q[x9]=D,Q[S0]=$,Q[J8]=J,Q},b4=(D,$)=>{if(D.level<=0||!$)return D[J8]?"":$;let J=D[S0];if(J===void 0)return $;let{openAll:Q,closeAll:G}=J;if($.includes("\x1B"))while(J!==void 0)$=Y1($,J.close,J.open),J=J.parent;let q=$.indexOf(`
|
|
38
|
+
`);if(q!==-1)$=Z1($,G,Q,q);return Q+$+G};Object.defineProperties(Q8.prototype,_0);var h4=Q8(),bj=Q8({level:j1?j1.level:0});var sD=h4;var i9=b6(K$(),1);class v{static outputOverride;static isJson(){return(this.outputOverride??d.load().output)==="json"}static json(D){console.log(JSON.stringify(D,null,2))}static error(D){let $=D instanceof Error?D.message:String(D);if(this.isJson())this.json({error:$});else console.log(`${sD.red.bold("Error:")} ${$}`)}static table(D){if(D.type==="horizontal"){if(D.rows.length===0){console.log("No results.");return}let $=Object.keys(D.headers),J=$.map((G)=>sD.bold(D.headers[G])),Q=new i9.default({head:J,style:{head:[]}});for(let G of D.rows)Q.push($.map((q)=>String(G[q]??"")));console.log(Q.toString())}else{let $=new i9.default;for(let{label:J,value:Q}of D.rows)$.push({[sD.bold(J)]:Q});console.log($.toString())}}static formatBoolean(D){return D?"✅":"❌"}static formatPercentageChange(D){if(D===void 0||D===null)return"—";let $=`${D>=0?"+":""}${D.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}%`;if(D>0.5)return sD.green($);if(D<-0.5)return sD.red($);return sD.gray($)}static formatDollar(D){if(!D)return sD.gray("—");if(D<1000)return D.toLocaleString("en-US",{currency:"USD",style:"currency",minimumSignificantDigits:5,maximumSignificantDigits:5});return D.toLocaleString("en-US",{currency:"USD",style:"currency"})}}class r9{static register(D){let $=D.command("config").description("CLI settings and configurations");$.command("list").description("List all settings").action(()=>this.list()),$.command("set").description("Update settings").option("--active-key <name>","Set the active key").option("--output <type>","Set the output format ('table' or 'json')").action((J)=>this.set(J))}static list(){let D=d.load();if(v.isJson()){v.json(D);return}let $=Object.entries(D).map(([J,Q])=>({setting:J,value:String(Q)}));v.table({type:"horizontal",headers:{setting:"Setting",value:"Value"},rows:$})}static set(D){if(D.output&&D.output!=="table"&&D.output!=="json")throw Error("Invalid --output format. Must be 'table' or 'json'.");d.set(D),this.list()}}import{copyFileSync as VK,existsSync as U0,readdirSync as FK,renameSync as LK,rmSync as BK}from"node:fs";import{homedir as RK}from"node:os";import{join as P0}from"node:path";var Fq=1,Lq=2,Bq=3,Rq=4,Iq=5,wq=6,Oq=7,Tq=8,Mq=9,Pq=10,Sq=11,_q=12,kq=-32700,Aq=-32603,xq=-32602,bq=-32601,hq=-32600,vq=-32019,yq=-32018,fq=-32017,mq=-32016,uq=-32015,gq=-32014,lq=-32013,pq=-32012,dq=-32011,cq=-32010,aq=-32009,iq=-32008,rq=-32007,oq=-32006,sq=-32005,nq=-32004,tq=-32003,eq=-32002,DX=-32001,s9=2800000,n9=2800001,$X=2800002,t9=2800003,j$=2800004,U$=2800005,e9=2800006,D7=2800007,p8=2800008,$7=2800009,W$=2800010,E$=2800011,JX=3230000,QX=32300001,GX=3230002,qX=3230003,XX=3230004,YX=3610000,J7=3610001,z$=3610002,Q7=3610003,C$=3610004,G7=3610005,H$=3610006,q7=3610007,N$=3611000,V$=3704000,X7=3704001,F$=3704002,L$=3704003,B$=3704004,ZX=4128000,KX=4128001,jX=4128002,o9=4615000,UX=4615001,WX=4615002,EX=4615003,zX=4615004,CX=4615005,HX=4615006,NX=4615007,VX=4615008,FX=4615009,LX=4615010,BX=4615011,RX=4615012,IX=4615013,wX=4615014,OX=4615015,TX=4615016,MX=4615017,PX=4615018,SX=4615019,_X=4615020,kX=4615021,AX=4615022,xX=4615023,bX=4615024,hX=4615025,vX=4615026,yX=4615027,fX=4615028,mX=4615029,uX=4615030,gX=4615031,lX=4615032,pX=4615033,dX=4615034,cX=4615035,aX=4615036,iX=4615037,rX=4615038,oX=4615039,sX=4615040,nX=4615041,tX=4615042,eX=4615043,DY=4615044,$Y=4615045,JY=4615046,QY=4615047,GY=4615048,qY=4615049,XY=4615050,YY=4615051,ZY=4615052,KY=4615053,jY=4615054,UY=5508000,WY=5508001,EY=5508002,zY=5508003,CY=5508004,HY=5508005,NY=5508006,VY=5508007,FY=5508008,LY=5508009,BY=5508010,RY=5508011,IY=5607000,wY=5607001,OY=5607002,TY=5607003,MY=5607004,PY=5607005,SY=5607006,_Y=5607007,kY=5607008,AY=5607009,xY=5607010,bY=5607011,hY=5607012,vY=5607013,yY=5607014,fY=5607015,mY=5607016,uY=5607017,R$=5663000,I$=5663001,Y7=5663002,Z7=5663003,w$=5663004,O$=5663005,T$=5663006,M$=5663007,P$=5663008,S$=5663009,gY=5663010,lY=5663011,_$=5663012,pY=5663013,dY=5663014,K7=5663015,j7=5663016,d8=5663017,cY=5663018,aY=5663019,k$=5663020,Y8=5663021,A$=5663022,U7=5663023,W7=5663024,E7=5663025,z7=5663026,C7=5663027,iY=5663028,rY=7050000,oY=7050001,sY=7050002,nY=7050003,tY=7050004,eY=7050005,D2=7050006,$2=7050007,J2=7050008,Q2=7050009,G2=7050010,q2=7050011,X2=7050012,Y2=7050013,Z2=7050014,K2=7050015,j2=7050016,U2=7050017,W2=7050018,E2=7050019,z2=7050020,C2=7050021,H2=7050022,N2=7050023,V2=7050024,F2=7050025,L2=7050026,B2=7050027,R2=7050028,I2=7050029,w2=7050030,O2=7050031,T2=7050032,M2=7050033,P2=7050034,S2=7050035,_2=7050036,k2=7618000,A2=7618001,x2=7618002,b2=7618003,h2=7618004,v2=7618005,y2=7618006,f2=7618007,m2=7618008,u2=7618009,H7=8078000,N7=8078001,x$=8078002,b$=8078003,V7=8078004,F7=8078005,L7=8078006,B7=8078007,h$=8078008,v$=8078009,y$=8078010,R7=8078011,x0=8078012,I7=8078013,w7=8078014,f$=8078015,m$=8078016,O7=8078017,u$=8078018,g2=8078019,g$=8078020,l$=8078021,p$=8078022,d$=8078023,c$=8078024,a$=8078025,l2=8100000,p2=8100001,d2=8100002,c2=8100003,a2=8190000,i2=8190001,r2=8190002,o2=8190003,s2=8190004,i$=8500000,r$=8500001,o$=8500002,n2=8500003,t2=8500004,e2=8500005,s$=8500006,D5=9900000,$5=9900001,J5=9900002,Q5=9900003,G5=9900004,q5=9900005,X5=9900006;var Y5={[JX]:"Account not found at address: $address",[XX]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[qX]:"Expected decoded account at address: $address",[GX]:"Failed to decode account data at address: $address",[QX]:"Accounts not found at addresses: $addresses",[$7]:"Unable to find a viable program address bump seed.",[$X]:"$putativeAddress is not a base58-encoded address.",[s9]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[t9]:"The `CryptoKey` must be an `Ed25519` public key.",[E$]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[p8]:"Invalid seeds; point must fall off the Ed25519 curve.",[j$]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[e9]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[D7]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[U$]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[W$]:"Program address cannot end with PDA marker.",[n9]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[Rq]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Fq]:"The network has progressed past the last block for which this transaction could have been committed.",[H7]:"Codec [$codecDescription] cannot decode empty byte arrays.",[p$]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[g$]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[F7]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[L7]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[V7]:"Encoder and decoder must either both be fixed-size or variable-size.",[h$]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[x$]:"Expected a fixed-size codec, got a variable-size one.",[I7]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[b$]:"Expected a variable-size codec, got a fixed-size one.",[g2]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[N7]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[u$]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[v$]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[y$]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[f$]:"Invalid literal union variant. Expected one of [$variants], got $value.",[B7]:"Expected [$codecDescription] to have $expected items, got $actual.",[x0]:"Invalid value $value for base $base with alphabet $alphabet.",[m$]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[R7]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[w7]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[l$]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[O7]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[d$]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[c$]:"Invalid pattern match value. The provided value does not match any of the specified patterns.",[a$]:"Invalid pattern match bytes. The provided byte array does not match any of the specified patterns.",[N$]:"No random values implementation could be found.",[Sq]:"Failed to send transaction$causeMessage",[_q]:"Failed to send transactions$causeMessages",[FX]:"Instruction requires an uninitialized account",[xX]:"Instruction tries to borrow reference for an account which is already borrowed",[bX]:"Instruction left account with an outstanding borrowed reference",[kX]:"Program other than the account's owner changed the size of the account data",[CX]:"Account data too small for instruction",[AX]:"Instruction expected an executable account",[JY]:"An account does not have enough lamports to be rent-exempt",[GY]:"Program arithmetic overflowed",[$Y]:"Failed to serialize or deserialize account data",[jY]:"Builtin programs must consume compute units",[lX]:"Cross-program invocation call depth too deep",[rX]:"Computational budget exceeded",[vX]:"Custom program error: #$code",[MX]:"Instruction contains duplicate accounts",[hX]:"Instruction modifications of multiply-passed account differ",[uX]:"Executable accounts must be rent exempt",[fX]:"Instruction changed executable accounts data",[mX]:"Instruction changed the balance of an executable account",[PX]:"Instruction changed executable bit of an account",[wX]:"Instruction modified data of an account it does not own",[IX]:"Instruction spent from the balance of an account it does not own",[UX]:"Generic instruction error",[XY]:"Provided owner is not allowed",[eX]:"Account is immutable",[DY]:"Incorrect authority provided",[NX]:"Incorrect program id for instruction",[HX]:"Insufficient funds for instruction",[zX]:"Invalid account data for instruction",[QY]:"Invalid account owner",[WX]:"Invalid program argument",[yX]:"Program returned invalid error code",[EX]:"Invalid instruction data",[iX]:"Failed to reallocate account data",[aX]:"Provided seeds do not result in a valid address",[YY]:"Accounts data allocations exceeded the maximum allowed per transaction",[ZY]:"Max accounts exceeded",[KY]:"Max instruction trace length exceeded",[cX]:"Length of the seed is too long for address generation",[pX]:"An account required by the instruction is missing",[VX]:"Missing required signature for instruction",[RX]:"Instruction illegally modified the program id of an account",[_X]:"Insufficient account keys for instruction",[oX]:"Cross-program invocation with unauthorized signer or writable account",[sX]:"Failed to create program execution environment",[tX]:"Program failed to compile",[nX]:"Program failed to complete",[TX]:"Instruction modified data of a read-only account",[OX]:"Instruction changed the balance of a read-only account",[dX]:"Cross-program invocation reentrancy not allowed for this instruction",[SX]:"Instruction modified rent epoch of an account",[BX]:"Sum of account balances before and after instruction do not match",[LX]:"Instruction requires an initialized account",[o9]:"The instruction failed with the error: $errorName",[gX]:"Unsupported program id",[qY]:"Unsupported sysvar",[q5]:"Invalid instruction plan kind: $kind.",[x2]:"The provided instruction plan is empty.",[v2]:"No failed transaction plan result was found in the provided transaction plan result.",[h2]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved — e.g. by targetting RPCs that support transaction bundles.",[b2]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[k2]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[X5]:"Invalid transaction plan kind: $kind.",[A2]:"No more instructions to pack; the message packer has completed the instruction plan.",[y2]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[f2]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[m2]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[u2]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[ZX]:"The instruction does not have any accounts.",[KX]:"The instruction does not have any data.",[jX]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Iq]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Lq]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[J5]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[G5]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[$5]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[D5]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Q5]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Aq]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[xq]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[hq]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[bq]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[kq]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[pq]:"$__serverMessage",[DX]:"$__serverMessage",[nq]:"$__serverMessage",[gq]:"$__serverMessage",[fq]:"Epoch rewards period still active at slot $slot",[cq]:"$__serverMessage",[aq]:"$__serverMessage",[vq]:"Failed to query long-term storage; please try again",[mq]:"Minimum context slot has not been reached",[sq]:"Node is unhealthy; behind by $numSlotsBehind slots",[iq]:"No snapshot",[eq]:"Transaction simulation failed",[yq]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[rq]:"$__serverMessage",[dq]:"Transaction history is not available from this node",[oq]:"$__serverMessage",[lq]:"Transaction signature length mismatch",[tq]:"Transaction signature verification failure",[uq]:"$__serverMessage",[V$]:"Key pair bytes must be of length 64, got $byteLength.",[X7]:"Expected private key bytes with length 32. Actual length: $actualLength.",[F$]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[B$]:"The provided private key does not match the provided public key.",[L$]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[wq]:"Lamports value must be in the range [0, 2e64-1]",[Oq]:"`$value` cannot be parsed as a `BigInt`",[Pq]:"$message",[Tq]:"`$value` cannot be parsed as a `Number`",[Bq]:"No nonce account could be found at address `$nonceAccountAddress`",[TY]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[vY]:"Attempted to sign an offchain message with an address that is not a signer for it",[OY]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[hY]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[IY]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[_Y]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[kY]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[AY]:"Offchain message content must be non-empty",[PY]:"Offchain message must specify the address of at least one required signer",[xY]:"Offchain message envelope must reserve space for at least one signature",[MY]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[fY]:"The signatories of this offchain message must be listed in lexicographical order",[mY]:"An address must be listed no more than once among the signatories of an offchain message",[bY]:"Offchain message is missing signatures for addresses: $addresses.",[uY]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[wY]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[yY]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[SY]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[s$]:"The provided account could not be identified as an account from the $programName program.",[o$]:"The provided instruction could not be identified as an instruction from the $programName program.",[i$]:"The provided instruction is missing some accounts. Expected at least $expectedAccountMetas account(s), got $actualAccountMetas.",[t2]:"Expected resolved instruction input '$inputName' to be non-null.",[n2]:"Expected resolved instruction input '$inputName' to be of type `$expectedType`.",[e2]:"Unrecognized account type '$accountType' for the $programName program.",[r$]:"Unrecognized instruction type '$instructionType' for the $programName program.",[a2]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[r2]:"WebSocket was closed before payload could be added to the send buffer",[o2]:"WebSocket connection closed",[s2]:"WebSocket failed to connect",[i2]:"Failed to obtain a subscription id from the server",[c2]:"Could not find an API plan for RPC method: `$method`",[l2]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[d2]:"HTTP error ($statusCode): $message",[p2]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[UY]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[WY]:"The provided value does not implement the `KeyPairSigner` interface",[zY]:"The provided value does not implement the `MessageModifyingSigner` interface",[CY]:"The provided value does not implement the `MessagePartialSigner` interface",[EY]:"The provided value does not implement any of the `MessageSigner` interfaces",[NY]:"The provided value does not implement the `TransactionModifyingSigner` interface",[VY]:"The provided value does not implement the `TransactionPartialSigner` interface",[FY]:"The provided value does not implement the `TransactionSendingSigner` interface",[HY]:"The provided value does not implement any of the `TransactionSigner` interfaces",[LY]:"More than one `TransactionSendingSigner` was identified.",[BY]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[RY]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[q7]:"Cannot export a non-extractable key.",[J7]:"No digest implementation could be found.",[YX]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[z$]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
39
|
+
|
|
40
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
41
|
+
|
|
42
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[Q7]:"No signature verification implementation could be found.",[C$]:"No key generation implementation could be found.",[G7]:"No signing implementation could be found.",[H$]:"No key export implementation could be found.",[Mq]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[j2]:"Transaction processing left an account with an outstanding borrowed reference",[oY]:"Account in use",[sY]:"Account loaded twice",[nY]:"Attempt to debit an account but found no record of a prior credit.",[N2]:"Transaction loads an address table account that doesn't exist",[$2]:"This transaction has already been processed",[J2]:"Blockhash not found",[Q2]:"Loader call chain is too deep",[K2]:"Transactions are currently disabled due to cluster maintenance",[w2]:"Transaction contains a duplicate instruction ($index) that is not allowed",[eY]:"Insufficient funds for fee",[O2]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[D2]:"This account may not be used to pay transaction fees",[q2]:"Transaction contains an invalid account reference",[F2]:"Transaction loads an address table account with invalid data",[L2]:"Transaction address table lookup uses an invalid index",[V2]:"Transaction loads an address table account with an invalid owner",[M2]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[Y2]:"This program may not be used for executing instructions",[B2]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[E2]:"Transaction loads a writable account that cannot be written",[T2]:"Transaction exceeded max loaded accounts data size cap",[G2]:"Transaction requires a fee but has no signature present",[tY]:"Attempt to load a program that does not exist",[S2]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[P2]:"ResanitizationNeeded",[Z2]:"Transaction failed to sanitize accounts offsets correctly",[X2]:"Transaction did not pass signature verification",[H2]:"Transaction locked too many accounts",[_2]:"Sum of account balances before and after transaction do not match",[rY]:"The transaction failed with the error `$errorName`",[W2]:"Transaction version is unsupported",[C2]:"Transaction would exceed account data limit within the block",[I2]:"Transaction would exceed total account data limit",[z2]:"Transaction would exceed max account limit within the block",[U2]:"Transaction would exceed max Block Cost Limit",[R2]:"Transaction would exceed max Vote Cost Limit",[K7]:"Attempted to sign a transaction with an address that is not a signer for it",[gY]:"Transaction is missing an address at index: $index.",[j7]:"Transaction has no expected signers therefore it cannot be encoded",[k$]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[Y7]:"Transaction does not have a blockhash lifetime",[Z7]:"Transaction is not a durable nonce transaction",[O$]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[T$]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[P$]:"No fee payer set in CompiledTransaction",[M$]:"Could not find program address at index $index",[cY]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[aY]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[lY]:"Transaction is missing a fee payer.",[_$]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[dY]:"Transaction first instruction is not advance nonce account instruction.",[pY]:"Transaction with no instructions cannot be durable nonce transaction.",[R$]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[I$]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[d8]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[S$]:"Transaction is missing signatures for addresses: $addresses.",[w$]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[Y8]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[A$]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction.",[iY]:"Invalid transaction config mask: $mask. Bits 0 and 1 must match (both set or both unset)",[U7]:"Transaction message bytes are malformed: $messageBytes",[W7]:"Transaction message bytes are empty, so the transaction cannot be encoded",[E7]:"Transaction bytes are empty, so no transaction can be decoded",[z7]:"Transaction version 0 must be encoded with signatures first. This transaction was encoded with first byte $firstByte, which is expected to be a signature count for v0 transactions.",[C7]:"The provided transaction bytes expect that there should be $numExpectedSignatures signatures, but the bytes are not long enough to contain a transaction message with this many signatures. The provided bytes are $transactionBytesLength bytes long."},Z5=1000,mD="i",AD="t";function K5(D,$={}){let J=Y5[D];if(J.length===0)return"";let Q;function G(Y){if(Q[AD]===2){let Z=J.slice(Q[mD]+1,Y);q.push(Z in $?`${$[Z]}`:`$${Z}`)}else if(Q[AD]===1)q.push(J.slice(Q[mD],Y))}let q=[];J.split("").forEach((Y,Z)=>{if(Z===0){Q={[mD]:0,[AD]:J[0]==="\\"?0:J[0]==="$"?2:1};return}let K;switch(Q[AD]){case 0:K={[mD]:Z,[AD]:1};break;case 1:if(Y==="\\")K={[mD]:Z,[AD]:0};else if(Y==="$")K={[mD]:Z,[AD]:2};break;case 2:if(Y==="\\")K={[mD]:Z,[AD]:0};else if(Y==="$")K={[mD]:Z,[AD]:2};else if(!Y.match(/\w/))K={[mD]:Z,[AD]:1};break}if(K){if(Q!==K)G(Z);Q=K}}),G();let X=q.join("");if(D>=o9&&D<o9+Z5&&"index"in $)X+=` (instruction #${$.index+1})`;return X}function j5(D,$={}){return K5(D,$)}function n$(D,$){if(D instanceof Error&&D.name==="SolanaError"){if($!==void 0)return D.context.__code===$;return!0}return!1}var b=class extends Error{cause=this.cause;context;constructor(...[D,$]){let J,Q;if($)Object.entries(Object.getOwnPropertyDescriptors($)).forEach(([q,X])=>{if(q==="cause")Q={cause:X.value};else{if(J===void 0)J={__code:D};Object.defineProperty(J,q,X)}});let G=j5(D,J);super(G,Q);this.context=Object.freeze(J===void 0?{__code:D}:J),this.name="SolanaError"}};function U5(D,$){if(D.length>=$)return D;let J=new Uint8Array($).fill(0);return J.set(D),J}var W5=(D,$)=>U5(D.length<=$?D:D.slice(0,$),$);function T7(D,$){return D.length===$.length&&D.every((J,Q)=>J===$[Q])}function b0(D,$){return"fixedSize"in $?$.fixedSize:$.getSizeFromValue(D)}function QD(D){return Object.freeze({...D,encode:($)=>{let J=new Uint8Array(b0($,D));return D.write($,J,0),J}})}function s(D){return Object.freeze({...D,decode:($,J=0)=>D.read($,J)[0]})}function VD(D){return"fixedSize"in D&&typeof D.fixedSize==="number"}function E5(D){return!VD(D)}function xD(D,$){if(VD(D)!==VD($))throw new b(V7);if(VD(D)&&VD($)&&D.fixedSize!==$.fixedSize)throw new b(F7,{decoderFixedSize:$.fixedSize,encoderFixedSize:D.fixedSize});if(!VD(D)&&!VD($)&&D.maxSize!==$.maxSize)throw new b(L7,{decoderMaxSize:$.maxSize,encoderMaxSize:D.maxSize});return{...$,...D,decode:$.decode,encode:D.encode,read:$.read,write:D.write}}function e$(D,$,J=0){if($.length-J<=0)throw new b(H7,{codecDescription:D})}function c8(D,$,J,Q=0){let G=J.length-Q;if(G<$)throw new b(N7,{bytesLength:G,codecDescription:D,expected:$})}function t$(D,$,J){if($<0||$>J)throw new b(w7,{bytesLength:J,codecDescription:D,offset:$})}function h0(D,$,J){let Q=D.byteOffset+($??0),G=J??D.byteLength,q;if(typeof SharedArrayBuffer>"u")q=D.buffer;else if(D.buffer instanceof SharedArrayBuffer)q=new ArrayBuffer(D.length),new Uint8Array(q).set(new Uint8Array(D));else q=D.buffer;return(Q===0||Q===-D.byteLength)&&G===D.byteLength?q:q.slice(Q,Q+G)}function H0(D,$){return QD({fixedSize:$,write:(J,Q,G)=>{let q=D.encode(J),X=q.length>$?q.slice(0,$):q;return Q.set(X,G),G+$}})}function N0(D,$){return s({fixedSize:$,read:(J,Q)=>{if(c8("fixCodecSize",$,J,Q),Q>0||J.length>$)J=J.slice(Q,Q+$);if(VD(D))J=W5(J,D.fixedSize);let[G]=D.read(J,0);return[G,Q+$]}})}function z5(D,$){return s({...D,read:(J,Q)=>{let G=(K)=>C5(K,J.length),q=$.preOffset?$.preOffset({bytes:J,preOffset:Q,wrapBytes:G}):Q;t$("offsetDecoder",q,J.length);let[X,Y]=D.read(J,q),Z=$.postOffset?$.postOffset({bytes:J,newPreOffset:q,postOffset:Y,preOffset:Q,wrapBytes:G}):Y;return t$("offsetDecoder",Z,J.length),[X,Z]}})}function C5(D,$){if($===0)return 0;return(D%$+$)%$}function H5(D,$){if(VD(D)){let J=$(D.fixedSize);if(J<0)throw new b(I7,{bytesLength:J,codecDescription:"resizeDecoder"});return s({...D,fixedSize:J})}return D}function DJ(D,$){return z5(H5(D,(J)=>J+$),{postOffset:({postOffset:J})=>J+$})}function nD(D,$){return QD({...E5(D)?{...D,getSizeFromValue:(J)=>D.getSizeFromValue($(J))}:D,write:(J,Q,G)=>D.write($(J),Q,G)})}function Z8(D,$){return s({...D,read:(J,Q)=>{let[G,q]=D.read(J,Q);return[$(G,J,Q),q]}})}function GJ(D,$,J=$){if(!$.match(new RegExp(`^[${D}]*$`)))throw new b(x0,{alphabet:D,base:D.length,value:J})}var N5=(D)=>{return QD({getSizeFromValue:($)=>{let[J,Q]=$J($,D[0]);if(!Q)return $.length;let G=JJ(Q,D);return J.length+Math.ceil(G.toString(16).length/2)},write($,J,Q){if(GJ(D,$),$==="")return Q;let[G,q]=$J($,D[0]);if(!q)return J.set(new Uint8Array(G.length).fill(0),Q),Q+G.length;let X=JJ(q,D),Y=[];while(X>0n)Y.unshift(Number(X%256n)),X/=256n;let Z=[...Array(G.length).fill(0),...Y];return J.set(Z,Q),Q+Z.length}})},V5=(D)=>{return s({read($,J){let Q=J===0?$:$.slice(J);if(Q.length===0)return["",0];let G=Q.findIndex((Z)=>Z!==0);G=G===-1?Q.length:G;let q=D[0].repeat(G);if(G===Q.length)return[q,$.length];let X=Q.slice(G).reduce((Z,K)=>Z*256n+BigInt(K),0n),Y=F5(X,D);return[q+Y,$.length]}})};function $J(D,$){let[J,Q]=D.split(new RegExp(`((?!${$}).*)`));return[J,Q]}function JJ(D,$){let J=BigInt($.length),Q=0n;for(let G of D)Q*=J,Q+=BigInt($.indexOf(G));return Q}function F5(D,$){let J=BigInt($.length),Q=[];while(D>0n)Q.unshift($[Number(D%J)]),D/=J;return Q.join("")}var QJ={alphabet:"0123456789abcdef",base:16};function M7(D){if(D>=48&&D<=57)return D-48;if(D>=65&&D<=70)return D-55;if(D>=97&&D<=102)return D-87}var qJ=()=>QD({getSizeFromValue:(D)=>Math.ceil(D.length/2),write(D,$,J){let Q=D.length,G=Q/2;if(Q===1){let X=D.charCodeAt(0),Y=M7(X);if(Y===void 0)throw new b(x0,{...QJ,value:D});return $.set([Y],J),1+J}let q=new Uint8Array(G);for(let X=0,Y=0;X<G;X++){let Z=D.charCodeAt(Y++),K=D.charCodeAt(Y++),j=M7(Z),U=M7(K);if(j===void 0||U===void 0&&!Number.isNaN(K))throw new b(x0,{...QJ,value:D});q[X]=!Number.isNaN(K)?j<<4|(U??0):j}return $.set(q,J),q.length+J}});var XJ="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",a8=()=>N5(XJ),P7=()=>V5(XJ);var L5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S7=()=>{return QD({getSizeFromValue:(D)=>Buffer.from(D,"base64").length,write(D,$,J){GJ(L5,D.replace(/=/g,""));let Q=Buffer.from(D,"base64");return $.set(Q,J),Q.length+J}})},_7=()=>{return s({read:(D,$=0)=>[Buffer.from(h0(D),$).toString("base64"),D.length]})},YJ=()=>xD(S7(),_7());var{TextDecoder:HU,TextEncoder:NU}=globalThis;function ZJ(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.digest!=="function")throw new b(J7)}function i8(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.exportKey!=="function")throw new b(Q7)}function KJ(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.sign!=="function")throw new b(G7)}var k7,A7;function EJ(){if(!k7)k7=a8();return k7}function B5(){if(!A7)A7=P7();return A7}function R5(D){if(D.length<32||D.length>44)throw new b(n9,{actualLength:D.length});let Q=EJ().encode(D).byteLength;if(Q!==32)throw new b(s9,{actualLength:Q})}function x7(D){return R5(D),D}function K8(){return nD(H0(EJ(),32),(D)=>x7(D))}function v0(){return N0(B5(),32)}function I5(){return xD(K8(),v0())}var w5=37095705934669439343138083508754565189542113879843219016388785533085940283555n,CD=57896044618658097711785492504343953926634992332820282019728792003956564819949n,jJ=19681161376707505956807079304988542015446066515923890162744021073123829784752n;function MD(D){let $=D%CD;return $>=0n?$:CD+$}function bD(D,$){let J=D;while($-- >0n)J*=J,J%=CD;return J}function O5(D){let J=D*D%CD*D%CD,Q=bD(J,2n)*J%CD,G=bD(Q,1n)*D%CD,q=bD(G,5n)*G%CD,X=bD(q,10n)*q%CD,Y=bD(X,20n)*X%CD,Z=bD(Y,40n)*Y%CD,K=bD(Z,80n)*Z%CD,j=bD(K,80n)*Z%CD,U=bD(j,10n)*q%CD;return bD(U,2n)*D%CD}function T5(D,$){let J=MD($*$*$),Q=MD(J*J*$),G=O5(D*Q),q=MD(D*J*G),X=MD($*q*q),Y=q,Z=MD(q*jJ),K=X===D,j=X===MD(-D),U=X===MD(-D*jJ);if(K)q=Y;if(j||U)q=Z;if((MD(q)&1n)===1n)q=MD(-q);if(!K&&!j)return null;return q}function M5(D,$){let J=MD(D*D),Q=MD(J-1n),G=MD(w5*J+1n),q=T5(Q,G);if(q===null)return!1;let X=($&128)!==0;if(q===0n&&X)return!1;return!0}function P5(D){let $=D.toString(16);if($.length===1)return`0${$}`;else return $}function S5(D){let J=`0x${D.reduce((Q,G,q)=>`${P5(q===31?G&-129:G)}${Q}`,"")}`;return BigInt(J)}function _5(D){if(D.byteLength!==32)return!1;let $=S5(D);return M5($,D[31])}var UJ=32,WJ=16,k5=[80,114,111,103,114,97,109,68,101,114,105,118,101,100,65,100,100,114,101,115,115];async function A5({programAddress:D,seeds:$}){if(ZJ(),$.length>WJ)throw new b(e9,{actual:$.length,maxSeeds:WJ});let J,Q=$.reduce((Z,K,j)=>{let U=typeof K==="string"?(J||=new TextEncoder).encode(K):K;if(U.byteLength>UJ)throw new b(D7,{actual:U.byteLength,index:j,maxSeedLength:UJ});return Z.push(...U),Z},[]),G=I5(),q=G.encode(D),X=await crypto.subtle.digest("SHA-256",new Uint8Array([...Q,...q,...k5])),Y=new Uint8Array(X);if(_5(Y))throw new b(p8);return G.decode(Y)}async function zJ({programAddress:D,seeds:$}){let J=255;while(J>0)try{return[await A5({programAddress:D,seeds:[...$,new Uint8Array([J])]}),J]}catch(Q){if(n$(Q,p8))J--;else throw Q}throw new b($7)}async function r8(D){if(i8(),D.type!=="public"||D.algorithm.name!=="Ed25519")throw new b(t9);let $=await crypto.subtle.exportKey("raw",D);return v0().decode(new Uint8Array($))}function CJ(D,$,J,Q){if(Q<$||Q>J)throw new b(R7,{codecDescription:D,max:J,min:$,value:Q})}function HJ(D){return D?.endian===1?!1:!0}function x5(D){return QD({fixedSize:D.size,write($,J,Q){if(D.range)CJ(D.name,D.range[0],D.range[1],$);let G=new ArrayBuffer(D.size);return D.set(new DataView(G),$,HJ(D.config)),J.set(new Uint8Array(G),Q),Q+D.size}})}function NJ(D){return s({fixedSize:D.size,read($,J=0){e$(D.name,$,J),c8(D.name,D.size,$,J);let Q=new DataView(h0($,J,D.size));return[D.get(Q,HJ(D.config)),J+D.size]}})}var VJ=()=>QD({getSizeFromValue:(D)=>{if(D<=127)return 1;if(D<=16383)return 2;return 3},maxSize:3,write:(D,$,J)=>{CJ("shortU16",0,65535,D);let Q=[0];for(let G=0;;G+=1){let q=Number(D)>>G*7;if(q===0)break;let X=127&q;if(Q[G]=X,G>0)Q[G-1]|=128}return $.set(Q,J),J+Q.length}}),b7=()=>s({maxSize:3,read:(D,$)=>{let J=0,Q=0;while(++Q){let G=Q-1,q=D[$+G],X=127&q;if(J|=X<<G*7,(q&128)===0)break}return[J,$+Q]}});var h7=(D={})=>x5({config:D,name:"u32",range:[0,Number("0xffffffff")],set:($,J,Q)=>$.setUint32(0,Number(J),Q),size:4}),v7=(D={})=>NJ({config:D,get:($,J)=>$.getUint32(0,J),name:"u32",size:4});var o8=()=>NJ({get:(D)=>D.getUint8(0),name:"u8",size:1});function v5(D,$,J){if($!==J)throw new b(B7,{actual:J,codecDescription:D,expected:$})}function y5(D){return D.reduce(($,J)=>$===null||J===null?null:Math.max($,J),0)}function y0(D){return D.reduce(($,J)=>$===null||J===null?null:$+J,0)}function j8(D){return VD(D)?D.fixedSize:null}function f0(D){return VD(D)?D.fixedSize:D.maxSize??null}function n8(D,$={}){let J=$.size??h7(),Q=s8(J,j8(D)),G=s8(J,f0(D))??void 0;return QD({...Q!==null?{fixedSize:Q}:{getSizeFromValue:(q)=>{return(typeof J==="object"?b0(q.length,J):0)+[...q].reduce((Y,Z)=>Y+b0(Z,D),0)},maxSize:G},write:(q,X,Y)=>{if(typeof J==="number")v5($.description??"array",J,q.length);if(typeof J==="object")Y=J.write(q.length,X,Y);return q.forEach((Z)=>{Y=D.write(Z,X,Y)}),Y}})}function m0(D,$={}){let J=$.size??v7(),Q=j8(D),G=s8(J,Q),q=s8(J,f0(D))??void 0;return s({...G!==null?{fixedSize:G}:{maxSize:q},read:(X,Y)=>{let Z=[];if(typeof J==="object"&&X.slice(Y).length===0)return[Z,Y];if(J==="remainder"){while(Y<X.length){let[U,C]=D.read(X,Y);Y=C,Z.push(U)}return[Z,Y]}let[K,j]=typeof J==="number"?[J,Y]:J.read(X,Y);Y=j;for(let U=0;U<K;U+=1){let[C,z]=D.read(X,Y);Y=z,Z.push(C)}return[Z,Y]}})}function s8(D,$){if(typeof D!=="number")return null;if(D===0)return 0;return $===null?null:$*D}function U8(){return QD({getSizeFromValue:(D)=>D.length,write:(D,$,J)=>{return $.set(D,J),J+D.length}})}function t8(){return s({read:(D,$)=>{let J=D.slice($);return[J,$+J.length]}})}function FJ(D){let $=y0(D.map(j8)),J=y0(D.map(f0))??void 0;return s({...$===null?{maxSize:J}:{fixedSize:$},read:(Q,G)=>{let q=[];return D.forEach((X)=>{let[Y,Z]=X.read(Q,G);q.push(Y),G=Z}),[q,G]}})}function f5(D,$){let J=LJ(D),Q=(q,X,Y)=>{let Z=$(q);return y7(D,Z),D[Z].write(q,X,Y)};if(J!==null)return QD({fixedSize:J,write:Q});let G=BJ(D);return QD({...G!==null?{maxSize:G}:{},getSizeFromValue:(q)=>{let X=$(q);return y7(D,X),b0(q,D[X])},write:Q})}function m5(D,$){let J=LJ(D),Q=(q,X)=>{let Y=$(q,X);return y7(D,Y),D[Y].read(q,X)};if(J!==null)return s({fixedSize:J,read:Q});let G=BJ(D);return s({...G!==null?{maxSize:G}:{},read:Q})}function y7(D,$){if(typeof D[$]>"u")throw new b(O7,{maxRange:D.length-1,minRange:0,variant:$})}function LJ(D){if(D.length===0)return 0;if(!VD(D[0]))return null;let $=D[0].fixedSize;return D.every((Q)=>VD(Q)&&Q.fixedSize===$)?$:null}function BJ(D){return y5(D.map(($)=>f0($)))}function RJ(D,$,J){return f5([$,J],(Q)=>D(Q)?0:1)}function IJ(D,$,J){return m5([$,J],(Q)=>D(Q)?0:1)}function f7(D){let $=D.map(([,G])=>G),J=y0($.map(j8)),Q=y0($.map(f0))??void 0;return QD({...J===null?{getSizeFromValue:(G)=>D.map(([q,X])=>b0(G[q],X)).reduce((q,X)=>q+X,0),maxSize:Q}:{fixedSize:J},write:(G,q,X)=>{return D.forEach(([Y,Z])=>{X=Z.write(G[Y],q,X)}),X}})}function m7(D){let $=D.map(([,G])=>G),J=y0($.map(j8)),Q=y0($.map(f0))??void 0;return s({...J===null?{maxSize:Q}:{fixedSize:J},read:(G,q)=>{let X={};return D.forEach(([Y,Z])=>{let[K,j]=Z.read(G,q);q=j,X[Y]=K}),[X,q]}})}var u5=1,wJ=128;function u7(){return s({maxSize:1,read:(D,$)=>{let J=D[$];if((J&wJ)===0)return["legacy",$];else{let Q=J^wJ;if(Q>u5)throw new b(Y8,{unsupportedVersion:Q});return[Q,$+1]}}})}var fU=Symbol("AddressMapTypeProperty");var mU=Symbol("AddressMapTypeProperty");var TJ=Object.freeze({name:"Ed25519"});function g5(D){return new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32,...D])}async function OJ(D,$=!1){let J=D.byteLength;if(J!==32)throw new b(X7,{actualLength:J});let Q=g5(D);return await crypto.subtle.importKey("pkcs8",Q,TJ,$,["sign"])}async function l5(D,$=!1){if(i8(),D.extractable===!1)throw new b(q7,{key:D});let J=await crypto.subtle.exportKey("jwk",D);return await crypto.subtle.importKey("jwk",{crv:"Ed25519",ext:$,key_ops:["verify"],kty:"OKP",x:J.x},"Ed25519",$,["verify"])}async function e8(D,$){KJ();let J=await crypto.subtle.sign(TJ,D,h0($));return new Uint8Array(J)}async function MJ(D,$=!1){let J=OJ(D,$),[Q,G]=await Promise.all([($?J:OJ(D,!0)).then(async(q)=>await l5(q,!0)),J]);return{privateKey:G,publicKey:Q}}function PJ(D){let $=Object.values(D);if($.length===0)throw new b(j7);return $.map((J)=>{if(!J)return new Uint8Array(64).fill(0);return J})}function d5(){return nD(n8(H0(U8(),64),{size:VJ()}),PJ)}function c5(D){return nD(n8(H0(U8(),64),{description:"signatures",size:D}),PJ)}var a5=128,i5=127;function r5(D){if(D.length===0)throw new b(W7);return u7().decode(D)===1?"messageFirst":"signaturesFirst"}function o5(D){if(D.length===0)throw new b(E7);let $=D[0];if(($&a5)===0)return"signaturesFirst";let J=$&i5;if(J===0)throw new b(z7,{firstByte:$,transactionBytes:D});if(J===1)return"messageFirst";throw new b(Y8,{unsupportedVersion:J})}function SJ(){return RJ((D)=>r5(D.messageBytes)==="signaturesFirst",s5(),n5())}function s5(){return f7([["signatures",d5()],["messageBytes",U8()]])}function g7(D,$){if(D.length<$+2)throw new b(U7,{messageBytes:D});return D[$+1]}function n5(){let D=U8();return QD({getSizeFromValue:($)=>{let J=g7($.messageBytes,0);return $.messageBytes.length+J*64},write:($,J,Q)=>{Q=D.write($.messageBytes,J,Q);let G=g7($.messageBytes,0);return Q=c5(G).write($.signatures,J,Q),Q}})}function t5(){return IJ((D)=>o5(D)==="signaturesFirst",e5(),DZ())}function e5(){return Z8(m7([["signatures",m0(N0(t8(),64),{size:b7()})],["messageBytes",t8()]]),JZ)}function DZ(){return Z8($Z(),QZ)}function $Z(){return s({read(D,$){let J=g7(D,$),Q=J*64,G=D.length-$-Q;if(G<0)throw new b(C7,{numExpectedSignatures:J,transactionBytes:D.subarray($),transactionBytesLength:D.length-$});let q=D.subarray($,$+G),[X,Y]=m0(N0(t8(),64),{size:J}).read(D,$+G);return[{messageBytes:q,signatures:X},Y]}})}function _J(){return xD(SJ(),t5())}function JZ(D){let{messageBytes:$,signatures:J}=D,Q=FJ([u7(),DJ(o8(),2),m0(v0(),{size:b7()})]),[G,q,X]=Q.decode($),Y=X.slice(0,q);if(Y.length!==J.length)throw new b(d8,{numRequiredSignatures:q,signaturesLength:J.length,signerAddresses:Y});let Z=kJ(Y,J);return{messageBytes:$,signatures:Object.freeze(Z)}}function QZ(D){let{messageBytes:$,signatures:J}=D,Q=$[1],G=14,q=m0(v0(),{size:Q}).decode($,14);if(q.length!==J.length)throw new b(d8,{numRequiredSignatures:Q,signaturesLength:J.length,signerAddresses:q});let X=kJ(q,J);return{messageBytes:$,signatures:X}}function kJ(D,$){let J={};return D.forEach((Q,G)=>{let q=$[G];if(q.every((X)=>X===0))J[Q]=null;else J[Q]=q}),Object.freeze(J)}async function D9(D,$){let J,Q;if(await Promise.all(D.map(async(G)=>{let q=await r8(G.publicKey),X=$.signatures[q];if(X===void 0){Q||=new Set,Q.add(q);return}if(Q)return;let Y=await e8(G.privateKey,$.messageBytes);if(X!==null&&T7(Y,X))return;J||={},J[q]=Y})),Q&&Q.size>0){let G=Object.keys($.signatures);throw new b(K7,{expectedAddresses:G,unexpectedAddresses:[...Q]})}if(!J)return $;return Object.freeze({...$,signatures:Object.freeze({...$.signatures,...J})})}function AJ(D){let $=SJ().encode(D);return _7().decode($)}var GZ=1280,qZ=48,XW=GZ-qZ;async function XZ(D){let $=await r8(D.publicKey);return Object.freeze({address:$,keyPair:D,signMessages:(Q)=>Promise.all(Q.map(async(G)=>Object.freeze({[$]:await e8(D.privateKey,G.content)}))),signTransactions:(Q)=>Promise.all(Q.map(async(G)=>{let q=await D9([D],G);return Object.freeze({[$]:q.signatures[$]})}))})}async function xJ(D,$){return await XZ(await MJ(D,$))}var CW=globalThis.TextEncoder;import{existsSync as CK,readFileSync as HK,writeFileSync as NK}from"node:fs";import{join as eQ}from"node:path";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function V0(D){return D instanceof Uint8Array||ArrayBuffer.isView(D)&&D.constructor.name==="Uint8Array"}function UD(D,$=""){if(!Number.isSafeInteger(D)||D<0){let J=$&&`"${$}" `;throw Error(`${J}expected integer >= 0, got ${D}`)}}function x(D,$,J=""){let Q=V0(D),G=D?.length,q=$!==void 0;if(!Q||q&&G!==$){let X=J&&`"${J}" `,Y=q?` of length ${$}`:"",Z=Q?`length=${G}`:`type=${typeof D}`;throw Error(X+"expected Uint8Array"+Y+", got "+Z)}return D}function u0(D){if(typeof D!=="function"||typeof D.create!=="function")throw Error("Hash must wrapped by utils.createHasher");UD(D.outputLen),UD(D.blockLen)}function g0(D,$=!0){if(D.destroyed)throw Error("Hash instance has been destroyed");if($&&D.finished)throw Error("Hash#digest() has already been called")}function hJ(D,$){x(D,void 0,"digestInto() output");let J=$.outputLen;if(D.length<J)throw Error('"digestInto() output" expected to be of length >='+J)}function GD(...D){for(let $=0;$<D.length;$++)D[$].fill(0)}function hD(D){return new DataView(D.buffer,D.byteOffset,D.byteLength)}function _D(D,$){return D<<32-$|D>>>$}function gD(D,$){return D<<$|D>>>32-$>>>0}var vJ=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),YZ=Array.from({length:256},(D,$)=>$.toString(16).padStart(2,"0"));function lD(D){if(x(D),vJ)return D.toHex();let $="";for(let J=0;J<D.length;J++)$+=YZ[D[J]];return $}var uD={_0:48,_9:57,A:65,F:70,a:97,f:102};function bJ(D){if(D>=uD._0&&D<=uD._9)return D-uD._0;if(D>=uD.A&&D<=uD.F)return D-(uD.A-10);if(D>=uD.a&&D<=uD.f)return D-(uD.a-10);return}function pD(D){if(typeof D!=="string")throw Error("hex string expected, got "+typeof D);if(vJ)return Uint8Array.fromHex(D);let $=D.length,J=$/2;if($%2)throw Error("hex string expected, got unpadded hex of length "+$);let Q=new Uint8Array(J);for(let G=0,q=0;G<J;G++,q+=2){let X=bJ(D.charCodeAt(q)),Y=bJ(D.charCodeAt(q+1));if(X===void 0||Y===void 0){let Z=D[q]+D[q+1];throw Error('hex string expected, got non-hex character "'+Z+'" at index '+q)}Q[G]=X*16+Y}return Q}function ZZ(D){if(typeof D!=="string")throw Error("string expected");return new Uint8Array(new TextEncoder().encode(D))}function l7(D,$=""){if(typeof D==="string")return ZZ(D);return x(D,void 0,$)}function $D(...D){let $=0;for(let Q=0;Q<D.length;Q++){let G=D[Q];x(G),$+=G.length}let J=new Uint8Array($);for(let Q=0,G=0;Q<D.length;Q++){let q=D[Q];J.set(q,G),G+=q.length}return J}function yJ(D,$){if($!==void 0&&{}.toString.call($)!=="[object Object]")throw Error("options must be object or undefined");return Object.assign(D,$)}function W8(D,$={}){let J=(G,q)=>D(q).update(G).digest(),Q=D(void 0);return J.outputLen=Q.outputLen,J.blockLen=Q.blockLen,J.create=(G)=>D(G),Object.assign(J,$),Object.freeze(J)}function tD(D=32){let $=typeof globalThis==="object"?globalThis.crypto:null;if(typeof $?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return $.getRandomValues(new Uint8Array(D))}var p7=(D)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,D])});function l0(D,$,J){return D&$^~D&J}function $9(D,$,J){return D&$^D&J^$&J}class eD{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(D,$,J,Q){this.blockLen=D,this.outputLen=$,this.padOffset=J,this.isLE=Q,this.buffer=new Uint8Array(D),this.view=hD(this.buffer)}update(D){g0(this),x(D);let{view:$,buffer:J,blockLen:Q}=this,G=D.length;for(let q=0;q<G;){let X=Math.min(Q-this.pos,G-q);if(X===Q){let Y=hD(D);for(;Q<=G-q;q+=Q)this.process(Y,q);continue}if(J.set(D.subarray(q,q+X),this.pos),this.pos+=X,q+=X,this.pos===Q)this.process($,0),this.pos=0}return this.length+=D.length,this.roundClean(),this}digestInto(D){g0(this),hJ(D,this),this.finished=!0;let{buffer:$,view:J,blockLen:Q,isLE:G}=this,{pos:q}=this;if($[q++]=128,GD(this.buffer.subarray(q)),this.padOffset>Q-q)this.process(J,0),q=0;for(let j=q;j<Q;j++)$[j]=0;J.setBigUint64(Q-8,BigInt(this.length*8),G),this.process(J,0);let X=hD(D),Y=this.outputLen;if(Y%4)throw Error("_sha2: outputLen must be aligned to 32bit");let Z=Y/4,K=this.get();if(Z>K.length)throw Error("_sha2: outputLen bigger than state");for(let j=0;j<Z;j++)X.setUint32(4*j,K[j],G)}digest(){let{buffer:D,outputLen:$}=this;this.digestInto(D);let J=D.slice(0,$);return this.destroy(),J}_cloneInto(D){D||=new this.constructor,D.set(...this.get());let{blockLen:$,buffer:J,length:Q,finished:G,destroyed:q,pos:X}=this;if(D.destroyed=q,D.finished=G,D.length=Q,D.pos=X,Q%$)D.buffer.set(J);return D}clone(){return this._cloneInto()}}var dD=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),cD=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),ZD=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),KD=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var J9=BigInt(4294967295),fJ=BigInt(32);function KZ(D,$=!1){if($)return{h:Number(D&J9),l:Number(D>>fJ&J9)};return{h:Number(D>>fJ&J9)|0,l:Number(D&J9)|0}}function mJ(D,$=!1){let J=D.length,Q=new Uint32Array(J),G=new Uint32Array(J);for(let q=0;q<J;q++){let{h:X,l:Y}=KZ(D[q],$);[Q[q],G[q]]=[X,Y]}return[Q,G]}var d7=(D,$,J)=>D>>>J,c7=(D,$,J)=>D<<32-J|$>>>J,F0=(D,$,J)=>D>>>J|$<<32-J,L0=(D,$,J)=>D<<32-J|$>>>J,E8=(D,$,J)=>D<<64-J|$>>>J-32,z8=(D,$,J)=>D>>>J-32|$<<64-J;function vD(D,$,J,Q){let G=($>>>0)+(Q>>>0);return{h:D+J+(G/4294967296|0)|0,l:G|0}}var uJ=(D,$,J)=>(D>>>0)+($>>>0)+(J>>>0),gJ=(D,$,J,Q)=>$+J+Q+(D/4294967296|0)|0,lJ=(D,$,J,Q)=>(D>>>0)+($>>>0)+(J>>>0)+(Q>>>0),pJ=(D,$,J,Q,G)=>$+J+Q+G+(D/4294967296|0)|0,dJ=(D,$,J,Q,G)=>(D>>>0)+($>>>0)+(J>>>0)+(Q>>>0)+(G>>>0),cJ=(D,$,J,Q,G,q)=>$+J+Q+G+q+(D/4294967296|0)|0;var UZ=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),D0=new Uint32Array(64);class a7 extends eD{constructor(D){super(64,D,8,!1)}get(){let{A:D,B:$,C:J,D:Q,E:G,F:q,G:X,H:Y}=this;return[D,$,J,Q,G,q,X,Y]}set(D,$,J,Q,G,q,X,Y){this.A=D|0,this.B=$|0,this.C=J|0,this.D=Q|0,this.E=G|0,this.F=q|0,this.G=X|0,this.H=Y|0}process(D,$){for(let j=0;j<16;j++,$+=4)D0[j]=D.getUint32($,!1);for(let j=16;j<64;j++){let U=D0[j-15],C=D0[j-2],z=_D(U,7)^_D(U,18)^U>>>3,E=_D(C,17)^_D(C,19)^C>>>10;D0[j]=E+D0[j-7]+z+D0[j-16]|0}let{A:J,B:Q,C:G,D:q,E:X,F:Y,G:Z,H:K}=this;for(let j=0;j<64;j++){let U=_D(X,6)^_D(X,11)^_D(X,25),C=K+U+l0(X,Y,Z)+UZ[j]+D0[j]|0,E=(_D(J,2)^_D(J,13)^_D(J,22))+$9(J,Q,G)|0;K=Z,Z=Y,Y=X,X=q+C|0,q=G,G=Q,Q=J,J=C+E|0}J=J+this.A|0,Q=Q+this.B|0,G=G+this.C|0,q=q+this.D|0,X=X+this.E|0,Y=Y+this.F|0,Z=Z+this.G|0,K=K+this.H|0,this.set(J,Q,G,q,X,Y,Z,K)}roundClean(){GD(D0)}destroy(){this.set(0,0,0,0,0,0,0,0),GD(this.buffer)}}class aJ extends a7{A=dD[0]|0;B=dD[1]|0;C=dD[2]|0;D=dD[3]|0;E=dD[4]|0;F=dD[5]|0;G=dD[6]|0;H=dD[7]|0;constructor(){super(32)}}class WZ extends a7{A=cD[0]|0;B=cD[1]|0;C=cD[2]|0;D=cD[3]|0;E=cD[4]|0;F=cD[5]|0;G=cD[6]|0;H=cD[7]|0;constructor(){super(28)}}var iJ=(()=>mJ(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((D)=>BigInt(D))))(),EZ=(()=>iJ[0])(),zZ=(()=>iJ[1])(),$0=new Uint32Array(80),J0=new Uint32Array(80);class C8 extends eD{constructor(D){super(128,D,16,!1)}get(){let{Ah:D,Al:$,Bh:J,Bl:Q,Ch:G,Cl:q,Dh:X,Dl:Y,Eh:Z,El:K,Fh:j,Fl:U,Gh:C,Gl:z,Hh:E,Hl:F}=this;return[D,$,J,Q,G,q,X,Y,Z,K,j,U,C,z,E,F]}set(D,$,J,Q,G,q,X,Y,Z,K,j,U,C,z,E,F){this.Ah=D|0,this.Al=$|0,this.Bh=J|0,this.Bl=Q|0,this.Ch=G|0,this.Cl=q|0,this.Dh=X|0,this.Dl=Y|0,this.Eh=Z|0,this.El=K|0,this.Fh=j|0,this.Fl=U|0,this.Gh=C|0,this.Gl=z|0,this.Hh=E|0,this.Hl=F|0}process(D,$){for(let N=0;N<16;N++,$+=4)$0[N]=D.getUint32($),J0[N]=D.getUint32($+=4);for(let N=16;N<80;N++){let I=$0[N-15]|0,O=J0[N-15]|0,y=F0(I,O,1)^F0(I,O,8)^d7(I,O,7),p=L0(I,O,1)^L0(I,O,8)^c7(I,O,7),m=$0[N-2]|0,T=J0[N-2]|0,w=F0(m,T,19)^E8(m,T,61)^d7(m,T,6),h=L0(m,T,19)^z8(m,T,61)^c7(m,T,6),u=lJ(p,h,J0[N-7],J0[N-16]),L=pJ(u,y,w,$0[N-7],$0[N-16]);$0[N]=L|0,J0[N]=u|0}let{Ah:J,Al:Q,Bh:G,Bl:q,Ch:X,Cl:Y,Dh:Z,Dl:K,Eh:j,El:U,Fh:C,Fl:z,Gh:E,Gl:F,Hh:W,Hl:H}=this;for(let N=0;N<80;N++){let I=F0(j,U,14)^F0(j,U,18)^E8(j,U,41),O=L0(j,U,14)^L0(j,U,18)^z8(j,U,41),y=j&C^~j&E,p=U&z^~U&F,m=dJ(H,O,p,zZ[N],J0[N]),T=cJ(m,W,I,y,EZ[N],$0[N]),w=m|0,h=F0(J,Q,28)^E8(J,Q,34)^E8(J,Q,39),u=L0(J,Q,28)^z8(J,Q,34)^z8(J,Q,39),L=J&G^J&X^G&X,R=Q&q^Q&Y^q&Y;W=E|0,H=F|0,E=C|0,F=z|0,C=j|0,z=U|0,{h:j,l:U}=vD(Z|0,K|0,T|0,w|0),Z=X|0,K=Y|0,X=G|0,Y=q|0,G=J|0,q=Q|0;let V=uJ(w,u,R);J=gJ(V,T,h,L),Q=V|0}({h:J,l:Q}=vD(this.Ah|0,this.Al|0,J|0,Q|0)),{h:G,l:q}=vD(this.Bh|0,this.Bl|0,G|0,q|0),{h:X,l:Y}=vD(this.Ch|0,this.Cl|0,X|0,Y|0),{h:Z,l:K}=vD(this.Dh|0,this.Dl|0,Z|0,K|0),{h:j,l:U}=vD(this.Eh|0,this.El|0,j|0,U|0),{h:C,l:z}=vD(this.Fh|0,this.Fl|0,C|0,z|0),{h:E,l:F}=vD(this.Gh|0,this.Gl|0,E|0,F|0),{h:W,l:H}=vD(this.Hh|0,this.Hl|0,W|0,H|0),this.set(J,Q,G,q,X,Y,Z,K,j,U,C,z,E,F,W,H)}roundClean(){GD($0,J0)}destroy(){GD(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class rJ extends C8{Ah=KD[0]|0;Al=KD[1]|0;Bh=KD[2]|0;Bl=KD[3]|0;Ch=KD[4]|0;Cl=KD[5]|0;Dh=KD[6]|0;Dl=KD[7]|0;Eh=KD[8]|0;El=KD[9]|0;Fh=KD[10]|0;Fl=KD[11]|0;Gh=KD[12]|0;Gl=KD[13]|0;Hh=KD[14]|0;Hl=KD[15]|0;constructor(){super(64)}}class CZ extends C8{Ah=ZD[0]|0;Al=ZD[1]|0;Bh=ZD[2]|0;Bl=ZD[3]|0;Ch=ZD[4]|0;Cl=ZD[5]|0;Dh=ZD[6]|0;Dl=ZD[7]|0;Eh=ZD[8]|0;El=ZD[9]|0;Fh=ZD[10]|0;Fl=ZD[11]|0;Gh=ZD[12]|0;Gl=ZD[13]|0;Hh=ZD[14]|0;Hl=ZD[15]|0;constructor(){super(48)}}var WD=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),ED=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class HZ extends C8{Ah=WD[0]|0;Al=WD[1]|0;Bh=WD[2]|0;Bl=WD[3]|0;Ch=WD[4]|0;Cl=WD[5]|0;Dh=WD[6]|0;Dl=WD[7]|0;Eh=WD[8]|0;El=WD[9]|0;Fh=WD[10]|0;Fl=WD[11]|0;Gh=WD[12]|0;Gl=WD[13]|0;Hh=WD[14]|0;Hl=WD[15]|0;constructor(){super(28)}}class NZ extends C8{Ah=ED[0]|0;Al=ED[1]|0;Bh=ED[2]|0;Bl=ED[3]|0;Ch=ED[4]|0;Cl=ED[5]|0;Dh=ED[6]|0;Dl=ED[7]|0;Eh=ED[8]|0;El=ED[9]|0;Fh=ED[10]|0;Fl=ED[11]|0;Gh=ED[12]|0;Gl=ED[13]|0;Hh=ED[14]|0;Hl=ED[15]|0;constructor(){super(32)}}var B0=W8(()=>new aJ,p7(1));var R0=W8(()=>new rJ,p7(3));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var r7=BigInt(0),i7=BigInt(1);function aD(D,$=""){if(typeof D!=="boolean"){let J=$&&`"${$}" `;throw Error(J+"expected boolean, got type="+typeof D)}return D}function oJ(D){if(typeof D==="bigint"){if(!Q9(D))throw Error("positive bigint expected, got "+D)}else UD(D);return D}function H8(D){let $=oJ(D).toString(16);return $.length&1?"0"+$:$}function sJ(D){if(typeof D!=="string")throw Error("hex string expected, got "+typeof D);return D===""?r7:BigInt("0x"+D)}function p0(D){return sJ(lD(D))}function I0(D){return sJ(lD(q9(x(D)).reverse()))}function G9(D,$){UD($),D=oJ(D);let J=pD(D.toString(16).padStart($*2,"0"));if(J.length!==$)throw Error("number too large");return J}function o7(D,$){return G9(D,$).reverse()}function q9(D){return Uint8Array.from(D)}var Q9=(D)=>typeof D==="bigint"&&r7<=D;function VZ(D,$,J){return Q9(D)&&Q9($)&&Q9(J)&&$<=D&&D<J}function N8(D,$,J,Q){if(!VZ($,J,Q))throw Error("expected valid "+D+": "+J+" <= n < "+Q+", got "+$)}function s7(D){let $;for($=0;D>r7;D>>=i7,$+=1);return $}var V8=(D)=>(i7<<BigInt(D))-i7;function nJ(D,$,J){if(UD(D,"hashLen"),UD($,"qByteLen"),typeof J!=="function")throw Error("hmacFn must be a function");let Q=(W)=>new Uint8Array(W),G=Uint8Array.of(),q=Uint8Array.of(0),X=Uint8Array.of(1),Y=1000,Z=Q(D),K=Q(D),j=0,U=()=>{Z.fill(1),K.fill(0),j=0},C=(...W)=>J(K,$D(Z,...W)),z=(W=G)=>{if(K=C(q,W),Z=C(),W.length===0)return;K=C(X,W),Z=C()},E=()=>{if(j++>=Y)throw Error("drbg: tried max amount of iterations");let W=0,H=[];while(W<$){Z=C();let N=Z.slice();H.push(N),W+=Z.length}return $D(...H)};return(W,H)=>{U(),z(W);let N=void 0;while(!(N=H(E())))z();return U(),N}}function Q0(D,$={},J={}){if(!D||typeof D!=="object")throw Error("expected valid options object");function Q(q,X,Y){let Z=D[q];if(Y&&Z===void 0)return;let K=typeof Z;if(K!==X||Z===null)throw Error(`param "${q}" is invalid: expected ${X}, got ${K}`)}let G=(q,X)=>Object.entries(q).forEach(([Y,Z])=>Q(Y,Z,X));G($,!1),G(J,!0)}function d0(D){let $=new WeakMap;return(J,...Q)=>{let G=$.get(J);if(G!==void 0)return G;let q=D(J,...Q);return $.set(J,q),q}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var HD=BigInt(0),qD=BigInt(1),w0=BigInt(2),DQ=BigInt(3),$Q=BigInt(4),JQ=BigInt(5),FZ=BigInt(7),QQ=BigInt(8),LZ=BigInt(9),GQ=BigInt(16);function n(D,$){let J=D%$;return J>=HD?J:$+J}function o(D,$,J){let Q=D;while($-- >HD)Q*=Q,Q%=J;return Q}function tJ(D,$){if(D===HD)throw Error("invert: expected non-zero number");if($<=HD)throw Error("invert: expected positive modulus, got "+$);let J=n(D,$),Q=$,G=HD,q=qD,X=qD,Y=HD;while(J!==HD){let K=Q/J,j=Q%J,U=G-X*K,C=q-Y*K;Q=J,J=j,G=X,q=Y,X=U,Y=C}if(Q!==qD)throw Error("invert: does not exist");return n(G,$)}function n7(D,$,J){if(!D.eql(D.sqr($),J))throw Error("Cannot find square root")}function qQ(D,$){let J=(D.ORDER+qD)/$Q,Q=D.pow($,J);return n7(D,Q,$),Q}function BZ(D,$){let J=(D.ORDER-JQ)/QQ,Q=D.mul($,w0),G=D.pow(Q,J),q=D.mul($,G),X=D.mul(D.mul(q,w0),G),Y=D.mul(q,D.sub(X,D.ONE));return n7(D,Y,$),Y}function RZ(D){let $=c0(D),J=XQ(D),Q=J($,$.neg($.ONE)),G=J($,Q),q=J($,$.neg(Q)),X=(D+FZ)/GQ;return(Y,Z)=>{let K=Y.pow(Z,X),j=Y.mul(K,Q),U=Y.mul(K,G),C=Y.mul(K,q),z=Y.eql(Y.sqr(j),Z),E=Y.eql(Y.sqr(U),Z);K=Y.cmov(K,j,z),j=Y.cmov(C,U,E);let F=Y.eql(Y.sqr(j),Z),W=Y.cmov(K,j,F);return n7(Y,W,Z),W}}function XQ(D){if(D<DQ)throw Error("sqrt is not defined for small field");let $=D-qD,J=0;while($%w0===HD)$/=w0,J++;let Q=w0,G=c0(D);while(eJ(G,Q)===1)if(Q++>1000)throw Error("Cannot find square root: probably non-prime P");if(J===1)return qQ;let q=G.pow(Q,$),X=($+qD)/w0;return function(Z,K){if(Z.is0(K))return K;if(eJ(Z,K)!==1)throw Error("Cannot find square root");let j=J,U=Z.mul(Z.ONE,q),C=Z.pow(K,$),z=Z.pow(K,X);while(!Z.eql(C,Z.ONE)){if(Z.is0(C))return Z.ZERO;let E=1,F=Z.sqr(C);while(!Z.eql(F,Z.ONE))if(E++,F=Z.sqr(F),E===j)throw Error("Cannot find square root");let W=qD<<BigInt(j-E-1),H=Z.pow(U,W);j=E,U=Z.sqr(H),C=Z.mul(C,U),z=Z.mul(z,H)}return z}}function IZ(D){if(D%$Q===DQ)return qQ;if(D%QQ===JQ)return BZ;if(D%GQ===LZ)return RZ(D);return XQ(D)}var YQ=(D,$)=>(n(D,$)&qD)===qD,wZ=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function t7(D){let $={ORDER:"bigint",BYTES:"number",BITS:"number"},J=wZ.reduce((Q,G)=>{return Q[G]="function",Q},$);return Q0(D,J),D}function OZ(D,$,J){if(J<HD)throw Error("invalid exponent, negatives unsupported");if(J===HD)return D.ONE;if(J===qD)return $;let Q=D.ONE,G=$;while(J>HD){if(J&qD)Q=D.mul(Q,G);G=D.sqr(G),J>>=qD}return Q}function F8(D,$,J=!1){let Q=Array($.length).fill(J?D.ZERO:void 0),G=$.reduce((X,Y,Z)=>{if(D.is0(Y))return X;return Q[Z]=X,D.mul(X,Y)},D.ONE),q=D.inv(G);return $.reduceRight((X,Y,Z)=>{if(D.is0(Y))return X;return Q[Z]=D.mul(X,Q[Z]),D.mul(X,Y)},q),Q}function eJ(D,$){let J=(D.ORDER-qD)/w0,Q=D.pow($,J),G=D.eql(Q,D.ONE),q=D.eql(Q,D.ZERO),X=D.eql(Q,D.neg(D.ONE));if(!G&&!q&&!X)throw Error("invalid Legendre symbol result");return G?1:q?0:-1}function TZ(D,$){if($!==void 0)UD($);let J=$!==void 0?$:D.toString(2).length,Q=Math.ceil(J/8);return{nBitLength:J,nByteLength:Q}}class ZQ{ORDER;BITS;BYTES;isLE;ZERO=HD;ONE=qD;_lengths;_sqrt;_mod;constructor(D,$={}){if(D<=HD)throw Error("invalid field: expected ORDER > 0, got "+D);let J=void 0;if(this.isLE=!1,$!=null&&typeof $==="object"){if(typeof $.BITS==="number")J=$.BITS;if(typeof $.sqrt==="function")this.sqrt=$.sqrt;if(typeof $.isLE==="boolean")this.isLE=$.isLE;if($.allowedLengths)this._lengths=$.allowedLengths?.slice();if(typeof $.modFromBytes==="boolean")this._mod=$.modFromBytes}let{nBitLength:Q,nByteLength:G}=TZ(D,J);if(G>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=D,this.BITS=Q,this.BYTES=G,this._sqrt=void 0,Object.preventExtensions(this)}create(D){return n(D,this.ORDER)}isValid(D){if(typeof D!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof D);return HD<=D&&D<this.ORDER}is0(D){return D===HD}isValidNot0(D){return!this.is0(D)&&this.isValid(D)}isOdd(D){return(D&qD)===qD}neg(D){return n(-D,this.ORDER)}eql(D,$){return D===$}sqr(D){return n(D*D,this.ORDER)}add(D,$){return n(D+$,this.ORDER)}sub(D,$){return n(D-$,this.ORDER)}mul(D,$){return n(D*$,this.ORDER)}pow(D,$){return OZ(this,D,$)}div(D,$){return n(D*tJ($,this.ORDER),this.ORDER)}sqrN(D){return D*D}addN(D,$){return D+$}subN(D,$){return D-$}mulN(D,$){return D*$}inv(D){return tJ(D,this.ORDER)}sqrt(D){if(!this._sqrt)this._sqrt=IZ(this.ORDER);return this._sqrt(this,D)}toBytes(D){return this.isLE?o7(D,this.BYTES):G9(D,this.BYTES)}fromBytes(D,$=!1){x(D);let{_lengths:J,BYTES:Q,isLE:G,ORDER:q,_mod:X}=this;if(J){if(!J.includes(D.length)||D.length>Q)throw Error("Field.fromBytes: expected "+J+" bytes, got "+D.length);let Z=new Uint8Array(Q);Z.set(D,G?0:Z.length-D.length),D=Z}if(D.length!==Q)throw Error("Field.fromBytes: expected "+Q+" bytes, got "+D.length);let Y=G?I0(D):p0(D);if(X)Y=n(Y,q);if(!$){if(!this.isValid(Y))throw Error("invalid field element: outside of range 0..ORDER")}return Y}invertBatch(D){return F8(this,D)}cmov(D,$,J){return J?$:D}}function c0(D,$={}){return new ZQ(D,$)}function KQ(D){if(typeof D!=="bigint")throw Error("field order must be bigint");let $=D.toString(2).length;return Math.ceil($/8)}function e7(D){let $=KQ(D);return $+Math.ceil($/2)}function D6(D,$,J=!1){x(D);let Q=D.length,G=KQ($),q=e7($);if(Q<16||Q<q||Q>1024)throw Error("expected "+q+"-1024 bytes of input, got "+Q);let X=J?I0(D):p0(D),Y=n(X,$-qD)+qD;return J?o7(Y,G):G9(Y,G)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var a0=BigInt(0),O0=BigInt(1);function L8(D,$){let J=$.negate();return D?J:$}function T0(D,$){let J=F8(D.Fp,$.map((Q)=>Q.Z));return $.map((Q,G)=>D.fromAffine(Q.toAffine(J[G])))}function EQ(D,$){if(!Number.isSafeInteger(D)||D<=0||D>$)throw Error("invalid window size, expected [1.."+$+"], got W="+D)}function $6(D,$){EQ(D,$);let J=Math.ceil($/D)+1,Q=2**(D-1),G=2**D,q=V8(D),X=BigInt(D);return{windows:J,windowSize:Q,mask:q,maxNumber:G,shiftBy:X}}function jQ(D,$,J){let{windowSize:Q,mask:G,maxNumber:q,shiftBy:X}=J,Y=Number(D&G),Z=D>>X;if(Y>Q)Y-=q,Z+=O0;let K=$*Q,j=K+Math.abs(Y)-1,U=Y===0,C=Y<0,z=$%2!==0;return{nextN:Z,offset:j,isZero:U,isNeg:C,isNegF:z,offsetF:K}}var J6=new WeakMap,zQ=new WeakMap;function Q6(D){return zQ.get(D)||1}function UQ(D){if(D!==a0)throw Error("invalid wNAF")}class B8{BASE;ZERO;Fn;bits;constructor(D,$){this.BASE=D.BASE,this.ZERO=D.ZERO,this.Fn=D.Fn,this.bits=$}_unsafeLadder(D,$,J=this.ZERO){let Q=D;while($>a0){if($&O0)J=J.add(Q);Q=Q.double(),$>>=O0}return J}precomputeWindow(D,$){let{windows:J,windowSize:Q}=$6($,this.bits),G=[],q=D,X=q;for(let Y=0;Y<J;Y++){X=q,G.push(X);for(let Z=1;Z<Q;Z++)X=X.add(q),G.push(X);q=X.double()}return G}wNAF(D,$,J){if(!this.Fn.isValid(J))throw Error("invalid scalar");let Q=this.ZERO,G=this.BASE,q=$6(D,this.bits);for(let X=0;X<q.windows;X++){let{nextN:Y,offset:Z,isZero:K,isNeg:j,isNegF:U,offsetF:C}=jQ(J,X,q);if(J=Y,K)G=G.add(L8(U,$[C]));else Q=Q.add(L8(j,$[Z]))}return UQ(J),{p:Q,f:G}}wNAFUnsafe(D,$,J,Q=this.ZERO){let G=$6(D,this.bits);for(let q=0;q<G.windows;q++){if(J===a0)break;let{nextN:X,offset:Y,isZero:Z,isNeg:K}=jQ(J,q,G);if(J=X,Z)continue;else{let j=$[Y];Q=Q.add(K?j.negate():j)}}return UQ(J),Q}getPrecomputes(D,$,J){let Q=J6.get($);if(!Q){if(Q=this.precomputeWindow($,D),D!==1){if(typeof J==="function")Q=J(Q);J6.set($,Q)}}return Q}cached(D,$,J){let Q=Q6(D);return this.wNAF(Q,this.getPrecomputes(Q,D,J),$)}unsafe(D,$,J,Q){let G=Q6(D);if(G===1)return this._unsafeLadder(D,$,Q);return this.wNAFUnsafe(G,this.getPrecomputes(G,D,J),$,Q)}createCache(D,$){EQ($,this.bits),zQ.set(D,$),J6.delete(D)}hasCache(D){return Q6(D)!==1}}function CQ(D,$,J,Q){let G=$,q=D.ZERO,X=D.ZERO;while(J>a0||Q>a0){if(J&O0)q=q.add(G);if(Q&O0)X=X.add(G);G=G.double(),J>>=O0,Q>>=O0}return{p1:q,p2:X}}function WQ(D,$,J){if($){if($.ORDER!==D)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return t7($),$}else return c0(D,{isLE:J})}function X9(D,$,J={},Q){if(Q===void 0)Q=D==="edwards";if(!$||typeof $!=="object")throw Error(`expected valid ${D} CURVE object`);for(let Z of["p","n","h"]){let K=$[Z];if(!(typeof K==="bigint"&&K>a0))throw Error(`CURVE.${Z} must be positive bigint`)}let G=WQ($.p,J.Fp,Q),q=WQ($.n,J.Fn,Q),Y=["Gx","Gy","a",D==="weierstrass"?"b":"d"];for(let Z of Y)if(!G.isValid($[Z]))throw Error(`CURVE.${Z} must be valid field element of CURVE.Fp`);return $=Object.freeze(Object.assign({},$)),{CURVE:$,Fp:G,Fn:q}}function Y9(D,$){return function(Q){let G=D(Q);return{secretKey:G,publicKey:$(G)}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var G0=BigInt(0),XD=BigInt(1),G6=BigInt(2),MZ=BigInt(8);function PZ(D,$,J,Q){let G=D.sqr(J),q=D.sqr(Q),X=D.add(D.mul($.a,G),q),Y=D.add(D.ONE,D.mul($.d,D.mul(G,q)));return D.eql(X,Y)}function HQ(D,$={}){let J=X9("edwards",D,$,$.FpFnLE),{Fp:Q,Fn:G}=J,q=J.CURVE,{h:X}=q;Q0($,{},{uvRatio:"function"});let Y=G6<<BigInt(G.BYTES*8)-XD,Z=(W)=>Q.create(W),K=$.uvRatio||((W,H)=>{try{return{isValid:!0,value:Q.sqrt(Q.div(W,H))}}catch(N){return{isValid:!1,value:G0}}});if(!PZ(Q,q,q.Gx,q.Gy))throw Error("bad curve params: generator point");function j(W,H,N=!1){let I=N?XD:G0;return N8("coordinate "+W,H,I,Y),H}function U(W){if(!(W instanceof E))throw Error("EdwardsPoint expected")}let C=d0((W,H)=>{let{X:N,Y:I,Z:O}=W,y=W.is0();if(H==null)H=y?MZ:Q.inv(O);let p=Z(N*H),m=Z(I*H),T=Q.mul(O,H);if(y)return{x:G0,y:XD};if(T!==XD)throw Error("invZ was invalid");return{x:p,y:m}}),z=d0((W)=>{let{a:H,d:N}=q;if(W.is0())throw Error("bad point: ZERO");let{X:I,Y:O,Z:y,T:p}=W,m=Z(I*I),T=Z(O*O),w=Z(y*y),h=Z(w*w),u=Z(m*H),L=Z(w*Z(u+T)),R=Z(h+Z(N*Z(m*T)));if(L!==R)throw Error("bad point: equation left != right (1)");let V=Z(I*O),B=Z(y*p);if(V!==B)throw Error("bad point: equation left != right (2)");return!0});class E{static BASE=new E(q.Gx,q.Gy,XD,Z(q.Gx*q.Gy));static ZERO=new E(G0,XD,XD,G0);static Fp=Q;static Fn=G;X;Y;Z;T;constructor(W,H,N,I){this.X=j("x",W),this.Y=j("y",H),this.Z=j("z",N,!0),this.T=j("t",I),Object.freeze(this)}static CURVE(){return q}static fromAffine(W){if(W instanceof E)throw Error("extended point not allowed");let{x:H,y:N}=W||{};return j("x",H),j("y",N),new E(H,N,XD,Z(H*N))}static fromBytes(W,H=!1){let N=Q.BYTES,{a:I,d:O}=q;W=q9(x(W,N,"point")),aD(H,"zip215");let y=q9(W),p=W[N-1];y[N-1]=p&-129;let m=I0(y),T=H?Y:Q.ORDER;N8("point.y",m,G0,T);let w=Z(m*m),h=Z(w-XD),u=Z(O*w-I),{isValid:L,value:R}=K(h,u);if(!L)throw Error("bad point: invalid y coordinate");let V=(R&XD)===XD,B=(p&128)!==0;if(!H&&R===G0&&B)throw Error("bad point: x=0 and x_0=1");if(B!==V)R=Z(-R);return E.fromAffine({x:R,y:m})}static fromHex(W,H=!1){return E.fromBytes(pD(W),H)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(W=8,H=!0){if(F.createCache(this,W),!H)this.multiply(G6);return this}assertValidity(){z(this)}equals(W){U(W);let{X:H,Y:N,Z:I}=this,{X:O,Y:y,Z:p}=W,m=Z(H*p),T=Z(O*I),w=Z(N*p),h=Z(y*I);return m===T&&w===h}is0(){return this.equals(E.ZERO)}negate(){return new E(Z(-this.X),this.Y,this.Z,Z(-this.T))}double(){let{a:W}=q,{X:H,Y:N,Z:I}=this,O=Z(H*H),y=Z(N*N),p=Z(G6*Z(I*I)),m=Z(W*O),T=H+N,w=Z(Z(T*T)-O-y),h=m+y,u=h-p,L=m-y,R=Z(w*u),V=Z(h*L),B=Z(w*L),M=Z(u*h);return new E(R,V,M,B)}add(W){U(W);let{a:H,d:N}=q,{X:I,Y:O,Z:y,T:p}=this,{X:m,Y:T,Z:w,T:h}=W,u=Z(I*m),L=Z(O*T),R=Z(p*N*h),V=Z(y*w),B=Z((I+O)*(m+T)-u-L),M=V-R,S=V+R,P=Z(L-H*u),_=Z(B*M),k=Z(S*P),A=Z(B*P),t=Z(M*S);return new E(_,k,t,A)}subtract(W){return this.add(W.negate())}multiply(W){if(!G.isValidNot0(W))throw Error("invalid scalar: expected 1 <= sc < curve.n");let{p:H,f:N}=F.cached(this,W,(I)=>T0(E,I));return T0(E,[H,N])[0]}multiplyUnsafe(W,H=E.ZERO){if(!G.isValid(W))throw Error("invalid scalar: expected 0 <= sc < curve.n");if(W===G0)return E.ZERO;if(this.is0()||W===XD)return this;return F.unsafe(this,W,(N)=>T0(E,N),H)}isSmallOrder(){return this.multiplyUnsafe(X).is0()}isTorsionFree(){return F.unsafe(this,q.n).is0()}toAffine(W){return C(this,W)}clearCofactor(){if(X===XD)return this;return this.multiplyUnsafe(X)}toBytes(){let{x:W,y:H}=this.toAffine(),N=Q.toBytes(H);return N[N.length-1]|=W&XD?128:0,N}toHex(){return lD(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let F=new B8(E,G.BITS);return E.BASE.precompute(8),E}function NQ(D,$,J={}){if(typeof $!=="function")throw Error('"hash" function param is required');Q0(J,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:Q}=J,{BASE:G,Fp:q,Fn:X}=D,Y=J.randomBytes||tD,Z=J.adjustScalarBytes||((T)=>T),K=J.domain||((T,w,h)=>{if(aD(h,"phflag"),w.length||h)throw Error("Contexts/pre-hash are not supported");return T});function j(T){return X.create(I0(T))}function U(T){let w=I.secretKey;x(T,I.secretKey,"secretKey");let h=x($(T),2*w,"hashedSecretKey"),u=Z(h.slice(0,w)),L=h.slice(w,2*w),R=j(u);return{head:u,prefix:L,scalar:R}}function C(T){let{head:w,prefix:h,scalar:u}=U(T),L=G.multiply(u),R=L.toBytes();return{head:w,prefix:h,scalar:u,point:L,pointBytes:R}}function z(T){return C(T).pointBytes}function E(T=Uint8Array.of(),...w){let h=$D(...w);return j($(K(h,x(T,void 0,"context"),!!Q)))}function F(T,w,h={}){if(T=x(T,void 0,"message"),Q)T=Q(T);let{prefix:u,scalar:L,pointBytes:R}=C(w),V=E(h.context,u,T),B=G.multiply(V).toBytes(),M=E(h.context,B,R,T),S=X.create(V+M*L);if(!X.isValid(S))throw Error("sign failed: invalid s");let P=$D(B,X.toBytes(S));return x(P,I.signature,"result")}let W={zip215:!0};function H(T,w,h,u=W){let{context:L,zip215:R}=u,V=I.signature;if(T=x(T,V,"signature"),w=x(w,void 0,"message"),h=x(h,I.publicKey,"publicKey"),R!==void 0)aD(R,"zip215");if(Q)w=Q(w);let B=V/2,M=T.subarray(0,B),S=I0(T.subarray(B,V)),P,_,k;try{P=D.fromBytes(h,R),_=D.fromBytes(M,R),k=G.multiplyUnsafe(S)}catch(a){return!1}if(!R&&P.isSmallOrder())return!1;let A=E(L,_.toBytes(),P.toBytes(),w);return _.add(P.multiplyUnsafe(A)).subtract(k).clearCofactor().is0()}let N=q.BYTES,I={secretKey:N,publicKey:N,signature:2*N,seed:N};function O(T=Y(I.seed)){return x(T,I.seed,"seed")}function y(T){return V0(T)&&T.length===X.BYTES}function p(T,w){try{return!!D.fromBytes(T,w)}catch(h){return!1}}let m={getExtendedPublicKey:C,randomSecretKey:O,isValidSecretKey:y,isValidPublicKey:p,toMontgomery(T){let{y:w}=D.fromBytes(T),h=I.publicKey,u=h===32;if(!u&&h!==57)throw Error("only defined for 25519 and 448");let L=u?q.div(XD+w,XD-w):q.div(w-XD,w+XD);return q.toBytes(L)},toMontgomerySecret(T){let w=I.secretKey;x(T,w);let h=$(T.subarray(0,w));return Z(h).subarray(0,w)}};return Object.freeze({keygen:Y9(O,z),getPublicKey:z,sign:F,verify:H,utils:m,Point:D,lengths:I})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var SZ=BigInt(1),VQ=BigInt(2);var _Z=BigInt(5),kZ=BigInt(8),q6=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),AZ=(()=>({p:q6,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:kZ,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function xZ(D){let $=BigInt(10),J=BigInt(20),Q=BigInt(40),G=BigInt(80),q=q6,Y=D*D%q*D%q,Z=o(Y,VQ,q)*Y%q,K=o(Z,SZ,q)*D%q,j=o(K,_Z,q)*K%q,U=o(j,$,q)*j%q,C=o(U,J,q)*U%q,z=o(C,Q,q)*C%q,E=o(z,G,q)*z%q,F=o(E,G,q)*z%q,W=o(F,$,q)*j%q;return{pow_p_5_8:o(W,VQ,q)*D%q,b2:Y}}function bZ(D){return D[0]&=248,D[31]&=127,D[31]|=64,D}var FQ=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function hZ(D,$){let J=q6,Q=n($*$*$,J),G=n(Q*Q*$,J),q=xZ(D*G).pow_p_5_8,X=n(D*Q*q,J),Y=n($*X*X,J),Z=X,K=n(X*FQ,J),j=Y===D,U=Y===n(-D,J),C=Y===n(-D*FQ,J);if(j)X=Z;if(U||C)X=K;if(YQ(X,J))X=n(-X,J);return{isValid:j||U,value:X}}var vZ=HQ(AZ,{uvRatio:hZ});function yZ(D){return NQ(vZ,R0,Object.assign({adjustScalarBytes:bZ},D))}var X6=yZ({});class Y6{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(D,$){if(u0(D),x($,void 0,"key"),this.iHash=D.create(),typeof this.iHash.update!=="function")throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let J=this.blockLen,Q=new Uint8Array(J);Q.set($.length>J?D.create().update($).digest():$);for(let G=0;G<Q.length;G++)Q[G]^=54;this.iHash.update(Q),this.oHash=D.create();for(let G=0;G<Q.length;G++)Q[G]^=106;this.oHash.update(Q),GD(Q)}update(D){return g0(this),this.iHash.update(D),this}digestInto(D){g0(this),x(D,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(D),this.oHash.update(D),this.oHash.digestInto(D),this.destroy()}digest(){let D=new Uint8Array(this.oHash.outputLen);return this.digestInto(D),D}_cloneInto(D){D||=Object.create(Object.getPrototypeOf(this),{});let{oHash:$,iHash:J,finished:Q,destroyed:G,blockLen:q,outputLen:X}=this;return D=D,D.finished=Q,D.destroyed=G,D.blockLen=q,D.outputLen=X,D.oHash=$._cloneInto(D.oHash),D.iHash=J._cloneInto(D.iHash),D}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var q0=(D,$,J)=>new Y6(D,$).update(J).digest();q0.create=(D,$)=>new Y6(D,$);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var LQ=(D,$)=>(D+(D>=0?$:-$)/RQ)/$;function fZ(D,$,J){let[[Q,G],[q,X]]=$,Y=LQ(X*D,J),Z=LQ(-G*D,J),K=D-Y*Q-Z*q,j=-Y*G-Z*X,U=K<iD,C=j<iD;if(U)K=-K;if(C)j=-j;let z=V8(Math.ceil(s7(J)/2))+i0;if(K<iD||K>=z||j<iD||j>=z)throw Error("splitScalar (endomorphism): failed, k="+D);return{k1neg:U,k1:K,k2neg:C,k2:j}}function K6(D){if(!["compact","recovered","der"].includes(D))throw Error('Signature format must be "compact", "recovered", or "der"');return D}function Z6(D,$){let J={};for(let Q of Object.keys($))J[Q]=D[Q]===void 0?$[Q]:D[Q];if(aD(J.lowS,"lowS"),aD(J.prehash,"prehash"),J.format!==void 0)K6(J.format);return J}class BQ extends Error{constructor(D=""){super(D)}}var X0={Err:BQ,_tlv:{encode:(D,$)=>{let{Err:J}=X0;if(D<0||D>256)throw new J("tlv.encode: wrong tag");if($.length&1)throw new J("tlv.encode: unpadded data");let Q=$.length/2,G=H8(Q);if(G.length/2&128)throw new J("tlv.encode: long form length too big");let q=Q>127?H8(G.length/2|128):"";return H8(D)+q+G+$},decode(D,$){let{Err:J}=X0,Q=0;if(D<0||D>256)throw new J("tlv.encode: wrong tag");if($.length<2||$[Q++]!==D)throw new J("tlv.decode: wrong tlv");let G=$[Q++],q=!!(G&128),X=0;if(!q)X=G;else{let Z=G&127;if(!Z)throw new J("tlv.decode(long): indefinite length not supported");if(Z>4)throw new J("tlv.decode(long): byte length is too big");let K=$.subarray(Q,Q+Z);if(K.length!==Z)throw new J("tlv.decode: length bytes not complete");if(K[0]===0)throw new J("tlv.decode(long): zero leftmost byte");for(let j of K)X=X<<8|j;if(Q+=Z,X<128)throw new J("tlv.decode(long): not minimal encoding")}let Y=$.subarray(Q,Q+X);if(Y.length!==X)throw new J("tlv.decode: wrong value length");return{v:Y,l:$.subarray(Q+X)}}},_int:{encode(D){let{Err:$}=X0;if(D<iD)throw new $("integer: negative integers are not allowed");let J=H8(D);if(Number.parseInt(J[0],16)&8)J="00"+J;if(J.length&1)throw new $("unexpected DER parsing assertion: unpadded hex");return J},decode(D){let{Err:$}=X0;if(D[0]&128)throw new $("invalid signature integer: negative");if(D[0]===0&&!(D[1]&128))throw new $("invalid signature integer: unnecessary leading zero");return p0(D)}},toSig(D){let{Err:$,_int:J,_tlv:Q}=X0,G=x(D,void 0,"signature"),{v:q,l:X}=Q.decode(48,G);if(X.length)throw new $("invalid signature: left bytes after parsing");let{v:Y,l:Z}=Q.decode(2,q),{v:K,l:j}=Q.decode(2,Z);if(j.length)throw new $("invalid signature: left bytes after parsing");return{r:J.decode(Y),s:J.decode(K)}},hexFromSig(D){let{_tlv:$,_int:J}=X0,Q=$.encode(2,J.encode(D.r)),G=$.encode(2,J.encode(D.s)),q=Q+G;return $.encode(48,q)}},iD=BigInt(0),i0=BigInt(1),RQ=BigInt(2),Z9=BigInt(3),mZ=BigInt(4);function IQ(D,$={}){let J=X9("weierstrass",D,$),{Fp:Q,Fn:G}=J,q=J.CURVE,{h:X,n:Y}=q;Q0($,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:Z}=$;if(Z){if(!Q.is0(q.a)||typeof Z.beta!=="bigint"||!Array.isArray(Z.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let K=OQ(Q,G);function j(){if(!Q.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function U(L,R,V){let{x:B,y:M}=R.toAffine(),S=Q.toBytes(B);if(aD(V,"isCompressed"),V){j();let P=!Q.isOdd(M);return $D(wQ(P),S)}else return $D(Uint8Array.of(4),S,Q.toBytes(M))}function C(L){x(L,void 0,"Point");let{publicKey:R,publicKeyUncompressed:V}=K,B=L.length,M=L[0],S=L.subarray(1);if(B===R&&(M===2||M===3)){let P=Q.fromBytes(S);if(!Q.isValid(P))throw Error("bad point: is not on curve, wrong x");let _=F(P),k;try{k=Q.sqrt(_)}catch(a){let g=a instanceof Error?": "+a.message:"";throw Error("bad point: is not on curve, sqrt error"+g)}j();let A=Q.isOdd(k);if((M&1)===1!==A)k=Q.neg(k);return{x:P,y:k}}else if(B===V&&M===4){let P=Q.BYTES,_=Q.fromBytes(S.subarray(0,P)),k=Q.fromBytes(S.subarray(P,P*2));if(!W(_,k))throw Error("bad point: is not on curve");return{x:_,y:k}}else throw Error(`bad point: got length ${B}, expected compressed=${R} or uncompressed=${V}`)}let z=$.toBytes||U,E=$.fromBytes||C;function F(L){let R=Q.sqr(L),V=Q.mul(R,L);return Q.add(Q.add(V,Q.mul(L,q.a)),q.b)}function W(L,R){let V=Q.sqr(R),B=F(L);return Q.eql(V,B)}if(!W(q.Gx,q.Gy))throw Error("bad curve params: generator point");let H=Q.mul(Q.pow(q.a,Z9),mZ),N=Q.mul(Q.sqr(q.b),BigInt(27));if(Q.is0(Q.add(H,N)))throw Error("bad curve params: a or b");function I(L,R,V=!1){if(!Q.isValid(R)||V&&Q.is0(R))throw Error(`bad point coordinate ${L}`);return R}function O(L){if(!(L instanceof w))throw Error("Weierstrass Point expected")}function y(L){if(!Z||!Z.basises)throw Error("no endo");return fZ(L,Z.basises,G.ORDER)}let p=d0((L,R)=>{let{X:V,Y:B,Z:M}=L;if(Q.eql(M,Q.ONE))return{x:V,y:B};let S=L.is0();if(R==null)R=S?Q.ONE:Q.inv(M);let P=Q.mul(V,R),_=Q.mul(B,R),k=Q.mul(M,R);if(S)return{x:Q.ZERO,y:Q.ZERO};if(!Q.eql(k,Q.ONE))throw Error("invZ was invalid");return{x:P,y:_}}),m=d0((L)=>{if(L.is0()){if($.allowInfinityPoint&&!Q.is0(L.Y))return;throw Error("bad point: ZERO")}let{x:R,y:V}=L.toAffine();if(!Q.isValid(R)||!Q.isValid(V))throw Error("bad point: x or y not field elements");if(!W(R,V))throw Error("bad point: equation left != right");if(!L.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function T(L,R,V,B,M){return V=new w(Q.mul(V.X,L),V.Y,V.Z),R=L8(B,R),V=L8(M,V),R.add(V)}class w{static BASE=new w(q.Gx,q.Gy,Q.ONE);static ZERO=new w(Q.ZERO,Q.ONE,Q.ZERO);static Fp=Q;static Fn=G;X;Y;Z;constructor(L,R,V){this.X=I("x",L),this.Y=I("y",R,!0),this.Z=I("z",V),Object.freeze(this)}static CURVE(){return q}static fromAffine(L){let{x:R,y:V}=L||{};if(!L||!Q.isValid(R)||!Q.isValid(V))throw Error("invalid affine point");if(L instanceof w)throw Error("projective point not allowed");if(Q.is0(R)&&Q.is0(V))return w.ZERO;return new w(R,V,Q.ONE)}static fromBytes(L){let R=w.fromAffine(E(x(L,void 0,"point")));return R.assertValidity(),R}static fromHex(L){return w.fromBytes(pD(L))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(L=8,R=!0){if(u.createCache(this,L),!R)this.multiply(Z9);return this}assertValidity(){m(this)}hasEvenY(){let{y:L}=this.toAffine();if(!Q.isOdd)throw Error("Field doesn't support isOdd");return!Q.isOdd(L)}equals(L){O(L);let{X:R,Y:V,Z:B}=this,{X:M,Y:S,Z:P}=L,_=Q.eql(Q.mul(R,P),Q.mul(M,B)),k=Q.eql(Q.mul(V,P),Q.mul(S,B));return _&&k}negate(){return new w(this.X,Q.neg(this.Y),this.Z)}double(){let{a:L,b:R}=q,V=Q.mul(R,Z9),{X:B,Y:M,Z:S}=this,P=Q.ZERO,_=Q.ZERO,k=Q.ZERO,A=Q.mul(B,B),t=Q.mul(M,M),a=Q.mul(S,S),g=Q.mul(B,M);return g=Q.add(g,g),k=Q.mul(B,S),k=Q.add(k,k),P=Q.mul(L,k),_=Q.mul(V,a),_=Q.add(P,_),P=Q.sub(t,_),_=Q.add(t,_),_=Q.mul(P,_),P=Q.mul(g,P),k=Q.mul(V,k),a=Q.mul(L,a),g=Q.sub(A,a),g=Q.mul(L,g),g=Q.add(g,k),k=Q.add(A,A),A=Q.add(k,A),A=Q.add(A,a),A=Q.mul(A,g),_=Q.add(_,A),a=Q.mul(M,S),a=Q.add(a,a),A=Q.mul(a,g),P=Q.sub(P,A),k=Q.mul(a,t),k=Q.add(k,k),k=Q.add(k,k),new w(P,_,k)}add(L){O(L);let{X:R,Y:V,Z:B}=this,{X:M,Y:S,Z:P}=L,_=Q.ZERO,k=Q.ZERO,A=Q.ZERO,t=q.a,a=Q.mul(q.b,Z9),g=Q.mul(R,M),e=Q.mul(V,S),JD=Q.mul(B,P),OD=Q.add(R,V),DD=Q.add(M,S);OD=Q.mul(OD,DD),DD=Q.add(g,e),OD=Q.sub(OD,DD),DD=Q.add(R,B);let YD=Q.add(M,P);return DD=Q.mul(DD,YD),YD=Q.add(g,JD),DD=Q.sub(DD,YD),YD=Q.add(V,B),_=Q.add(S,P),YD=Q.mul(YD,_),_=Q.add(e,JD),YD=Q.sub(YD,_),A=Q.mul(t,DD),_=Q.mul(a,JD),A=Q.add(_,A),_=Q.sub(e,A),A=Q.add(e,A),k=Q.mul(_,A),e=Q.add(g,g),e=Q.add(e,g),JD=Q.mul(t,JD),DD=Q.mul(a,DD),e=Q.add(e,JD),JD=Q.sub(g,JD),JD=Q.mul(t,JD),DD=Q.add(DD,JD),g=Q.mul(e,DD),k=Q.add(k,g),g=Q.mul(YD,DD),_=Q.mul(OD,_),_=Q.sub(_,g),g=Q.mul(OD,e),A=Q.mul(YD,A),A=Q.add(A,g),new w(_,k,A)}subtract(L){return this.add(L.negate())}is0(){return this.equals(w.ZERO)}multiply(L){let{endo:R}=$;if(!G.isValidNot0(L))throw Error("invalid scalar: out of range");let V,B,M=(S)=>u.cached(this,S,(P)=>T0(w,P));if(R){let{k1neg:S,k1:P,k2neg:_,k2:k}=y(L),{p:A,f:t}=M(P),{p:a,f:g}=M(k);B=t.add(g),V=T(R.beta,A,a,S,_)}else{let{p:S,f:P}=M(L);V=S,B=P}return T0(w,[V,B])[0]}multiplyUnsafe(L){let{endo:R}=$,V=this;if(!G.isValid(L))throw Error("invalid scalar: out of range");if(L===iD||V.is0())return w.ZERO;if(L===i0)return V;if(u.hasCache(this))return this.multiply(L);if(R){let{k1neg:B,k1:M,k2neg:S,k2:P}=y(L),{p1:_,p2:k}=CQ(w,V,M,P);return T(R.beta,_,k,B,S)}else return u.unsafe(V,L)}toAffine(L){return p(this,L)}isTorsionFree(){let{isTorsionFree:L}=$;if(X===i0)return!0;if(L)return L(w,this);return u.unsafe(this,Y).is0()}clearCofactor(){let{clearCofactor:L}=$;if(X===i0)return this;if(L)return L(w,this);return this.multiplyUnsafe(X)}isSmallOrder(){return this.multiplyUnsafe(X).is0()}toBytes(L=!0){return aD(L,"isCompressed"),this.assertValidity(),z(w,this,L)}toHex(L=!0){return lD(this.toBytes(L))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let h=G.BITS,u=new B8(w,$.endo?Math.ceil(h/2):h);return w.BASE.precompute(8),w}function wQ(D){return Uint8Array.of(D?2:3)}function OQ(D,$){return{secretKey:$.BYTES,publicKey:1+D.BYTES,publicKeyUncompressed:1+2*D.BYTES,publicKeyHasPrefix:!0,signature:2*$.BYTES}}function uZ(D,$={}){let{Fn:J}=D,Q=$.randomBytes||tD,G=Object.assign(OQ(D.Fp,J),{seed:e7(J.ORDER)});function q(z){try{let E=J.fromBytes(z);return J.isValidNot0(E)}catch(E){return!1}}function X(z,E){let{publicKey:F,publicKeyUncompressed:W}=G;try{let H=z.length;if(E===!0&&H!==F)return!1;if(E===!1&&H!==W)return!1;return!!D.fromBytes(z)}catch(H){return!1}}function Y(z=Q(G.seed)){return D6(x(z,G.seed,"seed"),J.ORDER)}function Z(z,E=!0){return D.BASE.multiply(J.fromBytes(z)).toBytes(E)}function K(z){let{secretKey:E,publicKey:F,publicKeyUncompressed:W}=G;if(!V0(z))return;if("_lengths"in J&&J._lengths||E===F)return;let H=x(z,void 0,"key").length;return H===F||H===W}function j(z,E,F=!0){if(K(z)===!0)throw Error("first arg must be private key");if(K(E)===!1)throw Error("second arg must be public key");let W=J.fromBytes(z);return D.fromBytes(E).multiply(W).toBytes(F)}let U={isValidSecretKey:q,isValidPublicKey:X,randomSecretKey:Y},C=Y9(Y,Z);return Object.freeze({getPublicKey:Z,getSharedSecret:j,keygen:C,Point:D,utils:U,lengths:G})}function TQ(D,$,J={}){u0($),Q0(J,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),J=Object.assign({},J);let Q=J.randomBytes||tD,G=J.hmac||((V,B)=>q0($,V,B)),{Fp:q,Fn:X}=D,{ORDER:Y,BITS:Z}=X,{keygen:K,getPublicKey:j,getSharedSecret:U,utils:C,lengths:z}=uZ(D,J),E={prehash:!0,lowS:typeof J.lowS==="boolean"?J.lowS:!0,format:"compact",extraEntropy:!1},F=Y*RQ<q.ORDER;function W(V){let B=Y>>i0;return V>B}function H(V,B){if(!X.isValidNot0(B))throw Error(`invalid signature ${V}: out of range 1..Point.Fn.ORDER`);return B}function N(){if(F)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function I(V,B){K6(B);let M=z.signature,S=B==="compact"?M:B==="recovered"?M+1:void 0;return x(V,S)}class O{r;s;recovery;constructor(V,B,M){if(this.r=H("r",V),this.s=H("s",B),M!=null){if(N(),![0,1,2,3].includes(M))throw Error("invalid recovery id");this.recovery=M}Object.freeze(this)}static fromBytes(V,B=E.format){I(V,B);let M;if(B==="der"){let{r:k,s:A}=X0.toSig(x(V));return new O(k,A)}if(B==="recovered")M=V[0],B="compact",V=V.subarray(1);let S=z.signature/2,P=V.subarray(0,S),_=V.subarray(S,S*2);return new O(X.fromBytes(P),X.fromBytes(_),M)}static fromHex(V,B){return this.fromBytes(pD(V),B)}assertRecovery(){let{recovery:V}=this;if(V==null)throw Error("invalid recovery id: must be present");return V}addRecoveryBit(V){return new O(this.r,this.s,V)}recoverPublicKey(V){let{r:B,s:M}=this,S=this.assertRecovery(),P=S===2||S===3?B+Y:B;if(!q.isValid(P))throw Error("invalid recovery id: sig.r+curve.n != R.x");let _=q.toBytes(P),k=D.fromBytes($D(wQ((S&1)===0),_)),A=X.inv(P),t=p(x(V,void 0,"msgHash")),a=X.create(-t*A),g=X.create(M*A),e=D.BASE.multiplyUnsafe(a).add(k.multiplyUnsafe(g));if(e.is0())throw Error("invalid recovery: point at infinify");return e.assertValidity(),e}hasHighS(){return W(this.s)}toBytes(V=E.format){if(K6(V),V==="der")return pD(X0.hexFromSig(this));let{r:B,s:M}=this,S=X.toBytes(B),P=X.toBytes(M);if(V==="recovered")return N(),$D(Uint8Array.of(this.assertRecovery()),S,P);return $D(S,P)}toHex(V){return lD(this.toBytes(V))}}let y=J.bits2int||function(B){if(B.length>8192)throw Error("input is too large");let M=p0(B),S=B.length*8-Z;return S>0?M>>BigInt(S):M},p=J.bits2int_modN||function(B){return X.create(y(B))},m=V8(Z);function T(V){return N8("num < 2^"+Z,V,iD,m),X.toBytes(V)}function w(V,B){return x(V,void 0,"message"),B?x($(V),void 0,"prehashed message"):V}function h(V,B,M){let{lowS:S,prehash:P,extraEntropy:_}=Z6(M,E);V=w(V,P);let k=p(V),A=X.fromBytes(B);if(!X.isValidNot0(A))throw Error("invalid private key");let t=[T(A),T(k)];if(_!=null&&_!==!1){let JD=_===!0?Q(z.secretKey):_;t.push(x(JD,void 0,"extraEntropy"))}let a=$D(...t),g=k;function e(JD){let OD=y(JD);if(!X.isValidNot0(OD))return;let DD=X.inv(OD),YD=D.BASE.multiply(OD).toAffine(),D8=X.create(YD.x);if(D8===iD)return;let A8=X.create(DD*X.create(g+D8*A));if(A8===iD)return;let k6=(YD.x===D8?0:2)|Number(YD.y&i0),A6=A8;if(S&&W(A8))A6=X.neg(A8),k6^=1;return new O(D8,A6,F?void 0:k6)}return{seed:a,k2sig:e}}function u(V,B,M={}){let{seed:S,k2sig:P}=h(V,B,M);return nJ($.outputLen,X.BYTES,G)(S,P).toBytes(M.format)}function L(V,B,M,S={}){let{lowS:P,prehash:_,format:k}=Z6(S,E);if(M=x(M,void 0,"publicKey"),B=w(B,_),!V0(V)){let A=V instanceof O?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+A)}I(V,k);try{let A=O.fromBytes(V,k),t=D.fromBytes(M);if(P&&A.hasHighS())return!1;let{r:a,s:g}=A,e=p(B),JD=X.inv(g),OD=X.create(e*JD),DD=X.create(a*JD),YD=D.BASE.multiplyUnsafe(OD).add(t.multiplyUnsafe(DD));if(YD.is0())return!1;return X.create(YD.x)===a}catch(A){return!1}}function R(V,B,M={}){let{prehash:S}=Z6(M,E);return B=w(B,S),O.fromBytes(V,"recovered").recoverPublicKey(B).toBytes()}return Object.freeze({keygen:K,getPublicKey:j,getSharedSecret:U,utils:C,lengths:z,Point:D,sign:u,verify:L,recoverPublicKey:R,Signature:O,hash:$})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var U6={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},gZ={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]};var MQ=BigInt(2);function lZ(D){let $=U6.p,J=BigInt(3),Q=BigInt(6),G=BigInt(11),q=BigInt(22),X=BigInt(23),Y=BigInt(44),Z=BigInt(88),K=D*D*D%$,j=K*K*D%$,U=o(j,J,$)*j%$,C=o(U,J,$)*j%$,z=o(C,MQ,$)*K%$,E=o(z,G,$)*z%$,F=o(E,q,$)*E%$,W=o(F,Y,$)*F%$,H=o(W,Z,$)*W%$,N=o(H,Y,$)*F%$,I=o(N,J,$)*j%$,O=o(I,X,$)*E%$,y=o(O,Q,$)*K%$,p=o(y,MQ,$);if(!j6.eql(j6.sqr(p),D))throw Error("Cannot find square root");return p}var j6=c0(U6.p,{sqrt:lZ}),pZ=IQ(U6,{Fp:j6,endo:gZ}),M0=TQ(pZ,B0);var r0=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),Y0=new Uint32Array(80);class dZ extends eD{A=r0[0]|0;B=r0[1]|0;C=r0[2]|0;D=r0[3]|0;E=r0[4]|0;constructor(){super(64,20,8,!1)}get(){let{A:D,B:$,C:J,D:Q,E:G}=this;return[D,$,J,Q,G]}set(D,$,J,Q,G){this.A=D|0,this.B=$|0,this.C=J|0,this.D=Q|0,this.E=G|0}process(D,$){for(let Y=0;Y<16;Y++,$+=4)Y0[Y]=D.getUint32($,!1);for(let Y=16;Y<80;Y++)Y0[Y]=gD(Y0[Y-3]^Y0[Y-8]^Y0[Y-14]^Y0[Y-16],1);let{A:J,B:Q,C:G,D:q,E:X}=this;for(let Y=0;Y<80;Y++){let Z,K;if(Y<20)Z=l0(Q,G,q),K=1518500249;else if(Y<40)Z=Q^G^q,K=1859775393;else if(Y<60)Z=$9(Q,G,q),K=2400959708;else Z=Q^G^q,K=3395469782;let j=gD(J,5)+Z+X+K+Y0[Y]|0;X=q,q=G,G=gD(Q,30),Q=J,J=j}J=J+this.A|0,Q=Q+this.B|0,G=G+this.C|0,q=q+this.D|0,X=X+this.E|0,this.set(J,Q,G,q,X)}roundClean(){GD(Y0)}destroy(){this.set(0,0,0,0,0),GD(this.buffer)}}var cZ=Math.pow(2,32),aZ=Array.from({length:64},(D,$)=>Math.floor(cZ*Math.abs(Math.sin($+1)))),K9=r0.slice(0,4),W6=new Uint32Array(16);class iZ extends eD{A=K9[0]|0;B=K9[1]|0;C=K9[2]|0;D=K9[3]|0;constructor(){super(64,16,8,!0)}get(){let{A:D,B:$,C:J,D:Q}=this;return[D,$,J,Q]}set(D,$,J,Q){this.A=D|0,this.B=$|0,this.C=J|0,this.D=Q|0}process(D,$){for(let X=0;X<16;X++,$+=4)W6[X]=D.getUint32($,!0);let{A:J,B:Q,C:G,D:q}=this;for(let X=0;X<64;X++){let Y,Z,K;if(X<16)Y=l0(Q,G,q),Z=X,K=[7,12,17,22];else if(X<32)Y=l0(q,Q,G),Z=(5*X+1)%16,K=[5,9,14,20];else if(X<48)Y=Q^G^q,Z=(3*X+5)%16,K=[4,11,16,23];else Y=G^(Q|~q),Z=7*X%16,K=[6,10,15,21];Y=Y+J+aZ[X]+W6[Z],J=q,q=G,G=Q,Q=Q+gD(Y,K[X%4])}J=J+this.A|0,Q=Q+this.B|0,G=G+this.C|0,q=q+this.D|0,this.set(J,Q,G,q)}roundClean(){GD(W6)}destroy(){this.set(0,0,0,0),GD(this.buffer)}}var rZ=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),SQ=(()=>Uint8Array.from(Array(16).fill(0).map((D,$)=>$)))(),oZ=(()=>SQ.map((D)=>(9*D+5)%16))(),_Q=(()=>{let J=[[SQ],[oZ]];for(let Q=0;Q<4;Q++)for(let G of J)G.push(G[Q].map((q)=>rZ[q]));return J})(),kQ=(()=>_Q[0])(),AQ=(()=>_Q[1])(),xQ=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((D)=>Uint8Array.from(D)),sZ=kQ.map((D,$)=>D.map((J)=>xQ[$][J])),nZ=AQ.map((D,$)=>D.map((J)=>xQ[$][J])),tZ=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),eZ=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function PQ(D,$,J,Q){if(D===0)return $^J^Q;if(D===1)return $&J|~$&Q;if(D===2)return($|~J)^Q;if(D===3)return $&Q|J&~Q;return $^(J|~Q)}var j9=new Uint32Array(16);class bQ extends eD{h0=1732584193;h1=-271733879;h2=-1732584194;h3=271733878;h4=-1009589776;constructor(){super(64,20,8,!0)}get(){let{h0:D,h1:$,h2:J,h3:Q,h4:G}=this;return[D,$,J,Q,G]}set(D,$,J,Q,G){this.h0=D|0,this.h1=$|0,this.h2=J|0,this.h3=Q|0,this.h4=G|0}process(D,$){for(let C=0;C<16;C++,$+=4)j9[C]=D.getUint32($,!0);let J=this.h0|0,Q=J,G=this.h1|0,q=G,X=this.h2|0,Y=X,Z=this.h3|0,K=Z,j=this.h4|0,U=j;for(let C=0;C<5;C++){let z=4-C,E=tZ[C],F=eZ[C],W=kQ[C],H=AQ[C],N=sZ[C],I=nZ[C];for(let O=0;O<16;O++){let y=gD(J+PQ(C,G,X,Z)+j9[W[O]]+E,N[O])+j|0;J=j,j=Z,Z=gD(X,10)|0,X=G,G=y}for(let O=0;O<16;O++){let y=gD(Q+PQ(z,q,Y,K)+j9[H[O]]+F,I[O])+U|0;Q=U,U=K,K=gD(Y,10)|0,Y=q,q=y}}this.set(this.h1+X+K|0,this.h2+Z+U|0,this.h3+j+Q|0,this.h4+J+q|0,this.h0+G+Y|0)}roundClean(){GD(j9)}destroy(){this.destroyed=!0,GD(this.buffer),this.set(0,0,0,0,0)}}var hQ=W8(()=>new bQ);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function o0(D){return D instanceof Uint8Array||ArrayBuffer.isView(D)&&D.constructor.name==="Uint8Array"}function C6(D){if(!o0(D))throw Error("Uint8Array expected")}function mQ(D,$){if(!Array.isArray($))return!1;if($.length===0)return!0;if(D)return $.every((J)=>typeof J==="string");else return $.every((J)=>Number.isSafeInteger(J))}function H6(D){if(typeof D!=="function")throw Error("function expected");return!0}function Z0(D,$){if(typeof $!=="string")throw Error(`${D}: string expected`);return!0}function s0(D){if(!Number.isSafeInteger(D))throw Error(`invalid integer: ${D}`)}function W9(D){if(!Array.isArray(D))throw Error("array expected")}function E9(D,$){if(!mQ(!0,$))throw Error(`${D}: array of strings expected`)}function N6(D,$){if(!mQ(!1,$))throw Error(`${D}: array of numbers expected`)}function ND(...D){let $=(q)=>q,J=(q,X)=>(Y)=>q(X(Y)),Q=D.map((q)=>q.encode).reduceRight(J,$),G=D.map((q)=>q.decode).reduce(J,$);return{encode:Q,decode:G}}function FD(D){let $=typeof D==="string"?D.split(""):D,J=$.length;E9("alphabet",$);let Q=new Map($.map((G,q)=>[G,q]));return{encode:(G)=>{return W9(G),G.map((q)=>{if(!Number.isSafeInteger(q)||q<0||q>=J)throw Error(`alphabet.encode: digit index outside alphabet "${q}". Allowed: ${D}`);return $[q]})},decode:(G)=>{return W9(G),G.map((q)=>{Z0("alphabet.decode",q);let X=Q.get(q);if(X===void 0)throw Error(`Unknown letter: "${q}". Allowed: ${D}`);return X})}}}function LD(D=""){return Z0("join",D),{encode:($)=>{return E9("join.decode",$),$.join(D)},decode:($)=>{return Z0("join.decode",$),$.split(D)}}}function I8(D,$="="){return s0(D),Z0("padding",$),{encode(J){E9("padding.encode",J);while(J.length*D%8)J.push($);return J},decode(J){E9("padding.decode",J);let Q=J.length;if(Q*D%8)throw Error("padding: invalid, string should have whole number of bytes");for(;Q>0&&J[Q-1]===$;Q--)if((Q-1)*D%8===0)throw Error("padding: invalid, string has too much padding");return J.slice(0,Q)}}}function uQ(D){return H6(D),{encode:($)=>$,decode:($)=>D($)}}function E6(D,$,J){if($<2)throw Error(`convertRadix: invalid from=${$}, base cannot be less than 2`);if(J<2)throw Error(`convertRadix: invalid to=${J}, base cannot be less than 2`);if(W9(D),!D.length)return[];let Q=0,G=[],q=Array.from(D,(Y)=>{if(s0(Y),Y<0||Y>=$)throw Error(`invalid integer: ${Y}`);return Y}),X=q.length;while(!0){let Y=0,Z=!0;for(let K=Q;K<X;K++){let j=q[K],U=$*Y,C=U+j;if(!Number.isSafeInteger(C)||U/$!==Y||C-j!==U)throw Error("convertRadix: carry overflow");let z=C/J;Y=C%J;let E=Math.floor(z);if(q[K]=E,!Number.isSafeInteger(E)||E*J+Y!==C)throw Error("convertRadix: carry overflow");if(!Z)continue;else if(!E)Q=K;else Z=!1}if(G.push(Y),Z)break}for(let Y=0;Y<D.length-1&&D[Y]===0;Y++)G.push(0);return G.reverse()}var gQ=(D,$)=>$===0?D:gQ($,D%$),z9=(D,$)=>D+($-gQ(D,$)),U9=(()=>{let D=[];for(let $=0;$<40;$++)D.push(2**$);return D})();function C9(D,$,J,Q){if(W9(D),$<=0||$>32)throw Error(`convertRadix2: wrong from=${$}`);if(J<=0||J>32)throw Error(`convertRadix2: wrong to=${J}`);if(z9($,J)>32)throw Error(`convertRadix2: carry overflow from=${$} to=${J} carryBits=${z9($,J)}`);let G=0,q=0,X=U9[$],Y=U9[J]-1,Z=[];for(let K of D){if(s0(K),K>=X)throw Error(`convertRadix2: invalid data word=${K} from=${$}`);if(G=G<<$|K,q+$>32)throw Error(`convertRadix2: carry overflow pos=${q} from=${$}`);q+=$;for(;q>=J;q-=J)Z.push((G>>q-J&Y)>>>0);let j=U9[q];if(j===void 0)throw Error("invalid carry");G&=j-1}if(G=G<<J-q&Y,!Q&&q>=$)throw Error("Excess padding");if(!Q&&G>0)throw Error(`Non-zero padding: ${G}`);if(Q&&q>0)Z.push(G>>>0);return Z}function lQ(D){s0(D);let $=256;return{encode:(J)=>{if(!o0(J))throw Error("radix.encode input should be Uint8Array");return E6(Array.from(J),$,D)},decode:(J)=>{return N6("radix.decode",J),Uint8Array.from(E6(J,D,$))}}}function ID(D,$=!1){if(s0(D),D<=0||D>32)throw Error("radix2: bits should be in (0..32]");if(z9(8,D)>32||z9(D,8)>32)throw Error("radix2: carry overflow");return{encode:(J)=>{if(!o0(J))throw Error("radix2.encode input should be Uint8Array");return C9(Array.from(J),8,D,!$)},decode:(J)=>{return N6("radix2.decode",J),Uint8Array.from(C9(J,D,8,$))}}}function vQ(D){return H6(D),function(...$){try{return D.apply(null,$)}catch(J){}}}function pQ(D,$){return s0(D),H6($),{encode(J){if(!o0(J))throw Error("checksum.encode: input should be Uint8Array");let Q=$(J).slice(0,D),G=new Uint8Array(J.length+D);return G.set(J),G.set(Q,J.length),G},decode(J){if(!o0(J))throw Error("checksum.decode: input should be Uint8Array");let Q=J.slice(0,-D),G=J.slice(-D),q=$(Q).slice(0,D);for(let X=0;X<D;X++)if(q[X]!==G[X])throw Error("Invalid checksum");return Q}}}var w8={alphabet:FD,chain:ND,checksum:pQ,convertRadix:E6,convertRadix2:C9,radix:lQ,radix2:ID,join:LD,padding:I8},QE=ND(ID(4),FD("0123456789ABCDEF"),LD("")),GE=ND(ID(5),FD("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),I8(5),LD("")),qE=ND(ID(5),FD("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),LD("")),XE=ND(ID(5),FD("0123456789ABCDEFGHIJKLMNOPQRSTUV"),I8(5),LD("")),YE=ND(ID(5),FD("0123456789ABCDEFGHIJKLMNOPQRSTUV"),LD("")),ZE=ND(ID(5),FD("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),LD(""),uQ((D)=>D.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),dQ=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),cQ=(D,$)=>{Z0("base64",D);let J=$?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,Q=$?"base64url":"base64";if(D.length>0&&!J.test(D))throw Error("invalid base64");return Uint8Array.fromBase64(D,{alphabet:Q,lastChunkHandling:"strict"})},KE=dQ?{encode(D){return C6(D),D.toBase64()},decode(D){return cQ(D,!1)}}:ND(ID(6),FD("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),I8(6),LD("")),jE=ND(ID(6),FD("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),LD("")),UE=dQ?{encode(D){return C6(D),D.toBase64({alphabet:"base64url"})},decode(D){return cQ(D,!0)}}:ND(ID(6),FD("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),I8(6),LD("")),WE=ND(ID(6),FD("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),LD("")),V6=(D)=>ND(lQ(58),FD(D),LD("")),DK=V6("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),EE=V6("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),zE=V6("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var aQ=(D)=>ND(pQ(4,($)=>D(D($))),DK);var z6=ND(FD("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),LD("")),yQ=[996825010,642813549,513874426,1027748829,705979059];function R8(D){let $=D>>25,J=(D&33554431)<<5;for(let Q=0;Q<yQ.length;Q++)if(($>>Q&1)===1)J^=yQ[Q];return J}function fQ(D,$,J=1){let Q=D.length,G=1;for(let q=0;q<Q;q++){let X=D.charCodeAt(q);if(X<33||X>126)throw Error(`Invalid prefix (${D})`);G=R8(G)^X>>5}G=R8(G);for(let q=0;q<Q;q++)G=R8(G)^D.charCodeAt(q)&31;for(let q of $)G=R8(G)^q;for(let q=0;q<6;q++)G=R8(G);return G^=J,z6.encode(C9([G%U9[30]],30,5,!1))}function iQ(D){let $=D==="bech32"?1:734539939,J=ID(5),Q=J.decode,G=J.encode,q=vQ(Q);function X(U,C,z=90){if(Z0("bech32.encode prefix",U),o0(C))C=Array.from(C);N6("bech32.encode",C);let E=U.length;if(E===0)throw TypeError(`Invalid prefix length ${E}`);let F=E+7+C.length;if(z!==!1&&F>z)throw TypeError(`Length ${F} exceeds limit ${z}`);let W=U.toLowerCase(),H=fQ(W,C,$);return`${W}1${z6.encode(C)}${H}`}function Y(U,C=90){Z0("bech32.decode input",U);let z=U.length;if(z<8||C!==!1&&z>C)throw TypeError(`invalid string length: ${z} (${U}). Expected (8..${C})`);let E=U.toLowerCase();if(U!==E&&U!==U.toUpperCase())throw Error("String must be lowercase or uppercase");let F=E.lastIndexOf("1");if(F===0||F===-1)throw Error('Letter "1" must be present between prefix and data only');let W=E.slice(0,F),H=E.slice(F+1);if(H.length<6)throw Error("Data must be at least 6 characters long");let N=z6.decode(H).slice(0,-6),I=fQ(W,N,$);if(!H.endsWith(I))throw Error(`Invalid checksum in ${U}: expected "${I}"`);return{prefix:W,words:N}}let Z=vQ(Y);function K(U){let{prefix:C,words:z}=Y(U,!1);return{prefix:C,words:z,bytes:Q(z)}}function j(U,C){return X(U,G(C))}return{encode:X,decode:Y,encodeFromBytes:j,decodeToBytes:K,decodeUnsafe:Z,fromWords:Q,fromWordsUnsafe:q,toWords:G}}var CE=iQ("bech32"),HE=iQ("bech32m");var $K=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),JK={encode(D){return C6(D),D.toHex()},decode(D){return Z0("hex",D),Uint8Array.fromHex(D)}},NE=$K?JK:ND(ID(4),FD("0123456789abcdef"),LD(""),uQ((D)=>{if(typeof D!=="string"||D.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof D} with length ${D.length}`);return D.toLowerCase()}));/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */var T8=M0.Point,{Fn:O8}=T8,F6=aQ(B0),QK=Uint8Array.from("Bitcoin seed".split(""),(D)=>D.charCodeAt(0)),L6={private:76066276,public:76067358},B6=2147483648,GK=(D)=>hQ(B0(D)),qK=(D)=>hD(D).getUint32(0,!1),H9=(D)=>{if(!Number.isSafeInteger(D)||D<0||D>4294967295)throw Error("invalid number, should be from 0 to 2**32-1, got "+D);let $=new Uint8Array(4);return hD($).setUint32(0,D,!1),$};class K0{get fingerprint(){if(!this.pubHash)throw Error("No publicKey set!");return qK(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this._privateKey||null}get publicKey(){return this._publicKey||null}get privateExtendedKey(){let D=this._privateKey;if(!D)throw Error("No private key");return F6.encode(this.serialize(this.versions.private,$D(Uint8Array.of(0),D)))}get publicExtendedKey(){if(!this._publicKey)throw Error("No public key");return F6.encode(this.serialize(this.versions.public,this._publicKey))}static fromMasterSeed(D,$=L6){if(x(D),8*D.length<128||8*D.length>512)throw Error("HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got "+D.length);let J=q0(R0,QK,D),Q=J.slice(0,32),G=J.slice(32);return new K0({versions:$,chainCode:G,privateKey:Q})}static fromExtendedKey(D,$=L6){let J=F6.decode(D),Q=hD(J),G=Q.getUint32(0,!1),q={versions:$,depth:J[4],parentFingerprint:Q.getUint32(5,!1),index:Q.getUint32(9,!1),chainCode:J.slice(13,45)},X=J.slice(45),Y=X[0]===0;if(G!==$[Y?"private":"public"])throw Error("Version mismatch");if(Y)return new K0({...q,privateKey:X.slice(1)});else return new K0({...q,publicKey:X})}static fromJSON(D){return K0.fromExtendedKey(D.xpriv)}versions;depth=0;index=0;chainCode=null;parentFingerprint=0;_privateKey;_publicKey;pubHash;constructor(D){if(!D||typeof D!=="object")throw Error("HDKey.constructor must not be called directly");if(this.versions=D.versions||L6,this.depth=D.depth||0,this.chainCode=D.chainCode||null,this.index=D.index||0,this.parentFingerprint=D.parentFingerprint||0,!this.depth){if(this.parentFingerprint||this.index)throw Error("HDKey: zero depth with non-zero index/parent fingerprint")}if(this.depth>255)throw Error("HDKey: depth exceeds the serializable value 255");if(D.publicKey&&D.privateKey)throw Error("HDKey: publicKey and privateKey at same time.");if(D.privateKey){if(!M0.utils.isValidSecretKey(D.privateKey))throw Error("Invalid private key");this._privateKey=D.privateKey,this._publicKey=M0.getPublicKey(D.privateKey,!0)}else if(D.publicKey)this._publicKey=T8.fromBytes(D.publicKey).toBytes(!0);else throw Error("HDKey: no public or private key provided");this.pubHash=GK(this._publicKey)}derive(D){if(!/^[mM]'?/.test(D))throw Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(D))return this;let $=D.replace(/^[mM]'?\//,"").split("/"),J=this;for(let Q of $){let G=/^(\d+)('?)$/.exec(Q),q=G&&G[1];if(!G||G.length!==3||typeof q!=="string")throw Error("invalid child index: "+Q);let X=+q;if(!Number.isSafeInteger(X)||X>=B6)throw Error("Invalid index");if(G[2]==="'")X+=B6;J=J.deriveChild(X)}return J}deriveChild(D){if(!this._publicKey||!this.chainCode)throw Error("No publicKey or chainCode set");let $=H9(D);if(D>=B6){let Y=this._privateKey;if(!Y)throw Error("Could not derive hardened child key");$=$D(Uint8Array.of(0),Y,$)}else $=$D(this._publicKey,$);let J=q0(R0,this.chainCode,$),Q=J.slice(0,32),G=J.slice(32);if(!M0.utils.isValidSecretKey(Q))throw Error("Tweak bigger than curve order");let q={versions:this.versions,chainCode:G,depth:this.depth+1,parentFingerprint:this.fingerprint,index:D},X=O8.fromBytes(Q);try{if(this._privateKey){let Y=O8.create(O8.fromBytes(this._privateKey)+X);if(!O8.isValidNot0(Y))throw Error("The tweak was out of range or the resulted private key is invalid");q.privateKey=O8.toBytes(Y)}else{let Y=T8.fromBytes(this._publicKey).add(T8.BASE.multiply(X));if(Y.equals(T8.ZERO))throw Error("The tweak was equal to negative P, which made the result key invalid");q.publicKey=Y.toBytes(!0)}return new K0(q)}catch(Y){return this.deriveChild(D+1)}}sign(D){if(!this._privateKey)throw Error("No privateKey set!");return x(D,32),M0.sign(D,this._privateKey,{prehash:!1})}verify(D,$){if(x(D,32),x($,64),!this._publicKey)throw Error("No publicKey set!");return M0.verify($,D,this._publicKey,{prehash:!1})}wipePrivateData(){if(this._privateKey)this._privateKey.fill(0),this._privateKey=void 0;return this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(D,$){if(!this.chainCode)throw Error("No chainCode set");return x($,33),$D(H9(D),new Uint8Array([this.depth]),H9(this.parentFingerprint),H9(this.index),this.chainCode,$)}}function XK(D,$,J,Q){u0(D);let G=yJ({dkLen:32,asyncTick:10},Q),{c:q,dkLen:X,asyncTick:Y}=G;if(UD(q,"c"),UD(X,"dkLen"),UD(Y,"asyncTick"),q<1)throw Error("iterations (c) must be >= 1");let Z=l7($,"password"),K=l7(J,"salt"),j=new Uint8Array(X),U=q0.create(D,Z),C=U._cloneInto().update(K);return{c:q,dkLen:X,asyncTick:Y,DK:j,PRF:U,PRFSalt:C}}function YK(D,$,J,Q,G){if(D.destroy(),$.destroy(),Q)Q.destroy();return GD(G),J}function rQ(D,$,J,Q){let{c:G,dkLen:q,DK:X,PRF:Y,PRFSalt:Z}=XK(D,$,J,Q),K,j=new Uint8Array(4),U=hD(j),C=new Uint8Array(Y.outputLen);for(let z=1,E=0;E<q;z++,E+=Y.outputLen){let F=X.subarray(E,E+Y.outputLen);U.setInt32(0,z,!1),(K=Z._cloneInto(K)).update(j).digestInto(C),F.set(C.subarray(0,F.length));for(let W=1;W<G;W++){Y._cloneInto(K).update(C).digestInto(C);for(let H=0;H<F.length;H++)F[H]^=C[H]}}return YK(Y,Z,X,K,C)}/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */var ZK=(D)=>D[0]==="あいこくしん";function oQ(D){if(typeof D!=="string")throw TypeError("invalid mnemonic type: "+typeof D);return D.normalize("NFKD")}function KK(D){let $=oQ(D),J=$.split(" ");if(![12,15,18,21,24].includes(J.length))throw Error("Invalid mnemonic");return{nfkd:$,words:J}}function jK(D){if(x(D),![16,20,24,28,32].includes(D.length))throw Error("invalid entropy length")}function sQ(D,$=128){if(UD($),$%32!==0||$>256)throw TypeError("Invalid entropy");return EK(tD($/8),D)}var UK=(D)=>{let $=8-D.length/4;return new Uint8Array([B0(D)[0]>>$<<$])};function WK(D){if(!Array.isArray(D)||D.length!==2048||typeof D[0]!=="string")throw Error("Wordlist: expected array of 2048 strings");return D.forEach(($)=>{if(typeof $!=="string")throw Error("wordlist: non-string element: "+$)}),w8.chain(w8.checksum(1,UK),w8.radix2(11,!0),w8.alphabet(D))}function EK(D,$){return jK(D),WK($).encode(D).join(ZK($)?" ":" ")}var zK=(D)=>oQ("mnemonic"+D);function nQ(D,$=""){return rQ(R0,KK(D).nfkd,zK($),{c:2048,dkLen:64})}var tQ=`abandon
|
|
43
|
+
ability
|
|
44
|
+
able
|
|
45
|
+
about
|
|
46
|
+
above
|
|
47
|
+
absent
|
|
48
|
+
absorb
|
|
49
|
+
abstract
|
|
50
|
+
absurd
|
|
51
|
+
abuse
|
|
52
|
+
access
|
|
53
|
+
accident
|
|
54
|
+
account
|
|
55
|
+
accuse
|
|
56
|
+
achieve
|
|
57
|
+
acid
|
|
58
|
+
acoustic
|
|
59
|
+
acquire
|
|
60
|
+
across
|
|
61
|
+
act
|
|
62
|
+
action
|
|
63
|
+
actor
|
|
64
|
+
actress
|
|
65
|
+
actual
|
|
66
|
+
adapt
|
|
67
|
+
add
|
|
68
|
+
addict
|
|
69
|
+
address
|
|
70
|
+
adjust
|
|
71
|
+
admit
|
|
72
|
+
adult
|
|
73
|
+
advance
|
|
74
|
+
advice
|
|
75
|
+
aerobic
|
|
76
|
+
affair
|
|
77
|
+
afford
|
|
78
|
+
afraid
|
|
79
|
+
again
|
|
80
|
+
age
|
|
81
|
+
agent
|
|
82
|
+
agree
|
|
83
|
+
ahead
|
|
84
|
+
aim
|
|
85
|
+
air
|
|
86
|
+
airport
|
|
87
|
+
aisle
|
|
88
|
+
alarm
|
|
89
|
+
album
|
|
90
|
+
alcohol
|
|
91
|
+
alert
|
|
92
|
+
alien
|
|
93
|
+
all
|
|
94
|
+
alley
|
|
95
|
+
allow
|
|
96
|
+
almost
|
|
97
|
+
alone
|
|
98
|
+
alpha
|
|
99
|
+
already
|
|
100
|
+
also
|
|
101
|
+
alter
|
|
102
|
+
always
|
|
103
|
+
amateur
|
|
104
|
+
amazing
|
|
105
|
+
among
|
|
106
|
+
amount
|
|
107
|
+
amused
|
|
108
|
+
analyst
|
|
109
|
+
anchor
|
|
110
|
+
ancient
|
|
111
|
+
anger
|
|
112
|
+
angle
|
|
113
|
+
angry
|
|
114
|
+
animal
|
|
115
|
+
ankle
|
|
116
|
+
announce
|
|
117
|
+
annual
|
|
118
|
+
another
|
|
119
|
+
answer
|
|
120
|
+
antenna
|
|
121
|
+
antique
|
|
122
|
+
anxiety
|
|
123
|
+
any
|
|
124
|
+
apart
|
|
125
|
+
apology
|
|
126
|
+
appear
|
|
127
|
+
apple
|
|
128
|
+
approve
|
|
129
|
+
april
|
|
130
|
+
arch
|
|
131
|
+
arctic
|
|
132
|
+
area
|
|
133
|
+
arena
|
|
134
|
+
argue
|
|
135
|
+
arm
|
|
136
|
+
armed
|
|
137
|
+
armor
|
|
138
|
+
army
|
|
139
|
+
around
|
|
140
|
+
arrange
|
|
141
|
+
arrest
|
|
142
|
+
arrive
|
|
143
|
+
arrow
|
|
144
|
+
art
|
|
145
|
+
artefact
|
|
146
|
+
artist
|
|
147
|
+
artwork
|
|
148
|
+
ask
|
|
149
|
+
aspect
|
|
150
|
+
assault
|
|
151
|
+
asset
|
|
152
|
+
assist
|
|
153
|
+
assume
|
|
154
|
+
asthma
|
|
155
|
+
athlete
|
|
156
|
+
atom
|
|
157
|
+
attack
|
|
158
|
+
attend
|
|
159
|
+
attitude
|
|
160
|
+
attract
|
|
161
|
+
auction
|
|
162
|
+
audit
|
|
163
|
+
august
|
|
164
|
+
aunt
|
|
165
|
+
author
|
|
166
|
+
auto
|
|
167
|
+
autumn
|
|
168
|
+
average
|
|
169
|
+
avocado
|
|
170
|
+
avoid
|
|
171
|
+
awake
|
|
172
|
+
aware
|
|
173
|
+
away
|
|
174
|
+
awesome
|
|
175
|
+
awful
|
|
176
|
+
awkward
|
|
177
|
+
axis
|
|
178
|
+
baby
|
|
179
|
+
bachelor
|
|
180
|
+
bacon
|
|
181
|
+
badge
|
|
182
|
+
bag
|
|
183
|
+
balance
|
|
184
|
+
balcony
|
|
185
|
+
ball
|
|
186
|
+
bamboo
|
|
187
|
+
banana
|
|
188
|
+
banner
|
|
189
|
+
bar
|
|
190
|
+
barely
|
|
191
|
+
bargain
|
|
192
|
+
barrel
|
|
193
|
+
base
|
|
194
|
+
basic
|
|
195
|
+
basket
|
|
196
|
+
battle
|
|
197
|
+
beach
|
|
198
|
+
bean
|
|
199
|
+
beauty
|
|
200
|
+
because
|
|
201
|
+
become
|
|
202
|
+
beef
|
|
203
|
+
before
|
|
204
|
+
begin
|
|
205
|
+
behave
|
|
206
|
+
behind
|
|
207
|
+
believe
|
|
208
|
+
below
|
|
209
|
+
belt
|
|
210
|
+
bench
|
|
211
|
+
benefit
|
|
212
|
+
best
|
|
213
|
+
betray
|
|
214
|
+
better
|
|
215
|
+
between
|
|
216
|
+
beyond
|
|
217
|
+
bicycle
|
|
218
|
+
bid
|
|
219
|
+
bike
|
|
220
|
+
bind
|
|
221
|
+
biology
|
|
222
|
+
bird
|
|
223
|
+
birth
|
|
224
|
+
bitter
|
|
225
|
+
black
|
|
226
|
+
blade
|
|
227
|
+
blame
|
|
228
|
+
blanket
|
|
229
|
+
blast
|
|
230
|
+
bleak
|
|
231
|
+
bless
|
|
232
|
+
blind
|
|
233
|
+
blood
|
|
234
|
+
blossom
|
|
235
|
+
blouse
|
|
236
|
+
blue
|
|
237
|
+
blur
|
|
238
|
+
blush
|
|
239
|
+
board
|
|
240
|
+
boat
|
|
241
|
+
body
|
|
242
|
+
boil
|
|
243
|
+
bomb
|
|
244
|
+
bone
|
|
245
|
+
bonus
|
|
246
|
+
book
|
|
247
|
+
boost
|
|
248
|
+
border
|
|
249
|
+
boring
|
|
250
|
+
borrow
|
|
251
|
+
boss
|
|
252
|
+
bottom
|
|
253
|
+
bounce
|
|
254
|
+
box
|
|
255
|
+
boy
|
|
256
|
+
bracket
|
|
257
|
+
brain
|
|
258
|
+
brand
|
|
259
|
+
brass
|
|
260
|
+
brave
|
|
261
|
+
bread
|
|
262
|
+
breeze
|
|
263
|
+
brick
|
|
264
|
+
bridge
|
|
265
|
+
brief
|
|
266
|
+
bright
|
|
267
|
+
bring
|
|
268
|
+
brisk
|
|
269
|
+
broccoli
|
|
270
|
+
broken
|
|
271
|
+
bronze
|
|
272
|
+
broom
|
|
273
|
+
brother
|
|
274
|
+
brown
|
|
275
|
+
brush
|
|
276
|
+
bubble
|
|
277
|
+
buddy
|
|
278
|
+
budget
|
|
279
|
+
buffalo
|
|
280
|
+
build
|
|
281
|
+
bulb
|
|
282
|
+
bulk
|
|
283
|
+
bullet
|
|
284
|
+
bundle
|
|
285
|
+
bunker
|
|
286
|
+
burden
|
|
287
|
+
burger
|
|
288
|
+
burst
|
|
289
|
+
bus
|
|
290
|
+
business
|
|
291
|
+
busy
|
|
292
|
+
butter
|
|
293
|
+
buyer
|
|
294
|
+
buzz
|
|
295
|
+
cabbage
|
|
296
|
+
cabin
|
|
297
|
+
cable
|
|
298
|
+
cactus
|
|
299
|
+
cage
|
|
300
|
+
cake
|
|
301
|
+
call
|
|
302
|
+
calm
|
|
303
|
+
camera
|
|
304
|
+
camp
|
|
305
|
+
can
|
|
306
|
+
canal
|
|
307
|
+
cancel
|
|
308
|
+
candy
|
|
309
|
+
cannon
|
|
310
|
+
canoe
|
|
311
|
+
canvas
|
|
312
|
+
canyon
|
|
313
|
+
capable
|
|
314
|
+
capital
|
|
315
|
+
captain
|
|
316
|
+
car
|
|
317
|
+
carbon
|
|
318
|
+
card
|
|
319
|
+
cargo
|
|
320
|
+
carpet
|
|
321
|
+
carry
|
|
322
|
+
cart
|
|
323
|
+
case
|
|
324
|
+
cash
|
|
325
|
+
casino
|
|
326
|
+
castle
|
|
327
|
+
casual
|
|
328
|
+
cat
|
|
329
|
+
catalog
|
|
330
|
+
catch
|
|
331
|
+
category
|
|
332
|
+
cattle
|
|
333
|
+
caught
|
|
334
|
+
cause
|
|
335
|
+
caution
|
|
336
|
+
cave
|
|
337
|
+
ceiling
|
|
338
|
+
celery
|
|
339
|
+
cement
|
|
340
|
+
census
|
|
341
|
+
century
|
|
342
|
+
cereal
|
|
343
|
+
certain
|
|
344
|
+
chair
|
|
345
|
+
chalk
|
|
346
|
+
champion
|
|
347
|
+
change
|
|
348
|
+
chaos
|
|
349
|
+
chapter
|
|
350
|
+
charge
|
|
351
|
+
chase
|
|
352
|
+
chat
|
|
353
|
+
cheap
|
|
354
|
+
check
|
|
355
|
+
cheese
|
|
356
|
+
chef
|
|
357
|
+
cherry
|
|
358
|
+
chest
|
|
359
|
+
chicken
|
|
360
|
+
chief
|
|
361
|
+
child
|
|
362
|
+
chimney
|
|
363
|
+
choice
|
|
364
|
+
choose
|
|
365
|
+
chronic
|
|
366
|
+
chuckle
|
|
367
|
+
chunk
|
|
368
|
+
churn
|
|
369
|
+
cigar
|
|
370
|
+
cinnamon
|
|
371
|
+
circle
|
|
372
|
+
citizen
|
|
373
|
+
city
|
|
374
|
+
civil
|
|
375
|
+
claim
|
|
376
|
+
clap
|
|
377
|
+
clarify
|
|
378
|
+
claw
|
|
379
|
+
clay
|
|
380
|
+
clean
|
|
381
|
+
clerk
|
|
382
|
+
clever
|
|
383
|
+
click
|
|
384
|
+
client
|
|
385
|
+
cliff
|
|
386
|
+
climb
|
|
387
|
+
clinic
|
|
388
|
+
clip
|
|
389
|
+
clock
|
|
390
|
+
clog
|
|
391
|
+
close
|
|
392
|
+
cloth
|
|
393
|
+
cloud
|
|
394
|
+
clown
|
|
395
|
+
club
|
|
396
|
+
clump
|
|
397
|
+
cluster
|
|
398
|
+
clutch
|
|
399
|
+
coach
|
|
400
|
+
coast
|
|
401
|
+
coconut
|
|
402
|
+
code
|
|
403
|
+
coffee
|
|
404
|
+
coil
|
|
405
|
+
coin
|
|
406
|
+
collect
|
|
407
|
+
color
|
|
408
|
+
column
|
|
409
|
+
combine
|
|
410
|
+
come
|
|
411
|
+
comfort
|
|
412
|
+
comic
|
|
413
|
+
common
|
|
414
|
+
company
|
|
415
|
+
concert
|
|
416
|
+
conduct
|
|
417
|
+
confirm
|
|
418
|
+
congress
|
|
419
|
+
connect
|
|
420
|
+
consider
|
|
421
|
+
control
|
|
422
|
+
convince
|
|
423
|
+
cook
|
|
424
|
+
cool
|
|
425
|
+
copper
|
|
426
|
+
copy
|
|
427
|
+
coral
|
|
428
|
+
core
|
|
429
|
+
corn
|
|
430
|
+
correct
|
|
431
|
+
cost
|
|
432
|
+
cotton
|
|
433
|
+
couch
|
|
434
|
+
country
|
|
435
|
+
couple
|
|
436
|
+
course
|
|
437
|
+
cousin
|
|
438
|
+
cover
|
|
439
|
+
coyote
|
|
440
|
+
crack
|
|
441
|
+
cradle
|
|
442
|
+
craft
|
|
443
|
+
cram
|
|
444
|
+
crane
|
|
445
|
+
crash
|
|
446
|
+
crater
|
|
447
|
+
crawl
|
|
448
|
+
crazy
|
|
449
|
+
cream
|
|
450
|
+
credit
|
|
451
|
+
creek
|
|
452
|
+
crew
|
|
453
|
+
cricket
|
|
454
|
+
crime
|
|
455
|
+
crisp
|
|
456
|
+
critic
|
|
457
|
+
crop
|
|
458
|
+
cross
|
|
459
|
+
crouch
|
|
460
|
+
crowd
|
|
461
|
+
crucial
|
|
462
|
+
cruel
|
|
463
|
+
cruise
|
|
464
|
+
crumble
|
|
465
|
+
crunch
|
|
466
|
+
crush
|
|
467
|
+
cry
|
|
468
|
+
crystal
|
|
469
|
+
cube
|
|
470
|
+
culture
|
|
471
|
+
cup
|
|
472
|
+
cupboard
|
|
473
|
+
curious
|
|
474
|
+
current
|
|
475
|
+
curtain
|
|
476
|
+
curve
|
|
477
|
+
cushion
|
|
478
|
+
custom
|
|
479
|
+
cute
|
|
480
|
+
cycle
|
|
481
|
+
dad
|
|
482
|
+
damage
|
|
483
|
+
damp
|
|
484
|
+
dance
|
|
485
|
+
danger
|
|
486
|
+
daring
|
|
487
|
+
dash
|
|
488
|
+
daughter
|
|
489
|
+
dawn
|
|
490
|
+
day
|
|
491
|
+
deal
|
|
492
|
+
debate
|
|
493
|
+
debris
|
|
494
|
+
decade
|
|
495
|
+
december
|
|
496
|
+
decide
|
|
497
|
+
decline
|
|
498
|
+
decorate
|
|
499
|
+
decrease
|
|
500
|
+
deer
|
|
501
|
+
defense
|
|
502
|
+
define
|
|
503
|
+
defy
|
|
504
|
+
degree
|
|
505
|
+
delay
|
|
506
|
+
deliver
|
|
507
|
+
demand
|
|
508
|
+
demise
|
|
509
|
+
denial
|
|
510
|
+
dentist
|
|
511
|
+
deny
|
|
512
|
+
depart
|
|
513
|
+
depend
|
|
514
|
+
deposit
|
|
515
|
+
depth
|
|
516
|
+
deputy
|
|
517
|
+
derive
|
|
518
|
+
describe
|
|
519
|
+
desert
|
|
520
|
+
design
|
|
521
|
+
desk
|
|
522
|
+
despair
|
|
523
|
+
destroy
|
|
524
|
+
detail
|
|
525
|
+
detect
|
|
526
|
+
develop
|
|
527
|
+
device
|
|
528
|
+
devote
|
|
529
|
+
diagram
|
|
530
|
+
dial
|
|
531
|
+
diamond
|
|
532
|
+
diary
|
|
533
|
+
dice
|
|
534
|
+
diesel
|
|
535
|
+
diet
|
|
536
|
+
differ
|
|
537
|
+
digital
|
|
538
|
+
dignity
|
|
539
|
+
dilemma
|
|
540
|
+
dinner
|
|
541
|
+
dinosaur
|
|
542
|
+
direct
|
|
543
|
+
dirt
|
|
544
|
+
disagree
|
|
545
|
+
discover
|
|
546
|
+
disease
|
|
547
|
+
dish
|
|
548
|
+
dismiss
|
|
549
|
+
disorder
|
|
550
|
+
display
|
|
551
|
+
distance
|
|
552
|
+
divert
|
|
553
|
+
divide
|
|
554
|
+
divorce
|
|
555
|
+
dizzy
|
|
556
|
+
doctor
|
|
557
|
+
document
|
|
558
|
+
dog
|
|
559
|
+
doll
|
|
560
|
+
dolphin
|
|
561
|
+
domain
|
|
562
|
+
donate
|
|
563
|
+
donkey
|
|
564
|
+
donor
|
|
565
|
+
door
|
|
566
|
+
dose
|
|
567
|
+
double
|
|
568
|
+
dove
|
|
569
|
+
draft
|
|
570
|
+
dragon
|
|
571
|
+
drama
|
|
572
|
+
drastic
|
|
573
|
+
draw
|
|
574
|
+
dream
|
|
575
|
+
dress
|
|
576
|
+
drift
|
|
577
|
+
drill
|
|
578
|
+
drink
|
|
579
|
+
drip
|
|
580
|
+
drive
|
|
581
|
+
drop
|
|
582
|
+
drum
|
|
583
|
+
dry
|
|
584
|
+
duck
|
|
585
|
+
dumb
|
|
586
|
+
dune
|
|
587
|
+
during
|
|
588
|
+
dust
|
|
589
|
+
dutch
|
|
590
|
+
duty
|
|
591
|
+
dwarf
|
|
592
|
+
dynamic
|
|
593
|
+
eager
|
|
594
|
+
eagle
|
|
595
|
+
early
|
|
596
|
+
earn
|
|
597
|
+
earth
|
|
598
|
+
easily
|
|
599
|
+
east
|
|
600
|
+
easy
|
|
601
|
+
echo
|
|
602
|
+
ecology
|
|
603
|
+
economy
|
|
604
|
+
edge
|
|
605
|
+
edit
|
|
606
|
+
educate
|
|
607
|
+
effort
|
|
608
|
+
egg
|
|
609
|
+
eight
|
|
610
|
+
either
|
|
611
|
+
elbow
|
|
612
|
+
elder
|
|
613
|
+
electric
|
|
614
|
+
elegant
|
|
615
|
+
element
|
|
616
|
+
elephant
|
|
617
|
+
elevator
|
|
618
|
+
elite
|
|
619
|
+
else
|
|
620
|
+
embark
|
|
621
|
+
embody
|
|
622
|
+
embrace
|
|
623
|
+
emerge
|
|
624
|
+
emotion
|
|
625
|
+
employ
|
|
626
|
+
empower
|
|
627
|
+
empty
|
|
628
|
+
enable
|
|
629
|
+
enact
|
|
630
|
+
end
|
|
631
|
+
endless
|
|
632
|
+
endorse
|
|
633
|
+
enemy
|
|
634
|
+
energy
|
|
635
|
+
enforce
|
|
636
|
+
engage
|
|
637
|
+
engine
|
|
638
|
+
enhance
|
|
639
|
+
enjoy
|
|
640
|
+
enlist
|
|
641
|
+
enough
|
|
642
|
+
enrich
|
|
643
|
+
enroll
|
|
644
|
+
ensure
|
|
645
|
+
enter
|
|
646
|
+
entire
|
|
647
|
+
entry
|
|
648
|
+
envelope
|
|
649
|
+
episode
|
|
650
|
+
equal
|
|
651
|
+
equip
|
|
652
|
+
era
|
|
653
|
+
erase
|
|
654
|
+
erode
|
|
655
|
+
erosion
|
|
656
|
+
error
|
|
657
|
+
erupt
|
|
658
|
+
escape
|
|
659
|
+
essay
|
|
660
|
+
essence
|
|
661
|
+
estate
|
|
662
|
+
eternal
|
|
663
|
+
ethics
|
|
664
|
+
evidence
|
|
665
|
+
evil
|
|
666
|
+
evoke
|
|
667
|
+
evolve
|
|
668
|
+
exact
|
|
669
|
+
example
|
|
670
|
+
excess
|
|
671
|
+
exchange
|
|
672
|
+
excite
|
|
673
|
+
exclude
|
|
674
|
+
excuse
|
|
675
|
+
execute
|
|
676
|
+
exercise
|
|
677
|
+
exhaust
|
|
678
|
+
exhibit
|
|
679
|
+
exile
|
|
680
|
+
exist
|
|
681
|
+
exit
|
|
682
|
+
exotic
|
|
683
|
+
expand
|
|
684
|
+
expect
|
|
685
|
+
expire
|
|
686
|
+
explain
|
|
687
|
+
expose
|
|
688
|
+
express
|
|
689
|
+
extend
|
|
690
|
+
extra
|
|
691
|
+
eye
|
|
692
|
+
eyebrow
|
|
693
|
+
fabric
|
|
694
|
+
face
|
|
695
|
+
faculty
|
|
696
|
+
fade
|
|
697
|
+
faint
|
|
698
|
+
faith
|
|
699
|
+
fall
|
|
700
|
+
false
|
|
701
|
+
fame
|
|
702
|
+
family
|
|
703
|
+
famous
|
|
704
|
+
fan
|
|
705
|
+
fancy
|
|
706
|
+
fantasy
|
|
707
|
+
farm
|
|
708
|
+
fashion
|
|
709
|
+
fat
|
|
710
|
+
fatal
|
|
711
|
+
father
|
|
712
|
+
fatigue
|
|
713
|
+
fault
|
|
714
|
+
favorite
|
|
715
|
+
feature
|
|
716
|
+
february
|
|
717
|
+
federal
|
|
718
|
+
fee
|
|
719
|
+
feed
|
|
720
|
+
feel
|
|
721
|
+
female
|
|
722
|
+
fence
|
|
723
|
+
festival
|
|
724
|
+
fetch
|
|
725
|
+
fever
|
|
726
|
+
few
|
|
727
|
+
fiber
|
|
728
|
+
fiction
|
|
729
|
+
field
|
|
730
|
+
figure
|
|
731
|
+
file
|
|
732
|
+
film
|
|
733
|
+
filter
|
|
734
|
+
final
|
|
735
|
+
find
|
|
736
|
+
fine
|
|
737
|
+
finger
|
|
738
|
+
finish
|
|
739
|
+
fire
|
|
740
|
+
firm
|
|
741
|
+
first
|
|
742
|
+
fiscal
|
|
743
|
+
fish
|
|
744
|
+
fit
|
|
745
|
+
fitness
|
|
746
|
+
fix
|
|
747
|
+
flag
|
|
748
|
+
flame
|
|
749
|
+
flash
|
|
750
|
+
flat
|
|
751
|
+
flavor
|
|
752
|
+
flee
|
|
753
|
+
flight
|
|
754
|
+
flip
|
|
755
|
+
float
|
|
756
|
+
flock
|
|
757
|
+
floor
|
|
758
|
+
flower
|
|
759
|
+
fluid
|
|
760
|
+
flush
|
|
761
|
+
fly
|
|
762
|
+
foam
|
|
763
|
+
focus
|
|
764
|
+
fog
|
|
765
|
+
foil
|
|
766
|
+
fold
|
|
767
|
+
follow
|
|
768
|
+
food
|
|
769
|
+
foot
|
|
770
|
+
force
|
|
771
|
+
forest
|
|
772
|
+
forget
|
|
773
|
+
fork
|
|
774
|
+
fortune
|
|
775
|
+
forum
|
|
776
|
+
forward
|
|
777
|
+
fossil
|
|
778
|
+
foster
|
|
779
|
+
found
|
|
780
|
+
fox
|
|
781
|
+
fragile
|
|
782
|
+
frame
|
|
783
|
+
frequent
|
|
784
|
+
fresh
|
|
785
|
+
friend
|
|
786
|
+
fringe
|
|
787
|
+
frog
|
|
788
|
+
front
|
|
789
|
+
frost
|
|
790
|
+
frown
|
|
791
|
+
frozen
|
|
792
|
+
fruit
|
|
793
|
+
fuel
|
|
794
|
+
fun
|
|
795
|
+
funny
|
|
796
|
+
furnace
|
|
797
|
+
fury
|
|
798
|
+
future
|
|
799
|
+
gadget
|
|
800
|
+
gain
|
|
801
|
+
galaxy
|
|
802
|
+
gallery
|
|
803
|
+
game
|
|
804
|
+
gap
|
|
805
|
+
garage
|
|
806
|
+
garbage
|
|
807
|
+
garden
|
|
808
|
+
garlic
|
|
809
|
+
garment
|
|
810
|
+
gas
|
|
811
|
+
gasp
|
|
812
|
+
gate
|
|
813
|
+
gather
|
|
814
|
+
gauge
|
|
815
|
+
gaze
|
|
816
|
+
general
|
|
817
|
+
genius
|
|
818
|
+
genre
|
|
819
|
+
gentle
|
|
820
|
+
genuine
|
|
821
|
+
gesture
|
|
822
|
+
ghost
|
|
823
|
+
giant
|
|
824
|
+
gift
|
|
825
|
+
giggle
|
|
826
|
+
ginger
|
|
827
|
+
giraffe
|
|
828
|
+
girl
|
|
829
|
+
give
|
|
830
|
+
glad
|
|
831
|
+
glance
|
|
832
|
+
glare
|
|
833
|
+
glass
|
|
834
|
+
glide
|
|
835
|
+
glimpse
|
|
836
|
+
globe
|
|
837
|
+
gloom
|
|
838
|
+
glory
|
|
839
|
+
glove
|
|
840
|
+
glow
|
|
841
|
+
glue
|
|
842
|
+
goat
|
|
843
|
+
goddess
|
|
844
|
+
gold
|
|
845
|
+
good
|
|
846
|
+
goose
|
|
847
|
+
gorilla
|
|
848
|
+
gospel
|
|
849
|
+
gossip
|
|
850
|
+
govern
|
|
851
|
+
gown
|
|
852
|
+
grab
|
|
853
|
+
grace
|
|
854
|
+
grain
|
|
855
|
+
grant
|
|
856
|
+
grape
|
|
857
|
+
grass
|
|
858
|
+
gravity
|
|
859
|
+
great
|
|
860
|
+
green
|
|
861
|
+
grid
|
|
862
|
+
grief
|
|
863
|
+
grit
|
|
864
|
+
grocery
|
|
865
|
+
group
|
|
866
|
+
grow
|
|
867
|
+
grunt
|
|
868
|
+
guard
|
|
869
|
+
guess
|
|
870
|
+
guide
|
|
871
|
+
guilt
|
|
872
|
+
guitar
|
|
873
|
+
gun
|
|
874
|
+
gym
|
|
875
|
+
habit
|
|
876
|
+
hair
|
|
877
|
+
half
|
|
878
|
+
hammer
|
|
879
|
+
hamster
|
|
880
|
+
hand
|
|
881
|
+
happy
|
|
882
|
+
harbor
|
|
883
|
+
hard
|
|
884
|
+
harsh
|
|
885
|
+
harvest
|
|
886
|
+
hat
|
|
887
|
+
have
|
|
888
|
+
hawk
|
|
889
|
+
hazard
|
|
890
|
+
head
|
|
891
|
+
health
|
|
892
|
+
heart
|
|
893
|
+
heavy
|
|
894
|
+
hedgehog
|
|
895
|
+
height
|
|
896
|
+
hello
|
|
897
|
+
helmet
|
|
898
|
+
help
|
|
899
|
+
hen
|
|
900
|
+
hero
|
|
901
|
+
hidden
|
|
902
|
+
high
|
|
903
|
+
hill
|
|
904
|
+
hint
|
|
905
|
+
hip
|
|
906
|
+
hire
|
|
907
|
+
history
|
|
908
|
+
hobby
|
|
909
|
+
hockey
|
|
910
|
+
hold
|
|
911
|
+
hole
|
|
912
|
+
holiday
|
|
913
|
+
hollow
|
|
914
|
+
home
|
|
915
|
+
honey
|
|
916
|
+
hood
|
|
917
|
+
hope
|
|
918
|
+
horn
|
|
919
|
+
horror
|
|
920
|
+
horse
|
|
921
|
+
hospital
|
|
922
|
+
host
|
|
923
|
+
hotel
|
|
924
|
+
hour
|
|
925
|
+
hover
|
|
926
|
+
hub
|
|
927
|
+
huge
|
|
928
|
+
human
|
|
929
|
+
humble
|
|
930
|
+
humor
|
|
931
|
+
hundred
|
|
932
|
+
hungry
|
|
933
|
+
hunt
|
|
934
|
+
hurdle
|
|
935
|
+
hurry
|
|
936
|
+
hurt
|
|
937
|
+
husband
|
|
938
|
+
hybrid
|
|
939
|
+
ice
|
|
940
|
+
icon
|
|
941
|
+
idea
|
|
942
|
+
identify
|
|
943
|
+
idle
|
|
944
|
+
ignore
|
|
945
|
+
ill
|
|
946
|
+
illegal
|
|
947
|
+
illness
|
|
948
|
+
image
|
|
949
|
+
imitate
|
|
950
|
+
immense
|
|
951
|
+
immune
|
|
952
|
+
impact
|
|
953
|
+
impose
|
|
954
|
+
improve
|
|
955
|
+
impulse
|
|
956
|
+
inch
|
|
957
|
+
include
|
|
958
|
+
income
|
|
959
|
+
increase
|
|
960
|
+
index
|
|
961
|
+
indicate
|
|
962
|
+
indoor
|
|
963
|
+
industry
|
|
964
|
+
infant
|
|
965
|
+
inflict
|
|
966
|
+
inform
|
|
967
|
+
inhale
|
|
968
|
+
inherit
|
|
969
|
+
initial
|
|
970
|
+
inject
|
|
971
|
+
injury
|
|
972
|
+
inmate
|
|
973
|
+
inner
|
|
974
|
+
innocent
|
|
975
|
+
input
|
|
976
|
+
inquiry
|
|
977
|
+
insane
|
|
978
|
+
insect
|
|
979
|
+
inside
|
|
980
|
+
inspire
|
|
981
|
+
install
|
|
982
|
+
intact
|
|
983
|
+
interest
|
|
984
|
+
into
|
|
985
|
+
invest
|
|
986
|
+
invite
|
|
987
|
+
involve
|
|
988
|
+
iron
|
|
989
|
+
island
|
|
990
|
+
isolate
|
|
991
|
+
issue
|
|
992
|
+
item
|
|
993
|
+
ivory
|
|
994
|
+
jacket
|
|
995
|
+
jaguar
|
|
996
|
+
jar
|
|
997
|
+
jazz
|
|
998
|
+
jealous
|
|
999
|
+
jeans
|
|
1000
|
+
jelly
|
|
1001
|
+
jewel
|
|
1002
|
+
job
|
|
1003
|
+
join
|
|
1004
|
+
joke
|
|
1005
|
+
journey
|
|
1006
|
+
joy
|
|
1007
|
+
judge
|
|
1008
|
+
juice
|
|
1009
|
+
jump
|
|
1010
|
+
jungle
|
|
1011
|
+
junior
|
|
1012
|
+
junk
|
|
1013
|
+
just
|
|
1014
|
+
kangaroo
|
|
1015
|
+
keen
|
|
1016
|
+
keep
|
|
1017
|
+
ketchup
|
|
1018
|
+
key
|
|
1019
|
+
kick
|
|
1020
|
+
kid
|
|
1021
|
+
kidney
|
|
1022
|
+
kind
|
|
1023
|
+
kingdom
|
|
1024
|
+
kiss
|
|
1025
|
+
kit
|
|
1026
|
+
kitchen
|
|
1027
|
+
kite
|
|
1028
|
+
kitten
|
|
1029
|
+
kiwi
|
|
1030
|
+
knee
|
|
1031
|
+
knife
|
|
1032
|
+
knock
|
|
1033
|
+
know
|
|
1034
|
+
lab
|
|
1035
|
+
label
|
|
1036
|
+
labor
|
|
1037
|
+
ladder
|
|
1038
|
+
lady
|
|
1039
|
+
lake
|
|
1040
|
+
lamp
|
|
1041
|
+
language
|
|
1042
|
+
laptop
|
|
1043
|
+
large
|
|
1044
|
+
later
|
|
1045
|
+
latin
|
|
1046
|
+
laugh
|
|
1047
|
+
laundry
|
|
1048
|
+
lava
|
|
1049
|
+
law
|
|
1050
|
+
lawn
|
|
1051
|
+
lawsuit
|
|
1052
|
+
layer
|
|
1053
|
+
lazy
|
|
1054
|
+
leader
|
|
1055
|
+
leaf
|
|
1056
|
+
learn
|
|
1057
|
+
leave
|
|
1058
|
+
lecture
|
|
1059
|
+
left
|
|
1060
|
+
leg
|
|
1061
|
+
legal
|
|
1062
|
+
legend
|
|
1063
|
+
leisure
|
|
1064
|
+
lemon
|
|
1065
|
+
lend
|
|
1066
|
+
length
|
|
1067
|
+
lens
|
|
1068
|
+
leopard
|
|
1069
|
+
lesson
|
|
1070
|
+
letter
|
|
1071
|
+
level
|
|
1072
|
+
liar
|
|
1073
|
+
liberty
|
|
1074
|
+
library
|
|
1075
|
+
license
|
|
1076
|
+
life
|
|
1077
|
+
lift
|
|
1078
|
+
light
|
|
1079
|
+
like
|
|
1080
|
+
limb
|
|
1081
|
+
limit
|
|
1082
|
+
link
|
|
1083
|
+
lion
|
|
1084
|
+
liquid
|
|
1085
|
+
list
|
|
1086
|
+
little
|
|
1087
|
+
live
|
|
1088
|
+
lizard
|
|
1089
|
+
load
|
|
1090
|
+
loan
|
|
1091
|
+
lobster
|
|
1092
|
+
local
|
|
1093
|
+
lock
|
|
1094
|
+
logic
|
|
1095
|
+
lonely
|
|
1096
|
+
long
|
|
1097
|
+
loop
|
|
1098
|
+
lottery
|
|
1099
|
+
loud
|
|
1100
|
+
lounge
|
|
1101
|
+
love
|
|
1102
|
+
loyal
|
|
1103
|
+
lucky
|
|
1104
|
+
luggage
|
|
1105
|
+
lumber
|
|
1106
|
+
lunar
|
|
1107
|
+
lunch
|
|
1108
|
+
luxury
|
|
1109
|
+
lyrics
|
|
1110
|
+
machine
|
|
1111
|
+
mad
|
|
1112
|
+
magic
|
|
1113
|
+
magnet
|
|
1114
|
+
maid
|
|
1115
|
+
mail
|
|
1116
|
+
main
|
|
1117
|
+
major
|
|
1118
|
+
make
|
|
1119
|
+
mammal
|
|
1120
|
+
man
|
|
1121
|
+
manage
|
|
1122
|
+
mandate
|
|
1123
|
+
mango
|
|
1124
|
+
mansion
|
|
1125
|
+
manual
|
|
1126
|
+
maple
|
|
1127
|
+
marble
|
|
1128
|
+
march
|
|
1129
|
+
margin
|
|
1130
|
+
marine
|
|
1131
|
+
market
|
|
1132
|
+
marriage
|
|
1133
|
+
mask
|
|
1134
|
+
mass
|
|
1135
|
+
master
|
|
1136
|
+
match
|
|
1137
|
+
material
|
|
1138
|
+
math
|
|
1139
|
+
matrix
|
|
1140
|
+
matter
|
|
1141
|
+
maximum
|
|
1142
|
+
maze
|
|
1143
|
+
meadow
|
|
1144
|
+
mean
|
|
1145
|
+
measure
|
|
1146
|
+
meat
|
|
1147
|
+
mechanic
|
|
1148
|
+
medal
|
|
1149
|
+
media
|
|
1150
|
+
melody
|
|
1151
|
+
melt
|
|
1152
|
+
member
|
|
1153
|
+
memory
|
|
1154
|
+
mention
|
|
1155
|
+
menu
|
|
1156
|
+
mercy
|
|
1157
|
+
merge
|
|
1158
|
+
merit
|
|
1159
|
+
merry
|
|
1160
|
+
mesh
|
|
1161
|
+
message
|
|
1162
|
+
metal
|
|
1163
|
+
method
|
|
1164
|
+
middle
|
|
1165
|
+
midnight
|
|
1166
|
+
milk
|
|
1167
|
+
million
|
|
1168
|
+
mimic
|
|
1169
|
+
mind
|
|
1170
|
+
minimum
|
|
1171
|
+
minor
|
|
1172
|
+
minute
|
|
1173
|
+
miracle
|
|
1174
|
+
mirror
|
|
1175
|
+
misery
|
|
1176
|
+
miss
|
|
1177
|
+
mistake
|
|
1178
|
+
mix
|
|
1179
|
+
mixed
|
|
1180
|
+
mixture
|
|
1181
|
+
mobile
|
|
1182
|
+
model
|
|
1183
|
+
modify
|
|
1184
|
+
mom
|
|
1185
|
+
moment
|
|
1186
|
+
monitor
|
|
1187
|
+
monkey
|
|
1188
|
+
monster
|
|
1189
|
+
month
|
|
1190
|
+
moon
|
|
1191
|
+
moral
|
|
1192
|
+
more
|
|
1193
|
+
morning
|
|
1194
|
+
mosquito
|
|
1195
|
+
mother
|
|
1196
|
+
motion
|
|
1197
|
+
motor
|
|
1198
|
+
mountain
|
|
1199
|
+
mouse
|
|
1200
|
+
move
|
|
1201
|
+
movie
|
|
1202
|
+
much
|
|
1203
|
+
muffin
|
|
1204
|
+
mule
|
|
1205
|
+
multiply
|
|
1206
|
+
muscle
|
|
1207
|
+
museum
|
|
1208
|
+
mushroom
|
|
1209
|
+
music
|
|
1210
|
+
must
|
|
1211
|
+
mutual
|
|
1212
|
+
myself
|
|
1213
|
+
mystery
|
|
1214
|
+
myth
|
|
1215
|
+
naive
|
|
1216
|
+
name
|
|
1217
|
+
napkin
|
|
1218
|
+
narrow
|
|
1219
|
+
nasty
|
|
1220
|
+
nation
|
|
1221
|
+
nature
|
|
1222
|
+
near
|
|
1223
|
+
neck
|
|
1224
|
+
need
|
|
1225
|
+
negative
|
|
1226
|
+
neglect
|
|
1227
|
+
neither
|
|
1228
|
+
nephew
|
|
1229
|
+
nerve
|
|
1230
|
+
nest
|
|
1231
|
+
net
|
|
1232
|
+
network
|
|
1233
|
+
neutral
|
|
1234
|
+
never
|
|
1235
|
+
news
|
|
1236
|
+
next
|
|
1237
|
+
nice
|
|
1238
|
+
night
|
|
1239
|
+
noble
|
|
1240
|
+
noise
|
|
1241
|
+
nominee
|
|
1242
|
+
noodle
|
|
1243
|
+
normal
|
|
1244
|
+
north
|
|
1245
|
+
nose
|
|
1246
|
+
notable
|
|
1247
|
+
note
|
|
1248
|
+
nothing
|
|
1249
|
+
notice
|
|
1250
|
+
novel
|
|
1251
|
+
now
|
|
1252
|
+
nuclear
|
|
1253
|
+
number
|
|
1254
|
+
nurse
|
|
1255
|
+
nut
|
|
1256
|
+
oak
|
|
1257
|
+
obey
|
|
1258
|
+
object
|
|
1259
|
+
oblige
|
|
1260
|
+
obscure
|
|
1261
|
+
observe
|
|
1262
|
+
obtain
|
|
1263
|
+
obvious
|
|
1264
|
+
occur
|
|
1265
|
+
ocean
|
|
1266
|
+
october
|
|
1267
|
+
odor
|
|
1268
|
+
off
|
|
1269
|
+
offer
|
|
1270
|
+
office
|
|
1271
|
+
often
|
|
1272
|
+
oil
|
|
1273
|
+
okay
|
|
1274
|
+
old
|
|
1275
|
+
olive
|
|
1276
|
+
olympic
|
|
1277
|
+
omit
|
|
1278
|
+
once
|
|
1279
|
+
one
|
|
1280
|
+
onion
|
|
1281
|
+
online
|
|
1282
|
+
only
|
|
1283
|
+
open
|
|
1284
|
+
opera
|
|
1285
|
+
opinion
|
|
1286
|
+
oppose
|
|
1287
|
+
option
|
|
1288
|
+
orange
|
|
1289
|
+
orbit
|
|
1290
|
+
orchard
|
|
1291
|
+
order
|
|
1292
|
+
ordinary
|
|
1293
|
+
organ
|
|
1294
|
+
orient
|
|
1295
|
+
original
|
|
1296
|
+
orphan
|
|
1297
|
+
ostrich
|
|
1298
|
+
other
|
|
1299
|
+
outdoor
|
|
1300
|
+
outer
|
|
1301
|
+
output
|
|
1302
|
+
outside
|
|
1303
|
+
oval
|
|
1304
|
+
oven
|
|
1305
|
+
over
|
|
1306
|
+
own
|
|
1307
|
+
owner
|
|
1308
|
+
oxygen
|
|
1309
|
+
oyster
|
|
1310
|
+
ozone
|
|
1311
|
+
pact
|
|
1312
|
+
paddle
|
|
1313
|
+
page
|
|
1314
|
+
pair
|
|
1315
|
+
palace
|
|
1316
|
+
palm
|
|
1317
|
+
panda
|
|
1318
|
+
panel
|
|
1319
|
+
panic
|
|
1320
|
+
panther
|
|
1321
|
+
paper
|
|
1322
|
+
parade
|
|
1323
|
+
parent
|
|
1324
|
+
park
|
|
1325
|
+
parrot
|
|
1326
|
+
party
|
|
1327
|
+
pass
|
|
1328
|
+
patch
|
|
1329
|
+
path
|
|
1330
|
+
patient
|
|
1331
|
+
patrol
|
|
1332
|
+
pattern
|
|
1333
|
+
pause
|
|
1334
|
+
pave
|
|
1335
|
+
payment
|
|
1336
|
+
peace
|
|
1337
|
+
peanut
|
|
1338
|
+
pear
|
|
1339
|
+
peasant
|
|
1340
|
+
pelican
|
|
1341
|
+
pen
|
|
1342
|
+
penalty
|
|
1343
|
+
pencil
|
|
1344
|
+
people
|
|
1345
|
+
pepper
|
|
1346
|
+
perfect
|
|
1347
|
+
permit
|
|
1348
|
+
person
|
|
1349
|
+
pet
|
|
1350
|
+
phone
|
|
1351
|
+
photo
|
|
1352
|
+
phrase
|
|
1353
|
+
physical
|
|
1354
|
+
piano
|
|
1355
|
+
picnic
|
|
1356
|
+
picture
|
|
1357
|
+
piece
|
|
1358
|
+
pig
|
|
1359
|
+
pigeon
|
|
1360
|
+
pill
|
|
1361
|
+
pilot
|
|
1362
|
+
pink
|
|
1363
|
+
pioneer
|
|
1364
|
+
pipe
|
|
1365
|
+
pistol
|
|
1366
|
+
pitch
|
|
1367
|
+
pizza
|
|
1368
|
+
place
|
|
1369
|
+
planet
|
|
1370
|
+
plastic
|
|
1371
|
+
plate
|
|
1372
|
+
play
|
|
1373
|
+
please
|
|
1374
|
+
pledge
|
|
1375
|
+
pluck
|
|
1376
|
+
plug
|
|
1377
|
+
plunge
|
|
1378
|
+
poem
|
|
1379
|
+
poet
|
|
1380
|
+
point
|
|
1381
|
+
polar
|
|
1382
|
+
pole
|
|
1383
|
+
police
|
|
1384
|
+
pond
|
|
1385
|
+
pony
|
|
1386
|
+
pool
|
|
1387
|
+
popular
|
|
1388
|
+
portion
|
|
1389
|
+
position
|
|
1390
|
+
possible
|
|
1391
|
+
post
|
|
1392
|
+
potato
|
|
1393
|
+
pottery
|
|
1394
|
+
poverty
|
|
1395
|
+
powder
|
|
1396
|
+
power
|
|
1397
|
+
practice
|
|
1398
|
+
praise
|
|
1399
|
+
predict
|
|
1400
|
+
prefer
|
|
1401
|
+
prepare
|
|
1402
|
+
present
|
|
1403
|
+
pretty
|
|
1404
|
+
prevent
|
|
1405
|
+
price
|
|
1406
|
+
pride
|
|
1407
|
+
primary
|
|
1408
|
+
print
|
|
1409
|
+
priority
|
|
1410
|
+
prison
|
|
1411
|
+
private
|
|
1412
|
+
prize
|
|
1413
|
+
problem
|
|
1414
|
+
process
|
|
1415
|
+
produce
|
|
1416
|
+
profit
|
|
1417
|
+
program
|
|
1418
|
+
project
|
|
1419
|
+
promote
|
|
1420
|
+
proof
|
|
1421
|
+
property
|
|
1422
|
+
prosper
|
|
1423
|
+
protect
|
|
1424
|
+
proud
|
|
1425
|
+
provide
|
|
1426
|
+
public
|
|
1427
|
+
pudding
|
|
1428
|
+
pull
|
|
1429
|
+
pulp
|
|
1430
|
+
pulse
|
|
1431
|
+
pumpkin
|
|
1432
|
+
punch
|
|
1433
|
+
pupil
|
|
1434
|
+
puppy
|
|
1435
|
+
purchase
|
|
1436
|
+
purity
|
|
1437
|
+
purpose
|
|
1438
|
+
purse
|
|
1439
|
+
push
|
|
1440
|
+
put
|
|
1441
|
+
puzzle
|
|
1442
|
+
pyramid
|
|
1443
|
+
quality
|
|
1444
|
+
quantum
|
|
1445
|
+
quarter
|
|
1446
|
+
question
|
|
1447
|
+
quick
|
|
1448
|
+
quit
|
|
1449
|
+
quiz
|
|
1450
|
+
quote
|
|
1451
|
+
rabbit
|
|
1452
|
+
raccoon
|
|
1453
|
+
race
|
|
1454
|
+
rack
|
|
1455
|
+
radar
|
|
1456
|
+
radio
|
|
1457
|
+
rail
|
|
1458
|
+
rain
|
|
1459
|
+
raise
|
|
1460
|
+
rally
|
|
1461
|
+
ramp
|
|
1462
|
+
ranch
|
|
1463
|
+
random
|
|
1464
|
+
range
|
|
1465
|
+
rapid
|
|
1466
|
+
rare
|
|
1467
|
+
rate
|
|
1468
|
+
rather
|
|
1469
|
+
raven
|
|
1470
|
+
raw
|
|
1471
|
+
razor
|
|
1472
|
+
ready
|
|
1473
|
+
real
|
|
1474
|
+
reason
|
|
1475
|
+
rebel
|
|
1476
|
+
rebuild
|
|
1477
|
+
recall
|
|
1478
|
+
receive
|
|
1479
|
+
recipe
|
|
1480
|
+
record
|
|
1481
|
+
recycle
|
|
1482
|
+
reduce
|
|
1483
|
+
reflect
|
|
1484
|
+
reform
|
|
1485
|
+
refuse
|
|
1486
|
+
region
|
|
1487
|
+
regret
|
|
1488
|
+
regular
|
|
1489
|
+
reject
|
|
1490
|
+
relax
|
|
1491
|
+
release
|
|
1492
|
+
relief
|
|
1493
|
+
rely
|
|
1494
|
+
remain
|
|
1495
|
+
remember
|
|
1496
|
+
remind
|
|
1497
|
+
remove
|
|
1498
|
+
render
|
|
1499
|
+
renew
|
|
1500
|
+
rent
|
|
1501
|
+
reopen
|
|
1502
|
+
repair
|
|
1503
|
+
repeat
|
|
1504
|
+
replace
|
|
1505
|
+
report
|
|
1506
|
+
require
|
|
1507
|
+
rescue
|
|
1508
|
+
resemble
|
|
1509
|
+
resist
|
|
1510
|
+
resource
|
|
1511
|
+
response
|
|
1512
|
+
result
|
|
1513
|
+
retire
|
|
1514
|
+
retreat
|
|
1515
|
+
return
|
|
1516
|
+
reunion
|
|
1517
|
+
reveal
|
|
1518
|
+
review
|
|
1519
|
+
reward
|
|
1520
|
+
rhythm
|
|
1521
|
+
rib
|
|
1522
|
+
ribbon
|
|
1523
|
+
rice
|
|
1524
|
+
rich
|
|
1525
|
+
ride
|
|
1526
|
+
ridge
|
|
1527
|
+
rifle
|
|
1528
|
+
right
|
|
1529
|
+
rigid
|
|
1530
|
+
ring
|
|
1531
|
+
riot
|
|
1532
|
+
ripple
|
|
1533
|
+
risk
|
|
1534
|
+
ritual
|
|
1535
|
+
rival
|
|
1536
|
+
river
|
|
1537
|
+
road
|
|
1538
|
+
roast
|
|
1539
|
+
robot
|
|
1540
|
+
robust
|
|
1541
|
+
rocket
|
|
1542
|
+
romance
|
|
1543
|
+
roof
|
|
1544
|
+
rookie
|
|
1545
|
+
room
|
|
1546
|
+
rose
|
|
1547
|
+
rotate
|
|
1548
|
+
rough
|
|
1549
|
+
round
|
|
1550
|
+
route
|
|
1551
|
+
royal
|
|
1552
|
+
rubber
|
|
1553
|
+
rude
|
|
1554
|
+
rug
|
|
1555
|
+
rule
|
|
1556
|
+
run
|
|
1557
|
+
runway
|
|
1558
|
+
rural
|
|
1559
|
+
sad
|
|
1560
|
+
saddle
|
|
1561
|
+
sadness
|
|
1562
|
+
safe
|
|
1563
|
+
sail
|
|
1564
|
+
salad
|
|
1565
|
+
salmon
|
|
1566
|
+
salon
|
|
1567
|
+
salt
|
|
1568
|
+
salute
|
|
1569
|
+
same
|
|
1570
|
+
sample
|
|
1571
|
+
sand
|
|
1572
|
+
satisfy
|
|
1573
|
+
satoshi
|
|
1574
|
+
sauce
|
|
1575
|
+
sausage
|
|
1576
|
+
save
|
|
1577
|
+
say
|
|
1578
|
+
scale
|
|
1579
|
+
scan
|
|
1580
|
+
scare
|
|
1581
|
+
scatter
|
|
1582
|
+
scene
|
|
1583
|
+
scheme
|
|
1584
|
+
school
|
|
1585
|
+
science
|
|
1586
|
+
scissors
|
|
1587
|
+
scorpion
|
|
1588
|
+
scout
|
|
1589
|
+
scrap
|
|
1590
|
+
screen
|
|
1591
|
+
script
|
|
1592
|
+
scrub
|
|
1593
|
+
sea
|
|
1594
|
+
search
|
|
1595
|
+
season
|
|
1596
|
+
seat
|
|
1597
|
+
second
|
|
1598
|
+
secret
|
|
1599
|
+
section
|
|
1600
|
+
security
|
|
1601
|
+
seed
|
|
1602
|
+
seek
|
|
1603
|
+
segment
|
|
1604
|
+
select
|
|
1605
|
+
sell
|
|
1606
|
+
seminar
|
|
1607
|
+
senior
|
|
1608
|
+
sense
|
|
1609
|
+
sentence
|
|
1610
|
+
series
|
|
1611
|
+
service
|
|
1612
|
+
session
|
|
1613
|
+
settle
|
|
1614
|
+
setup
|
|
1615
|
+
seven
|
|
1616
|
+
shadow
|
|
1617
|
+
shaft
|
|
1618
|
+
shallow
|
|
1619
|
+
share
|
|
1620
|
+
shed
|
|
1621
|
+
shell
|
|
1622
|
+
sheriff
|
|
1623
|
+
shield
|
|
1624
|
+
shift
|
|
1625
|
+
shine
|
|
1626
|
+
ship
|
|
1627
|
+
shiver
|
|
1628
|
+
shock
|
|
1629
|
+
shoe
|
|
1630
|
+
shoot
|
|
1631
|
+
shop
|
|
1632
|
+
short
|
|
1633
|
+
shoulder
|
|
1634
|
+
shove
|
|
1635
|
+
shrimp
|
|
1636
|
+
shrug
|
|
1637
|
+
shuffle
|
|
1638
|
+
shy
|
|
1639
|
+
sibling
|
|
1640
|
+
sick
|
|
1641
|
+
side
|
|
1642
|
+
siege
|
|
1643
|
+
sight
|
|
1644
|
+
sign
|
|
1645
|
+
silent
|
|
1646
|
+
silk
|
|
1647
|
+
silly
|
|
1648
|
+
silver
|
|
1649
|
+
similar
|
|
1650
|
+
simple
|
|
1651
|
+
since
|
|
1652
|
+
sing
|
|
1653
|
+
siren
|
|
1654
|
+
sister
|
|
1655
|
+
situate
|
|
1656
|
+
six
|
|
1657
|
+
size
|
|
1658
|
+
skate
|
|
1659
|
+
sketch
|
|
1660
|
+
ski
|
|
1661
|
+
skill
|
|
1662
|
+
skin
|
|
1663
|
+
skirt
|
|
1664
|
+
skull
|
|
1665
|
+
slab
|
|
1666
|
+
slam
|
|
1667
|
+
sleep
|
|
1668
|
+
slender
|
|
1669
|
+
slice
|
|
1670
|
+
slide
|
|
1671
|
+
slight
|
|
1672
|
+
slim
|
|
1673
|
+
slogan
|
|
1674
|
+
slot
|
|
1675
|
+
slow
|
|
1676
|
+
slush
|
|
1677
|
+
small
|
|
1678
|
+
smart
|
|
1679
|
+
smile
|
|
1680
|
+
smoke
|
|
1681
|
+
smooth
|
|
1682
|
+
snack
|
|
1683
|
+
snake
|
|
1684
|
+
snap
|
|
1685
|
+
sniff
|
|
1686
|
+
snow
|
|
1687
|
+
soap
|
|
1688
|
+
soccer
|
|
1689
|
+
social
|
|
1690
|
+
sock
|
|
1691
|
+
soda
|
|
1692
|
+
soft
|
|
1693
|
+
solar
|
|
1694
|
+
soldier
|
|
1695
|
+
solid
|
|
1696
|
+
solution
|
|
1697
|
+
solve
|
|
1698
|
+
someone
|
|
1699
|
+
song
|
|
1700
|
+
soon
|
|
1701
|
+
sorry
|
|
1702
|
+
sort
|
|
1703
|
+
soul
|
|
1704
|
+
sound
|
|
1705
|
+
soup
|
|
1706
|
+
source
|
|
1707
|
+
south
|
|
1708
|
+
space
|
|
1709
|
+
spare
|
|
1710
|
+
spatial
|
|
1711
|
+
spawn
|
|
1712
|
+
speak
|
|
1713
|
+
special
|
|
1714
|
+
speed
|
|
1715
|
+
spell
|
|
1716
|
+
spend
|
|
1717
|
+
sphere
|
|
1718
|
+
spice
|
|
1719
|
+
spider
|
|
1720
|
+
spike
|
|
1721
|
+
spin
|
|
1722
|
+
spirit
|
|
1723
|
+
split
|
|
1724
|
+
spoil
|
|
1725
|
+
sponsor
|
|
1726
|
+
spoon
|
|
1727
|
+
sport
|
|
1728
|
+
spot
|
|
1729
|
+
spray
|
|
1730
|
+
spread
|
|
1731
|
+
spring
|
|
1732
|
+
spy
|
|
1733
|
+
square
|
|
1734
|
+
squeeze
|
|
1735
|
+
squirrel
|
|
1736
|
+
stable
|
|
1737
|
+
stadium
|
|
1738
|
+
staff
|
|
1739
|
+
stage
|
|
1740
|
+
stairs
|
|
1741
|
+
stamp
|
|
1742
|
+
stand
|
|
1743
|
+
start
|
|
1744
|
+
state
|
|
1745
|
+
stay
|
|
1746
|
+
steak
|
|
1747
|
+
steel
|
|
1748
|
+
stem
|
|
1749
|
+
step
|
|
1750
|
+
stereo
|
|
1751
|
+
stick
|
|
1752
|
+
still
|
|
1753
|
+
sting
|
|
1754
|
+
stock
|
|
1755
|
+
stomach
|
|
1756
|
+
stone
|
|
1757
|
+
stool
|
|
1758
|
+
story
|
|
1759
|
+
stove
|
|
1760
|
+
strategy
|
|
1761
|
+
street
|
|
1762
|
+
strike
|
|
1763
|
+
strong
|
|
1764
|
+
struggle
|
|
1765
|
+
student
|
|
1766
|
+
stuff
|
|
1767
|
+
stumble
|
|
1768
|
+
style
|
|
1769
|
+
subject
|
|
1770
|
+
submit
|
|
1771
|
+
subway
|
|
1772
|
+
success
|
|
1773
|
+
such
|
|
1774
|
+
sudden
|
|
1775
|
+
suffer
|
|
1776
|
+
sugar
|
|
1777
|
+
suggest
|
|
1778
|
+
suit
|
|
1779
|
+
summer
|
|
1780
|
+
sun
|
|
1781
|
+
sunny
|
|
1782
|
+
sunset
|
|
1783
|
+
super
|
|
1784
|
+
supply
|
|
1785
|
+
supreme
|
|
1786
|
+
sure
|
|
1787
|
+
surface
|
|
1788
|
+
surge
|
|
1789
|
+
surprise
|
|
1790
|
+
surround
|
|
1791
|
+
survey
|
|
1792
|
+
suspect
|
|
1793
|
+
sustain
|
|
1794
|
+
swallow
|
|
1795
|
+
swamp
|
|
1796
|
+
swap
|
|
1797
|
+
swarm
|
|
1798
|
+
swear
|
|
1799
|
+
sweet
|
|
1800
|
+
swift
|
|
1801
|
+
swim
|
|
1802
|
+
swing
|
|
1803
|
+
switch
|
|
1804
|
+
sword
|
|
1805
|
+
symbol
|
|
1806
|
+
symptom
|
|
1807
|
+
syrup
|
|
1808
|
+
system
|
|
1809
|
+
table
|
|
1810
|
+
tackle
|
|
1811
|
+
tag
|
|
1812
|
+
tail
|
|
1813
|
+
talent
|
|
1814
|
+
talk
|
|
1815
|
+
tank
|
|
1816
|
+
tape
|
|
1817
|
+
target
|
|
1818
|
+
task
|
|
1819
|
+
taste
|
|
1820
|
+
tattoo
|
|
1821
|
+
taxi
|
|
1822
|
+
teach
|
|
1823
|
+
team
|
|
1824
|
+
tell
|
|
1825
|
+
ten
|
|
1826
|
+
tenant
|
|
1827
|
+
tennis
|
|
1828
|
+
tent
|
|
1829
|
+
term
|
|
1830
|
+
test
|
|
1831
|
+
text
|
|
1832
|
+
thank
|
|
1833
|
+
that
|
|
1834
|
+
theme
|
|
1835
|
+
then
|
|
1836
|
+
theory
|
|
1837
|
+
there
|
|
1838
|
+
they
|
|
1839
|
+
thing
|
|
1840
|
+
this
|
|
1841
|
+
thought
|
|
1842
|
+
three
|
|
1843
|
+
thrive
|
|
1844
|
+
throw
|
|
1845
|
+
thumb
|
|
1846
|
+
thunder
|
|
1847
|
+
ticket
|
|
1848
|
+
tide
|
|
1849
|
+
tiger
|
|
1850
|
+
tilt
|
|
1851
|
+
timber
|
|
1852
|
+
time
|
|
1853
|
+
tiny
|
|
1854
|
+
tip
|
|
1855
|
+
tired
|
|
1856
|
+
tissue
|
|
1857
|
+
title
|
|
1858
|
+
toast
|
|
1859
|
+
tobacco
|
|
1860
|
+
today
|
|
1861
|
+
toddler
|
|
1862
|
+
toe
|
|
1863
|
+
together
|
|
1864
|
+
toilet
|
|
1865
|
+
token
|
|
1866
|
+
tomato
|
|
1867
|
+
tomorrow
|
|
1868
|
+
tone
|
|
1869
|
+
tongue
|
|
1870
|
+
tonight
|
|
1871
|
+
tool
|
|
1872
|
+
tooth
|
|
1873
|
+
top
|
|
1874
|
+
topic
|
|
1875
|
+
topple
|
|
1876
|
+
torch
|
|
1877
|
+
tornado
|
|
1878
|
+
tortoise
|
|
1879
|
+
toss
|
|
1880
|
+
total
|
|
1881
|
+
tourist
|
|
1882
|
+
toward
|
|
1883
|
+
tower
|
|
1884
|
+
town
|
|
1885
|
+
toy
|
|
1886
|
+
track
|
|
1887
|
+
trade
|
|
1888
|
+
traffic
|
|
1889
|
+
tragic
|
|
1890
|
+
train
|
|
1891
|
+
transfer
|
|
1892
|
+
trap
|
|
1893
|
+
trash
|
|
1894
|
+
travel
|
|
1895
|
+
tray
|
|
1896
|
+
treat
|
|
1897
|
+
tree
|
|
1898
|
+
trend
|
|
1899
|
+
trial
|
|
1900
|
+
tribe
|
|
1901
|
+
trick
|
|
1902
|
+
trigger
|
|
1903
|
+
trim
|
|
1904
|
+
trip
|
|
1905
|
+
trophy
|
|
1906
|
+
trouble
|
|
1907
|
+
truck
|
|
1908
|
+
true
|
|
1909
|
+
truly
|
|
1910
|
+
trumpet
|
|
1911
|
+
trust
|
|
1912
|
+
truth
|
|
1913
|
+
try
|
|
1914
|
+
tube
|
|
1915
|
+
tuition
|
|
1916
|
+
tumble
|
|
1917
|
+
tuna
|
|
1918
|
+
tunnel
|
|
1919
|
+
turkey
|
|
1920
|
+
turn
|
|
1921
|
+
turtle
|
|
1922
|
+
twelve
|
|
1923
|
+
twenty
|
|
1924
|
+
twice
|
|
1925
|
+
twin
|
|
1926
|
+
twist
|
|
1927
|
+
two
|
|
1928
|
+
type
|
|
1929
|
+
typical
|
|
1930
|
+
ugly
|
|
1931
|
+
umbrella
|
|
1932
|
+
unable
|
|
1933
|
+
unaware
|
|
1934
|
+
uncle
|
|
1935
|
+
uncover
|
|
1936
|
+
under
|
|
1937
|
+
undo
|
|
1938
|
+
unfair
|
|
1939
|
+
unfold
|
|
1940
|
+
unhappy
|
|
1941
|
+
uniform
|
|
1942
|
+
unique
|
|
1943
|
+
unit
|
|
1944
|
+
universe
|
|
1945
|
+
unknown
|
|
1946
|
+
unlock
|
|
1947
|
+
until
|
|
1948
|
+
unusual
|
|
1949
|
+
unveil
|
|
1950
|
+
update
|
|
1951
|
+
upgrade
|
|
1952
|
+
uphold
|
|
1953
|
+
upon
|
|
1954
|
+
upper
|
|
1955
|
+
upset
|
|
1956
|
+
urban
|
|
1957
|
+
urge
|
|
1958
|
+
usage
|
|
1959
|
+
use
|
|
1960
|
+
used
|
|
1961
|
+
useful
|
|
1962
|
+
useless
|
|
1963
|
+
usual
|
|
1964
|
+
utility
|
|
1965
|
+
vacant
|
|
1966
|
+
vacuum
|
|
1967
|
+
vague
|
|
1968
|
+
valid
|
|
1969
|
+
valley
|
|
1970
|
+
valve
|
|
1971
|
+
van
|
|
1972
|
+
vanish
|
|
1973
|
+
vapor
|
|
1974
|
+
various
|
|
1975
|
+
vast
|
|
1976
|
+
vault
|
|
1977
|
+
vehicle
|
|
1978
|
+
velvet
|
|
1979
|
+
vendor
|
|
1980
|
+
venture
|
|
1981
|
+
venue
|
|
1982
|
+
verb
|
|
1983
|
+
verify
|
|
1984
|
+
version
|
|
1985
|
+
very
|
|
1986
|
+
vessel
|
|
1987
|
+
veteran
|
|
1988
|
+
viable
|
|
1989
|
+
vibrant
|
|
1990
|
+
vicious
|
|
1991
|
+
victory
|
|
1992
|
+
video
|
|
1993
|
+
view
|
|
1994
|
+
village
|
|
1995
|
+
vintage
|
|
1996
|
+
violin
|
|
1997
|
+
virtual
|
|
1998
|
+
virus
|
|
1999
|
+
visa
|
|
2000
|
+
visit
|
|
2001
|
+
visual
|
|
2002
|
+
vital
|
|
2003
|
+
vivid
|
|
2004
|
+
vocal
|
|
2005
|
+
voice
|
|
2006
|
+
void
|
|
2007
|
+
volcano
|
|
2008
|
+
volume
|
|
2009
|
+
vote
|
|
2010
|
+
voyage
|
|
2011
|
+
wage
|
|
2012
|
+
wagon
|
|
2013
|
+
wait
|
|
2014
|
+
walk
|
|
2015
|
+
wall
|
|
2016
|
+
walnut
|
|
2017
|
+
want
|
|
2018
|
+
warfare
|
|
2019
|
+
warm
|
|
2020
|
+
warrior
|
|
2021
|
+
wash
|
|
2022
|
+
wasp
|
|
2023
|
+
waste
|
|
2024
|
+
water
|
|
2025
|
+
wave
|
|
2026
|
+
way
|
|
2027
|
+
wealth
|
|
2028
|
+
weapon
|
|
2029
|
+
wear
|
|
2030
|
+
weasel
|
|
2031
|
+
weather
|
|
2032
|
+
web
|
|
2033
|
+
wedding
|
|
2034
|
+
weekend
|
|
2035
|
+
weird
|
|
2036
|
+
welcome
|
|
2037
|
+
west
|
|
2038
|
+
wet
|
|
2039
|
+
whale
|
|
2040
|
+
what
|
|
2041
|
+
wheat
|
|
2042
|
+
wheel
|
|
2043
|
+
when
|
|
2044
|
+
where
|
|
2045
|
+
whip
|
|
2046
|
+
whisper
|
|
2047
|
+
wide
|
|
2048
|
+
width
|
|
2049
|
+
wife
|
|
2050
|
+
wild
|
|
2051
|
+
will
|
|
2052
|
+
win
|
|
2053
|
+
window
|
|
2054
|
+
wine
|
|
2055
|
+
wing
|
|
2056
|
+
wink
|
|
2057
|
+
winner
|
|
2058
|
+
winter
|
|
2059
|
+
wire
|
|
2060
|
+
wisdom
|
|
2061
|
+
wise
|
|
2062
|
+
wish
|
|
2063
|
+
witness
|
|
2064
|
+
wolf
|
|
2065
|
+
woman
|
|
2066
|
+
wonder
|
|
2067
|
+
wood
|
|
2068
|
+
wool
|
|
2069
|
+
word
|
|
2070
|
+
work
|
|
2071
|
+
world
|
|
2072
|
+
worry
|
|
2073
|
+
worth
|
|
2074
|
+
wrap
|
|
2075
|
+
wreck
|
|
2076
|
+
wrestle
|
|
2077
|
+
wrist
|
|
2078
|
+
write
|
|
2079
|
+
wrong
|
|
2080
|
+
yard
|
|
2081
|
+
year
|
|
2082
|
+
yellow
|
|
2083
|
+
you
|
|
2084
|
+
young
|
|
2085
|
+
youth
|
|
2086
|
+
zebra
|
|
2087
|
+
zero
|
|
2088
|
+
zone
|
|
2089
|
+
zoo`.split(`
|
|
2090
|
+
`);class j0{privateKey;publicKey;constructor(D,$){this.privateKey=D,this.publicKey=$}static async generate(D=24){let $=sQ(tQ,D===12?128:256);return{keyPair:await this.fromSeedPhrase($),mnemonic:$}}static async fromSeedPhrase(D){let $=nQ(D),J=K0.fromMasterSeed($).derive("m/44'/501'/0'/0'");if(!J.privateKey)throw Error("Failed to derive private key");return new j0(J.privateKey,X6.getPublicKey(J.privateKey))}static async fromPrivateKey(D){let $=void 0;try{let Q=JSON.parse(D.startsWith("[")&&D.endsWith("]")?D:`[${D}]`);if(Array.isArray(Q)&&Q.every((G)=>typeof G==="number"&&G>=0&&G<=255)){let G=new Uint8Array(Q);if(G.length===32||G.length===64)$=G}}catch(Q){}try{$??=qJ().encode(D)}catch(Q){}try{$??=a8().encode(D)}catch(Q){}try{$??=S7().encode(D)}catch(Q){}if($==null||$.length!==32&&$.length!==64)throw Error("Invalid private key format");let J=$.slice(0,32);return new j0(J,X6.getPublicKey(J))}toJson(){return JSON.stringify([...this.privateKey,...this.publicKey])}}class wD{#J;#$;constructor(D,$){this.#J=D,this.#$=$}static async fromKeyPair(D){let $=await xJ(D.privateKey);return new wD($,D)}static async fromSeedPhrase(D){return this.fromKeyPair(await j0.fromSeedPhrase(D))}static async fromPrivateKey(D){return this.fromKeyPair(await j0.fromPrivateKey(D))}static async generate(){let{keyPair:D}=await j0.generate();return this.fromKeyPair(D)}static async load(D){let $=eQ(d.KEYS_DIR,`${D}.json`);if(!CK($))throw Error(`Key "${D}" does not exist.`);let J=HK($,"utf-8");return this.fromKeyPair(await j0.fromPrivateKey(J))}save(D){let $=eQ(d.KEYS_DIR,`${D}.json`);NK($,this.#$.toJson())}get address(){return this.#J.address}async signTransaction(D){let $=YJ().encode(D),J=_J().decode($),Q=await D9([this.#J.keyPair],J);return AJ(Q)}}class R6{static register(D){let $=D.command("keys").description("Private key management");$.command("list").description("List all keys").action(()=>this.list()),$.command("add [name]").description("Generate or recover a keypair").option("--overwrite","Overwrite existing key").option("--recover","Recover from seed phrase or private key").option("--seed-phrase <phrase>","Seed phrase for recovery").option("--private-key <key>","Private key (base58) for recovery").action((J,Q)=>this.add(J,Q)),$.command("delete <name>").description("Delete a key").action((J)=>this.delete(J)),$.command("edit <name>").description("Edit a key's name or credentials").option("--name <new-name>","Rename the key").option("--seed-phrase <phrase>","Replace key with new seed phrase").option("--private-key <key>","Replace key with new private key").action((J,Q)=>this.edit(J,Q)),$.command("use <name>").description("Set the active key").action((J)=>this.use(J)),$.command("solana-import").description("Import a Solana CLI keypair").option("--name <name>","Name for the imported key").option("--path <path>","Path to Solana keypair file").option("--overwrite","Overwrite existing key").action((J)=>this.solanaImport(J))}static async list(){if(!U0(d.KEYS_DIR))throw Error("No keys found.");let D=FK(d.KEYS_DIR).filter((Q)=>Q.endsWith(".json")),$=d.load(),J=await Promise.all(D.map(async(Q)=>{let G=Q.replace(".json",""),q=await wD.load(G);return{name:G,address:q.address,active:$.activeKey===G}}));if(v.isJson()){v.json(J);return}v.table({type:"horizontal",headers:{name:"Name",address:"Address",active:"Active"},rows:J.map((Q)=>({...Q,active:v.formatBoolean(Q.active)}))})}static async add(D="default",$={}){let J=P0(d.KEYS_DIR,`${D}.json`);if(U0(J)&&!$.overwrite)throw Error(`Key "${D}" already exists. Use --overwrite to replace.`);let Q;if($.recover)if($.seedPhrase)Q=await wD.fromSeedPhrase($.seedPhrase);else if($.privateKey)Q=await wD.fromPrivateKey($.privateKey);else throw Error("--recover requires --seed-phrase or --private-key");else Q=await wD.generate();Q.save(D),this.list()}static delete(D){let $=P0(d.KEYS_DIR,`${D}.json`);if(!U0($))throw Error(`Key "${D}" not found.`);BK($),this.list()}static async edit(D,$={}){if(!$.name&&!$.seedPhrase&&!$.privateKey)throw Error("At least one option is required (--name, --seed-phrase, or --private-key).");if($.seedPhrase&&$.privateKey)throw Error("--seed-phrase and --private-key are mutually exclusive.");let J=P0(d.KEYS_DIR,`${D}.json`);if(!U0(J))throw Error(`Key "${D}" not found.`);if($.seedPhrase||$.privateKey)($.seedPhrase?await wD.fromSeedPhrase($.seedPhrase):await wD.fromPrivateKey($.privateKey)).save(D);if($.name){let Q=P0(d.KEYS_DIR,`${$.name}.json`);if(U0(Q))throw Error(`Key "${$.name}" already exists.`);if(LK(J,Q),d.load().activeKey===D)d.set({activeKey:$.name})}this.list()}static use(D){let $=P0(d.KEYS_DIR,`${D}.json`);if(!U0($))throw Error(`Key "${D}" not found.`);d.set({activeKey:D}),this.list()}static solanaImport(D={}){let $=D.name??"default",J=D.path??P0(RK(),".config","solana","id.json");if(!U0(J))throw Error(`Solana keypair not found at: ${J}`);let Q=P0(d.KEYS_DIR,`${$}.json`);if(U0(Q)&&!D.overwrite)throw Error(`Key "${$}" already exists. Use --overwrite to replace.`);VK(J,Q),this.list()}}async function DG(D,$={}){let{programAddress:J="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}=$;return await zJ({programAddress:J,seeds:[K8().encode(D.owner),K8().encode(D.tokenProgram),K8().encode(D.mint)]})}var IK=0,wK;wK={[IK]:"Associated token account owner does not match address derivation"};var OK=0,TK=1,MK=2,PK=3,SK=4,_K=5,kK=6,AK=7,xK=8,bK=9,hK=10,vK=11,yK=12,fK=13,mK=14,uK=15,gK=16,lK=17,pK=18,dK=19,cK;cK={[lK]:"Account is frozen",[kK]:"Already in use",[uK]:"Account does not support specified authority type",[_K]:"Fixed supply",[TK]:"Insufficient funds",[yK]:"Invalid instruction",[MK]:"Invalid Mint",[AK]:"Invalid number of provided signers",[xK]:"Invalid number of required signers",[fK]:"State is invalid for requested operation",[gK]:"This token mint cannot freeze accounts",[pK]:"The provided decimals value different from the Mint decimals",[PK]:"Account not associated with this Mint",[hK]:"Instruction does not support native tokens",[vK]:"Non-native account can only be closed if its balance is zero",[dK]:"Instruction does not support non-native tokens",[OK]:"Lamport balance below rent-exempt threshold",[mK]:"Operation overflowed",[SK]:"Owner does not match",[bK]:"State is unititialized"};class n0 extends Error{response;request;options;constructor(D,$,J){let Q=D.status||D.status===0?D.status:"",G=D.statusText??"",q=`${Q} ${G}`.trim(),X=q?`status code ${q}`:"an unknown error";super(`Request failed with ${X}: ${$.method} ${$.url}`);this.name="HTTPError",this.response=D,this.request=$,this.options=J}}class M8 extends Error{name="NonError";value;constructor(D){let $="Non-error value was thrown";try{if(typeof D==="string")$=D;else if(D&&typeof D==="object"&&"message"in D&&typeof D.message==="string")$=D.message}catch{}super($);this.value=D}}class P8 extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(D){let $=D?.cause?D.cause instanceof Error?D.cause:new M8(D.cause):void 0;super(D?.code?`Forced retry: ${D.code}`:"Forced retry",$?{cause:$}:void 0);this.customDelay=D?.delay,this.code=D?.code,this.customRequest=D?.request}}var I6=(()=>{let D=!1,$=!1,J=typeof globalThis.ReadableStream==="function",Q=typeof globalThis.Request==="function";if(J&&Q)try{$=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return D=!0,"half"}}).headers.has("Content-Type")}catch(G){if(G instanceof Error&&G.message==="unsupported BodyInit type")return!1;throw G}return D&&!$})(),$G=typeof globalThis.AbortController==="function",N9=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",JG=typeof globalThis.ReadableStream==="function",QG=typeof globalThis.FormData==="function",V9=["get","post","put","patch","head","delete"],aK=()=>{return};aK();var GG={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},F9=2147483647,qG=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,L9=Symbol("stop");class B9{options;constructor(D){this.options=D}}var XG=(D)=>new B9(D),YG={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},ZG={next:!0},KG={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};var iK=(D)=>{if(!D)return 0;if(D instanceof FormData){let $=0;for(let[J,Q]of D)$+=qG,$+=new TextEncoder().encode(`Content-Disposition: form-data; name="${J}"`).length,$+=typeof Q==="string"?new TextEncoder().encode(Q).length:Q.size;return $}if(D instanceof Blob)return D.size;if(D instanceof ArrayBuffer)return D.byteLength;if(typeof D==="string")return new TextEncoder().encode(D).length;if(D instanceof URLSearchParams)return new TextEncoder().encode(D.toString()).length;if("byteLength"in D)return D.byteLength;if(typeof D==="object"&&D!==null)try{let $=JSON.stringify(D);return new TextEncoder().encode($).length}catch{return 0}return 0},jG=(D,$,J)=>{let Q,G=0;return D.pipeThrough(new TransformStream({transform(q,X){if(X.enqueue(q),Q){G+=Q.byteLength;let Y=$===0?0:G/$;if(Y>=1)Y=1-Number.EPSILON;J?.({percent:Y,totalBytes:Math.max($,G),transferredBytes:G},Q)}Q=q},flush(){if(Q)G+=Q.byteLength,J?.({percent:1,totalBytes:Math.max($,G),transferredBytes:G},Q)}}))},UG=(D,$)=>{if(!D.body)return D;if(D.status===204)return new Response(null,{status:D.status,statusText:D.statusText,headers:D.headers});let J=Math.max(0,Number(D.headers.get("content-length"))||0);return new Response(jG(D.body,J,$),{status:D.status,statusText:D.statusText,headers:D.headers})},WG=(D,$,J)=>{if(!D.body)return D;let Q=iK(J??D.body);return new Request(D,{duplex:"half",body:jG(D.body,Q,$)})};var W0=(D)=>D!==null&&typeof D==="object";var S8=(...D)=>{for(let $ of D)if((!W0($)||Array.isArray($))&&$!==void 0)throw TypeError("The `options` argument must be an object");return T6({},...D)},w6=(D={},$={})=>{let J=new globalThis.Headers(D),Q=$ instanceof globalThis.Headers,G=new globalThis.Headers($);for(let[q,X]of G.entries())if(Q&&X==="undefined"||X===void 0)J.delete(q);else J.set(q,X);return J};function R9(D,$,J){return Object.hasOwn($,J)&&$[J]===void 0?[]:T6(D[J]??[],$[J]??[])}var O6=(D={},$={})=>({beforeRequest:R9(D,$,"beforeRequest"),beforeRetry:R9(D,$,"beforeRetry"),afterResponse:R9(D,$,"afterResponse"),beforeError:R9(D,$,"beforeError")}),rK=(D,$)=>{let J=new URLSearchParams;for(let Q of[D,$]){if(Q===void 0)continue;if(Q instanceof URLSearchParams)for(let[G,q]of Q.entries())J.append(G,q);else if(Array.isArray(Q))for(let G of Q){if(!Array.isArray(G)||G.length!==2)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");J.append(String(G[0]),String(G[1]))}else if(W0(Q)){for(let[G,q]of Object.entries(Q))if(q!==void 0)J.append(G,String(q))}else{let G=new URLSearchParams(Q);for(let[q,X]of G.entries())J.append(q,X)}}return J},T6=(...D)=>{let $={},J={},Q={},G,q=[];for(let X of D)if(Array.isArray(X)){if(!Array.isArray($))$=[];$=[...$,...X]}else if(W0(X)){for(let[Y,Z]of Object.entries(X)){if(Y==="signal"&&Z instanceof globalThis.AbortSignal){q.push(Z);continue}if(Y==="context"){if(Z!==void 0&&Z!==null&&(!W0(Z)||Array.isArray(Z)))throw TypeError("The `context` option must be an object");$={...$,context:Z===void 0||Z===null?{}:{...$.context,...Z}};continue}if(Y==="searchParams"){if(Z===void 0||Z===null)G=void 0;else G=G===void 0?Z:rK(G,Z);continue}if(W0(Z)&&Y in $)Z=T6($[Y],Z);$={...$,[Y]:Z}}if(W0(X.hooks))Q=O6(Q,X.hooks),$.hooks=Q;if(W0(X.headers))J=w6(J,X.headers),$.headers=J}if(G!==void 0)$.searchParams=G;if(q.length>0)if(q.length===1)$.signal=q[0];else if(N9)$.signal=AbortSignal.any(q);else $.signal=q.at(-1);return $};var zG=(D)=>V9.includes(D)?D.toUpperCase():D,oK=["get","put","head","delete","options","trace"],sK=[408,413,429,500,502,503,504],nK=[413,429,503],EG={limit:2,methods:oK,statusCodes:sK,afterStatusCodes:nK,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:(D)=>0.3*2**(D-1)*1000,jitter:void 0,retryOnTimeout:!1},CG=(D={})=>{if(typeof D==="number")return{...EG,limit:D};if(D.methods&&!Array.isArray(D.methods))throw Error("retry.methods must be an array");if(D.methods&&=D.methods.map((J)=>J.toLowerCase()),D.statusCodes&&!Array.isArray(D.statusCodes))throw Error("retry.statusCodes must be an array");let $=Object.fromEntries(Object.entries(D).filter(([,J])=>J!==void 0));return{...EG,...$}};class t0 extends Error{request;constructor(D){super(`Request timed out: ${D.method} ${D.url}`);this.name="TimeoutError",this.request=D}}async function M6(D,$,J,Q){return new Promise((G,q)=>{let X=setTimeout(()=>{if(J)J.abort();q(new t0(D))},Q.timeout);Q.fetch(D,$).then(G).catch(q).then(()=>{clearTimeout(X)})})}async function P6(D,{signal:$}){return new Promise((J,Q)=>{if($)$.throwIfAborted(),$.addEventListener("abort",G,{once:!0});function G(){clearTimeout(q),Q($.reason)}let q=setTimeout(()=>{$?.removeEventListener("abort",G),J()},D)})}var HG=(D,$)=>{let J={};for(let Q in $){if(!Object.hasOwn($,Q))continue;if(!(Q in KG)&&!(Q in YG)&&(!(Q in D)||(Q in ZG)))J[Q]=$[Q]}return J},NG=(D)=>{if(D===void 0)return!1;if(Array.isArray(D))return D.length>0;if(D instanceof URLSearchParams)return D.size>0;if(typeof D==="object")return Object.keys(D).length>0;if(typeof D==="string")return D.trim().length>0;return Boolean(D)};function VG(D){return D instanceof n0||D?.name===n0.name}function FG(D){return D instanceof t0||D?.name===t0.name}class e0{static create(D,$){let J=new e0(D,$),Q=async()=>{if(typeof J.#D.timeout==="number"&&J.#D.timeout>F9)throw RangeError(`The \`timeout\` option cannot be greater than ${F9}`);await Promise.resolve();let q=await J.#N();for(let X of J.#D.hooks.afterResponse){let Y=J.#E(q.clone()),Z;try{Z=await X(J.request,J.#K(),Y,{retryCount:J.#G})}catch(j){throw J.#X(Y),J.#X(q),j}if(Z instanceof B9)throw J.#X(Y),J.#X(q),new P8(Z.options);let K=Z instanceof globalThis.Response?Z:q;if(Y!==K)J.#X(Y);if(q!==K)J.#X(q);q=K}if(J.#E(q),!q.ok&&(typeof J.#D.throwHttpErrors==="function"?J.#D.throwHttpErrors(q.status):J.#D.throwHttpErrors)){let X=new n0(q,J.request,J.#K());for(let Y of J.#D.hooks.beforeError)X=await Y(X,{retryCount:J.#G});throw X}if(J.#D.onDownloadProgress){if(typeof J.#D.onDownloadProgress!=="function")throw TypeError("The `onDownloadProgress` option must be a function");if(!JG)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let X=q.clone();return J.#X(q),UG(X,J.#D.onDownloadProgress)}return q},G=J.#z(Q).finally(()=>{let q=J.#Y;J.#U(q?.body??void 0),J.#U(J.request.body??void 0)});for(let[q,X]of Object.entries(GG)){if(q==="bytes"&&typeof globalThis.Response?.prototype?.bytes!=="function")continue;G[q]=async()=>{J.request.headers.set("accept",J.request.headers.get("accept")||X);let Y=await G;if(q==="json"){if(Y.status===204)return"";let Z=await Y.text();if(Z==="")return"";if($.parseJson)return $.parseJson(Z);return JSON.parse(Z)}return Y[q]()}}return G}static#J(D){if(D&&typeof D==="object"&&!Array.isArray(D)&&!(D instanceof URLSearchParams))return Object.fromEntries(Object.entries(D).filter(([,$])=>$!==void 0));return D}request;#$;#G=0;#Q;#D;#Y;#q;#Z;constructor(D,$={}){if(this.#Q=D,this.#D={...$,headers:w6(this.#Q.headers,$.headers),hooks:O6({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},$.hooks),method:zG($.method??this.#Q.method??"GET"),prefixUrl:String($.prefixUrl||""),retry:CG($.retry),throwHttpErrors:$.throwHttpErrors??!0,timeout:$.timeout??1e4,fetch:$.fetch??globalThis.fetch.bind(globalThis),context:$.context??{}},typeof this.#Q!=="string"&&!(this.#Q instanceof URL||this.#Q instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this.#D.prefixUrl&&typeof this.#Q==="string"){if(this.#Q.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");if(!this.#D.prefixUrl.endsWith("/"))this.#D.prefixUrl+="/";this.#Q=this.#D.prefixUrl+this.#Q}if($G&&N9)this.#q=this.#D.signal??this.#Q.signal,this.#$=new globalThis.AbortController,this.#D.signal=this.#q?AbortSignal.any([this.#q,this.#$.signal]):this.#$.signal;if(I6)this.#D.duplex="half";if(this.#D.json!==void 0)this.#D.body=this.#D.stringifyJson?.(this.#D.json)??JSON.stringify(this.#D.json),this.#D.headers.set("content-type",this.#D.headers.get("content-type")??"application/json");let J=$.headers&&new globalThis.Headers($.headers).has("content-type");if(this.#Q instanceof globalThis.Request&&(QG&&this.#D.body instanceof globalThis.FormData||this.#D.body instanceof URLSearchParams)&&!J)this.#D.headers.delete("content-type");if(this.request=new globalThis.Request(this.#Q,this.#D),NG(this.#D.searchParams)){let G="?"+(typeof this.#D.searchParams==="string"?this.#D.searchParams.replace(/^\?/,""):new URLSearchParams(e0.#J(this.#D.searchParams)).toString()),q=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,G);this.request=new globalThis.Request(q,this.#D)}if(this.#D.onUploadProgress){if(typeof this.#D.onUploadProgress!=="function")throw TypeError("The `onUploadProgress` option must be a function");if(!I6)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#C(this.request,this.#D.body??void 0)}}#j(){let D=this.#D.retry.delay(this.#G),$=D;if(this.#D.retry.jitter===!0)$=Math.random()*D;else if(typeof this.#D.retry.jitter==="function"){if($=this.#D.retry.jitter(D),!Number.isFinite($)||$<0)$=D}let J=this.#D.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(J,$)}async#H(D){if(this.#G++,this.#G>this.#D.retry.limit)throw D;let $=D instanceof Error?D:new M8(D);if($ instanceof P8)return $.customDelay??this.#j();if(!this.#D.retry.methods.includes(this.request.method.toLowerCase()))throw D;if(this.#D.retry.shouldRetry!==void 0){let J=await this.#D.retry.shouldRetry({error:$,retryCount:this.#G});if(J===!1)throw D;if(J===!0)return this.#j()}if(FG(D)&&!this.#D.retry.retryOnTimeout)throw D;if(VG(D)){if(!this.#D.retry.statusCodes.includes(D.response.status))throw D;let J=D.response.headers.get("Retry-After")??D.response.headers.get("RateLimit-Reset")??D.response.headers.get("X-RateLimit-Retry-After")??D.response.headers.get("X-RateLimit-Reset")??D.response.headers.get("X-Rate-Limit-Reset");if(J&&this.#D.retry.afterStatusCodes.includes(D.response.status)){let Q=Number(J)*1000;if(Number.isNaN(Q))Q=Date.parse(J)-Date.now();else if(Q>=Date.parse("2024-01-01"))Q-=Date.now();let G=this.#D.retry.maxRetryAfter??Q;return Q<G?Q:G}if(D.response.status===413)throw D}return this.#j()}#E(D){if(this.#D.parseJson)D.json=async()=>this.#D.parseJson(await D.text());return D}#U(D){if(!D)return;D.cancel().catch(()=>{return})}#X(D){this.#U(D.body??void 0)}async#z(D){try{return await D()}catch($){let J=Math.min(await this.#H($),F9);if(this.#G<1)throw $;if(await P6(J,this.#q?{signal:this.#q}:{}),$ instanceof P8&&$.customRequest){let Q=this.#D.signal?new globalThis.Request($.customRequest,{signal:this.#D.signal}):new globalThis.Request($.customRequest);this.#W(Q)}for(let Q of this.#D.hooks.beforeRetry){let G=await Q({request:this.request,options:this.#K(),error:$,retryCount:this.#G});if(G instanceof globalThis.Request){this.#W(G);break}if(G instanceof globalThis.Response)return G;if(G===L9)return}return this.#z(D)}}async#N(){if(this.#$?.signal.aborted)this.#$=new globalThis.AbortController,this.#D.signal=this.#q?AbortSignal.any([this.#q,this.#$.signal]):this.#$.signal,this.request=new globalThis.Request(this.request,{signal:this.#D.signal});for(let $ of this.#D.hooks.beforeRequest){let J=await $(this.request,this.#K(),{retryCount:this.#G});if(J instanceof Response)return J;if(J instanceof globalThis.Request){this.#W(J);break}}let D=HG(this.request,this.#D);if(this.#Y=this.request,this.request=this.#Y.clone(),this.#D.timeout===!1)return this.#D.fetch(this.#Y,D);return M6(this.#Y,D,this.#$,this.#D)}#K(){if(!this.#Z){let{hooks:D,...$}=this.#D;this.#Z=Object.freeze($)}return this.#Z}#W(D){this.#Z=void 0,this.request=this.#C(D)}#C(D,$){if(!this.#D.onUploadProgress||!D.body)return D;return WG(D,this.#D.onUploadProgress,$??this.#D.body??void 0)}}/*! MIT License © Sindre Sorhus */var S6=(D)=>{let $=(J,Q)=>e0.create(J,S8(D,Q));for(let J of V9)$[J]=(Q,G)=>e0.create(Q,S8(D,G,{method:J}));return $.create=(J)=>S6(S8(J)),$.extend=(J)=>{if(typeof J==="function")J=J(D??{});return S6(S8(D,J))},$.stop=L9,$.retry=XG,$},tK=S6(),rD=tK;class _8{static#J="https://lite-api.jup.ag/tokens/v2";static async search(D){return rD.get(`${this.#J}/search`,{searchParams:D,throwHttpErrors:!1}).json()}}class oD{static#J="https://lite-api.jup.ag/ultra/v1";static#$={"x-client-platform":"jupiter.cli"};static async getOrder(D){return rD.get(`${this.#J}/order`,{searchParams:D,throwHttpErrors:!1,headers:this.#$}).json()}static async getHoldings(D){return rD.get(`${this.#J}/holdings/${D}`,{headers:this.#$}).json()}static async postExecute(D){return rD.post(`${this.#J}/execute`,{json:D,headers:this.#$}).json()}static async getTransferTokenTx(D){return rD.get(`${this.#J}/transfer/craft-token`,{searchParams:D,throwHttpErrors:!1,headers:this.#$}).json()}static async getTransferSolTx(D){return rD.get(`${this.#J}/transfer/craft-native`,{searchParams:D,throwHttpErrors:!1,headers:this.#$}).json()}static async postExecuteTransfer(D){return rD.post(`${this.#J}/transfer/execute`,{json:D,headers:this.#$}).json()}}var E0={WSOL:x7("So11111111111111111111111111111111111111112")};class BD{static removeInsignificantZeros(D){if(D.length===0)return"";if(Number(D)===0)return"0";let $=0;while($<D.length&&D[$]==="0"&&D[$+1]!==".")$++;let J=D.length-1;if(D.includes(".")){while(J>=0&&(D[J]==="0"||D[J]==="."))if(J--,D[J]==="."){J--;break}}return D.substring($,J+1)}static fromChainAmount(D,$,J){let Q=D.toString(),G;if(Q.length<=$){let q="0".repeat($-Q.length);G=this.removeInsignificantZeros(`0.${q}${Q}`)}else{let q=Q.length-$,X=Q.substring(0,q),Y=Q.substring(q);G=this.removeInsignificantZeros(`${X}.${Y}`)}if(!J||J===1)return G;return this.removeInsignificantZeros((Number(G)*J).toFixed($))}static toChainAmount(D,$,J){let[Q,G]=D.split("."),q=this.removeInsignificantZeros((Q??"")+(G??"").padEnd($,"0").slice(0,$));if(!J||J===1)return q;return this.removeInsignificantZeros(Math.round(Number(q)/J).toFixed(0))}}class _6{static register(D){let $=D.command("spot").description("Swaps, transfers, token and portfolio data");$.command("tokens").description("Search for tokens by symbol or mint address").requiredOption("--search <query>","Token symbol or comma-delimited mint addresses").option("--limit <n>","Max number of results").action((J)=>this.tokens(J)),$.command("quote").description("Get a swap quote").requiredOption("--from <token>","Input token (symbol or mint address)").requiredOption("--to <token>","Output token (symbol or mint address)").option("--amount <n>","Amount in human-readable units").option("--raw-amount <n>","Amount in on-chain units (no decimal conversion)").action((J)=>this.quote(J)),$.command("swap").description("Execute a swap").requiredOption("--from <token>","Input token (symbol or mint address)").requiredOption("--to <token>","Output token (symbol or mint address)").option("--amount <n>","Amount in human-readable units").option("--raw-amount <n>","Amount in on-chain units (no decimal conversion)").option("--key <name>","Key to use for signing").action((J)=>this.swap(J)),$.command("portfolio").description("Show spot portfolio for a wallet").option("--address <address>","Wallet address to look up").option("--key <name>","Key to use (overrides active key)").action((J)=>this.portfolio(J)),$.command("transfer").description("Transfer tokens to another wallet").requiredOption("--token <token>","Token to transfer (symbol or mint address)").requiredOption("--to <address>","Recipient wallet address").option("--amount <n>","Amount in human-readable units").option("--raw-amount <n>","Amount in on-chain units (no decimal conversion)").option("--key <name>","Key to use for signing").action((J)=>this.transfer(J))}static async tokens(D){if(D.limit&&isNaN(Number(D.limit)))throw Error("--limit must be a number");let $=await _8.search({query:D.search,limit:D.limit});if($.length===0)throw Error("No tokens found matching query.");if(v.isJson()){v.json($);return}v.table({type:"horizontal",headers:{id:"Address",symbol:"Symbol",name:"Name",price:"Price",mcap:"Market Cap",verified:"Verified"},rows:$.map((J)=>({...J,price:v.formatDollar(J.usdPrice),mcap:v.formatDollar(J.mcap),verified:v.formatBoolean(J.isVerified)}))})}static async quote(D){this.validateAmountOpts(D);let[$,J]=await Promise.all([this.resolveToken(D.from),this.resolveToken(D.to)]),Q=this.getScaledUiMultiplier($),G=this.getScaledUiMultiplier(J),q=await oD.getOrder({inputMint:$.id,outputMint:J.id,amount:D.rawAmount??BD.toChainAmount(D.amount,$.decimals,Q)});if(q.error)throw Error(q.errorMessage??q.error);let X=BD.fromChainAmount(q.inAmount,$.decimals,Q),Y=BD.fromChainAmount(q.outAmount,J.decimals,G);if(v.isJson()){v.json({inputToken:{id:$.id,symbol:$.symbol,decimals:$.decimals},outputToken:{id:J.id,symbol:J.symbol,decimals:J.decimals},inAmount:X,outAmount:Y,inUsdValue:q.inUsdValue,outUsdValue:q.outUsdValue,priceImpact:q.priceImpact});return}v.table({type:"vertical",rows:[{label:"Input",value:`${X} ${$.symbol} (${v.formatDollar(q.inUsdValue)})`},{label:"Quoted Output",value:`${Y} ${J.symbol} (${v.formatDollar(q.outUsdValue)})`},{label:"Price Impact",value:v.formatPercentageChange(q.priceImpact)}]})}static async swap(D){this.validateAmountOpts(D);let $=d.load(),[J,Q,G]=await Promise.all([wD.load(D.key??$.activeKey),this.resolveToken(D.from),this.resolveToken(D.to)]),q=this.getScaledUiMultiplier(Q),X=this.getScaledUiMultiplier(G),Y=await oD.getOrder({inputMint:Q.id,outputMint:G.id,amount:D.rawAmount??BD.toChainAmount(D.amount,Q.decimals,q),taker:J.address});if(Y.error)throw Error(Y.errorMessage??Y.error);if(!Y.transaction)throw Error("No valid routes found.");let Z=await J.signTransaction(Y.transaction),K=await oD.postExecute({requestId:Y.requestId,signedTransaction:Z}),j=BD.fromChainAmount(K.inputAmountResult,Q.decimals,q),U=BD.fromChainAmount(K.outputAmountResult,G.decimals,X),C=0;if(Y.prioritizationFeePayer===J.address&&Y.prioritizationFeeLamports)C=Y.prioritizationFeeLamports;if(Y.rentFeePayer===J.address&&Y.rentFeeLamports)C+=Y.rentFeeLamports;if(Y.signatureFeePayer===J.address&&Y.signatureFeeLamports)C+=Y.signatureFeeLamports;let z=BD.fromChainAmount(C.toString(),9);if(v.isJson()){v.json({trader:J.address,signature:K.signature,inputToken:{id:Q.id,symbol:Q.symbol,decimals:Q.decimals},outputToken:{id:G.id,symbol:G.symbol,decimals:G.decimals},inAmount:j,outAmount:U,inUsdValue:Y.inUsdValue,outUsdValue:Y.outUsdValue,priceImpact:Y.priceImpact,networkFeeLamports:C});return}v.table({type:"vertical",rows:[{label:"Trader",value:J.address},{label:"Input",value:`${j} ${Q.symbol} (${v.formatDollar(Y.inUsdValue)})`},{label:"Output",value:`${U} ${G.symbol} (${v.formatDollar(Y.outUsdValue)})`},{label:"Network Fee",value:`${z} SOL`},{label:"Tx Signature",value:K.signature}]})}static async portfolio(D){if(D.address&&D.key)throw Error("Only one of --address or --key can be provided.");let $=D.address??(await wD.load(D.key??d.load().activeKey)).address,J=9,Q=await oD.getHoldings($),G=new Map;for(let[W,H]of Object.entries(Q.tokens)){let N=H.find((I)=>I.isAssociatedTokenAccount);if(N)G.set(W,N)}let q=[...G.keys()];if(!G.has(E0.WSOL))q.push(E0.WSOL);let X=100,Y=new Map,Z=[];for(let W=0;W<q.length;W+=X)Z.push(q.slice(W,W+X));let K=await Promise.all(Z.map((W)=>_8.search({query:W.join(","),limit:X.toString()})));for(let W of K)for(let H of W)Y.set(H.id,H);let j=[],U=Y.get(E0.WSOL),C=BigInt(Q.amount),z=BigInt(G.get(E0.WSOL)?.amount??"0"),E=C+z;if(U&&E>0n){let W=Number(BD.fromChainAmount(E,J));j.push({id:E0.WSOL,symbol:U.symbol,decimals:J,amount:W,rawAmount:E.toString(),value:W*(U.usdPrice??0),price:U.usdPrice??0,priceChange:U.stats24h?.priceChange??0,isVerified:U.isVerified})}for(let[W,H]of G){if(W===E0.WSOL)continue;let N=Y.get(W);if(!N)continue;let I=this.getScaledUiMultiplier(N),O=Number(BD.fromChainAmount(H.amount,N.decimals,I));j.push({id:W,symbol:N.symbol,decimals:N.decimals,amount:O,rawAmount:H.amount,value:O*(N.usdPrice??0),price:N.usdPrice??0,priceChange:N.stats24h?.priceChange??0,isVerified:N.isVerified,scaledUiMultiplier:I})}j.sort((W,H)=>H.value-W.value);let F=j.reduce((W,H)=>W+H.value,0);if(v.isJson()){v.json({totalValue:F,tokens:j});return}if(j.length===0)throw Error("No holdings found for this address.");v.table({type:"horizontal",headers:{symbol:"Token",amount:"Amount",price:"Price",value:"Value",priceChange:"24h Change",verified:"Verified"},rows:j.map((W)=>({symbol:W.symbol,amount:W.amount.toLocaleString("en-US",{maximumFractionDigits:6}),price:v.formatDollar(W.price),value:v.formatDollar(W.value),priceChange:v.formatPercentageChange(W.priceChange),verified:v.formatBoolean(W.isVerified)}))}),console.log(`
|
|
2091
|
+
Total Value: ${v.formatDollar(F)}`)}static async transfer(D){this.validateAmountOpts(D);let $=d.load(),[J,Q]=await Promise.all([wD.load(D.key??$.activeKey),this.resolveToken(D.token)]),G=this.getScaledUiMultiplier(Q),q=D.rawAmount??BD.toChainAmount(D.amount,Q.decimals,G),X;if(Q.id===E0.WSOL)X=await oD.getTransferSolTx({senderAddress:J.address,receiverAddress:D.to,amount:q});else{let[C]=await DG({mint:Q.id,owner:J.address,tokenProgram:Q.tokenProgram});X=await oD.getTransferTokenTx({mint:Q.id,tokenDecimals:Q.decimals.toString(),tokenProgramId:Q.tokenProgram,senderAddress:J.address,senderTokenAccountAddress:C,receiverAddress:D.to,amount:q})}if("error"in X)throw Error(X.error);let Y=await J.signTransaction(X.transaction),Z=await oD.postExecuteTransfer({requestId:X.requestId,signedTransaction:Y}),K=BD.fromChainAmount(q,Q.decimals,G),j=Number(K)*(Q.usdPrice??0);if(v.isJson()){v.json({sender:J.address,recipient:D.to,token:{id:Q.id,symbol:Q.symbol,decimals:Q.decimals},amount:K,value:j,networkFeeLamports:X.feeAmount,signature:Z.signature});return}let U=BD.fromChainAmount(X.feeAmount.toString(),9);v.table({type:"vertical",rows:[{label:"Sender",value:J.address},{label:"Recipient",value:D.to},{label:"Amount",value:`${K} ${Q.symbol} (${v.formatDollar(j)})`},{label:"Network Fee",value:`${U} SOL`},{label:"Tx Signature",value:Z.signature}]})}static validateAmountOpts(D){if(!D.amount&&!D.rawAmount)throw Error("Either --amount or --raw-amount must be provided.");if(D.amount&&D.rawAmount)throw Error("Only one of --amount or --raw-amount can be provided.")}static getScaledUiMultiplier(D){if(!D.scaledUiConfig)return;return new Date>=new Date(D.scaledUiConfig.newMultiplierEffectiveAt)?D.scaledUiConfig.newMultiplier:D.scaledUiConfig.multiplier}static async resolveToken(D){let[$]=await _8.search({query:D,limit:"1"});if(!$)throw Error(`Token not found: ${D}`);return $}}d.init();var k8=new t6;k8.name("jup").description("Jupiter CLI for agentic workflows").version("0.1.0").option("-f, --format <type>","Output format ('table' or 'json')").hook("preAction",(D)=>{let $=D.opts();if($.format){if($.format!=="table"&&$.format!=="json")throw Error("Invalid --format value. Must be 'table' or 'json'.");v.outputOverride=$.format}});r9.register(k8);R6.register(k8);_6.register(k8);k8.parseAsync().catch((D)=>{v.error(D),process.exit(1)});
|