resend-cli 2.22.0-preview-inboxes.3 → 2.22.0-preview-inboxes.5

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/dist/cli.cjs CHANGED
@@ -1,36 +1,36 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Dm=Object.create;var Ri=Object.defineProperty;var Tm=Object.getOwnPropertyDescriptor;var Om=Object.getOwnPropertyNames;var Em=Object.getPrototypeOf,Bm=Object.prototype.hasOwnProperty;var be=(e,t,o)=>()=>{if(o)throw o[0];try{return e&&(t=e(e=0)),t}catch(i){throw o=[i],i}};var Re=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}},io=(e,t)=>{for(var o in t)Ri(e,o,{get:t[o],enumerable:!0})},Im=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Om(t))!Bm.call(e,r)&&r!==o&&Ri(e,r,{get:()=>t[r],enumerable:!(i=Tm(t,r))||i.enumerable});return e};var me=(e,t,o)=>(o=e!=null?Dm(Em(e)):{},Im(t||!e||!e.__esModule?Ri(o,"default",{value:e,enumerable:!0}):o,e));var ro=Re(Ti=>{var Ko=class extends Error{constructor(t,o,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=o,this.exitCode=t,this.nestedError=void 0}},Di=class extends Ko{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ti.CommanderError=Ko;Ti.InvalidArgumentError=Di});var ko=Re(Ei=>{var{InvalidArgumentError:jm}=ro(),Oi=class{constructor(t,o){switch(this.description=o||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,o){return o===this.defaultValue||!Array.isArray(o)?[t]:(o.push(t),o)}default(t,o){return this.defaultValue=t,this.defaultValueDescription=o,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(o,i)=>{if(!this.argChoices.includes(o))throw new jm(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(o,i):o},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Pm(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}Ei.Argument=Oi;Ei.humanReadableArgName=Pm});var ji=Re(Ii=>{var{humanReadableArgName:$m}=ko(),Bi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let o=t.commands.filter(r=>!r._hidden),i=t._getHelpCommand();return i&&!i._hidden&&o.push(i),this.sortSubcommands&&o.sort((r,n)=>r.name().localeCompare(n.name())),o}compareOptions(t,o){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(t).localeCompare(i(o))}visibleOptions(t){let o=t.options.filter(r=>!r.hidden),i=t._getHelpOption();if(i&&!i.hidden){let r=i.short&&t._findOption(i.short),n=i.long&&t._findOption(i.long);!r&&!n?o.push(i):i.long&&!n?o.push(t.createOption(i.long,i.description)):i.short&&!r&&o.push(t.createOption(i.short,i.description))}return this.sortOptions&&o.sort(this.compareOptions),o}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let o=[];for(let i=t.parent;i;i=i.parent){let r=i.options.filter(n=>!n.hidden);o.push(...r)}return this.sortOptions&&o.sort(this.compareOptions),o}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(o=>{o.description=o.description||t._argsDescription[o.name()]||""}),t.registeredArguments.find(o=>o.description)?t.registeredArguments:[]}subcommandTerm(t){let o=t.registeredArguments.map(i=>$m(i)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(o?" "+o:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,o){return o.visibleCommands(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleSubcommandTerm(o.subcommandTerm(r)))),0)}longestOptionTermLength(t,o){return o.visibleOptions(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleOptionTerm(o.optionTerm(r)))),0)}longestGlobalOptionTermLength(t,o){return o.visibleGlobalOptions(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleOptionTerm(o.optionTerm(r)))),0)}longestArgumentTermLength(t,o){return o.visibleArguments(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleArgumentTerm(o.argumentTerm(r)))),0)}commandUsage(t){let o=t._name;t._aliases[0]&&(o=o+"|"+t._aliases[0]);let i="";for(let r=t.parent;r;r=r.parent)i=r.name()+" "+i;return i+o+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let o=[];if(t.argChoices&&o.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&o.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&o.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&o.push(`env: ${t.envVar}`),o.length>0){let i=`(${o.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}argumentDescription(t){let o=[];if(t.argChoices&&o.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&o.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),o.length>0){let i=`(${o.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}formatItemList(t,o,i){return o.length===0?[]:[i.styleTitle(t),...o,""]}groupItems(t,o,i){let r=new Map;return t.forEach(n=>{let s=i(n);r.has(s)||r.set(s,[])}),o.forEach(n=>{let s=i(n);r.has(s)||r.set(s,[]),r.get(s).push(n)}),r}formatHelp(t,o){let i=o.padWidth(t,o),r=o.helpWidth??80;function n(p,f){return o.formatItem(p,i,f,o)}let s=[`${o.styleTitle("Usage:")} ${o.styleUsage(o.commandUsage(t))}`,""],a=o.commandDescription(t);a.length>0&&(s=s.concat([o.boxWrap(o.styleCommandDescription(a),r),""]));let l=o.visibleArguments(t).map(p=>n(o.styleArgumentTerm(o.argumentTerm(p)),o.styleArgumentDescription(o.argumentDescription(p))));if(s=s.concat(this.formatItemList("Arguments:",l,o)),this.groupItems(t.options,o.visibleOptions(t),p=>p.helpGroupHeading??"Options:").forEach((p,f)=>{let y=p.map(A=>n(o.styleOptionTerm(o.optionTerm(A)),o.styleOptionDescription(o.optionDescription(A))));s=s.concat(this.formatItemList(f,y,o))}),o.showGlobalOptions){let p=o.visibleGlobalOptions(t).map(f=>n(o.styleOptionTerm(o.optionTerm(f)),o.styleOptionDescription(o.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",p,o))}return this.groupItems(t.commands,o.visibleCommands(t),p=>p.helpGroup()||"Commands:").forEach((p,f)=>{let y=p.map(A=>n(o.styleSubcommandTerm(o.subcommandTerm(A)),o.styleSubcommandDescription(o.subcommandDescription(A))));s=s.concat(this.formatItemList(f,y,o))}),s.join(`
3
- `)}displayWidth(t){return tn(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(o=>o==="[options]"?this.styleOptionText(o):o==="[command]"?this.styleSubcommandText(o):o[0]==="["||o[0]==="<"?this.styleArgumentText(o):this.styleCommandText(o)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(o=>o==="[options]"?this.styleOptionText(o):o[0]==="["||o[0]==="<"?this.styleArgumentText(o):this.styleSubcommandText(o)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,o){return Math.max(o.longestOptionTermLength(t,o),o.longestGlobalOptionTermLength(t,o),o.longestSubcommandTermLength(t,o),o.longestArgumentTermLength(t,o))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,o,i,r){let s=" ".repeat(2);if(!i)return s+t;let a=t.padEnd(o+t.length-r.displayWidth(t)),l=2,m=(this.helpWidth??80)-o-l-2,p;return m<this.minWidthToWrap||r.preformatted(i)?p=i:p=r.boxWrap(i,m).replace(/\n/g,`
2
+ "use strict";var Bm=Object.create;var Di=Object.defineProperty;var Im=Object.getOwnPropertyDescriptor;var jm=Object.getOwnPropertyNames;var Pm=Object.getPrototypeOf,$m=Object.prototype.hasOwnProperty;var be=(e,t,o)=>()=>{if(o)throw o[0];try{return e&&(t=e(e=0)),t}catch(i){throw o=[i],i}};var Re=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}},io=(e,t)=>{for(var o in t)Di(e,o,{get:t[o],enumerable:!0})},Gm=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of jm(t))!$m.call(e,r)&&r!==o&&Di(e,r,{get:()=>t[r],enumerable:!(i=Im(t,r))||i.enumerable});return e};var me=(e,t,o)=>(o=e!=null?Bm(Pm(e)):{},Gm(t||!e||!e.__esModule?Di(o,"default",{value:e,enumerable:!0}):o,e));var ro=Re(Oi=>{var Ko=class extends Error{constructor(t,o,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=o,this.exitCode=t,this.nestedError=void 0}},Ti=class extends Ko{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Oi.CommanderError=Ko;Oi.InvalidArgumentError=Ti});var ko=Re(Bi=>{var{InvalidArgumentError:Hm}=ro(),Ei=class{constructor(t,o){switch(this.description=o||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,o){return o===this.defaultValue||!Array.isArray(o)?[t]:(o.push(t),o)}default(t,o){return this.defaultValue=t,this.defaultValueDescription=o,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(o,i)=>{if(!this.argChoices.includes(o))throw new Hm(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(o,i):o},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Qm(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}Bi.Argument=Ei;Bi.humanReadableArgName=Qm});var Pi=Re(ji=>{var{humanReadableArgName:Nm}=ko(),Ii=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let o=t.commands.filter(r=>!r._hidden),i=t._getHelpCommand();return i&&!i._hidden&&o.push(i),this.sortSubcommands&&o.sort((r,n)=>r.name().localeCompare(n.name())),o}compareOptions(t,o){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(t).localeCompare(i(o))}visibleOptions(t){let o=t.options.filter(r=>!r.hidden),i=t._getHelpOption();if(i&&!i.hidden){let r=i.short&&t._findOption(i.short),n=i.long&&t._findOption(i.long);!r&&!n?o.push(i):i.long&&!n?o.push(t.createOption(i.long,i.description)):i.short&&!r&&o.push(t.createOption(i.short,i.description))}return this.sortOptions&&o.sort(this.compareOptions),o}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let o=[];for(let i=t.parent;i;i=i.parent){let r=i.options.filter(n=>!n.hidden);o.push(...r)}return this.sortOptions&&o.sort(this.compareOptions),o}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(o=>{o.description=o.description||t._argsDescription[o.name()]||""}),t.registeredArguments.find(o=>o.description)?t.registeredArguments:[]}subcommandTerm(t){let o=t.registeredArguments.map(i=>Nm(i)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(o?" "+o:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,o){return o.visibleCommands(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleSubcommandTerm(o.subcommandTerm(r)))),0)}longestOptionTermLength(t,o){return o.visibleOptions(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleOptionTerm(o.optionTerm(r)))),0)}longestGlobalOptionTermLength(t,o){return o.visibleGlobalOptions(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleOptionTerm(o.optionTerm(r)))),0)}longestArgumentTermLength(t,o){return o.visibleArguments(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleArgumentTerm(o.argumentTerm(r)))),0)}commandUsage(t){let o=t._name;t._aliases[0]&&(o=o+"|"+t._aliases[0]);let i="";for(let r=t.parent;r;r=r.parent)i=r.name()+" "+i;return i+o+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let o=[];if(t.argChoices&&o.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&o.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&o.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&o.push(`env: ${t.envVar}`),o.length>0){let i=`(${o.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}argumentDescription(t){let o=[];if(t.argChoices&&o.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&o.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),o.length>0){let i=`(${o.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}formatItemList(t,o,i){return o.length===0?[]:[i.styleTitle(t),...o,""]}groupItems(t,o,i){let r=new Map;return t.forEach(n=>{let s=i(n);r.has(s)||r.set(s,[])}),o.forEach(n=>{let s=i(n);r.has(s)||r.set(s,[]),r.get(s).push(n)}),r}formatHelp(t,o){let i=o.padWidth(t,o),r=o.helpWidth??80;function n(p,f){return o.formatItem(p,i,f,o)}let s=[`${o.styleTitle("Usage:")} ${o.styleUsage(o.commandUsage(t))}`,""],a=o.commandDescription(t);a.length>0&&(s=s.concat([o.boxWrap(o.styleCommandDescription(a),r),""]));let l=o.visibleArguments(t).map(p=>n(o.styleArgumentTerm(o.argumentTerm(p)),o.styleArgumentDescription(o.argumentDescription(p))));if(s=s.concat(this.formatItemList("Arguments:",l,o)),this.groupItems(t.options,o.visibleOptions(t),p=>p.helpGroupHeading??"Options:").forEach((p,f)=>{let y=p.map(A=>n(o.styleOptionTerm(o.optionTerm(A)),o.styleOptionDescription(o.optionDescription(A))));s=s.concat(this.formatItemList(f,y,o))}),o.showGlobalOptions){let p=o.visibleGlobalOptions(t).map(f=>n(o.styleOptionTerm(o.optionTerm(f)),o.styleOptionDescription(o.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",p,o))}return this.groupItems(t.commands,o.visibleCommands(t),p=>p.helpGroup()||"Commands:").forEach((p,f)=>{let y=p.map(A=>n(o.styleSubcommandTerm(o.subcommandTerm(A)),o.styleSubcommandDescription(o.subcommandDescription(A))));s=s.concat(this.formatItemList(f,y,o))}),s.join(`
3
+ `)}displayWidth(t){return on(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(o=>o==="[options]"?this.styleOptionText(o):o==="[command]"?this.styleSubcommandText(o):o[0]==="["||o[0]==="<"?this.styleArgumentText(o):this.styleCommandText(o)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(o=>o==="[options]"?this.styleOptionText(o):o[0]==="["||o[0]==="<"?this.styleArgumentText(o):this.styleSubcommandText(o)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,o){return Math.max(o.longestOptionTermLength(t,o),o.longestGlobalOptionTermLength(t,o),o.longestSubcommandTermLength(t,o),o.longestArgumentTermLength(t,o))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,o,i,r){let s=" ".repeat(2);if(!i)return s+t;let a=t.padEnd(o+t.length-r.displayWidth(t)),l=2,m=(this.helpWidth??80)-o-l-2,p;return m<this.minWidthToWrap||r.preformatted(i)?p=i:p=r.boxWrap(i,m).replace(/\n/g,`
4
4
  `+" ".repeat(o+l)),s+a+" ".repeat(l)+p.replace(/\n/g,`
5
5
  ${s}`)}boxWrap(t,o){if(o<this.minWidthToWrap)return t;let i=t.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,n=[];return i.forEach(s=>{let a=s.match(r);if(a===null){n.push("");return}let l=[a.shift()],u=this.displayWidth(l[0]);a.forEach(m=>{let p=this.displayWidth(m);if(u+p<=o){l.push(m),u+=p;return}n.push(l.join(""));let f=m.trimStart();l=[f],u=this.displayWidth(f)}),n.push(l.join(""))}),n.join(`
6
- `)}};function tn(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Ii.Help=Bi;Ii.stripColor=tn});var Hi=Re(Gi=>{var{InvalidArgumentError:Gm}=ro(),Pi=class{constructor(t,o){this.flags=t,this.description=o||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let i=Hm(t);this.short=i.shortFlag,this.long=i.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(t,o){return this.defaultValue=t,this.defaultValueDescription=o,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let o=t;return typeof t=="string"&&(o={[t]:!0}),this.implied=Object.assign(this.implied||{},o),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,o){return o===this.defaultValue||!Array.isArray(o)?[t]:(o.push(t),o)}choices(t){return this.argChoices=t.slice(),this.parseArg=(o,i)=>{if(!this.argChoices.includes(o))throw new Gm(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(o,i):o},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?on(this.name().replace(/^no-/,"")):on(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},$i=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(o=>{o.negate?this.negativeOptions.set(o.attributeName(),o):this.positiveOptions.set(o.attributeName(),o)}),this.negativeOptions.forEach((o,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(t,o){let i=o.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,n=r!==void 0?r:!1;return o.negate===(n===t)}};function on(e){return e.split("-").reduce((t,o)=>t+o[0].toUpperCase()+o.slice(1))}function Hm(e){let t,o,i=/^-[^-]$/,r=/^--[^-]/,n=e.split(/[ |,]+/).concat("guard");if(i.test(n[0])&&(t=n.shift()),r.test(n[0])&&(o=n.shift()),!t&&i.test(n[0])&&(t=n.shift()),!t&&r.test(n[0])&&(t=o,o=n.shift()),n[0].startsWith("-")){let s=n[0],a=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
6
+ `)}};function on(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}ji.Help=Ii;ji.stripColor=on});var Qi=Re(Hi=>{var{InvalidArgumentError:Mm}=ro(),$i=class{constructor(t,o){this.flags=t,this.description=o||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let i=qm(t);this.short=i.shortFlag,this.long=i.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(t,o){return this.defaultValue=t,this.defaultValueDescription=o,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let o=t;return typeof t=="string"&&(o={[t]:!0}),this.implied=Object.assign(this.implied||{},o),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,o){return o===this.defaultValue||!Array.isArray(o)?[t]:(o.push(t),o)}choices(t){return this.argChoices=t.slice(),this.parseArg=(o,i)=>{if(!this.argChoices.includes(o))throw new Mm(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(o,i):o},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?rn(this.name().replace(/^no-/,"")):rn(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Gi=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(o=>{o.negate?this.negativeOptions.set(o.attributeName(),o):this.positiveOptions.set(o.attributeName(),o)}),this.negativeOptions.forEach((o,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(t,o){let i=o.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,n=r!==void 0?r:!1;return o.negate===(n===t)}};function rn(e){return e.split("-").reduce((t,o)=>t+o[0].toUpperCase()+o.slice(1))}function qm(e){let t,o,i=/^-[^-]$/,r=/^--[^-]/,n=e.split(/[ |,]+/).concat("guard");if(i.test(n[0])&&(t=n.shift()),r.test(n[0])&&(o=n.shift()),!t&&i.test(n[0])&&(t=n.shift()),!t&&r.test(n[0])&&(t=o,o=n.shift()),n[0].startsWith("-")){let s=n[0],a=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
7
7
  - a short flag is a single dash and a single character
8
8
  - either use a single dash and a single character (for a short flag)
9
9
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(s)?new Error(`${a}
10
10
  - too many short flags`):r.test(s)?new Error(`${a}
11
11
  - too many long flags`):new Error(`${a}
12
- - unrecognised flag format`)}if(t===void 0&&o===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:o}}Gi.Option=Pi;Gi.DualOptions=$i});var nn=Re(rn=>{function Qm(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let o=[];for(let i=0;i<=e.length;i++)o[i]=[i];for(let i=0;i<=t.length;i++)o[0][i]=i;for(let i=1;i<=t.length;i++)for(let r=1;r<=e.length;r++){let n=1;e[r-1]===t[i-1]?n=0:n=1,o[r][i]=Math.min(o[r-1][i]+1,o[r][i-1]+1,o[r-1][i-1]+n),r>1&&i>1&&e[r-1]===t[i-2]&&e[r-2]===t[i-1]&&(o[r][i]=Math.min(o[r][i],o[r-2][i-2]+1))}return o[e.length][t.length]}function Nm(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let o=e.startsWith("--");o&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let i=[],r=3,n=.4;return t.forEach(s=>{if(s.length<=1)return;let a=Qm(e,s),l=Math.max(e.length,s.length);(l-a)/l>n&&(a<r?(r=a,i=[s]):a===r&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),o&&(i=i.map(s=>`--${s}`)),i.length>1?`
12
+ - unrecognised flag format`)}if(t===void 0&&o===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:o}}Hi.Option=$i;Hi.DualOptions=Gi});var sn=Re(nn=>{function Lm(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let o=[];for(let i=0;i<=e.length;i++)o[i]=[i];for(let i=0;i<=t.length;i++)o[0][i]=i;for(let i=1;i<=t.length;i++)for(let r=1;r<=e.length;r++){let n=1;e[r-1]===t[i-1]?n=0:n=1,o[r][i]=Math.min(o[r-1][i]+1,o[r][i-1]+1,o[r-1][i-1]+n),r>1&&i>1&&e[r-1]===t[i-2]&&e[r-2]===t[i-1]&&(o[r][i]=Math.min(o[r][i],o[r-2][i-2]+1))}return o[e.length][t.length]}function Wm(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let o=e.startsWith("--");o&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let i=[],r=3,n=.4;return t.forEach(s=>{if(s.length<=1)return;let a=Lm(e,s),l=Math.max(e.length,s.length);(l-a)/l>n&&(a<r?(r=a,i=[s]):a===r&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),o&&(i=i.map(s=>`--${s}`)),i.length>1?`
13
13
  (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
14
- (Did you mean ${i[0]}?)`:""}rn.suggestSimilar=Nm});var cn=Re(Li=>{var Mm=require("node:events").EventEmitter,Qi=require("node:child_process"),ot=require("node:path"),_o=require("node:fs"),Y=require("node:process"),{Argument:qm,humanReadableArgName:Lm}=ko(),{CommanderError:Ni}=ro(),{Help:Wm,stripColor:Jm}=ji(),{Option:sn,DualOptions:Vm}=Hi(),{suggestSimilar:an}=nn(),Mi=class e extends Mm{constructor(t){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=t||"",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:o=>Y.stdout.write(o),writeErr:o=>Y.stderr.write(o),outputError:(o,i)=>i(o),getOutHelpWidth:()=>Y.stdout.isTTY?Y.stdout.columns:void 0,getErrHelpWidth:()=>Y.stderr.isTTY?Y.stderr.columns:void 0,getOutHasColors:()=>qi()??(Y.stdout.isTTY&&Y.stdout.hasColors?.()),getErrHasColors:()=>qi()??(Y.stderr.isTTY&&Y.stderr.hasColors?.()),stripColor:o=>Jm(o)},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(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let o=this;o;o=o.parent)t.push(o);return t}command(t,o,i){let r=o,n=i;typeof r=="object"&&r!==null&&(n=r,r=null),n=n||{};let[,s,a]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(s);return r&&(l.description(r),l._executableHandler=!0),n.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(n.noHelp||n.hidden),l._executableFile=n.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),r?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Wm,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,o){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
15
- - specify the name in Command constructor or using .name()`);return o=o||{},o.isDefault&&(this._defaultCommandName=t._name),(o.noHelp||o.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,o){return new qm(t,o)}argument(t,o,i,r){let n=this.createArgument(t,o);return typeof i=="function"?n.default(r).argParser(i):n.default(i),this.addArgument(n),this}arguments(t){return t.trim().split(/ +/).forEach(o=>{this.argument(o)}),this}addArgument(t){let o=this.registeredArguments.slice(-1)[0];if(o?.variadic)throw new Error(`only the last argument can be variadic '${o.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,o){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=t??"help [command]",[,r,n]=i.match(/([^ ]+) *(.*)/),s=o??"display help for command",a=this.createCommand(r);return a.helpOption(!1),n&&a.arguments(n),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(t||o)&&this._initCommandGroup(a),this}addHelpCommand(t,o){return typeof t!="object"?(this.helpCommand(t,o),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,o){let i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
16
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(o):this._lifeCycleHooks[t]=[o],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=o=>{if(o.code!=="commander.executeSubCommandAsync")throw o},this}_exit(t,o,i){this._exitCallback&&this._exitCallback(new Ni(t,o,i)),Y.exit(t)}action(t){let o=i=>{let r=this.registeredArguments.length,n=i.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),t.apply(this,n)};return this._actionHandler=o,this}createOption(t,o){return new sn(t,o)}_callParseArg(t,o,i,r){try{return t.parseArg(o,i)}catch(n){if(n.code==="commander.invalidArgument"){let s=`${r} ${n.message}`;this.error(s,{exitCode:n.exitCode,code:n.code})}throw n}}_registerOption(t){let o=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(o){let i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
17
- - already used by option '${o.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let o=r=>[r.name()].concat(r.aliases()),i=o(t).find(r=>this._findCommand(r));if(i){let r=o(this._findCommand(i)).join("|"),n=o(t).join("|");throw new Error(`cannot add command '${n}' as already have command '${r}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let o=t.name(),i=t.attributeName();if(t.negate){let n=t.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(i,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(i,t.defaultValue,"default");let r=(n,s,a)=>{n==null&&t.presetArg!==void 0&&(n=t.presetArg);let l=this.getOptionValue(i);n!==null&&t.parseArg?n=this._callParseArg(t,n,l,s):n!==null&&t.variadic&&(n=t._collectValue(n,l)),n==null&&(t.negate?n=!1:t.isBoolean()||t.optional?n=!0:n=""),this.setOptionValueWithSource(i,n,a)};return this.on("option:"+o,n=>{let s=`error: option '${t.flags}' argument '${n}' is invalid.`;r(n,s,"cli")}),t.envVar&&this.on("optionEnv:"+o,n=>{let s=`error: option '${t.flags}' value '${n}' from env '${t.envVar}' is invalid.`;r(n,s,"env")}),this}_optionEx(t,o,i,r,n){if(typeof o=="object"&&o instanceof sn)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(o,i);if(s.makeOptionMandatory(!!t.mandatory),typeof r=="function")s.default(n).argParser(r);else if(r instanceof RegExp){let a=r;r=(l,u)=>{let m=a.exec(l);return m?m[0]:u},s.default(n).argParser(r)}else s.default(r);return this.addOption(s)}option(t,o,i,r){return this._optionEx({},t,o,i,r)}requiredOption(t,o,i,r){return this._optionEx({mandatory:!0},t,o,i,r)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,o){return this.setOptionValueWithSource(t,o,void 0)}setOptionValueWithSource(t,o,i){return this._storeOptionsAsProperties?this[t]=o:this._optionValues[t]=o,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let o;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(t)!==void 0&&(o=i.getOptionValueSource(t))}),o}_prepareUserArgs(t,o){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(o=o||{},t===void 0&&o.from===void 0){Y.versions?.electron&&(o.from="electron");let r=Y.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(o.from="eval")}t===void 0&&(t=Y.argv),this.rawArgs=t.slice();let i;switch(o.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":Y.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${o.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,o){this._prepareForParse();let i=this._prepareUserArgs(t,o);return this._parseCommand([],i),this}async parseAsync(t,o){this._prepareForParse();let i=this._prepareUserArgs(t,o);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
14
+ (Did you mean ${i[0]}?)`:""}nn.suggestSimilar=Wm});var cn=Re(Wi=>{var Jm=require("node:events").EventEmitter,Ni=require("node:child_process"),ot=require("node:path"),_o=require("node:fs"),Y=require("node:process"),{Argument:Vm,humanReadableArgName:zm}=ko(),{CommanderError:Mi}=ro(),{Help:Ym,stripColor:Xm}=Pi(),{Option:an,DualOptions:Zm}=Qi(),{suggestSimilar:ln}=sn(),qi=class e extends Jm{constructor(t){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=t||"",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:o=>Y.stdout.write(o),writeErr:o=>Y.stderr.write(o),outputError:(o,i)=>i(o),getOutHelpWidth:()=>Y.stdout.isTTY?Y.stdout.columns:void 0,getErrHelpWidth:()=>Y.stderr.isTTY?Y.stderr.columns:void 0,getOutHasColors:()=>Li()??(Y.stdout.isTTY&&Y.stdout.hasColors?.()),getErrHasColors:()=>Li()??(Y.stderr.isTTY&&Y.stderr.hasColors?.()),stripColor:o=>Xm(o)},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(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let o=this;o;o=o.parent)t.push(o);return t}command(t,o,i){let r=o,n=i;typeof r=="object"&&r!==null&&(n=r,r=null),n=n||{};let[,s,a]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(s);return r&&(l.description(r),l._executableHandler=!0),n.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(n.noHelp||n.hidden),l._executableFile=n.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),r?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Ym,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,o){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
15
+ - specify the name in Command constructor or using .name()`);return o=o||{},o.isDefault&&(this._defaultCommandName=t._name),(o.noHelp||o.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,o){return new Vm(t,o)}argument(t,o,i,r){let n=this.createArgument(t,o);return typeof i=="function"?n.default(r).argParser(i):n.default(i),this.addArgument(n),this}arguments(t){return t.trim().split(/ +/).forEach(o=>{this.argument(o)}),this}addArgument(t){let o=this.registeredArguments.slice(-1)[0];if(o?.variadic)throw new Error(`only the last argument can be variadic '${o.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,o){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=t??"help [command]",[,r,n]=i.match(/([^ ]+) *(.*)/),s=o??"display help for command",a=this.createCommand(r);return a.helpOption(!1),n&&a.arguments(n),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(t||o)&&this._initCommandGroup(a),this}addHelpCommand(t,o){return typeof t!="object"?(this.helpCommand(t,o),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,o){let i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
16
+ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(o):this._lifeCycleHooks[t]=[o],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=o=>{if(o.code!=="commander.executeSubCommandAsync")throw o},this}_exit(t,o,i){this._exitCallback&&this._exitCallback(new Mi(t,o,i)),Y.exit(t)}action(t){let o=i=>{let r=this.registeredArguments.length,n=i.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),t.apply(this,n)};return this._actionHandler=o,this}createOption(t,o){return new an(t,o)}_callParseArg(t,o,i,r){try{return t.parseArg(o,i)}catch(n){if(n.code==="commander.invalidArgument"){let s=`${r} ${n.message}`;this.error(s,{exitCode:n.exitCode,code:n.code})}throw n}}_registerOption(t){let o=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(o){let i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
17
+ - already used by option '${o.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let o=r=>[r.name()].concat(r.aliases()),i=o(t).find(r=>this._findCommand(r));if(i){let r=o(this._findCommand(i)).join("|"),n=o(t).join("|");throw new Error(`cannot add command '${n}' as already have command '${r}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let o=t.name(),i=t.attributeName();if(t.negate){let n=t.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(i,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(i,t.defaultValue,"default");let r=(n,s,a)=>{n==null&&t.presetArg!==void 0&&(n=t.presetArg);let l=this.getOptionValue(i);n!==null&&t.parseArg?n=this._callParseArg(t,n,l,s):n!==null&&t.variadic&&(n=t._collectValue(n,l)),n==null&&(t.negate?n=!1:t.isBoolean()||t.optional?n=!0:n=""),this.setOptionValueWithSource(i,n,a)};return this.on("option:"+o,n=>{let s=`error: option '${t.flags}' argument '${n}' is invalid.`;r(n,s,"cli")}),t.envVar&&this.on("optionEnv:"+o,n=>{let s=`error: option '${t.flags}' value '${n}' from env '${t.envVar}' is invalid.`;r(n,s,"env")}),this}_optionEx(t,o,i,r,n){if(typeof o=="object"&&o instanceof an)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(o,i);if(s.makeOptionMandatory(!!t.mandatory),typeof r=="function")s.default(n).argParser(r);else if(r instanceof RegExp){let a=r;r=(l,u)=>{let m=a.exec(l);return m?m[0]:u},s.default(n).argParser(r)}else s.default(r);return this.addOption(s)}option(t,o,i,r){return this._optionEx({},t,o,i,r)}requiredOption(t,o,i,r){return this._optionEx({mandatory:!0},t,o,i,r)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,o){return this.setOptionValueWithSource(t,o,void 0)}setOptionValueWithSource(t,o,i){return this._storeOptionsAsProperties?this[t]=o:this._optionValues[t]=o,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let o;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(t)!==void 0&&(o=i.getOptionValueSource(t))}),o}_prepareUserArgs(t,o){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(o=o||{},t===void 0&&o.from===void 0){Y.versions?.electron&&(o.from="electron");let r=Y.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(o.from="eval")}t===void 0&&(t=Y.argv),this.rawArgs=t.slice();let i;switch(o.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":Y.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${o.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,o){this._prepareForParse();let i=this._prepareUserArgs(t,o);return this._parseCommand([],i),this}async parseAsync(t,o){this._prepareForParse();let i=this._prepareUserArgs(t,o);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
18
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(t,o,i){if(_o.existsSync(t))return;let r=o?`searched for local subcommand relative to directory '${o}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${t}' does not exist
19
19
  - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
20
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
- - ${r}`;throw new Error(n)}_executeSubCommand(t,o){o=o.slice();let i=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function n(m,p){let f=ot.resolve(m,p);if(_o.existsSync(f))return f;if(r.includes(ot.extname(p)))return;let y=r.find(A=>_o.existsSync(`${f}${A}`));if(y)return`${f}${y}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let m;try{m=_o.realpathSync(this._scriptPath)}catch{m=this._scriptPath}a=ot.resolve(ot.dirname(m),a)}if(a){let m=n(a,s);if(!m&&!t._executableFile&&this._scriptPath){let p=ot.basename(this._scriptPath,ot.extname(this._scriptPath));p!==this._name&&(m=n(a,`${p}-${t._name}`))}s=m||s}i=r.includes(ot.extname(s));let l;Y.platform!=="win32"?i?(o.unshift(s),o=ln(Y.execArgv).concat(o),l=Qi.spawn(Y.argv[0],o,{stdio:"inherit"})):l=Qi.spawn(s,o,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,t._name),o.unshift(s),o=ln(Y.execArgv).concat(o),l=Qi.spawn(Y.execPath,o,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{Y.on(p,()=>{l.killed===!1&&l.exitCode===null&&l.kill(p)})});let u=this._exitCallback;l.on("close",m=>{m=m??1,u?u(new Ni(m,"commander.executeSubCommandAsync","(close)")):Y.exit(m)}),l.on("error",m=>{if(m.code==="ENOENT")this._checkForMissingExecutable(s,a,t._name);else if(m.code==="EACCES")throw new Error(`'${s}' not executable`);if(!u)Y.exit(1);else{let p=new Ni(1,"commander.executeSubCommandAsync","(error)");p.nestedError=m,u(p)}}),this.runningCommand=l}_dispatchSubcommand(t,o,i){let r=this._findCommand(t);r||this.help({error:!0}),r._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,r,"preSubcommand"),n=this._chainOrCall(n,()=>{if(r._executableHandler)this._executeSubCommand(r,o.concat(i));else return r._parseCommand(o,i)}),n}_dispatchHelpCommand(t){t||this.help();let o=this._findCommand(t);return o&&!o._executableHandler&&o.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,o)=>{t.required&&this.args[o]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(i,r,n)=>{let s=r;if(r!==null&&i.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,r,n,a)}return s};this._checkNumberOfArguments();let o=[];this.registeredArguments.forEach((i,r)=>{let n=i.defaultValue;i.variadic?r<this.args.length?(n=this.args.slice(r),i.parseArg&&(n=n.reduce((s,a)=>t(i,a,s),i.defaultValue))):n===void 0&&(n=[]):r<this.args.length&&(n=this.args[r],i.parseArg&&(n=t(i,n,i.defaultValue))),o[r]=n}),this.processedArgs=o}_chainOrCall(t,o){return t?.then&&typeof t.then=="function"?t.then(()=>o()):o()}_chainOrCallHooks(t,o){let i=t,r=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[o]!==void 0).forEach(n=>{n._lifeCycleHooks[o].forEach(s=>{r.push({hookedCommand:n,callback:s})})}),o==="postAction"&&r.reverse(),r.forEach(n=>{i=this._chainOrCall(i,()=>n.callback(n.hookedCommand,this))}),i}_chainOrCallSubCommandHook(t,o,i){let r=t;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(n=>{r=this._chainOrCall(r,()=>n(this,o))}),r}_parseCommand(t,o){let i=this.parseOptions(o);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),o=i.unknown,this.args=t.concat(o),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),o);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(o),this._dispatchSubcommand(this._defaultCommandName,t,o);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},n=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(n,t,o)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(n))r(),this._processArguments(),this.parent.emit(n,t,o);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,o);this.listenerCount("command:*")?this.emit("command:*",t,o):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(o=>o._name===t||o._aliases.includes(t))}_findOption(t){return this.options.find(o=>o.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(o=>{o.mandatory&&t.getOptionValue(o.attributeName())===void 0&&t.missingMandatoryOptionValue(o)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});t.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=t.find(n=>i.conflictsWith.includes(n.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let o=[],i=[],r=o;function n(m){return m.length>1&&m[0]==="-"}let s=m=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(m)?!this._getCommandAndAncestors().some(p=>p.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,l=null,u=0;for(;u<t.length||l;){let m=l??t[u++];if(l=null,m==="--"){r===i&&r.push(m),r.push(...t.slice(u));break}if(a&&(!n(m)||s(m))){this.emit(`option:${a.name()}`,m);continue}if(a=null,n(m)){let p=this._findOption(m);if(p){if(p.required){let f=t[u++];f===void 0&&this.optionMissingArgument(p),this.emit(`option:${p.name()}`,f)}else if(p.optional){let f=null;u<t.length&&(!n(t[u])||s(t[u]))&&(f=t[u++]),this.emit(`option:${p.name()}`,f)}else this.emit(`option:${p.name()}`);a=p.variadic?p:null;continue}}if(m.length>2&&m[0]==="-"&&m[1]!=="-"){let p=this._findOption(`-${m[1]}`);if(p){p.required||p.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${p.name()}`,m.slice(2)):(this.emit(`option:${p.name()}`),l=`-${m.slice(2)}`);continue}}if(/^--[^=]+=/.test(m)){let p=m.indexOf("="),f=this._findOption(m.slice(0,p));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,m.slice(p+1));continue}}if(r===o&&n(m)&&!(this.commands.length===0&&s(m))&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&o.length===0&&i.length===0){if(this._findCommand(m)){o.push(m),i.push(...t.slice(u));break}else if(this._getHelpCommand()&&m===this._getHelpCommand().name()){o.push(m,...t.slice(u));break}else if(this._defaultCommandName){i.push(m,...t.slice(u));break}}if(this._passThroughOptions){r.push(m,...t.slice(u));break}r.push(m)}return{operands:o,unknown:i}}opts(){if(this._storeOptionsAsProperties){let t={},o=this.options.length;for(let i=0;i<o;i++){let r=this.options[i].attributeName();t[r]=r===this._versionOptionName?this._version:this[r]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,o)=>Object.assign(t,o.opts()),{})}error(t,o){this._outputConfiguration.outputError(`${t}
21
+ - ${r}`;throw new Error(n)}_executeSubCommand(t,o){o=o.slice();let i=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function n(m,p){let f=ot.resolve(m,p);if(_o.existsSync(f))return f;if(r.includes(ot.extname(p)))return;let y=r.find(A=>_o.existsSync(`${f}${A}`));if(y)return`${f}${y}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let m;try{m=_o.realpathSync(this._scriptPath)}catch{m=this._scriptPath}a=ot.resolve(ot.dirname(m),a)}if(a){let m=n(a,s);if(!m&&!t._executableFile&&this._scriptPath){let p=ot.basename(this._scriptPath,ot.extname(this._scriptPath));p!==this._name&&(m=n(a,`${p}-${t._name}`))}s=m||s}i=r.includes(ot.extname(s));let l;Y.platform!=="win32"?i?(o.unshift(s),o=dn(Y.execArgv).concat(o),l=Ni.spawn(Y.argv[0],o,{stdio:"inherit"})):l=Ni.spawn(s,o,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,t._name),o.unshift(s),o=dn(Y.execArgv).concat(o),l=Ni.spawn(Y.execPath,o,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{Y.on(p,()=>{l.killed===!1&&l.exitCode===null&&l.kill(p)})});let u=this._exitCallback;l.on("close",m=>{m=m??1,u?u(new Mi(m,"commander.executeSubCommandAsync","(close)")):Y.exit(m)}),l.on("error",m=>{if(m.code==="ENOENT")this._checkForMissingExecutable(s,a,t._name);else if(m.code==="EACCES")throw new Error(`'${s}' not executable`);if(!u)Y.exit(1);else{let p=new Mi(1,"commander.executeSubCommandAsync","(error)");p.nestedError=m,u(p)}}),this.runningCommand=l}_dispatchSubcommand(t,o,i){let r=this._findCommand(t);r||this.help({error:!0}),r._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,r,"preSubcommand"),n=this._chainOrCall(n,()=>{if(r._executableHandler)this._executeSubCommand(r,o.concat(i));else return r._parseCommand(o,i)}),n}_dispatchHelpCommand(t){t||this.help();let o=this._findCommand(t);return o&&!o._executableHandler&&o.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,o)=>{t.required&&this.args[o]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(i,r,n)=>{let s=r;if(r!==null&&i.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,r,n,a)}return s};this._checkNumberOfArguments();let o=[];this.registeredArguments.forEach((i,r)=>{let n=i.defaultValue;i.variadic?r<this.args.length?(n=this.args.slice(r),i.parseArg&&(n=n.reduce((s,a)=>t(i,a,s),i.defaultValue))):n===void 0&&(n=[]):r<this.args.length&&(n=this.args[r],i.parseArg&&(n=t(i,n,i.defaultValue))),o[r]=n}),this.processedArgs=o}_chainOrCall(t,o){return t?.then&&typeof t.then=="function"?t.then(()=>o()):o()}_chainOrCallHooks(t,o){let i=t,r=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[o]!==void 0).forEach(n=>{n._lifeCycleHooks[o].forEach(s=>{r.push({hookedCommand:n,callback:s})})}),o==="postAction"&&r.reverse(),r.forEach(n=>{i=this._chainOrCall(i,()=>n.callback(n.hookedCommand,this))}),i}_chainOrCallSubCommandHook(t,o,i){let r=t;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(n=>{r=this._chainOrCall(r,()=>n(this,o))}),r}_parseCommand(t,o){let i=this.parseOptions(o);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),o=i.unknown,this.args=t.concat(o),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),o);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(o),this._dispatchSubcommand(this._defaultCommandName,t,o);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},n=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(n,t,o)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(n))r(),this._processArguments(),this.parent.emit(n,t,o);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,o);this.listenerCount("command:*")?this.emit("command:*",t,o):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(o=>o._name===t||o._aliases.includes(t))}_findOption(t){return this.options.find(o=>o.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(o=>{o.mandatory&&t.getOptionValue(o.attributeName())===void 0&&t.missingMandatoryOptionValue(o)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});t.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=t.find(n=>i.conflictsWith.includes(n.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let o=[],i=[],r=o;function n(m){return m.length>1&&m[0]==="-"}let s=m=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(m)?!this._getCommandAndAncestors().some(p=>p.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,l=null,u=0;for(;u<t.length||l;){let m=l??t[u++];if(l=null,m==="--"){r===i&&r.push(m),r.push(...t.slice(u));break}if(a&&(!n(m)||s(m))){this.emit(`option:${a.name()}`,m);continue}if(a=null,n(m)){let p=this._findOption(m);if(p){if(p.required){let f=t[u++];f===void 0&&this.optionMissingArgument(p),this.emit(`option:${p.name()}`,f)}else if(p.optional){let f=null;u<t.length&&(!n(t[u])||s(t[u]))&&(f=t[u++]),this.emit(`option:${p.name()}`,f)}else this.emit(`option:${p.name()}`);a=p.variadic?p:null;continue}}if(m.length>2&&m[0]==="-"&&m[1]!=="-"){let p=this._findOption(`-${m[1]}`);if(p){p.required||p.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${p.name()}`,m.slice(2)):(this.emit(`option:${p.name()}`),l=`-${m.slice(2)}`);continue}}if(/^--[^=]+=/.test(m)){let p=m.indexOf("="),f=this._findOption(m.slice(0,p));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,m.slice(p+1));continue}}if(r===o&&n(m)&&!(this.commands.length===0&&s(m))&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&o.length===0&&i.length===0){if(this._findCommand(m)){o.push(m),i.push(...t.slice(u));break}else if(this._getHelpCommand()&&m===this._getHelpCommand().name()){o.push(m,...t.slice(u));break}else if(this._defaultCommandName){i.push(m,...t.slice(u));break}}if(this._passThroughOptions){r.push(m,...t.slice(u));break}r.push(m)}return{operands:o,unknown:i}}opts(){if(this._storeOptionsAsProperties){let t={},o=this.options.length;for(let i=0;i<o;i++){let r=this.options[i].attributeName();t[r]=r===this._versionOptionName?this._version:this[r]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,o)=>Object.assign(t,o.opts()),{})}error(t,o){this._outputConfiguration.outputError(`${t}
22
22
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
23
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
24
- `),this.outputHelp({error:!0}));let i=o||{},r=i.exitCode||1,n=i.code||"commander.error";this._exit(r,n,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in Y.env){let o=t.attributeName();(this.getOptionValue(o)===void 0||["default","config","env"].includes(this.getOptionValueSource(o)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,Y.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Vm(this.options),o=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&o(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!o(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"implied")})})}missingArgument(t){let o=`error: missing required argument '${t}'`;this.error(o,{code:"commander.missingArgument"})}optionMissingArgument(t){let o=`error: option '${t.flags}' argument missing`;this.error(o,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let o=`error: required option '${t.flags}' not specified`;this.error(o,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,o){let i=s=>{let a=s.attributeName(),l=this.getOptionValue(a),u=this.options.find(p=>p.negate&&a===p.attributeName()),m=this.options.find(p=>!p.negate&&a===p.attributeName());return u&&(u.presetArg===void 0&&l===!1||u.presetArg!==void 0&&l===u.presetArg)?u:m||s},r=s=>{let a=i(s),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},n=`error: ${r(t)} cannot be used with ${r(o)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let o="";if(t.startsWith("--")&&this._showSuggestionAfterError){let r=[],n=this;do{let s=n.createHelp().visibleOptions(n).filter(a=>a.long).map(a=>a.long);r=r.concat(s),n=n.parent}while(n&&!n._enablePositionalOptions);o=an(t,r)}let i=`error: unknown option '${t}'${o}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let o=this.registeredArguments.length,i=o===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${o} argument${i} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],o="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(n=>{r.push(n.name()),n.alias()&&r.push(n.alias())}),o=an(t,r)}let i=`error: unknown command '${t}'${o}`;this.error(i,{code:"commander.unknownCommand"})}version(t,o,i){if(t===void 0)return this._version;this._version=t,o=o||"-V, --version",i=i||"output the version number";let r=this.createOption(o,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${t}
25
- `),this._exit(0,"commander.version",t)}),this}description(t,o){return t===void 0&&o===void 0?this._description:(this._description=t,o&&(this._argsDescription=o),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let o=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(o=this.commands[this.commands.length-1]),t===o._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(t);if(i){let r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${r}'`)}return o._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(o=>this.alias(o)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let o=this.registeredArguments.map(i=>Lm(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?o:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=ot.basename(t,ot.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let o=this.createHelp(),i=this._getOutputContext(t);o.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let r=o.formatHelp(this,o);return i.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(t){t=t||{};let o=!!t.error,i,r,n;return o?(i=a=>this._outputConfiguration.writeErr(a),r=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(i=a=>this._outputConfiguration.writeOut(a),r=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:o,write:a=>(r||(a=this._outputConfiguration.stripColor(a)),i(a)),hasColors:r,helpWidth:n}}outputHelp(t){let o;typeof t=="function"&&(o=t,t=void 0);let i=this._getOutputContext(t),r={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let n=this.helpInformation({error:i.error});if(o&&(n=o(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",r))}helpOption(t,o){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",o??"display help for command"),(t||o)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let o=Number(Y.exitCode??0);o===0&&t&&typeof t!="function"&&t.error&&(o=1),this._exit(o,"commander.help","(outputHelp)")}addHelpText(t,o){let i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.
24
+ `),this.outputHelp({error:!0}));let i=o||{},r=i.exitCode||1,n=i.code||"commander.error";this._exit(r,n,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in Y.env){let o=t.attributeName();(this.getOptionValue(o)===void 0||["default","config","env"].includes(this.getOptionValueSource(o)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,Y.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Zm(this.options),o=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&o(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!o(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"implied")})})}missingArgument(t){let o=`error: missing required argument '${t}'`;this.error(o,{code:"commander.missingArgument"})}optionMissingArgument(t){let o=`error: option '${t.flags}' argument missing`;this.error(o,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let o=`error: required option '${t.flags}' not specified`;this.error(o,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,o){let i=s=>{let a=s.attributeName(),l=this.getOptionValue(a),u=this.options.find(p=>p.negate&&a===p.attributeName()),m=this.options.find(p=>!p.negate&&a===p.attributeName());return u&&(u.presetArg===void 0&&l===!1||u.presetArg!==void 0&&l===u.presetArg)?u:m||s},r=s=>{let a=i(s),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},n=`error: ${r(t)} cannot be used with ${r(o)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let o="";if(t.startsWith("--")&&this._showSuggestionAfterError){let r=[],n=this;do{let s=n.createHelp().visibleOptions(n).filter(a=>a.long).map(a=>a.long);r=r.concat(s),n=n.parent}while(n&&!n._enablePositionalOptions);o=ln(t,r)}let i=`error: unknown option '${t}'${o}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let o=this.registeredArguments.length,i=o===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${o} argument${i} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],o="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(n=>{r.push(n.name()),n.alias()&&r.push(n.alias())}),o=ln(t,r)}let i=`error: unknown command '${t}'${o}`;this.error(i,{code:"commander.unknownCommand"})}version(t,o,i){if(t===void 0)return this._version;this._version=t,o=o||"-V, --version",i=i||"output the version number";let r=this.createOption(o,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${t}
25
+ `),this._exit(0,"commander.version",t)}),this}description(t,o){return t===void 0&&o===void 0?this._description:(this._description=t,o&&(this._argsDescription=o),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let o=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(o=this.commands[this.commands.length-1]),t===o._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(t);if(i){let r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${r}'`)}return o._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(o=>this.alias(o)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let o=this.registeredArguments.map(i=>zm(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?o:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=ot.basename(t,ot.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let o=this.createHelp(),i=this._getOutputContext(t);o.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let r=o.formatHelp(this,o);return i.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(t){t=t||{};let o=!!t.error,i,r,n;return o?(i=a=>this._outputConfiguration.writeErr(a),r=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(i=a=>this._outputConfiguration.writeOut(a),r=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:o,write:a=>(r||(a=this._outputConfiguration.stripColor(a)),i(a)),hasColors:r,helpWidth:n}}outputHelp(t){let o;typeof t=="function"&&(o=t,t=void 0);let i=this._getOutputContext(t),r={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let n=this.helpInformation({error:i.error});if(o&&(n=o(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",r))}helpOption(t,o){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",o??"display help for command"),(t||o)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let o=Number(Y.exitCode??0);o===0&&t&&typeof t!="function"&&t.error&&(o=1),this._exit(o,"commander.help","(outputHelp)")}addHelpText(t,o){let i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.
26
26
  Expecting one of '${i.join("', '")}'`);let r=`${t}Help`;return this.on(r,n=>{let s;typeof o=="function"?s=o({error:n.error,command:n.command}):s=o,s&&n.write(`${s}
27
- `)}),this}_outputHelpIfRequested(t){let o=this._getHelpOption();o&&t.find(r=>o.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function ln(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let o,i="127.0.0.1",r="9229",n;return(n=t.match(/^(--inspect(-brk)?)$/))!==null?o=n[1]:(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(o=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(o=n[1],i=n[3],r=n[4]),o&&r!=="0"?`${o}=${i}:${parseInt(r)+1}`:t})}function qi(){if(Y.env.NO_COLOR||Y.env.FORCE_COLOR==="0"||Y.env.FORCE_COLOR==="false")return!1;if(Y.env.FORCE_COLOR||Y.env.CLICOLOR_FORCE!==void 0)return!0}Li.Command=Mi;Li.useColor=qi});var pn=Re(He=>{var{Argument:dn}=ko(),{Command:Wi}=cn(),{CommanderError:zm,InvalidArgumentError:un}=ro(),{Help:Ym}=ji(),{Option:mn}=Hi();He.program=new Wi;He.createCommand=e=>new Wi(e);He.createOption=(e,t)=>new mn(e,t);He.createArgument=(e,t)=>new dn(e,t);He.Command=Wi;He.Option=mn;He.Argument=dn;He.Help=Ym;He.CommanderError=zm;He.InvalidArgumentError=un;He.InvalidOptionArgumentError=un});var hn=Re((Be,fn)=>{var We=pn();Be=fn.exports={};Be.program=new We.Command;Be.Argument=We.Argument;Be.Command=We.Command;Be.CommanderError=We.CommanderError;Be.Help=We.Help;Be.InvalidArgumentError=We.InvalidArgumentError;Be.InvalidOptionArgumentError=We.InvalidArgumentError;Be.Option=We.Option;Be.createCommand=e=>new We.Command(e);Be.createOption=(e,t)=>new We.Option(e,t);Be.createArgument=(e,t)=>new We.Argument(e,t)});var Je=Re((mA,Ji)=>{var Ro=process||{},bn=Ro.argv||[],Fo=Ro.env||{},Xm=!(Fo.NO_COLOR||bn.includes("--no-color"))&&(!!Fo.FORCE_COLOR||bn.includes("--color")||Ro.platform==="win32"||(Ro.stdout||{}).isTTY&&Fo.TERM!=="dumb"||!!Fo.CI),Zm=(e,t,o=e)=>i=>{let r=""+i,n=r.indexOf(t,e.length);return~n?e+ep(r,t,o,n)+t:e+r+t},ep=(e,t,o,i)=>{let r="",n=0;do r+=e.substring(n,i)+o,n=i+t.length,i=e.indexOf(t,n);while(~i);return r+e.substring(n)},yn=(e=Xm)=>{let t=e?Zm:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Ji.exports=yn();Ji.exports.createColors=yn});var Zi=Re((xA,En)=>{"use strict";var Xi={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let o="";return e<0?o+=`\x1B[${-e}D`:e>0&&(o+=`\x1B[${e}C`),t<0?o+=`\x1B[${-t}A`:t>0&&(o+=`\x1B[${t}B`),o},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Ap={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},bp={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let o=0;o<e;o++)t+=this.line+(o<e-1?Xi.up():"");return e&&(t+=Xi.left),t}};En.exports={cursor:Xi,scroll:Ap,erase:bp,beep:"\x07"}});var ir,Xn=be(()=>{ir={name:"resend-cli",version:"2.22.0-preview-inboxes.3",description:"The official CLI for Resend",license:"MIT",repository:{type:"git",url:"https://github.com/resend/resend-cli"},homepage:"https://github.com/resend/resend-cli#readme",keywords:["cli","resend","email","api","tanstack-intent"],engines:{node:">=22"},packageManager:"pnpm@11.8.0",files:["dist/cli.cjs","skills/"],type:"module",bin:{resend:"./dist/cli.cjs"},scripts:{dev:"tsx src/cli.ts","dev:watch":"tsx --watch src/cli.ts",build:"node scripts/build.mjs","build:bin":"pnpm build && pkg dist/cli.cjs --config package.json --compress Brotli --target node24 --output dist/resend",lint:"biome check .","lint:fix":"biome check --write .",typecheck:"tsc --noEmit",test:"vitest run","test:e2e":"vitest run --config vitest.config.e2e.ts",prepack:"pnpm install && pnpm build && node scripts/verify-bundle.mjs"},dependencies:{"@clack/prompts":"1.4.0","@commander-js/extra-typings":"14.0.0",commander:"14.0.3",esbuild:"0.28.1","esbuild-wasm":"0.28.0",picocolors:"1.1.1",resend:"6.32.1-preview-inboxes.1"},pkg:{scripts:["node_modules/esbuild-wasm/bin/esbuild","node_modules/esbuild-wasm/wasm_exec.js","node_modules/esbuild-wasm/wasm_exec_node.js"],assets:["node_modules/esbuild-wasm/esbuild.wasm"]},devDependencies:{"@biomejs/biome":"2.4.11","@types/node":"24.12.4","@yao-pkg/pkg":"6.20.0",tsx:"4.22.4",typescript:"5.9.3",vitest:"4.1.9"}}});var se,Zn,Kt=be(()=>{"use strict";Xn();se=ir.version,Zn=ir.name});var us=Re(Pe=>{"use strict";var lf=Pe&&Pe.__extends||(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var n in r)r.hasOwnProperty(n)&&(i[n]=r[n])},e(t,o)};return function(t,o){e(t,o);function i(){this.constructor=t}t.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}})();Object.defineProperty(Pe,"__esModule",{value:!0});var de=256,pr=(function(){function e(t){t===void 0&&(t="="),this._paddingCharacter=t}return e.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(t*8+5)/6|0},e.prototype.encode=function(t){for(var o="",i=0;i<t.length-2;i+=3){var r=t[i]<<16|t[i+1]<<8|t[i+2];o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),o+=this._encodeByte(r>>>6&63),o+=this._encodeByte(r>>>0&63)}var n=t.length-i;if(n>0){var r=t[i]<<16|(n===2?t[i+1]<<8:0);o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),n===2?o+=this._encodeByte(r>>>6&63):o+=this._paddingCharacter||"",o+=this._paddingCharacter||""}return o},e.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(t*6+7)/8|0},e.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},e.prototype.decode=function(t){if(t.length===0)return new Uint8Array(0);for(var o=this._getPaddingLength(t),i=t.length-o,r=new Uint8Array(this.maxDecodedLength(i)),n=0,s=0,a=0,l=0,u=0,m=0,p=0;s<i-4;s+=4)l=this._decodeChar(t.charCodeAt(s+0)),u=this._decodeChar(t.charCodeAt(s+1)),m=this._decodeChar(t.charCodeAt(s+2)),p=this._decodeChar(t.charCodeAt(s+3)),r[n++]=l<<2|u>>>4,r[n++]=u<<4|m>>>2,r[n++]=m<<6|p,a|=l&de,a|=u&de,a|=m&de,a|=p&de;if(s<i-1&&(l=this._decodeChar(t.charCodeAt(s)),u=this._decodeChar(t.charCodeAt(s+1)),r[n++]=l<<2|u>>>4,a|=l&de,a|=u&de),s<i-2&&(m=this._decodeChar(t.charCodeAt(s+2)),r[n++]=u<<4|m>>>2,a|=m&de),s<i-3&&(p=this._decodeChar(t.charCodeAt(s+3)),r[n++]=m<<6|p,a|=p&de),a!==0)throw new Error("Base64Coder: incorrect characters for decoding");return r},e.prototype._encodeByte=function(t){var o=t;return o+=65,o+=25-t>>>8&6,o+=51-t>>>8&-75,o+=61-t>>>8&-15,o+=62-t>>>8&3,String.fromCharCode(o)},e.prototype._decodeChar=function(t){var o=de;return o+=(42-t&t-44)>>>8&-de+t-43+62,o+=(46-t&t-48)>>>8&-de+t-47+63,o+=(47-t&t-58)>>>8&-de+t-48+52,o+=(64-t&t-91)>>>8&-de+t-65+0,o+=(96-t&t-123)>>>8&-de+t-97+26,o},e.prototype._getPaddingLength=function(t){var o=0;if(this._paddingCharacter){for(var i=t.length-1;i>=0&&t[i]===this._paddingCharacter;i--)o++;if(t.length<4||o>2)throw new Error("Base64Coder: incorrect padding")}return o},e})();Pe.Coder=pr;var po=new pr;function cf(e){return po.encode(e)}Pe.encode=cf;function df(e){return po.decode(e)}Pe.decode=df;var cs=(function(e){lf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(o){var i=o;return i+=65,i+=25-o>>>8&6,i+=51-o>>>8&-75,i+=61-o>>>8&-13,i+=62-o>>>8&49,String.fromCharCode(i)},t.prototype._decodeChar=function(o){var i=de;return i+=(44-o&o-46)>>>8&-de+o-45+62,i+=(94-o&o-96)>>>8&-de+o-95+63,i+=(47-o&o-58)>>>8&-de+o-48+52,i+=(64-o&o-91)>>>8&-de+o-65+0,i+=(96-o&o-123)>>>8&-de+o-97+26,i},t})(pr);Pe.URLSafeCoder=cs;var ds=new cs;function uf(e){return ds.encode(e)}Pe.encodeURLSafe=uf;function mf(e){return ds.decode(e)}Pe.decodeURLSafe=mf;Pe.encodedLength=function(e){return po.encodedLength(e)};Pe.maxDecodedLength=function(e){return po.maxDecodedLength(e)};Pe.decodedLength=function(e){return po.decodedLength(e)}});var ps=Re((ms,Mo)=>{(function(e,t){var o={};t(o);var i=o.default;for(var r in o)i[r]=o[r];typeof Mo=="object"&&typeof Mo.exports=="object"?Mo.exports=i:typeof define=="function"&&define.amd?define(function(){return i}):e.sha256=i})(ms,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(p,f,y,A,b){for(var x,v,U,K,k,I,G,Q,$,L,ve,re,Ut;b>=64;){for(x=f[0],v=f[1],U=f[2],K=f[3],k=f[4],I=f[5],G=f[6],Q=f[7],L=0;L<16;L++)ve=A+L*4,p[L]=(y[ve]&255)<<24|(y[ve+1]&255)<<16|(y[ve+2]&255)<<8|y[ve+3]&255;for(L=16;L<64;L++)$=p[L-2],re=($>>>17|$<<15)^($>>>19|$<<13)^$>>>10,$=p[L-15],Ut=($>>>7|$<<25)^($>>>18|$<<14)^$>>>3,p[L]=(re+p[L-7]|0)+(Ut+p[L-16]|0);for(L=0;L<64;L++)re=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&I^~k&G)|0)+(Q+(t[L]+p[L]|0)|0)|0,Ut=((x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10))+(x&v^x&U^v&U)|0,Q=G,G=I,I=k,k=K+re|0,K=U,U=v,v=x,x=re+Ut|0;f[0]+=x,f[1]+=v,f[2]+=U,f[3]+=K,f[4]+=k,f[5]+=I,f[6]+=G,f[7]+=Q,A+=64,b-=64}return A}var i=(function(){function p(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return p.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},p.prototype.clean=function(){for(var f=0;f<this.buffer.length;f++)this.buffer[f]=0;for(var f=0;f<this.temp.length;f++)this.temp[f]=0;this.reset()},p.prototype.update=function(f,y){if(y===void 0&&(y=f.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var A=0;if(this.bytesHashed+=y,this.bufferLength>0){for(;this.bufferLength<64&&y>0;)this.buffer[this.bufferLength++]=f[A++],y--;this.bufferLength===64&&(o(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(y>=64&&(A=o(this.temp,this.state,f,A,y),y%=64);y>0;)this.buffer[this.bufferLength++]=f[A++],y--;return this},p.prototype.finish=function(f){if(!this.finished){var y=this.bytesHashed,A=this.bufferLength,b=y/536870912|0,x=y<<3,v=y%64<56?64:128;this.buffer[A]=128;for(var U=A+1;U<v-8;U++)this.buffer[U]=0;this.buffer[v-8]=b>>>24&255,this.buffer[v-7]=b>>>16&255,this.buffer[v-6]=b>>>8&255,this.buffer[v-5]=b>>>0&255,this.buffer[v-4]=x>>>24&255,this.buffer[v-3]=x>>>16&255,this.buffer[v-2]=x>>>8&255,this.buffer[v-1]=x>>>0&255,o(this.temp,this.state,this.buffer,0,v),this.finished=!0}for(var U=0;U<8;U++)f[U*4+0]=this.state[U]>>>24&255,f[U*4+1]=this.state[U]>>>16&255,f[U*4+2]=this.state[U]>>>8&255,f[U*4+3]=this.state[U]>>>0&255;return this},p.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},p.prototype._saveState=function(f){for(var y=0;y<this.state.length;y++)f[y]=this.state[y]},p.prototype._restoreState=function(f,y){for(var A=0;A<this.state.length;A++)this.state[A]=f[A];this.bytesHashed=y,this.finished=!1,this.bufferLength=0},p})();e.Hash=i;var r=(function(){function p(f){this.inner=new i,this.outer=new i,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var y=new Uint8Array(this.blockSize);if(f.length>this.blockSize)new i().update(f).finish(y).clean();else for(var A=0;A<f.length;A++)y[A]=f[A];for(var A=0;A<y.length;A++)y[A]^=54;this.inner.update(y);for(var A=0;A<y.length;A++)y[A]^=106;this.outer.update(y),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var A=0;A<y.length;A++)y[A]=0}return p.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},p.prototype.clean=function(){for(var f=0;f<this.istate.length;f++)this.ostate[f]=this.istate[f]=0;this.inner.clean(),this.outer.clean()},p.prototype.update=function(f){return this.inner.update(f),this},p.prototype.finish=function(f){return this.outer.finished?this.outer.finish(f):(this.inner.finish(f),this.outer.update(f,this.digestLength).finish(f)),this},p.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},p})();e.HMAC=r;function n(p){var f=new i().update(p),y=f.digest();return f.clean(),y}e.hash=n,e.default=n;function s(p,f){var y=new r(p).update(f),A=y.digest();return y.clean(),A}e.hmac=s;function a(p,f,y,A){var b=A[0];if(b===0)throw new Error("hkdf: cannot expand more");f.reset(),b>1&&f.update(p),y&&f.update(y),f.update(A),f.finish(p),A[0]++}var l=new Uint8Array(e.digestLength);function u(p,f,y,A){f===void 0&&(f=l),A===void 0&&(A=32);for(var b=new Uint8Array([1]),x=s(f,p),v=new r(x),U=new Uint8Array(v.digestLength),K=U.length,k=new Uint8Array(A),I=0;I<A;I++)K===U.length&&(a(U,v,y,b),K=0),k[I]=U[K++];return v.clean(),U.fill(0),b.fill(0),k}e.hkdf=u;function m(p,f,y,A){for(var b=new r(p),x=b.digestLength,v=new Uint8Array(4),U=new Uint8Array(x),K=new Uint8Array(x),k=new Uint8Array(A),I=0;I*x<A;I++){var G=I+1;v[0]=G>>>24&255,v[1]=G>>>16&255,v[2]=G>>>8&255,v[3]=G>>>0&255,b.reset(),b.update(f),b.update(v),b.finish(K);for(var Q=0;Q<x;Q++)U[Q]=K[Q];for(var Q=2;Q<=y;Q++){b.reset(),b.update(K).finish(K);for(var $=0;$<x;$++)U[$]^=K[$]}for(var Q=0;Q<x&&I*x+Q<A;Q++)k[I*x+Q]=U[Q]}for(var I=0;I<x;I++)U[I]=K[I]=0;for(var I=0;I<4;I++)v[I]=0;return b.clean(),k}e.pbkdf2=m})});var hs=Re(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.timingSafeEqual=pf;function fs(e,t=""){if(!e)throw new Error(t)}function pf(e,t){if(e.byteLength!==t.byteLength)return!1;e instanceof DataView||(e=new DataView(ArrayBuffer.isView(e)?e.buffer:e)),t instanceof DataView||(t=new DataView(ArrayBuffer.isView(t)?t.buffer:t)),fs(e instanceof DataView),fs(t instanceof DataView);let o=e.byteLength,i=0,r=-1;for(;++r<o;)i|=e.getUint8(r)^t.getUint8(r);return i===0}});var bs=Re(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.Webhook=Pt.WebhookVerificationError=void 0;var gs=us(),ff=ps(),hf=hs(),As=300,hr=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="ExtendableError",this.stack=new Error(t).stack}},pt=class e extends hr{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="WebhookVerificationError"}};Pt.WebhookVerificationError=pt;var qo=class e{constructor(t,o){if(o?.format==="raw")t instanceof Uint8Array?this.key=t:this.key=Uint8Array.from(t,i=>i.charCodeAt(0));else{if(typeof t!="string")throw new Error("Expected secret to be of type string");t.startsWith(e.prefix)&&(t=t.substring(e.prefix.length)),this.key=gs.decode(t)}if(this.key.length===0)throw new Error("Secret can't be empty.")}verify(t,o,i){var r;let n=(r=i?.jsonParse)!==null&&r!==void 0?r:!0,s={};for(let b of Object.keys(o))s[b.toLowerCase()]=o[b];let a=s["webhook-id"],l=s["webhook-signature"],u=s["webhook-timestamp"];if(!l||!a||!u)throw new pt("Missing required headers");let m=this.verifyTimestamp(u),f=this.sign(a,m,t).split(",")[1],y=l.split(" "),A=new globalThis.TextEncoder;for(let b of y){let[x,v]=b.split(",");if(x==="v1"&&(0,hf.timingSafeEqual)(A.encode(v),A.encode(f))){let U=t.toString();return U===""?void 0:n?JSON.parse(U):void 0}}throw new pt("No matching signature found")}sign(t,o,i){if(typeof i!="string")if(i.constructor.name==="Buffer")i=i.toString();else throw new Error("Expected payload to be of type string or Buffer.");let r=new TextEncoder,n=Math.floor(o.getTime()/1e3),s=r.encode(`${t}.${n}.${i}`);return`v1,${gs.encode(ff.hmac(this.key,s))}`}verifyTimestamp(t){let o=Math.floor(Date.now()/1e3),i=parseInt(t,10);if(Number.isNaN(i))throw new pt("Invalid Signature Headers");if(o-i>As)throw new pt("Message timestamp too old");if(i>o+As)throw new pt("Message timestamp too new");return new Date(i*1e3)}};Pt.Webhook=qo;qo.prefix="whsec_"});var Wo,Os=be(()=>{"use strict";Wo=class extends Error{constructor(t){super(`Credentials file is corrupted or contains invalid JSON: ${t}
27
+ `)}),this}_outputHelpIfRequested(t){let o=this._getHelpOption();o&&t.find(r=>o.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function dn(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let o,i="127.0.0.1",r="9229",n;return(n=t.match(/^(--inspect(-brk)?)$/))!==null?o=n[1]:(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(o=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(o=n[1],i=n[3],r=n[4]),o&&r!=="0"?`${o}=${i}:${parseInt(r)+1}`:t})}function Li(){if(Y.env.NO_COLOR||Y.env.FORCE_COLOR==="0"||Y.env.FORCE_COLOR==="false")return!1;if(Y.env.FORCE_COLOR||Y.env.CLICOLOR_FORCE!==void 0)return!0}Wi.Command=qi;Wi.useColor=Li});var fn=Re(He=>{var{Argument:un}=ko(),{Command:Ji}=cn(),{CommanderError:ep,InvalidArgumentError:mn}=ro(),{Help:tp}=Pi(),{Option:pn}=Qi();He.program=new Ji;He.createCommand=e=>new Ji(e);He.createOption=(e,t)=>new pn(e,t);He.createArgument=(e,t)=>new un(e,t);He.Command=Ji;He.Option=pn;He.Argument=un;He.Help=tp;He.CommanderError=ep;He.InvalidArgumentError=mn;He.InvalidOptionArgumentError=mn});var gn=Re((Be,hn)=>{var We=fn();Be=hn.exports={};Be.program=new We.Command;Be.Argument=We.Argument;Be.Command=We.Command;Be.CommanderError=We.CommanderError;Be.Help=We.Help;Be.InvalidArgumentError=We.InvalidArgumentError;Be.InvalidOptionArgumentError=We.InvalidArgumentError;Be.Option=We.Option;Be.createCommand=e=>new We.Command(e);Be.createOption=(e,t)=>new We.Option(e,t);Be.createArgument=(e,t)=>new We.Argument(e,t)});var Je=Re((AA,Vi)=>{var Ro=process||{},yn=Ro.argv||[],Fo=Ro.env||{},op=!(Fo.NO_COLOR||yn.includes("--no-color"))&&(!!Fo.FORCE_COLOR||yn.includes("--color")||Ro.platform==="win32"||(Ro.stdout||{}).isTTY&&Fo.TERM!=="dumb"||!!Fo.CI),ip=(e,t,o=e)=>i=>{let r=""+i,n=r.indexOf(t,e.length);return~n?e+rp(r,t,o,n)+t:e+r+t},rp=(e,t,o,i)=>{let r="",n=0;do r+=e.substring(n,i)+o,n=i+t.length,i=e.indexOf(t,n);while(~i);return r+e.substring(n)},Cn=(e=op)=>{let t=e?ip:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Vi.exports=Cn();Vi.exports.createColors=Cn});var er=Re((KA,Bn)=>{"use strict";var Zi={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let o="";return e<0?o+=`\x1B[${-e}D`:e>0&&(o+=`\x1B[${e}C`),t<0?o+=`\x1B[${-t}A`:t>0&&(o+=`\x1B[${t}B`),o},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},xp={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},wp={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let o=0;o<e;o++)t+=this.line+(o<e-1?Zi.up():"");return e&&(t+=Zi.left),t}};Bn.exports={cursor:Zi,scroll:xp,erase:wp,beep:"\x07"}});var rr,Zn=be(()=>{rr={name:"resend-cli",version:"2.22.0-preview-inboxes.5",description:"The official CLI for Resend",license:"MIT",repository:{type:"git",url:"https://github.com/resend/resend-cli"},homepage:"https://github.com/resend/resend-cli#readme",keywords:["cli","resend","email","api","tanstack-intent"],engines:{node:">=22"},packageManager:"pnpm@11.8.0",files:["dist/cli.cjs","skills/"],type:"module",bin:{resend:"./dist/cli.cjs"},scripts:{dev:"tsx src/cli.ts","dev:watch":"tsx --watch src/cli.ts",build:"node scripts/build.mjs","build:bin":"pnpm build && pkg dist/cli.cjs --config package.json --compress Brotli --target node24 --output dist/resend",lint:"biome check .","lint:fix":"biome check --write .",typecheck:"tsc --noEmit",test:"vitest run","test:e2e":"vitest run --config vitest.config.e2e.ts",prepack:"pnpm install && pnpm build && node scripts/verify-bundle.mjs"},dependencies:{"@clack/prompts":"1.4.0","@commander-js/extra-typings":"14.0.0",commander:"14.0.3",esbuild:"0.28.1","esbuild-wasm":"0.28.0",picocolors:"1.1.1",resend:"6.32.1-preview-inboxes.3"},pkg:{scripts:["node_modules/esbuild-wasm/bin/esbuild","node_modules/esbuild-wasm/wasm_exec.js","node_modules/esbuild-wasm/wasm_exec_node.js"],assets:["node_modules/esbuild-wasm/esbuild.wasm"]},devDependencies:{"@biomejs/biome":"2.4.11","@types/node":"24.12.4","@yao-pkg/pkg":"6.20.0",tsx:"4.22.4",typescript:"5.9.3",vitest:"4.1.9"}}});var se,es,Kt=be(()=>{"use strict";Zn();se=rr.version,es=rr.name});var ms=Re(Pe=>{"use strict";var mf=Pe&&Pe.__extends||(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var n in r)r.hasOwnProperty(n)&&(i[n]=r[n])},e(t,o)};return function(t,o){e(t,o);function i(){this.constructor=t}t.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}})();Object.defineProperty(Pe,"__esModule",{value:!0});var ce=256,fr=(function(){function e(t){t===void 0&&(t="="),this._paddingCharacter=t}return e.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(t*8+5)/6|0},e.prototype.encode=function(t){for(var o="",i=0;i<t.length-2;i+=3){var r=t[i]<<16|t[i+1]<<8|t[i+2];o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),o+=this._encodeByte(r>>>6&63),o+=this._encodeByte(r>>>0&63)}var n=t.length-i;if(n>0){var r=t[i]<<16|(n===2?t[i+1]<<8:0);o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),n===2?o+=this._encodeByte(r>>>6&63):o+=this._paddingCharacter||"",o+=this._paddingCharacter||""}return o},e.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(t*6+7)/8|0},e.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},e.prototype.decode=function(t){if(t.length===0)return new Uint8Array(0);for(var o=this._getPaddingLength(t),i=t.length-o,r=new Uint8Array(this.maxDecodedLength(i)),n=0,s=0,a=0,l=0,u=0,m=0,p=0;s<i-4;s+=4)l=this._decodeChar(t.charCodeAt(s+0)),u=this._decodeChar(t.charCodeAt(s+1)),m=this._decodeChar(t.charCodeAt(s+2)),p=this._decodeChar(t.charCodeAt(s+3)),r[n++]=l<<2|u>>>4,r[n++]=u<<4|m>>>2,r[n++]=m<<6|p,a|=l&ce,a|=u&ce,a|=m&ce,a|=p&ce;if(s<i-1&&(l=this._decodeChar(t.charCodeAt(s)),u=this._decodeChar(t.charCodeAt(s+1)),r[n++]=l<<2|u>>>4,a|=l&ce,a|=u&ce),s<i-2&&(m=this._decodeChar(t.charCodeAt(s+2)),r[n++]=u<<4|m>>>2,a|=m&ce),s<i-3&&(p=this._decodeChar(t.charCodeAt(s+3)),r[n++]=m<<6|p,a|=p&ce),a!==0)throw new Error("Base64Coder: incorrect characters for decoding");return r},e.prototype._encodeByte=function(t){var o=t;return o+=65,o+=25-t>>>8&6,o+=51-t>>>8&-75,o+=61-t>>>8&-15,o+=62-t>>>8&3,String.fromCharCode(o)},e.prototype._decodeChar=function(t){var o=ce;return o+=(42-t&t-44)>>>8&-ce+t-43+62,o+=(46-t&t-48)>>>8&-ce+t-47+63,o+=(47-t&t-58)>>>8&-ce+t-48+52,o+=(64-t&t-91)>>>8&-ce+t-65+0,o+=(96-t&t-123)>>>8&-ce+t-97+26,o},e.prototype._getPaddingLength=function(t){var o=0;if(this._paddingCharacter){for(var i=t.length-1;i>=0&&t[i]===this._paddingCharacter;i--)o++;if(t.length<4||o>2)throw new Error("Base64Coder: incorrect padding")}return o},e})();Pe.Coder=fr;var po=new fr;function pf(e){return po.encode(e)}Pe.encode=pf;function ff(e){return po.decode(e)}Pe.decode=ff;var cs=(function(e){mf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(o){var i=o;return i+=65,i+=25-o>>>8&6,i+=51-o>>>8&-75,i+=61-o>>>8&-13,i+=62-o>>>8&49,String.fromCharCode(i)},t.prototype._decodeChar=function(o){var i=ce;return i+=(44-o&o-46)>>>8&-ce+o-45+62,i+=(94-o&o-96)>>>8&-ce+o-95+63,i+=(47-o&o-58)>>>8&-ce+o-48+52,i+=(64-o&o-91)>>>8&-ce+o-65+0,i+=(96-o&o-123)>>>8&-ce+o-97+26,i},t})(fr);Pe.URLSafeCoder=cs;var us=new cs;function hf(e){return us.encode(e)}Pe.encodeURLSafe=hf;function gf(e){return us.decode(e)}Pe.decodeURLSafe=gf;Pe.encodedLength=function(e){return po.encodedLength(e)};Pe.maxDecodedLength=function(e){return po.maxDecodedLength(e)};Pe.decodedLength=function(e){return po.decodedLength(e)}});var fs=Re((ps,Mo)=>{(function(e,t){var o={};t(o);var i=o.default;for(var r in o)i[r]=o[r];typeof Mo=="object"&&typeof Mo.exports=="object"?Mo.exports=i:typeof define=="function"&&define.amd?define(function(){return i}):e.sha256=i})(ps,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(p,f,y,A,b){for(var x,v,U,K,k,j,G,N,$,L,ve,re,Ut;b>=64;){for(x=f[0],v=f[1],U=f[2],K=f[3],k=f[4],j=f[5],G=f[6],N=f[7],L=0;L<16;L++)ve=A+L*4,p[L]=(y[ve]&255)<<24|(y[ve+1]&255)<<16|(y[ve+2]&255)<<8|y[ve+3]&255;for(L=16;L<64;L++)$=p[L-2],re=($>>>17|$<<15)^($>>>19|$<<13)^$>>>10,$=p[L-15],Ut=($>>>7|$<<25)^($>>>18|$<<14)^$>>>3,p[L]=(re+p[L-7]|0)+(Ut+p[L-16]|0);for(L=0;L<64;L++)re=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&j^~k&G)|0)+(N+(t[L]+p[L]|0)|0)|0,Ut=((x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10))+(x&v^x&U^v&U)|0,N=G,G=j,j=k,k=K+re|0,K=U,U=v,v=x,x=re+Ut|0;f[0]+=x,f[1]+=v,f[2]+=U,f[3]+=K,f[4]+=k,f[5]+=j,f[6]+=G,f[7]+=N,A+=64,b-=64}return A}var i=(function(){function p(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return p.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},p.prototype.clean=function(){for(var f=0;f<this.buffer.length;f++)this.buffer[f]=0;for(var f=0;f<this.temp.length;f++)this.temp[f]=0;this.reset()},p.prototype.update=function(f,y){if(y===void 0&&(y=f.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var A=0;if(this.bytesHashed+=y,this.bufferLength>0){for(;this.bufferLength<64&&y>0;)this.buffer[this.bufferLength++]=f[A++],y--;this.bufferLength===64&&(o(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(y>=64&&(A=o(this.temp,this.state,f,A,y),y%=64);y>0;)this.buffer[this.bufferLength++]=f[A++],y--;return this},p.prototype.finish=function(f){if(!this.finished){var y=this.bytesHashed,A=this.bufferLength,b=y/536870912|0,x=y<<3,v=y%64<56?64:128;this.buffer[A]=128;for(var U=A+1;U<v-8;U++)this.buffer[U]=0;this.buffer[v-8]=b>>>24&255,this.buffer[v-7]=b>>>16&255,this.buffer[v-6]=b>>>8&255,this.buffer[v-5]=b>>>0&255,this.buffer[v-4]=x>>>24&255,this.buffer[v-3]=x>>>16&255,this.buffer[v-2]=x>>>8&255,this.buffer[v-1]=x>>>0&255,o(this.temp,this.state,this.buffer,0,v),this.finished=!0}for(var U=0;U<8;U++)f[U*4+0]=this.state[U]>>>24&255,f[U*4+1]=this.state[U]>>>16&255,f[U*4+2]=this.state[U]>>>8&255,f[U*4+3]=this.state[U]>>>0&255;return this},p.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},p.prototype._saveState=function(f){for(var y=0;y<this.state.length;y++)f[y]=this.state[y]},p.prototype._restoreState=function(f,y){for(var A=0;A<this.state.length;A++)this.state[A]=f[A];this.bytesHashed=y,this.finished=!1,this.bufferLength=0},p})();e.Hash=i;var r=(function(){function p(f){this.inner=new i,this.outer=new i,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var y=new Uint8Array(this.blockSize);if(f.length>this.blockSize)new i().update(f).finish(y).clean();else for(var A=0;A<f.length;A++)y[A]=f[A];for(var A=0;A<y.length;A++)y[A]^=54;this.inner.update(y);for(var A=0;A<y.length;A++)y[A]^=106;this.outer.update(y),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var A=0;A<y.length;A++)y[A]=0}return p.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},p.prototype.clean=function(){for(var f=0;f<this.istate.length;f++)this.ostate[f]=this.istate[f]=0;this.inner.clean(),this.outer.clean()},p.prototype.update=function(f){return this.inner.update(f),this},p.prototype.finish=function(f){return this.outer.finished?this.outer.finish(f):(this.inner.finish(f),this.outer.update(f,this.digestLength).finish(f)),this},p.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},p})();e.HMAC=r;function n(p){var f=new i().update(p),y=f.digest();return f.clean(),y}e.hash=n,e.default=n;function s(p,f){var y=new r(p).update(f),A=y.digest();return y.clean(),A}e.hmac=s;function a(p,f,y,A){var b=A[0];if(b===0)throw new Error("hkdf: cannot expand more");f.reset(),b>1&&f.update(p),y&&f.update(y),f.update(A),f.finish(p),A[0]++}var l=new Uint8Array(e.digestLength);function u(p,f,y,A){f===void 0&&(f=l),A===void 0&&(A=32);for(var b=new Uint8Array([1]),x=s(f,p),v=new r(x),U=new Uint8Array(v.digestLength),K=U.length,k=new Uint8Array(A),j=0;j<A;j++)K===U.length&&(a(U,v,y,b),K=0),k[j]=U[K++];return v.clean(),U.fill(0),b.fill(0),k}e.hkdf=u;function m(p,f,y,A){for(var b=new r(p),x=b.digestLength,v=new Uint8Array(4),U=new Uint8Array(x),K=new Uint8Array(x),k=new Uint8Array(A),j=0;j*x<A;j++){var G=j+1;v[0]=G>>>24&255,v[1]=G>>>16&255,v[2]=G>>>8&255,v[3]=G>>>0&255,b.reset(),b.update(f),b.update(v),b.finish(K);for(var N=0;N<x;N++)U[N]=K[N];for(var N=2;N<=y;N++){b.reset(),b.update(K).finish(K);for(var $=0;$<x;$++)U[$]^=K[$]}for(var N=0;N<x&&j*x+N<A;N++)k[j*x+N]=U[N]}for(var j=0;j<x;j++)U[j]=K[j]=0;for(var j=0;j<4;j++)v[j]=0;return b.clean(),k}e.pbkdf2=m})});var gs=Re(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.timingSafeEqual=Af;function hs(e,t=""){if(!e)throw new Error(t)}function Af(e,t){if(e.byteLength!==t.byteLength)return!1;e instanceof DataView||(e=new DataView(ArrayBuffer.isView(e)?e.buffer:e)),t instanceof DataView||(t=new DataView(ArrayBuffer.isView(t)?t.buffer:t)),hs(e instanceof DataView),hs(t instanceof DataView);let o=e.byteLength,i=0,r=-1;for(;++r<o;)i|=e.getUint8(r)^t.getUint8(r);return i===0}});var ys=Re(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.Webhook=Pt.WebhookVerificationError=void 0;var As=ms(),bf=fs(),yf=gs(),bs=300,gr=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="ExtendableError",this.stack=new Error(t).stack}},pt=class e extends gr{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="WebhookVerificationError"}};Pt.WebhookVerificationError=pt;var qo=class e{constructor(t,o){if(o?.format==="raw")t instanceof Uint8Array?this.key=t:this.key=Uint8Array.from(t,i=>i.charCodeAt(0));else{if(typeof t!="string")throw new Error("Expected secret to be of type string");t.startsWith(e.prefix)&&(t=t.substring(e.prefix.length)),this.key=As.decode(t)}if(this.key.length===0)throw new Error("Secret can't be empty.")}verify(t,o,i){var r;let n=(r=i?.jsonParse)!==null&&r!==void 0?r:!0,s={};for(let b of Object.keys(o))s[b.toLowerCase()]=o[b];let a=s["webhook-id"],l=s["webhook-signature"],u=s["webhook-timestamp"];if(!l||!a||!u)throw new pt("Missing required headers");let m=this.verifyTimestamp(u),f=this.sign(a,m,t).split(",")[1],y=l.split(" "),A=new globalThis.TextEncoder;for(let b of y){let[x,v]=b.split(",");if(x==="v1"&&(0,yf.timingSafeEqual)(A.encode(v),A.encode(f))){let U=t.toString();return U===""?void 0:n?JSON.parse(U):void 0}}throw new pt("No matching signature found")}sign(t,o,i){if(typeof i!="string")if(i.constructor.name==="Buffer")i=i.toString();else throw new Error("Expected payload to be of type string or Buffer.");let r=new TextEncoder,n=Math.floor(o.getTime()/1e3),s=r.encode(`${t}.${n}.${i}`);return`v1,${As.encode(bf.hmac(this.key,s))}`}verifyTimestamp(t){let o=Math.floor(Date.now()/1e3),i=parseInt(t,10);if(Number.isNaN(i))throw new pt("Invalid Signature Headers");if(o-i>bs)throw new pt("Message timestamp too old");if(i>o+bs)throw new pt("Message timestamp too new");return new Date(i*1e3)}};Pt.Webhook=qo;qo.prefix="whsec_"});var Jo,Es=be(()=>{"use strict";Jo=class extends Error{constructor(t){super(`Credentials file is corrupted or contains invalid JSON: ${t}
28
28
  The file has been preserved for manual inspection.
29
- To fix: either repair the JSON manually, or delete the file and run: resend login`),this.name="CorruptedCredentialsError"}}});var Ar={};io(Ar,{FileBackend:()=>gr});var gr,br=be(()=>{"use strict";ye();gr=class{name="plaintext file";isSecure=!1;async get(t,o){let i=Ke();if(!i)return null;let r=i.profiles[o];return(r?.type==="api_key"?r.api_key:null)??null}async set(t,o,i){yr(i,o)}async delete(t,o){try{return Es(o),!0}catch{return!1}}async isAvailable(){return!0}}});var Is={};io(Is,{MacOSBackend:()=>xr});function Cr(e,t){return new Promise(o=>{(0,Bs.execFile)(e,t,{timeout:5e3},(i,r,n)=>{let s=i&&"code"in i?i.code:0;o({stdout:r??"",stderr:n??"",code:s})})})}var Bs,xr,js=be(()=>{"use strict";Bs=require("node:child_process");xr=class{name="macOS Keychain";isSecure=!0;async get(t,o){let{stdout:i,stderr:r,code:n}=await Cr("/usr/bin/security",["find-generic-password","-s",t,"-a",o,"-w"]);if(n===44)return null;if(n!==0)throw new Error(`Failed to read from macOS Keychain (exit code ${n}): ${r.trim()}`);return i.trim()||null}async set(t,o,i){let{code:r,stderr:n}=await Cr("/usr/bin/security",["add-generic-password","-s",t,"-a",o,"-w",i,"-U"]);if(r!==0)throw new Error(`Failed to store credential in macOS Keychain: ${n.trim()}`)}async delete(t,o){let{code:i}=await Cr("/usr/bin/security",["delete-generic-password","-s",t,"-a",o]);return i===0}async isAvailable(){return process.platform==="darwin"}}});var Ps={};io(Ps,{LinuxBackend:()=>wr});function Jo(e,t,o){return new Promise(i=>{(0,Vo.execFile)(e,t,{timeout:o?.timeout??5e3},(r,n,s)=>{let a=r&&"code"in r?r.code:0;i({stdout:n??"",stderr:s??"",code:a})})})}function ah(e,t,o){return new Promise(i=>{let r=(0,Vo.spawn)(e,t,{stdio:["pipe","ignore","pipe"],timeout:5e3}),n="";r.stderr?.on("data",s=>{n+=s.toString()}),r.on("close",s=>{i({code:s,stderr:n})}),r.on("error",()=>{i({code:1,stderr:"Failed to spawn process"})}),r.stdin?.on("error",()=>{}),r.stdin?.write(o),r.stdin?.end()})}var Vo,wr,$s=be(()=>{"use strict";Vo=require("node:child_process");wr=class{name="Secret Service (libsecret)";isSecure=!0;async get(t,o){let{stdout:i,code:r}=await Jo("secret-tool",["lookup","service",t,"account",o]);return r!==0||!i.trim()?null:i.trim()}async set(t,o,i){let{code:r,stderr:n}=await ah("secret-tool",["store",`--label=Resend CLI (${o})`,"service",t,"account",o],i);if(r!==0)throw new Error(`Failed to store credential in Secret Service: ${n.trim()}`)}async delete(t,o){let{code:i}=await Jo("secret-tool",["clear","service",t,"account",o]);return i===0}async isAvailable(){if(process.platform!=="linux"||(await Jo("which",["secret-tool"])).code!==0)return!1;let o=await Jo("secret-tool",["lookup","service","__resend_cli_probe__"],{timeout:3e3});return o.code===0||o.code===1}}});var Gs={};io(Gs,{WindowsBackend:()=>vr});function zo(e){return new Promise(t=>{(0,Yo.execFile)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],{timeout:1e4},(o,i,r)=>{let n=o&&"code"in o?o.code:0;t({stdout:i??"",stderr:r??"",code:n})})})}function lh(e,t){return new Promise(o=>{let i=(0,Yo.spawn)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],{stdio:["pipe","pipe","pipe"],timeout:1e4}),r="",n="";i.stdout?.on("data",s=>{r+=s.toString()}),i.stderr?.on("data",s=>{n+=s.toString()}),i.on("close",s=>{o({stdout:r,stderr:n,code:s})}),i.on("error",()=>{o({stdout:"",stderr:"Failed to spawn process",code:1})}),i.stdin?.on("error",()=>{}),i.stdin?.write(t),i.stdin?.end()})}function ft(e){return e.replace(/'/g,"''")}var Yo,ho,vr,Hs=be(()=>{"use strict";Yo=require("node:child_process");ho=`
29
+ To fix: either repair the JSON manually, or delete the file and run: resend login`),this.name="CorruptedCredentialsError"}}});var br={};io(br,{FileBackend:()=>Ar});var Ar,yr=be(()=>{"use strict";ye();Ar=class{name="plaintext file";isSecure=!1;async get(t,o){let i=Ke();if(!i)return null;let r=i.profiles[o];return(r?.type==="api_key"?r.api_key:null)??null}async set(t,o,i){Cr(i,o)}async delete(t,o){try{return Bs(o),!0}catch{return!1}}async isAvailable(){return!0}}});var js={};io(js,{MacOSBackend:()=>wr});function xr(e,t){return new Promise(o=>{(0,Is.execFile)(e,t,{timeout:5e3},(i,r,n)=>{let s=i&&"code"in i?i.code:0;o({stdout:r??"",stderr:n??"",code:s})})})}var Is,wr,Ps=be(()=>{"use strict";Is=require("node:child_process");wr=class{name="macOS Keychain";isSecure=!0;async get(t,o){let{stdout:i,stderr:r,code:n}=await xr("/usr/bin/security",["find-generic-password","-s",t,"-a",o,"-w"]);if(n===44)return null;if(n!==0)throw new Error(`Failed to read from macOS Keychain (exit code ${n}): ${r.trim()}`);return i.trim()||null}async set(t,o,i){let{code:r,stderr:n}=await xr("/usr/bin/security",["add-generic-password","-s",t,"-a",o,"-w",i,"-U"]);if(r!==0)throw new Error(`Failed to store credential in macOS Keychain: ${n.trim()}`)}async delete(t,o){let{code:i}=await xr("/usr/bin/security",["delete-generic-password","-s",t,"-a",o]);return i===0}async isAvailable(){return process.platform==="darwin"}}});var $s={};io($s,{LinuxBackend:()=>vr});function Vo(e,t,o){return new Promise(i=>{(0,zo.execFile)(e,t,{timeout:o?.timeout??5e3},(r,n,s)=>{let a=r&&"code"in r?r.code:0;i({stdout:n??"",stderr:s??"",code:a})})})}function mh(e,t,o){return new Promise(i=>{let r=(0,zo.spawn)(e,t,{stdio:["pipe","ignore","pipe"],timeout:5e3}),n="";r.stderr?.on("data",s=>{n+=s.toString()}),r.on("close",s=>{i({code:s,stderr:n})}),r.on("error",()=>{i({code:1,stderr:"Failed to spawn process"})}),r.stdin?.on("error",()=>{}),r.stdin?.write(o),r.stdin?.end()})}var zo,vr,Gs=be(()=>{"use strict";zo=require("node:child_process");vr=class{name="Secret Service (libsecret)";isSecure=!0;async get(t,o){let{stdout:i,code:r}=await Vo("secret-tool",["lookup","service",t,"account",o]);return r!==0||!i.trim()?null:i.trim()}async set(t,o,i){let{code:r,stderr:n}=await mh("secret-tool",["store",`--label=Resend CLI (${o})`,"service",t,"account",o],i);if(r!==0)throw new Error(`Failed to store credential in Secret Service: ${n.trim()}`)}async delete(t,o){let{code:i}=await Vo("secret-tool",["clear","service",t,"account",o]);return i===0}async isAvailable(){if(process.platform!=="linux"||(await Vo("which",["secret-tool"])).code!==0)return!1;let o=await Vo("secret-tool",["lookup","service","__resend_cli_probe__"],{timeout:3e3});return o.code===0||o.code===1}}});var Hs={};io(Hs,{WindowsBackend:()=>Ur});function Yo(e){return new Promise(t=>{(0,Xo.execFile)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],{timeout:1e4},(o,i,r)=>{let n=o&&"code"in o?o.code:0;t({stdout:i??"",stderr:r??"",code:n})})})}function ph(e,t){return new Promise(o=>{let i=(0,Xo.spawn)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],{stdio:["pipe","pipe","pipe"],timeout:1e4}),r="",n="";i.stdout?.on("data",s=>{r+=s.toString()}),i.stderr?.on("data",s=>{n+=s.toString()}),i.on("close",s=>{o({stdout:r,stderr:n,code:s})}),i.on("error",()=>{o({stdout:"",stderr:"Failed to spawn process",code:1})}),i.stdin?.on("error",()=>{}),i.stdin?.write(t),i.stdin?.end()})}function ft(e){return e.replace(/'/g,"''")}var Xo,ho,Ur,Qs=be(()=>{"use strict";Xo=require("node:child_process");ho=`
30
30
  try { $null = [Windows.Security.Credentials.PasswordVault] } catch {
31
31
  [void][Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime]
32
32
  }
33
- `,vr=class{name="Windows Credential Manager";isSecure=!0;async get(t,o){let i=`${ho}
33
+ `,Ur=class{name="Windows Credential Manager";isSecure=!0;async get(t,o){let i=`${ho}
34
34
  $v = New-Object Windows.Security.Credentials.PasswordVault
35
35
  try {
36
36
  $c = $v.Retrieve('${ft(t)}', '${ft(o)}')
@@ -39,18 +39,18 @@ To fix: either repair the JSON manually, or delete the file and run: resend logi
39
39
  } catch {
40
40
  exit 1
41
41
  }
42
- `,{stdout:r,code:n}=await zo(i);return n!==0||!r.trim()?null:r.trim()}async set(t,o,i){let r=`${ho}
42
+ `,{stdout:r,code:n}=await Yo(i);return n!==0||!r.trim()?null:r.trim()}async set(t,o,i){let r=`${ho}
43
43
  $v = New-Object Windows.Security.Credentials.PasswordVault
44
44
  try {
45
45
  $c = $v.Retrieve('${ft(t)}', '${ft(o)}')
46
46
  $v.Remove($c)
47
47
  } catch {}
48
- `;await zo(r);let n=`${ho}
48
+ `;await Yo(r);let n=`${ho}
49
49
  $secret = [Console]::In.ReadLine()
50
50
  $v = New-Object Windows.Security.Credentials.PasswordVault
51
51
  $c = New-Object Windows.Security.Credentials.PasswordCredential('${ft(t)}', '${ft(o)}', $secret)
52
52
  $v.Add($c)
53
- `,{code:s,stderr:a}=await lh(n,i);if(s!==0)throw new Error(`Failed to store credential in Windows Credential Manager: ${a.trim()}`)}async delete(t,o){let i=`${ho}
53
+ `,{code:s,stderr:a}=await ph(n,i);if(s!==0)throw new Error(`Failed to store credential in Windows Credential Manager: ${a.trim()}`)}async delete(t,o){let i=`${ho}
54
54
  $v = New-Object Windows.Security.Credentials.PasswordVault
55
55
  try {
56
56
  $c = $v.Retrieve('${ft(t)}', '${ft(o)}')
@@ -58,7 +58,7 @@ To fix: either repair the JSON manually, or delete the file and run: resend logi
58
58
  } catch {
59
59
  exit 1
60
60
  }
61
- `,{code:r}=await zo(i);return r===0}async isAvailable(){if(process.platform!=="win32")return!1;let{code:t}=await zo(`${ho} $null = New-Object Windows.Security.Credentials.PasswordVault`);return t===0}}});async function rt(){if(et)return et;let e=process.env.RESEND_CREDENTIAL_STORE;if(e==="file"){let{FileBackend:o}=await Promise.resolve().then(()=>(br(),Ar));return et=new o,et}if(e==="secure_storage"){let o=await Qs();if(o)return et=o,et}if(!e){let o=await Qs();if(o)return et=o,et}let{FileBackend:t}=await Promise.resolve().then(()=>(br(),Ar));return et=new t,et}async function Qs(){if(process.platform==="darwin"){let{MacOSBackend:e}=await Promise.resolve().then(()=>(js(),Is)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="linux"){let{LinuxBackend:e}=await Promise.resolve().then(()=>($s(),Ps)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="win32"){let{WindowsBackend:e}=await Promise.resolve().then(()=>(Hs(),Gs)),t=new e;if(await t.isAvailable())return t}return null}var ze,et,Ur=be(()=>{"use strict";ze="resend-cli",et=null});function nt(e,t){(0,ke.mkdirSync)((0,qs.dirname)(e),{recursive:!0});let o=uh(e);try{let i=t();return i instanceof Promise?i.finally(()=>Sr(e,o)):(Sr(e,o),i)}catch(i){throw Sr(e,o),i}}var Ms,ke,qs,ch,dh,Ns,uh,Sr,mh,ph,Ls=be(()=>{"use strict";Ms=require("node:crypto"),ke=require("node:fs"),qs=require("node:path"),ch=1e4,dh=50,Ns=200;uh=e=>{let t=(0,Ms.randomUUID)();for(let o=0;o<Ns;o++)try{let i=(0,ke.openSync)(e,"wx");try{(0,ke.writeSync)(i,t)}finally{(0,ke.closeSync)(i)}return t}catch(i){if(i.code!=="EEXIST")throw i;if(mh(e)){try{(0,ke.unlinkSync)(e)}catch{}continue}ph(dh)}throw new Error(`Could not acquire lock on ${e} after ${Ns} retries. If no other resend process is running, delete the lock file manually.`)},Sr=(e,t)=>{try{if((0,ke.readFileSync)(e,"utf-8")!==t)return;(0,ke.unlinkSync)(e)}catch{}},mh=e=>{try{let t=(0,ke.statSync)(e);return Date.now()-t.mtimeMs>ch}catch{return!0}},ph=e=>{Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}});var Ws,Js=be(()=>{"use strict";Ws="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCARXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAABkCgAwAEAAAAAQAAA4QAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEI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v1oAyZULFh90Y6+9UjHy2SOB37VrSICPbNZ8kaqoIA7jOKAM9wdxy2T+vvVdjlgw/hxV10BbBbG45BqBwu35FA5xQBEcn5c8N0/p+dBx0yST2x0pSFOE3c44pArKcMckjg+uKAJDt5LHPp+HtSox+bIzmkTaygd26f8A16BlsEZwD16UASYUkEAk+p4pj/PluoXpTyq7uMnuOaAGKncMUANbGxcLgjv6UzBY8D73P5VIRgYHfqKQ7jgkAMPXtQAw7QWA+UnnPWmlgwwvygdafkKuCee+aQLtGM4LdjQBETuxwSBUZEmQB1HBFWCAqsRnPbjAOKiGDwWwD3oAibaenrSkY64IqV1UtwMEdaYVBHI+nrQBCRxn72KaylcYHBqYhfpimthhk8dqAK7DJz0qEjJq1sPAP4UwgZIA5oApslV2TvV5gemKhZcUAUWWoSKuMtQEUAVStRlasEVERQBARTalIqMjFADKaRT6bQB//9H4AooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAFpKKKAFpKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAWkoooAKKKKACiiigAooooAKKKKACiiigAopaSgAoopfegBKKKKACiiigAooooAKKO1FABQKKKAFpabTqACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigApKWigAooooASlxRRQB6H4N1IvG+nyHmP5k+h6j8DXo0bZXJ4HrXz/Z3UlldR3UX3oznHqO4/GvdbG5jureK5i5WRQ350Aay46A8+tTr6VXTGOepqdTjpQBZXqKlBBzVdWJ61MDQBKDnNLgmmjFLzmgBCO4qJlzkfjU+abtJ6mgDPZCBzyaqPHz0rWdetVZF4NAGM8fB6VSkQAccitkoAKrSpzuwDigDHeIL1AyPTv8AjVB4wxPGD1yOorZdC33OAKrNGP4sc96AMZ41yVJyTyMe1V2bBOeeMZrTkjVc5BJHaq0itwMcDt/WgCkVy2MDtwP88Uxhzzgj19asOgy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mgCtsDMexHIxTSEByT3696s/NuKr1I9qjYZXK447HrQBWI47A/41Ey/5/wqzg9WGTUZ78fQelAFJl9arsnWr5Xiq7IaAM91qsy1pMlVXWgD/9X4EooooAKOtFFABRRRQAUUUUAFJS0lABRRRQAUUUUAFFFJQAtJS0lABS0UZoASiiigAooooAKKWigBKWiigAooooASloooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAEpaKKACiiigAoopKAFoozSUAHWiiigAooooAKKKWgBKKKKAFpKKKADrRRRQAUUUUAFFHSigAooooAKKKKACiiigAooooAKKKKACiijrQAUUUUAFFFHSgAooo96ACiiigBaSiigAooooAKKKKACiiigAooooAKKPaigAooooAKKKKACiiigAooooAWikooAKKKKACiiigApaSigApaKSgAooooAKKKKACiiigAooooAKKKKALmn302nXcV3AcNGc/Udx+NfQWnX0F/bR3MD7kkGR6/T6ivnGu38G659hujYTn91ORtJP3W/+vQB7cp+UHrUi8g561VifK9etWVHFAEg5p1Np3TigBwpRTR604dPagApaMUnWgBMVEwyam9/SmHvQBXYZqFlHXHX9atMOaixz+lAFJwy8fpUDoCBtGPWrzZz35quy5GDQBQYAtjHUcVXkUEY4Iq8wIGD+VQbRyAMA0AUXX+IDBHQVVMYbrx3B9a0XTdz1x071AyA8D8RQBnSRhlG7Bx+tVWUICAMnNabRkjHf361WZcEBQM/yoAzWQkkhc45qNQM/ONvGcVdkUdXzxx+NRurADjJ9/TtQBSIbnPA5xTjzljyKkC8Ejg1Hg7SB1oAby2c4wO9TA9zTNgwATyOtOXJxnkL0oAsL0Kk/L/WrSmJhjbgk8461TXnkcH+tWEJxyN2eD60AakbJhdp4PpV+Jiw9D0x1zWTHwoCLwf0rQjbjIoA1oznCk4B7VZTIPoAaoxk8YGc9quI3v8AWgC5HKUYDP0+lascgYe9Yqk4BIBxVqKTpgACgDZxxxTSMc02NgQKmGDQBWde9QOvOKuEVEyj0oAz3HZuP51TdOwFabrnmqkikAY/WgDLcY+VeOaoupPqCPUVsSxjr2Pp2qhJFuBXnPXJNAGZIny4HT0NVnG4ZxkjtWnIvYVTlGTgDp3oAynRlbYvODk56/5zVd1AJZgT9e1aUhX72Pr/APX+lVHPGCc59aAKR5O4Y2sMGmhsrhV4BxipyoUheoP6UzlQfr29aAFRWXnp2+hp6AsNp6+pqNhv5GGyOo/nSq5QDB28+lAE4MYyQcY44/X605Qc4ycD8KYNhkUYwM8/WpiCAGc5HtQA9hhuyyetOACjaP1pFKsxGMgcZxSoCGdSN+ORnj60AJt3HIHB79CPambN3z4698VMMEEAdO9J153EA9uuT6UAQBRg8kH1Pr6UFAAufl96ViWB9ccD+tEjkBR296AIdqjls5HqOaGU9W574xVjGeVP1FRFTyrdCaAISuRkHkdM8Z9vwqPBZjgZxU2Rg7uSPu02QEhSBj1waAK207cL685qMhWOeuKstwfQetRSCMcDggZGKAKxDfdA6VCysDg1abhdx78/WoyFJ9fpQBTdeKqutXmwelV2WgD/1vgSilpKACiiigAooooAKKKKACkpfrSUAFFFFABSdaWigAoopaAG0UtFACUtFLQA2ilooASlpKKAFpKWigBKWiigApaSigAooooAKKWkoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAAUUUUAFBoooAKTrS0UAJRS0lABRRRQAUUUUAFFFLQAlFLSUAFFLSUAFFFFABRRRQAUfSiigAooo96ACiiigAooooAKKKKACijNFABRRRQAUUUUAH1ooooAKKKKACjFFFABRS0lABRRS0AJRRRQAUUUUAH0ooooAKKKKACiiigAooooAKKKKACilpKACiiigAooooAWkpaSgBaSiigAoopaAEopaSgAooooAKKWkoGFFLSUAFKCQQVOD1FFJQI9s8Ja6upWiQSsTcQgK2e/ofxruUr5s0jUpdKv4ryPkKfmX1U9RX0Hpl7DfWyXEJzG4yPxoA1xTjTFOakoAX0FOBIP16Ugp1ACgfjSHp0o9KX0oAZk88e9IRnk8U7nvTTzQBGwJ4x0qMrU5BqNulAFdx6HGKhYZPPQVb2nGR16VA4544oApOMDPXNQsgIJA69quFQecYFRMO/Vf1oApMvBwOfaoXU54xkd6ud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p/E0AX4H4waewA/Gs6FipGe9ag/eJ9KAK7A5yKpSDnitLr17VXdFwTigDGkQ44GKougySBgg1sSLgkD86oShV5IAx1oAy2Gdx9OhquV565781oOGLEOMelVGXorYoApMeMn1+tV2HT1Aq6VYsG65HbpUDb48Bx1PGKAKbFuB0zVdw2ODsxzn3q7JhZOe9RMVAIYZB6UAU9u9SPrnnrURDeVtVcr196tMoJIAGQOaiJGQQMntzx+NAEahsfKO3XFJhQc5/D3p5yykDoeaaOeXXCgdutAEm7awUc56+1SAngLwR196gjC+XnnsRnvj1p+Np69eeKALR3AKwxjP5mngncSxyD3qKMlsA4yPyxUqs5zlQDnGBQBKqkgbjnjrTRuALL34weelJ8+WwBxjBx2p6gFckdetADMbcyEcjgj1pD8nGMjGckilXCrgcjufSl2qrEYzk0Af//W+DKKWjmgBKKWigBuKTFOooAbRS4pKACiiigBKKWkoASloxRQAlFLS0AJRS0YoAbRS0UAJRS0UAJRilooASilooASilooASilooAKSlooASjmlooASilooASilooASilpKACiiloASilooASiiloASjrS0UAJRS0UAJRRS0AJRS0daAEopaSgA9qKKKACiiigApKWigBKSnUUAJRRS0ANopaMUAJRS9KKAEo60tJQAUUUUAFFFLQAlFLRQAlFHSigAooooAKTmlooASilpKAEpaMUUAFJS0UAJ7UUtJQAUUUUAFFFFABR70UUAFFFFABR0oooAOlFFFABRR1ooAKKKKACiiloASilpKACiiigA96KWigBKKKKACiiigAopaSgAooooAKKKKAEpaKKACiiigA96KKKACiiigBKWiigAooooASilo+lACUUtFABTqbS0AFdx4T8Xz6E4tLg+ZZO2SO8ZPUr7eoriKOlAz62s72G7hSeCRZI2GVZeQa0CM4r5o8K+K5/D0xjkBltJCNyd1P95f6jvX0Npuo22o20d3aOJIpBuBH+e1AGjim0/gjigjvQIixjgUwr6VNj86QgUAVGGeKgdeOuR71eK46ComTIoAolRzu7DFQOgz/OrpXH4VEUz93gd6AKDJg5J5qJgWxxzVt1MnXqOlR9AMfjQBRZcnBz7motoY7RxVuROvrUJQbsNxQBXKbWyOo6HrmoSASeOcVYZSvA6E0wqwGFFAFbBBx6j8qikJwOOnOPWrLKxIGRkDmoWyATwCKAISBvDcgY/nTJODhMKp74z+FSsCo+Y578U0KQdpI29KAGMqjOzc3brT93yLvB+lN2lDwcAHjHSgDGW7D0oAtLhOQCQa04WYbeaxQS2CpzitGOUg5PI96AOntpFCj0zzW9G5bnPFchbTkEMcYxXQ2sgZQSODQBqcEc1GVHapV5GKUqPSgCmwA6jtVZgACKvsMCq5XmgCiUAztFWoJNvHbvTWFRAlDxQBqMAfmHSoCNwp8MvmAA96cVKGgDPkUEn1rOljBOD26VsSA8kAD0qjIjA89RQBjuhC4zmqrgEA4JJrUdMnHT1qhKuOc89qAKRQsD27E+lVmXgH7xPNXZORyBgDHtVZgd248cde1AFOQDZyvTkAVBIDsPUZq4RtOFP3utRMmPlHQ9KAKBHAzxgdv600K24c9e1WmXGdxwPbpUDgZJHynGMf1oAh6bhUYXaNhOccipWCupAx83PXoBTNoGAQcL0/GgAKsEAICk5zipQYwFY9uKiGQx3HBpPl6EY9M9qAJkUvwzEH09qlUjJJ6E44/SqvIOe46/41OFIHXvQBOpjDDcTk96RdqksCSfTNIuQgfOQTSludpxn35oAlP3hk4x1HpSNlVJfuaUkgfKCc9cdaGYlSoXI6jH8uaAP//X+DqKdSUAJRS0lACYpMU6igBpopaSgBKSnUUANopaKAEooxRigAopcUlAAKKKKACiiigANJS0UAJRS0UAJRS0UAGKKKKACkpaKACkpaKAEopaSgAopaKAEopaKAEopaKAEopaKAEopaKAEooooAKWikoAWkpaKAEopaKAEopaSgApKdRQA2ilooASiiigAooooAKKKKACiiigAooooASilooASilooASiiigAooooAKKWkoAKSlooASloooASilpKACiiigAooooAKKKKACkxS0UAJiilooASilooAbS0tFACUUtFACdaKWigBKKWkoAOtFFFACUUUUAFLSUtABRRRQAUlFLQAUUUUAFJS0UAFFJS0AFFFFACUUtFACUUUUAFFFLQAfWij60UAJRRRQAUUdKOlABRRS0AJRR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5IIoAhPyjk9+9PDDH4ZH/66Vdg4Pf16Ux1XjBOensaAHszZHp608OuNpOSOc+1REIFBywzxUjbNvQ4PHPrQBPw0ZwxIJ4FO2qoxjdnp6VCuAF2j8KfG5KqMY5wfp34oA//0fhPBoxTsUUANpKdSUANxSYp1B9KAGUUuKKAEpKdSUAJRS4ooASkxS0UAJSAU6igBKMUvSigBKSnUlACUUtJQAe1FLRigBKKWkoAKKWkoAKWiigBKKWigBKKKKACiiloASiiloASilooASiiigAoopaAEooooAKSlooAKSlooASilooASilpKACiiigBPpRS0mKACilxR2oASiiloASilpKACiiigBKKWigBKMUUtACYpKWloASilpKACiiloASiiigAooooAKKKKACkpaKAEpaKKAEopaSgAooooAKKKKACkpaKAEopaSgAoxS0UAJijFLRQAlJTqSgAo60UtACdKSlpaAGUZp1FADaOtLijFACUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFJQAtFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUtJQxoKWkoqRi0lFLTAQ0tFJRcBaKSimI9T8JfEB7AR6drRL264VJurIPRh3Hv1Fe5W1zDcRJNCwZHGQwOQR6g18d113hrxhqXh1hChM9oTloWPT3U84P6GkB9Qj2oFY2j65p+s2y3VjOJE43Doyk9mHUGtrdnpTEIRmomXrVgc5pCMdKAKDpxioSp2+taBSoGTP4UAZ5T/8AVVZkGeBWoUGNuee5qBkOOlAGUy8jk89TUEigf41pyLngDpVV0IyTwD3oAobQOp464qBhzyMnrV5kycBcVDsYA7iOOPwoApMgwTnk9ahbPqOP0q6yAnIA6VXcHGNvA7f40AQEZJxx35qNAo4wfr3qcxbvf1poTDEZA9D60AQnJYhxnHftUgbJ46Dn8qRlwcN8oNG4j0A7f/WoAsxHGEPHNaNvIN3HQfrWPGTn5h14/CrcbEN9KAO0srrOB69K3UOR61xFrNhh711FpcBgOaAL5HeoitWOCKYRQBUZRULLnrVsjtULLQBUK89eRRA21j71KynOQMVEVyM46CgC2xJ681XlQ/n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wTvYn1H0q0QNuB2quwI9sfrQBWbnLp/d/LmodvOActnOParZBxnGKY+ATg9fQdKAP/0Pi09aQipMUYoAjxSYqQikoAixS06koAaRTMVJ1pCKAGUmKfSUANxQadSYoAZijFOpQKAGYpKkxSYoAbikxTqSgBKKdijFADMU3FSYoxQBFijFPIoxQAzFIRT8UYoAjxRin4ooAZRTsUYoAbijFP6UlADcUuKWjFADcUY5p1LQAyinYooASiloxQA2kxUlJigBlFOxRigBtFOxRQA2kxinGigBuKKdikxQAlGKWkoAKSlooAbRRRQAUdKKKAEopaKAG4pMU+koAbikp9JQA2jFOoxQAzFFOoxQA2ilxRQAlFLijFADaKWigBKWiigBKMUtFACUUtFADaKdik7UAJRS0YoASilxRQAlFLRQAlFFFABSUtFACUU6koATFFLRQAmKSnUUAJikp1FADcUU6koASilooATFFLRQA3FFLijigBKKKKACijrRQAlFLRQAUlLRQA2inUlACYop1JigBKKKKACg4paSgBmKKf1phoASloooAKKKWgBKKKKACiiigBKKWjFABSUtJQAUUUUAFFFFABRRRQAUUUUAJRS0UANpaKKACiiigAooooAKKKO1ACUtFJQAUUUUALRRSUDQtJS0UAJmjFFFABSUtJQMKKKKBWClVipBBwRzSZooEeseGPidfWLR2eu5ubYYXzQP3qgcc/3gPzr32w1O11C3S7s5Vngfo6nI+nsfY818VVsaNrup6DcfadNmMZP3kPKP7Mvf8An70DPs8ENyKUjivNPC3xC0zXNlrcf6JebeVc/K+OuxvX2PP1r0lZAwz/AJ+tADWTIqs8e1cDsP51fIHak2KcgigRjSQ5HPQiqbRAjB9a3mjJ4PeqckfHyjBoAw5I2Pztkc9KhYFMs3f0/pWu8POfWqrRAAFs+1AECbSQe1attIwI5wKyvLYMCcVZjJBI64oA6eKQkfN09Kkx3rLgk6c8Vqqdy9c0AIeeajK5qUccdqAKAK7dKaw44qcqKYVz2oAgAJBOOlQyISDU5UoSM9TSuNw/CgDGkQEnPSqMo2+tbTqw6DOazpVwxGD+NAGUQCfm6mqbpxgckYFakiDs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oAZ9KTFSdKQigBtFLRigBtFLSYoAKWkooAKSnUUANopaSgApKd1ooAbRS0UAJRilpaAG4pMU6igBlLS02gAopaSgBKKdSUAJSfWlooASk60vvRigBO9FGKKAEoxS0UAIabTqTFADTS4pcCjFADaSlIpaAG0UtJQAUh9qWigBtJTqKAEooo5oAT2o4paSgApKKXpQA2kp2KKAEpKdSUAJSY5pTRQAlHSlpMUAFJS0UAJRR1ooASilooASilooASkpaKAEpaKKACko60tACUUUtADTRS4oxQA2ilooASkpaSgAopaKAEpKcaSgBKKKKACiiigApKWkoAKKKKACkoooAKSlooAKKKSgAopetFACUtFJQAhptOooASkpaSgAo+lFFABSGlpKADiiiigApKKWgBKBRRQAUUtFABSUtJ70AFFHvRQAlFLSUAFFFFAC0UUUAJRS0lABSUtJQAUUdaKACiiigAooooAKSlooASiiigBKXNJRQAlFLSUAFFLSUAFFLRQAlGaKKACiiloAOlekeEPiNqXh3y7C9zd6cDjYfvxj/YJ7f7J4+lebUUAfcWk61p+s2qXumzLPC/dTyD6MOoI9DWznIr4f0LxDqnh27F3pkpQn76HlHHow7/XqO1fUHhHx5pnihfKhBt7tBl4HOTgdSp7j9R3oA9AxmlHHFIrAj3p1AEEysMuvaiJs4qxjuRmqsgMRz2oAs9aqTqdwcd+CferCNuUGnMm4EH0xQBQfkHHYVTkXHQZHerwXBKn+GoZFIFAGNKvbnP9O1Z8qgELjPqRWzNwuTWdPHtxlskUAf/W+UCBUZFT4qMjigZCRTDUpFNIoEREUwipDSUARYppFSGmkUAMppqQimmgCPFGKU0lACUmO1OpKAG0tO70lADcUlPxSYoAbikxT8UmKAG0lOpDQAU2looASiik5oAKKWkoASjmlpDQAlFLRQA2kp1N5BoAKSlooASjFLiigApMUtFACUlLRQAmOKSnUUAJRRRQAUUUUAJRS0YoAbRSkUUAJS0UUANpKdRQAlJSmkoASloooASkxS0UAJRRRQAlIaWkoAKKXFJigBKSlpaAG4pMU7FJQAlFLSUAJRS0lABSUtFADaKXFFACUlLRQA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UUUAFFHSloASiiigApKWigBKKKKADvSUtJQAUUUlAC4pppTSdaACilpKAEopaKAE5opaSgBKKXikoAKKKKACkpaSgBKKKOhoAKKKSgBaSlooASloooASg0UGgBKKKKACkpaKAG0UuKSgBKKKKAEpaKSgApaKBQAUUUUAFJS0UAFFFFACUUtFACUlLRQAlFLSe1ABS0lFABSU6koASij3paAEooooAKKKKACkpaKACjrSUUAFBoooASiiigAooooAKKKKACiiigAoopKACiiigApKWigBKOlFFAHTeGPFWp+F70XFk5aFiPNhJOxwP5H0NfVXhXxhpfie1M9k5WVDiSF8BlJ9u49xXxf8ASr2najfaVdx3unzNBNGflZf6+oPpQM+8gc81WnjIxInbqK818FfEiy8SFNPvwlpf7ehOEkI/uE9z/d/LNepgqw96AIY3V14pLhCVDr1Tr9DVd90L5/gb9KvKQw24+91oEUCB3yQKpSJxkcf1rRKlH2dCOhqvIuetAH//0PVge49ealzjkHFU1f3qcNQB5P49+FVp4mkfVtFZbPU9uGTGIpyOm4Do3bPfvXyzdW1xZXMlnfQtb3MJIeNwQQRx36j0NfoADXG+NfA2l+NrHyrg+RfRcw3Kj5lPo3qp9PyoGfFBHFMrf8ReGdZ8Kag2mazEFPWOVeY5F7FT/Q81hdeaQEZFRkVPioyKYiLFMNSkU00AR4pKdTTQA2ilooATFNxUlIetAEdFOIpKAEpKdSUANxS0tJQAlNp9JQA3HNJipO1NoAYRSU+koAbilo9qWgBppKfikNADaKWjFADc0UtFACUUUUAJRRRigBMUlOxSUAJijFOpKAEpDTsUmKAE6UUfWloASilooASkNLSUAJRQeKWgBKTpS0lABSUtFADaWlpKACijvRQAmKTFO+tBoAZS0Uc0AIKMUtJ7UAJikp1JigBKKWkoASjrS0UANxSYp1JQAlFLikoASiiigBPpRRRQAlJT6TFADaSnd6OKAEooooASjFFFACUmKWigBKSlpKACkoooAWkpaSgAooooADRRSUAFFLSUAFFLiigBMUlLRQAlJS0lMAooopAFJS0UANo4paSgAooooASkp1JQAUlFFABRS0lABSGlpKAEoopaAEopaKAEooooAKKKKAEoopaAEpKdikNACUUtHSgBKQilooAZRTjSUAJRRijtQAlKKKKACiiigAooooAKKKKACiiigApKWkoAKSlooASloooASilptAC0lFFABRRRQAGiiigANJS0UAJRS0UAJRRS0AJRRRQAmKKWkoAKKKKACiiigAooooASilpKACkpaKAEooo+tABSikpaAHo7RsHRirKcgjggjuK9+8C/FLf5Oj+JXw5IWO7JwD6CT0/3vz9a+f6KAPvnKyDae/IqtG7RSbG9eDXzT4D+JNzoTrpetO8+nNhUc5Z4Pp3K+o7dvSvpOKa31K0jurKVZopV3RuhyCPUfyNAFqUBgsvcdRVZl9DzU8EhYeW3UfezUagqzIw4HYUAf//R72OfOAKupJXJRXYbHzce1bENxwCT16UAbyvmpQ1Zkcucc1aV/egDP1/w/pPibTn0vWIBNDJ0I4ZG7MrdiK+RPGvgTVvBl0DKGudPmJEN0Bx/uvj7rfXrX2gGFMura01C0lsL+Jbi2nXbJG/KsPQ0Dufn4cYGKjNetfED4X3PhUS61pDtd6WWLOhH7y3BPHT7ye/UV5MGVl3Kcg96AIzTTTzTTQIZikp9JigCOilNFACUlLiigBtIadSYoAbijFOoNADKKdSYoAbiinYpKAG0lOpKAExTcU+mmgBKMUtJQAUlLSUAJij6UtFADaMUtFACUlLRQA2loooASkp1JQAUlKaMUANopxpKAEpcUUdaAG0U7rSUAJSUuKQ0AFJS0UANoxS0UANop1HFADaSnUGgBtLRRQAU2looASloooAQ0lLRQA0UYpaKAG0U6koASkpaKAEpKWigBKDS0lACUlOptACEUUtBoASiiigBKSlpaAGmkpaKAENJTqbQAtNp1JQAlJTqSgBtFLSUAFFAooASiiigApKWigAoxRRQACiikoAKKKKAE70UUUAJRS0lACUtFFACUUtJQAlFBooADSUtFACUUUUAJRRRQAUlLSGgA6UUUUAHWiiigBKKKKAFpKKOKACig0UAFFJRQAUn1paSgAopKWgApCKWigBtFKabQAtJRRQAUUUUAFFFJQAtFFFABRRRQAlFLSGgAooooAKPeik+tAC0UlLQA2lopKACiiigAooooAKKKKACkpaKAEooxRQAUtJS0AFJRRQAlLRRQAlFFFABRRRQAUUUGgBKKKKAEooooAKWkooAWlpKKRQo4rv/AAT47vvCd0InzcadIf3sGeV9Xj5wG9ex79jXAA0tAj7j0/UrLWrCPVdKlE0Mg6j+RHUMO4NXnbIWUcdiBXxz4U8W6n4UvfPtGL28h/fQE/JIP6MOx/pX1do+uabr2njVNLcy274VlPDIw6qw7Efr1pgf/9JsU/Hy9Dz6fnW1b3JCpuK4PQ9yK4aObCghwx3ck9/atmG4A6EYbpigDuILoHg8fWtFJc9x9K46G54AznGa2ILjAXPegDo1epwwzzzWVHPuAx3q0su7nNAF9gsgYOodHGGVgCCPQg9a+cviN8J5Imk1/wAHW+5MFrizTsepeIfzUfhX0Osn41OrbTkdaAPzvVwwyKQ19UfED4T2utLPrXhlFt9SOXktxxHcHuR2Rz+R78818syxywTSW9xG0UsTFHjcYZWHBBB6EUAMooooAaab3p5pKAG0UpFJQAGm06jFACYpKWigBtFLiigBtIadSUANxSU6koAbRSmkoASkp30ooAbijFLiigBvU0UuKMUANxS4pcUUAMpDT6SgBtFLRigBtFFLigBKKXFJQAlFLRQAlFFFACUlOoxQA2kp9JQA2g8U6koAbRilpDQAneilpKAEopaKACm06jpQA2ilpKAEpaKWgBtJS0UAJRilooAbikp5ptACUhpaKAEooooASil96SgBKKWigBppKd70fWgBnNFOpKAEoNLSUABoo70UANNJTqKAG0UtJQAUlFFACdqSlooASkpaSgAooooABRRRQAUUUfSgBKSlooAKKSigBOKKKWgBKSlooASiiigApKKKACkxRS0AFNpaSgBaSiigBKKWigBKKKDQAUfSikoAWkpaSgBDRRiigAooooASloooASiiigApOtLSUAFFFFABRRRQAU3FLS0AN6UlONNoAKKKKACiiigAooooAKKKKACkpaSgAooooAKKKKACikooASilo96AEooooAKKKKAEpaKKACkpaSgApaKSgAoopaACkpfrSGgBDS0UUAJRS0lABRRRQAUUUUAJRRRmgBKKWkoAKWiigAoopKkoUUtJRQA6us8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YLgHHNcxHMfrV+GY8GgDr4ZucZrWhn7VyME/vWnFP05oA6+OQGraNXOQXHHWteKYNigDWV+MVxPjfwBpHja0Jl22upRr+5ulXnjosn95P1HY11ivU4fmgD4D13w/q/hjUpNJ1qAwzpyMcq69mRuhB/8A11lV97+IvDei+LLA6drcPmKOY5F4kib+8jdj7Hg96+PvG3gPWPBN0q3g8+xnYi3u0Hyuf7rD+F/Y9e1IZw9FFFMQlLSc0UALRSUZoAdS02igB1FJRQAtLSdDRQAtFFJQAUtJRmgBaTFFFABTaWg0AIabSmloAbSfSnZpKAEopfeigBtFKaSgBPalpOlKaAExR7UtIaAE6UhpaTFABmkpcUlACUUtJQAhpD607ikNADaKXtRQA00U6kzxQA2k6UvtSHNABSUv1pKACiiigBKKKKACkopaAG0d6U0lABSUfSj60AFJRRQAUnJpaSgBKKWkoAKSiigAptO7UnegBDwKKOtIaAFpD0paQ0AJSUtFACUnSlNJQAlFFFABSUtJQAmKKWkoASiiigBKKKKAEooooASjmiigApKWk6UALSfSiigANFGaSgAooooAKSlpKACijNIeKACikooAKKKKACkpaKAEooooASiiimAUUUUgCiiigApKKKACkpaSgAopaSgAopKKAA0lLRQAlHel96SgAooooAKKKKACiiigBKKKKACiiloASkpaSgAooooAKKKKACiiigBKSlpKACiiigAo60UlABRRRQAUUUUALRSUUALSYoooASilooAKKKKAEopaSgAooo6UAJRRRQAUUGigAoopaACm0tJQB//R+ZdzcoOMY6fzpVDcEgkiofmYjBwO/tipMuAdp3YP50ATg7iXIxkA4x1p6gHDkAA9xUXmAjcGPHf39KfzwQRnGcDpxQBMGyPl+UHPfv8AWnLtXJbJ7YqFBnnoQelTKy7+Onqe/wBaALAyjEsCuMdPSpzId+CAM/rVPO3Geh5BJ7elT7iWCgAdhQBcV8c5wKljY7s9jVRWIznmpVft37UAXwRn3qyrkAEdaz0Y9+DVhW54oAvRtircch5zWWrHpVlGNAGzHN6VejnrASQir0cnTmgDoops1qRT4rl45cd60I5gDQB1cFx2rYguRx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22/lV6J2IH41nx9Pyq9D0/OgDSjdtvWrcTt+VUY/u/jVyLofrQBoKxHSvOPijoGm3+iSa7LHtvrUBRKmAXX+6/HzAdj1HrXoq9B9K5T4h/8AIm330FIZ8lZ4paTt+FL/AI0xCUd6XtSDrQAtJ70tJQADg0uaTuaKAFzSUelJ/hQA6kopRQAdaaacOlNP9KAFpKPSjvQAdqSlPSkoATvRR3oNABSClpBQAUUHqfrRQAlJSmkoADRQaKAEooNFACUlLTexoAWkpaSgBKO9FL3oAQ0UGigA7Uhp3amnpTAKTtS0nagApDSnvQaQCdqSl7UlABSHg4paQ9aAFpDS0hoASlIpKcaAEptOpvf8KbASloopAFHeg0dzQAlFLSdzTAO9IeKXvSGkAUUUUAJRR3ooADSU40096AClHWkpR1oAQ0lKf6UgoQBmik9KdQAlFJ2ooAWiil9KAEpaTvS0AJ2o74o7Ud6ACiij/GgBCaM5oNAoADSUppD0oAKKKBQAnWjNAooAWkpaKAEPSk7Up6UdqAAdM0lKOlFAAKQmgUhoAWijvRQACilFJQAlHfFKKTvQAvfFJS96SgBaKDR60AFIeDS0h6mgBaQc0tIvagAHNLSClFACUUetFACGig9KKACkpaSgB1J3pfWk70wCikpfSkAUnpS0ncUALRS0goADRQaKAEpaQ0UAFFFFABS0Cj1oASlpKX1oATrSUopKAP/Z"});function _r(e){let t=e.split(".");if(t.length!==3)throw new Error(Kr);let o;try{o=JSON.parse(Buffer.from(t[1],"base64url").toString())}catch{throw new Error(Kr)}if(typeof o!="object"||o===null||typeof o.exp!="number")throw new Error(Kr);return o.exp}function Ys(e){let t=new Error("Received an unexpected response from Resend while authenticating. Please run `resend login` again.");if(typeof e!="object"||e===null)throw t;let o=e;if(typeof o.access_token!="string"||o.access_token.length===0||typeof o.refresh_token!="string"||o.refresh_token.length===0||typeof o.scope!="string")throw t;return o}async function Xs(e,t,o){try{return await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:t,signal:AbortSignal.timeout(fh)})}catch(i){let r=i instanceof Error&&i.name==="TimeoutError"?`${o} timed out after 30s. Check your connection and try again.`:"Could not reach the Resend API. Check your connection and try again.",n=new Error(r);throw n.name=Fr,n}}async function Zs(e,t){let o=Math.floor(Date.now()/1e3);if(e.access_token_expires_at>o+hh)return{access_token:e.access_token,scope:e.scope};let i=process.env.RESEND_BASE_URL??"https://api.resend.com",r=await Xs(`${i}/oauth/token`,new URLSearchParams({grant_type:"refresh_token",client_id:Xo,refresh_token:e.refresh_token}),"Token refresh");if(!r.ok)throw new Error(`Token refresh failed (${r.status}). Please run \`resend login\` again.`);let n=Ys(await r.json());return await ei({access_token:n.access_token,access_token_expires_at:_r(n.access_token),refresh_token:n.refresh_token,scope:n.scope},t),{access_token:n.access_token,scope:n.scope}}function kr(e){return e.toString("base64url")}function Vs(e){let{heading:t,message:o}=e;return`<!doctype html>
61
+ `,{code:r}=await Yo(i);return r===0}async isAvailable(){if(process.platform!=="win32")return!1;let{code:t}=await Yo(`${ho} $null = New-Object Windows.Security.Credentials.PasswordVault`);return t===0}}});async function rt(){if(et)return et;let e=process.env.RESEND_CREDENTIAL_STORE;if(e==="file"){let{FileBackend:o}=await Promise.resolve().then(()=>(yr(),br));return et=new o,et}if(e==="secure_storage"){let o=await Ns();if(o)return et=o,et}if(!e){let o=await Ns();if(o)return et=o,et}let{FileBackend:t}=await Promise.resolve().then(()=>(yr(),br));return et=new t,et}async function Ns(){if(process.platform==="darwin"){let{MacOSBackend:e}=await Promise.resolve().then(()=>(Ps(),js)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="linux"){let{LinuxBackend:e}=await Promise.resolve().then(()=>(Gs(),$s)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="win32"){let{WindowsBackend:e}=await Promise.resolve().then(()=>(Qs(),Hs)),t=new e;if(await t.isAvailable())return t}return null}var ze,et,Sr=be(()=>{"use strict";ze="resend-cli",et=null});function nt(e,t){(0,ke.mkdirSync)((0,Ls.dirname)(e),{recursive:!0});let o=gh(e);try{let i=t();return i instanceof Promise?i.finally(()=>Kr(e,o)):(Kr(e,o),i)}catch(i){throw Kr(e,o),i}}var qs,ke,Ls,fh,hh,Ms,gh,Kr,Ah,bh,Ws=be(()=>{"use strict";qs=require("node:crypto"),ke=require("node:fs"),Ls=require("node:path"),fh=1e4,hh=50,Ms=200;gh=e=>{let t=(0,qs.randomUUID)();for(let o=0;o<Ms;o++)try{let i=(0,ke.openSync)(e,"wx");try{(0,ke.writeSync)(i,t)}finally{(0,ke.closeSync)(i)}return t}catch(i){if(i.code!=="EEXIST")throw i;if(Ah(e)){try{(0,ke.unlinkSync)(e)}catch{}continue}bh(hh)}throw new Error(`Could not acquire lock on ${e} after ${Ms} retries. If no other resend process is running, delete the lock file manually.`)},Kr=(e,t)=>{try{if((0,ke.readFileSync)(e,"utf-8")!==t)return;(0,ke.unlinkSync)(e)}catch{}},Ah=e=>{try{let t=(0,ke.statSync)(e);return Date.now()-t.mtimeMs>fh}catch{return!0}},bh=e=>{Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}});var Js,Vs=be(()=>{"use strict";Js="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCARXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAABkCgAwAEAAAAAQAAA4QAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIA4QGQAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVV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PluoXpTyq7uMnuOaAGKncMUANbGxcLgjv6UzBY8D73P5VIRgYHfqKQ7jgkAMPXtQAw7QWA+UnnPWmlgwwvygdafkKuCee+aQLtGM4LdjQBETuxwSBUZEmQB1HBFWCAqsRnPbjAOKiGDwWwD3oAibaenrSkY64IqV1UtwMEdaYVBHI+nrQBCRxn72KaylcYHBqYhfpimthhk8dqAK7DJz0qEjJq1sPAP4UwgZIA5oApslV2TvV5gemKhZcUAUWWoSKuMtQEUAVStRlasEVERQBARTalIqMjFADKaRT6bQB//9H4AooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAFpKKKAFpKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAWkoooAKKKKACiiigAooooAKKKKACiiigAopaSgAoopfegBKKKKACiiigAooooAKKO1FABQKKKAFpabTqACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigApKWigAooooASlxRRQB6H4N1IvG+nyHmP5k+h6j8DXo0bZXJ4HrXz/Z3UlldR3UX3oznHqO4/GvdbG5jureK5i5WRQ350Aay46A8+tTr6VXTGOepqdTjpQBZXqKlBBzVdWJ61MDQBKDnNLgmmjFLzmgBCO4qJlzkfjU+abtJ6mgDPZCBzyaqPHz0rWdetVZF4NAGM8fB6VSkQAccitkoAKrSpzuwDigDHeIL1AyPTv8AjVB4wxPGD1yOorZdC33OAKrNGP4sc96AMZ41yVJyTyMe1V2bBOeeMZrTkjVc5BJHaq0itwMcDt/WgCkVy2MDtwP88Uxhzzgj19asOgyWVSajIXqOB3z3oAh+QnDHgd/Q0uecjlR0pzKu4hQfpTcENg844oAaF6njmlwxJ3dMZH4UrDB44x3FH3evTuKAFDckL0zjmhcjOeo6Uw7dwwCMfpSgncQMH3NAE2QWx1zTwGOQuCw+73pgOBzjd396T5trbQKALiFiqkjI681bibBO8HJ7d/wqlk4DK244wRViEbkBU4+tAGpE3pnjitGEkjJ/GsSOQ7suCM9vetKJxxzxntQBuxMeAOwrTjcYAJrBikOeeDmtKB8nBHBoA1lAPINSdearo3AFWB0oAMegphyOoxUtNI/woArlODVZ0J4A4P8AKrrD/CoXHGB1oAzZYzgKOMGqjqdpAANarpwR6VSkQqBigDIkU5w3B6+1UpEwfn6H9K13Q54xntVKZBnJHOMf59qAMyWNcsTgKP0qhtYAso3BuorVdHbD5+vGR+FU2QfeXjFAFJwG5wM+hHT6VDhQfmPB/SrJQk7uo6+majC9mPzUAQ9FAbg561Jn935Z9aRsE46/1+lC5VunXpQBJtIY85578GpQ2FH96olHKqSc+vXFOOwtgr8p96AAE46cntTmLY4A6Z/D0oCA5VCQQelABI6ZBoATbyN45YcY70kgVlU5x15+vpTzGqIFIPr+NC8A8ZJ7GgCttPU846UuDjLHIU88VMANpJ4XHbqKZgEY546fnQBXbdn5ePWk6EleeO9TFQU3EHjp6+9LzyrDr0oArhTwe1M5P3uQc9KsbRH8wPJ/GotpGWxwOv0oAhxgFhx2qM4BwvOetWf4sZ4/WoyCfl24HoO9AFdl4O7OahKY61aZRuOOvSoStAFZl9qquo6CrzCq7L6UAUitQkdquMvrUDLQBWK1ERVkioiKAK5FNxUpFMPtQB//0vgCiiigAooooAKKKKACiiloASiiigAooooAKKKKACiiigAooo+tABRRRQAUUUUAFFFFAC0lLRQAlFLSUAFFFFABRS0UAJRS0UAJS0UUAJRRRQAUUtJQAUtJS0AJS0UUAJRS/WigBKWkpaAEopaSgApaSigAoopaAEoopaAEpaSigAopaKAEopaKAEopaKAEopaKACiiigApKWigBKKWigBKKWkoAKWkpaAClpKWgAooooAKKKWgBKKKKACiiigAooooAKKKKADtRRRQAUUUUAFFLSUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFAoAWkoooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACu98GartlOmStjcd0f17j+tcHUtvcS2s8dzCdrxsGB9xQB9FROOeRVketYOkX8Oo2kdz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ASloooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAEpaKKACiiigAoopKAFoozSUAHWiiigAooooAKKKWgBKKKKAFpKKKADrRRRQAUUUUAFFHSigAooooAKKKKACiiigAooooAKKKKACiijrQAUUUUAFFFHSgAooo96ACiiigBaSiigAooooAKKKKACiiigAooooAKKPaigAooooAKKKKACiiigAooooAWikooAKKKKACiiigApaSigApaKSgAooooAKKKKACiiigAooooAKKKKALmn302nXcV3AcNGc/Udx+NfQWnX0F/bR3MD7kkGR6/T6ivnGu38G659hujYTn91ORtJP3W/+vQB7cp+UHrUi8g561VifK9etWVHFAEg5p1Np3TigBwpRTR604dPagApaMUnWgBMVEwyam9/SmHvQBXYZqFlHXHX9atMOaixz+lAFJwy8fpUDoCBtGPWrzZz35quy5GDQBQYAtjHUcVXkUEY4Iq8wIGD+VQbRyAMA0AUXX+IDBHQVVMYbrx3B9a0XTdz1x071AyA8D8RQBnSRhlG7Bx+tVWUICAMnNabRkjHf361WZcEBQM/yoAzWQkkhc45qNQM/ONvGcVdkUdXzxx+NRurADjJ9/TtQBSIbnPA5xTjzljyKkC8Ejg1Hg7SB1oAby2c4wO9TA9zTNgwATyOtOXJxnkL0oAsL0Kk/L/WrSmJhjbgk8461TXnkcH+tWEJxyN2eD60AakbJhdp4PpV+Jiw9D0x1zWTHwoCLwf0rQjbjIoA1oznCk4B7VZTIPoAaoxk8YGc9quI3v8AWgC5HKUYDP0+lascgYe9Yqk4BIBxVqKTpgACgDZxxxTSMc02NgQKmGDQBWde9QOvOKuEVEyj0oAz3HZuP51TdOwFabrnmqkikAY/WgDLcY+VeOaoupPqCPUVsSxjr2Pp2qhJFuBXnPXJNAGZIny4HT0NVnG4ZxkjtWnIvYVTlGTgDp3oAynRlbYvODk56/5zVd1AJZgT9e1aUhX72Pr/APX+lVHPGCc59aAKR5O4Y2sMGmhsrhV4BxipyoUheoP6UzlQfr29aAFRWXnp2+hp6AsNp6+pqNhv5GGyOo/nSq5QDB28+lAE4MYyQcY44/X605Qc4ycD8KYNhkUYwM8/WpiCAGc5HtQA9hhuyyetOACjaP1pFKsxGMgcZxSoCGdSN+ORnj60AJt3HIHB79CPambN3z4698VMMEEAdO9J153EA9uuT6UAQBRg8kH1Pr6UFAAufl96ViWB9ccD+tEjkBR296AIdqjls5HqOaGU9W574xVjGeVP1FRFTyrdCaAISuRkHkdM8Z9vwqPBZjgZxU2Rg7uSPu02QEhSBj1waAK207cL685qMhWOeuKstwfQetRSCMcDggZGKAKxDfdA6VCysDg1abhdx78/WoyFJ9fpQBTdeKqutXmwelV2WgD/1vgSilpKACiiigAooooAKKKKACkpfrSUAFFFFABSdaWigAoopaAG0UtFACUtFLQA2ilooASlpKKAFpKWigBKWiigApaSigAooooAKKWkoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAAUUUUAFBoooAKTrS0UAJRS0lABRRRQAUUUUAFFFLQAlFLSUAFFLSUAFFFFABRRRQAUfSiigAooo96ACiiigAooooAKKKKACijNFABRRRQAUUUUAH1ooooAKKKKACjFFFABRS0lABRRS0AJRRRQAUUUUAH0ooooAKKKKACiiigAooooAKKKKACilpKACiiigAooooAWkpaSgBaSiigAoopaAEopaSgAooooAKKWkoGFFLSUAFKCQQVOD1FFJQI9s8Ja6upWiQSsTcQgK2e/ofxruUr5s0jUpdKv4ryPkKfmX1U9RX0Hpl7DfWyXEJzG4yPxoA1xTjTFOakoAX0FOBIP16Ugp1ACgfjSHp0o9KX0oAZk88e9IRnk8U7nvTTzQBGwJ4x0qMrU5BqNulAFdx6HGKhYZPPQVb2nGR16VA4544oApOMDPXNQsgIJA69quFQecYFRMO/Vf1oApMvBwOfaoXU54xkd6udRj1qEpnDd6AKLg/dI2k81WZR0wOuc1oODx7fl7VXaIMCWHQevagCg8fHzHnGRmqjYPGSCOtahQtwBjH8qrMmG2gAZHPvQBnCMDjPemFTtz2JGfpVogZ3NwRxioirYJx2wSaAIWAPPGM8EUhB3YHX1p+Ao2jpn8KTG0FTyfX/AAoAQc8nj3qZSR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VAIYZB6UAU9u9SPrnnrURDeVtVcr196tMoJIAGQOaiJGQQMntzx+NAEahsfKO3XFJhQc5/D3p5yykDoeaaOeXXCgdutAEm7awUc56+1SAngLwR196gjC+XnnsRnvj1p+Np69eeKALR3AKwxjP5mngncSxyD3qKMlsA4yPyxUqs5zlQDnGBQBKqkgbjnjrTRuALL34weelJ8+WwBxjBx2p6gFckdetADMbcyEcjgj1pD8nGMjGckilXCrgcjufSl2qrEYzk0Af//W+DKKWjmgBKKWigBuKTFOooAbRS4pKACiiigBKKWkoASloxRQAlFLS0AJRS0YoAbRS0UAJRS0UAJRilooASilooASilooASilooAKSlooASjmlooASilooASilooASilpKACiiloASilooASiiloASjrS0UAJRS0UAJRRS0AJRS0daAEopaSgA9qKKKACiiigApKWigBKSnUUAJRRS0ANopaMUAJRS9KKAEo60tJQAUUUUAFFFLQAlFLRQAlFHSigAooooAKTmlooASilpKAEpaMUUAFJS0UAJ7UUtJQAUUUUAFFFFABR70UUAFFFFABR0oooAOlFFFABRR1ooAKKKKACiiloASilpKACiiigA96KWigBKKKKACiiigAopaSgAooooAKKKKAEpaKKACiiigA96KKKACiiigBKWiigAooooASilo+lACUUtFABTqbS0AFdx4T8Xz6E4tLg+ZZO2SO8ZPUr7eoriKOlAz62s72G7hSeCRZI2GVZeQa0CM4r5o8K+K5/D0xjkBltJCNyd1P95f6jvX0Npuo22o20d3aOJIpBuBH+e1AGjim0/gjigjvQIixjgUwr6VNj86QgUAVGGeKgdeOuR71eK46ComTIoAolRzu7DFQOgz/OrpXH4VEUz93gd6AKDJg5J5qJgWxxzVt1MnXqOlR9AMfjQBRZcnBz7motoY7RxVuROvrUJQbsNxQBXKbWyOo6HrmoSASeOcVYZSvA6E0wqwGFFAFbBBx6j8qikJwOOnOPWrLKxIGRkDmoWyATwCKAISBvDcgY/nTJODhMKp74z+FSsCo+Y578U0KQdpI29KAGMqjOzc3brT93yLvB+lN2lDwcAHjHSgDGW7D0oAtLhOQCQa04WYbeaxQS2CpzitGOUg5PI96AOntpFCj0zzW9G5bnPFchbTkEMcYxXQ2sgZQSODQBqcEc1GVHapV5GKUqPSgCmwA6jtVZgACKvsMCq5XmgCiUAztFWoJNvHbvTWFRAlDxQBqMAfmHSoCNwp8MvmAA96cVKGgDPkUEn1rOljBOD26VsSA8kAD0qjIjA89RQBjuhC4zmqrgEA4JJrUdMnHT1qhKuOc89qAKRQsD27E+lVmXgH7xPNXZORyBgDHtVZgd248cde1AFOQDZyvTkAVBIDsPUZq4RtOFP3utRMmPlHQ9KAKBHAzxgdv600K24c9e1WmXGdxwPbpUDgZJHynGMf1oAh6bhUYXaNhOccipWCupAx83PXoBTNoGAQcL0/GgAKsEAICk5zipQYwFY9uKiGQx3HBpPl6EY9M9qAJkUvwzEH09qlUjJJ6E44/SqvIOe46/41OFIHXvQBOpjDDcTk96RdqksCSfTNIuQgfOQTSludpxn35oAlP3hk4x1HpSNlVJfuaUkgfKCc9cdaGYlSoXI6jH8uaAP//X+DqKdSUAJRS0lACYpMU6igBpopaSgBKSnUUANopaKAEooxRigAopcUlAAKKKKACiiigANJS0UAJRS0UAJRS0UAGKKKKACkpaKACkpaKAEopaSgAopaKAEopaKAEopaKAEopaKAEopaKAEooooAKWikoAWkpaKAEopaKAEopaSgApKdRQA2ilooASiiigAooooAKKKKACiiigAooooASilooASilooASiiigAooooAKKWkoAKSlooASloooASilpKACiiigAooooAKKKKACkxS0UAJiilooASilooAbS0tFACUUtFACdaKWigBKKWkoAOtFFFACUUUUAFLSUtABRRRQAUlFLQAUUUUAFJS0UAFFJS0AFFFFACUUtFACUUUUAFFFLQAfWij60UAJRRRQAUUdKOlABRRS0AJRRRQAUUUUAFFFH1oAKWkpaBoSloooAWul8O+J7/AMPzjymL2zNmSE9D2yPQ1zVJQB9YaRq9nq9ot5ZSCRD1HdT3BHY1tAivk/RNdv8AQroXFm2VJ+eMn5XHuPX0NfRXh/xFY69bCa0JDjG+M/eQ+h9vegDpiPWkxSg07HpQIiIzURU1axmmEUAUm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xS0UAJSAU6igBKMUvSigBKSnUlACUUtJQAe1FLRigBKKWkoAKKWkoAKWiigBKKWigBKKKKACiiloASiiloASilooASiiigAoopaAEooooAKSlooAKSlooASilooASilpKACiiigBPpRS0mKACilxR2oASiiloASilpKACiiigBKKWigBKMUUtACYpKWloASilpKACiiloASiiigAooooAKKKKACkpaKAEpaKKAEopaSgAooooAKKKKACkpaKAEopaSgAoxS0UAJijFLRQAlJTqSgAo60UtACdKSlpaAGUZp1FADaOtLijFACUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFJQAtFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUtJQxoKWkoqRi0lFLTAQ0tFJRcBaKSimI9T8JfEB7AR6drRL264VJurIPRh3Hv1Fe5W1zDcRJNCwZHGQwOQR6g18d113hrxhqXh1hChM9oTloWPT3U84P6GkB9Qj2oFY2j65p+s2y3VjOJE43Doyk9mHUGtrdnpTEIRmomXrVgc5pCMdKAKDpxioSp2+taBSoGTP4UAZ5T/8AVVZkGeBWoUGNuee5qBkOOlAGUy8jk89TUEigf41pyLngDpVV0IyTwD3oAobQOp464qBhzyMnrV5kycBcVDsYA7iOOPwoApMgwTnk9ahbPqOP0q6yAnIA6VXcHGNvA7f40AQEZJxx35qNAo4wfr3qcxbvf1poTDEZA9D60AQnJYhxnHftUgbJ46Dn8qRlwcN8oNG4j0A7f/WoAsxHGEPHNaNvIN3HQfrWPGTn5h14/CrcbEN9KAO0srrOB69K3UOR61xFrNhh711FpcBgOaAL5HeoitWOCKYRQBUZRULLnrVsjtULLQBUK89eRRA21j71KynOQMVEVyM46CgC2xJ681XlQ/nT0Yn5T2qRge/0FAGRLx8uMH17VnyAAgHvW28XGMZFZ8yAADGaAMqVT0HSqj7lGPXpV9k5GT16VVZdpwcnB/OgCkVI5bqagfKgAetXSuBjP1FVnDfdPAoAqbF2kE9eCf61DIoH7sHp0Iq4yqRjGMdqhcbc9ifxoArMRzx97HHSoPK2ZLcZ71Z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lqywFQsOaAK7AmotvfrVkrnnsajYcjHbrQBWHynjirGAwAz161Ew7ZpyHHGc0ADrxgdKzpF5OBya1Dyv16VVlTdkrxmgDGlRQAQe+B7VRYEtjHTr61sSIAcAcg5qnInU42mgDKKqx5Ge9QPtLYPOPyzV1lGcn8Kr7Q31PegCsyE4c4OKqMMrvHrxV0rx83X2qB1bAA+uPSgCpjcScDK9R2qEgbmwOexNXGQkcDAxzUDP8xDYGB+tAFYDf8qrnjqfWmcdffFThDGBv9eoqBh8ueOeg9qAI2XHGRjOR34pG2sCPXvUm0EdCoA61E2FbB4HrQAhKxnLnJxkZ/8ArVKGAT/ZI6VGQVxxn0pxcpkgZ4oA/9P4ZxSU+kxQA2inYpMUANxSEU6igBhFJinkUlADMUU/FNxQA3FFOxSUAM70U7FGKAG0tLRQA2ilooASilooASjFLRQAmKMUtGKAEopaKAEoxS4ooAbRTqTFACUUtFACUUtFACUUtJQAlLRS0AJRS0UANopaWgBtFLSUAFFFLigBKKWigBKKWigBKKOlFACGilooAKSj3paYCUlOpOaQBRRRQAlFLjvRQAYpKdSUAJRS0ntQAUZoooAPaiiigBKWiigBPaloooASilooASiloxQAlFLSUAFFLSUAFFFFACUU6koASloooASjilooASilpKACilooASiiigAooooAKKKKACkpaKAExS0UUAFJzS0UAFNp2KSgBKWlooASiiigBMUmMU6igBlLRikoAKKKWgBKKKKACiikoAWiiigAooooAKKWigBKKWkoAKKKKACiiigAooooAKKWkoAKKKKACiiigAooooAKOlFFABRRRQAUmaWk60AFFFFABRRRQAUUUUAHSur8N+L9T8OSbIT51qxy0Lnj6qf4TXK0mKAPrTw94j07xBafaLKTkffjPDofcenuOK6MN+NfGFreXNjcJdWkrQyocq6nBFe8+FPiRZ3+yz1oi2ujwJekTn8fun68fSgD1cimlBSrKHH+H86f2oArMmagaPjmtDFRMlAGWyADHrVZk7GtZ48iq7RnGT0H50AZTRnA31WdBk8dK15Iy3HB7mqkoxnjg9qAMl1wc+vAzUDoVUkcjr71qMueew6Zqq6uWJboaAKBBAyBzUOFA9cd6vmNck9/Sq7oQu44x2oArFQwUjjHrTGVQcrnOMH0/CrIBHJHY800jo2Puj+dACRkDMYPbIq3HJgkk5AqmG2naM8+tTg8qo5xQB0FvPswSeT1rpLaTcuO+K4mGQhhj8a37K4B2j86AOmxkComFLC4IweakYdiKAKrCoyARVplHWoiOOlAFVlzyeKiIweBmrRGTUTJzkcZoAFOD04psi4yR9KIyVba3IqU4xigDNdOvrjpWc6smcdDyfWtxwOp6ms+WM5YnoPTvQBjvH3xx6DrVRgQAT0PatOVWBGM4PeqbxqAR156+lAFBxwGA6Y6dqhcMrZA6GrjjBK9OAfYmoHUAAdaAKTL0255GTVd3OCv8XUZ9KuMMBec1Cyx4wRuB7UAQOAWUEn14+neoCA2QF4Hf0q26N0Qj2zUD7QMAH6CgCqhZQV6Z6Go929WOOc4J9ce1Wij4weDTNwOMjkZyaAIBvBGBnjkUmTtAP4VMVBIwRn1pgUkg5wPSgD/1Ph2kNPxSEUANopaKAI8UlSUmKAGUlPxSYoAZRTsUlACYpMU/FIeaAGYop1JQA00U7FFADaSnYooATFJTqSgBMUUtFACUUuKKAEooxS4oASiil5oASkp1JQAlLRR9aAEopaKAExQaWigBtFLRQAlFLRQAlFLRQAlFLijFACUlOxSUAFFFFACUUtFACUUUtACUUtFACGkp1GKAG9aKdSUAJRS0YoASkpaKACilpKACkpaKAEopcUUAJRS0d6AEopaKAEopaSgBKWlpKACilpKAEopaKAEopaSgApKdSYoAKKKWgBKKKKAEpaKKACiiigApKWgUAJSU6koAKKKKAEopaSgAopTSe9ABRRRQAUUUUAHFFFFABSUtFABRRRQAlLRRQAmM0mKdRQAyloxSdKACkpaKAEopaSgAopaKACkpaKACiiigAooooAKSlpKACloooASiiloASilooASiiigAooooAKKKKACiiigAoopaAEooooAKSlpKACiiigAooooAKKKKACiiloA9C8LfEHUtCKWl5m7shgbT99B/snv9D+GK+gdK1rTtYtxdadcLOh64+8vsy9Qa+PK1NJ1jUNFuhe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jxRin4ooAZRTsUYoAbijFP6UlADcUuKWjFADcUY5p1LQAyinYooASiloxQA2kxUlJigBlFOxRigBtFOxRQA2kxinGigBuKKdikxQAlGKWkoAKSlooAbRRRQAUdKKKAEopaKAG4pMU+koAbikp9JQA2jFOoxQAzFFOoxQA2ilxRQAlFLijFADaKWigBKWiigBKMUtFACUUtFADaKdik7UAJRS0YoASilxRQAlFLRQAlFFFABSUtFACUU6koATFFLRQAmKSnUUAJikp1FADcUU6koASilooATFFLRQA3FFLijigBKKKKACijrRQAlFLRQAUlLRQA2inUlACYop1JigBKKKKACg4paSgBmKKf1phoASloooAKKKWgBKKKKACiiigBKKWjFABSUtJQAUUUUAFFFFABRRRQAUUUUAJRS0UANpaKKACiiigAooooAKKKO1ACUtFJQAUUUUALRRSUDQtJS0UAJmjFFFABSUtJQMKKKKBWClVipBBwRzSZooEeseGPidfWLR2eu5ubYYXzQP3qgcc/3gPzr32w1O11C3S7s5Vngfo6nI+nsfY818VVsaNrup6DcfadNmMZP3kPKP7Mvf8An70DPs8ENyKUjivNPC3xC0zXNlrcf6JebeVc/K+OuxvX2PP1r0lZAwz/AJ+tADWTIqs8e1cDsP51fIHak2KcgigRjSQ5HPQiqbRAjB9a3mjJ4PeqckfHyjBoAw5I2Pztkc9KhYFMs3f0/pWu8POfWqrRAAFs+1AECbSQe1attIwI5wKyvLYMCcVZjJBI64oA6eKQkfN09Kkx3rLgk6c8Vqqdy9c0AIeeajK5qUccdqAKAK7dKaw44qcqKYVz2oAgAJBOOlQyISDU5UoSM9TSuNw/CgDGkQEnPSqMo2+tbTqw6DOazpVwxGD+NAGUQCfm6mqbpxgckYFakiDsDwapyRqQM9aAM9ggOw5weuagZf4RggVbbcvXnPWo3H94/hQBWZQoOzjB5qAgNz35qyyMBkjI9qgkwI8LwRzmgD//0fjQim4qbHFRkUARmm4qQikoAjwaSpDSYoAZimmn4pOtADMUYp9N4oASkxT6SgBmKXFOxRQA3FGKWigBuKQin4oxQAwCjFOxRQA3FJ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0lFABSU6koASij3paAEooooAKKKKACkpaKACjrSUUAFBoooASiiigAooooAKKKKACiiigAoopKACiiigApKWigBKOlFFAHTeGPFWp+F70XFk5aFiPNhJOxwP5H0NfVXhXxhpfie1M9k5WVDiSF8BlJ9u49xXxf8ASr2najfaVdx3unzNBNGflZf6+oPpQM+8gc81WnjIxInbqK818FfEiy8SFNPvwlpf7ehOEkI/uE9z/d/LNepgqw96AIY3V14pLhCVDr1Tr9DVd90L5/gb9KvKQw24+91oEUCB3yQKpSJxkcf1rRKlH2dCOhqvIuetAH//0PVge49ealzjkHFU1f3qcNQB5P49+FVp4mkfVtFZbPU9uGTGIpyOm4Do3bPfvXyzdW1xZXMlnfQtb3MJIeNwQQRx36j0NfoADXG+NfA2l+NrHyrg+RfRcw3Kj5lPo3qp9PyoGfFBHFMrf8ReGdZ8Kag2mazEFPWOVeY5F7FT/Q81hdeaQEZFRkVPioyKYiLFMNSkU00AR4pKdTTQA2ilooATFNxUlIetAEdFOIpKAEpKdSUANxS0tJQAlNp9JQA3HNJipO1NoAYRSU+koAbilo9qWgBppKfikNADaKWjFADc0UtFACUUUUAJRRRigBMUlOxSUAJijFOpKAEpDTsUmKAE6UUfWloASilooASkNLSUAJRQeKWgBKTpS0lABSUtFADaWlpKACijvRQAmKTFO+tBoAZS0Uc0AIKMUtJ7UAJikp1JigBKKWkoASjrS0UANxSYp1JQAlFLikoASiiigBPpRRRQAlJT6TFADaSnd6OKAEooooASjFFFACUmKWigBKSlpKACkoooAWkpaSgAooooADRRSUAFFLSUAFFLiigBMUlLRQAlJS0lMAooopAFJS0UANo4paSgAooooASkp1JQAUlFFABRS0lABSGlpKAEoopaAEopaKAEooooAKKKKAEoopaAEpKdikNACUUtHSgBKQilooAZRTjSUAJRRijtQAlKKKKACiiigAooooAKKKKACiiigApKWkoAKSlooASloooASilptAC0lFFABRRRQAGiiigANJS0UAJRS0UAJRRS0AJRRRQAmKKWkoAKKKKACiiigAooooASilpKACkpaKAEooo+tABSikpaAHo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4UvfPtGL28h/fQE/JIP6MOx/pX1do+uabr2njVNLcy274VlPDIw6qw7Efr1pgf/9JsU/Hy9Dz6fnW1b3JCpuK4PQ9yK4aObCghwx3ck9/atmG4A6EYbpigDuILoHg8fWtFJc9x9K46G54AznGa2ILjAXPegDo1epwwzzzWVHPuAx3q0su7nNAF9gsgYOodHGGVgCCPQg9a+cviN8J5Imk1/wAHW+5MFrizTsepeIfzUfhX0Osn41OrbTkdaAPzvVwwyKQ19UfED4T2utLPrXhlFt9SOXktxxHcHuR2Rz+R78818syxywTSW9xG0UsTFHjcYZWHBBB6EUAMooooAaab3p5pKAG0UpFJQAGm06jFACYpKWigBtFLiigBtIadSUANxSU6koAbRSmkoASkp30ooAbijFLiigBvU0UuKMUANxS4pcUUAMpDT6SgBtFLRigBtFFLigBKKXFJQAlFLRQAlFFFACUlOoxQA2kp9JQA2g8U6koAbRilpDQAneilpKAEopaKACm06jpQA2ilpKAEpaKWgBtJS0UAJRilooAbikp5ptACUhpaKAEooooASil96SgBKKWigBppKd70fWgBnNFOpKAEoNLSUABoo70UANNJTqKAG0UtJQAUlFFACdqSlooASkpaSgAooooABRRRQAUUUfSgBKSlooAKKSigBOKKKWgBKSlooASiiigApKKKACkxRS0AFNpaSgBaSiigBKKWigBKKKDQAUfSikoAWkpaSgBDRRiigAooooASloooASiiigApOtLSUAFFFFABRRRQAU3FLS0AN6UlONNoAKKKKACiiigAooooAKKKKACkpaSgAooooAKKKKACikooASilo96AEooooAKKKKAEpaKKACkpaSgApaKSgAoopaACkpfrSGgBDS0UUAJRS0lABRRRQAUUUUAJRRRmgBKKWkoAKWiigAoopKkoUUtJRQA6us8H+LLzwnqi3kJL28mFuIuzp/LcOoP9K5KkpiP/0+CjnkJXfgkdCPX1Na0U4XIzgDue9clFOoyF+8Tlv8+1asMxVgz9B0Pc59KAOvhnIA2nGOOP/r1qxXO35mOQOOv+FcdBPkBW57kg8D0z71rwXOFGzHPJ+tAHaR3Iznd0xWrDPkdeK4uGckDb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g96+PvG3gPWPBN0q3g8+xnYi3u0Hyuf7rD+F/Y9e1IZw9FFFMQlLSc0UALRSUZoAdS02igB1FJRQAtLSdDRQAtFFJQAUtJRmgBaTFFFABTaWg0AIabSmloAbSfSnZpKAEopfeigBtFKaSgBPalpOlKaAExR7UtIaAE6UhpaTFABmkpcUlACUUtJQAhpD607ikNADaKXtRQA00U6kzxQA2k6UvtSHNABSUv1pKACiiigBKKKKACkopaAG0d6U0lABSUfSj60AFJRRQAUnJpaSgBKKWkoAKSiigAptO7UnegBDwKKOtIaAFpD0paQ0AJSUtFACUnSlNJQAlFFFABSUtJQAmKKWkoASiiigBKKKKAEooooASjmiigApKWk6UALSfSiigANFGaSgAooooAKSlpKACijNIeKACikooAKKKKACkpaKAEooooASiiimAUUUUgCiiigApKKKACkpaSgAopaSgAopKKAA0lLRQAlHel96SgAooooAKKKKACiiigBKKKKACiiloASkpaSgAooooAKKKKACiiigBKSlpKACiiigAo60UlABRRRQAUUUUALRSUUALSYoooASilooAKKKKAEopaSgAooo6UAJRRRQAUUGigAoopaACm0tJQB//R+ZdzcoOMY6fzpVDcEgkiofmYjBwO/tipMuAdp3YP50ATg7iXIxkA4x1p6gHDkAA9xUXmAjcGPHf39KfzwQRnGcDpxQBMGyPl+UHPfv8AWnLtXJbJ7YqFBnnoQelTKy7+Onqe/wBaALAyjEsCuMdPSpzId+CAM/rVPO3Geh5BJ7elT7iWCgAdhQBcV8c5wKljY7s9jVRWIznmpVft37UAXwRn3qyrkAEdaz0Y9+DVhW54oAvRtircch5zWWrHpVlGNAGzHN6VejnrASQir0cnTmgDoops1qRT4rl45cd60I5gDQB1cFx2rYguRxzXHwzdMGtOCc5AoA7WKbIq6r1y9vc8cmtWK4PTNAGyGNQ3tlZarZS6bqcKXNrOMSRuMg+n4jseopI3BGasKRQB8lfEP4X3fhUyatpBa70knJyMy2+ez46p6P8AnjrXkQORkdK/RQ4YFWAZWBBBGQQeoIPUGvnf4g/B4jzdb8GQ5U5eawXkj1aH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iiigAooooAKKKKAEopaSgBaSiigBKKSloAKKKKACiiigApKWkoAM0lLSUAFFFFABRRRQAUUUlABRRRQAUUUpoAKSlo9qACiiigAoopO9AC0UhooAKKSloAKKKKACiiigApKWkoASijrRQAtNpaSgD/9L5TFOqOnA/lQA72p3Wm9KUUAOU0/kU0e/X2p/agBy0p5pgp2aAHcU4Gm0tAEmadTBS0APzSimUoOKAHUtNBpc0APzRTaWgB1H0ptKDQA+lpuaUUAOFOFMpelAEgNOB5qMGlyaAJ89qcG/KoATTwcUAWA3NPBxVYNUgbPFAFtX45qUNVME1Kp4oAuA88VOjjIzVINmnq3pQBpq4qZX5zWcJDipVc0AaiyD8KuRS9Kx1kzVlHPFAG9HLjpV+Kc8c1z0cvHNXopeRQB0sVx6mtOKYY61ysc1aMUvvQB1cVxkcGtGKcHjNcpHPnHNaEU+O9AHVRyVx3jXwLpPja1HnkWuoxDEN2oyf92QdWT9R2rchuMgZq+stAHwrrvh/VvDOoyaXrMPkzJypByki9nRv4lP6d8Vjg192+IPDmjeLNObTNah8xOscq8Swv/eRv5g8GvkTxp4I1XwXfeTdgzWUxP2e6A+WQeh/uuO4P1FAzjxQDTRx1paAFpe1NzRmgQ/NGaZzS5oAdSUUZoAWikzR9KAFopKKAFpelJRQAUe9NozQAtLTaM0ALSUlFABR2pM0H1oAWm59aM0maACjNNzSUAOzSUlFADqSkooAM0UlFABRRSUAJRRmigApKOetFACUZopMUAHFJS0lABSUUhoAWkoooAKSiigAopKKAFpKKKACikozQAUlBpKAFpppc0hoASiikoAWkoooAKSiigApKWkoASiiigAooooAKKKTNAATSUUUAFJmijrQAUUUUAJRRRQAUUUGgApKKSgBaTpRR9aACiiigAooooAKKKKACiig0AJSUUtABSUUUAFFFFABRRiigAooooASiiigBaKKKAEpKXvSUALSUUUAFFFFABRRiigAoopKAFpKKKACkoooAKKKKACiiigAopKWgAopKWgBDS0lFAC0UUUAHtRRRQAUUUUAJRRS0AJRS0lABRRRQAUUUUAFJS0lACUUUU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aacOlNP9KAFpKPSjvQAdqSlPSkoATvRR3oNABSClpBQAUUHqfrRQAlJSmkoADRQaKAEooNFACUlLTexoAWkpaSgBKO9FL3oAQ0UGigA7Uhp3amnpTAKTtS0nagApDSnvQaQCdqSl7UlABSHg4paQ9aAFpDS0hoASlIpKcaAEptOpvf8KbASloopAFHeg0dzQAlFLSdzTAO9IeKXvSGkAUUUUAJRR3ooADSU40096AClHWkpR1oAQ0lKf6UgoQBmik9KdQAlFJ2ooAWiil9KAEpaTvS0AJ2o74o7Ud6ACiij/GgBCaM5oNAoADSUppD0oAKKKBQAnWjNAooAWkpaKAEPSk7Up6UdqAAdM0lKOlFAAKQmgUhoAWijvRQACilFJQAlHfFKKTvQAvfFJS96SgBaKDR60AFIeDS0h6mgBaQc0tIvagAHNLSClFACUUetFACGig9KKACkpaSgB1J3pfWk70wCikpfSkAUnpS0ncUALRS0goADRQaKAEpaQ0UAFFFFABS0Cj1oASlpKX1oATrSUopKAP/Z"});function Fr(e){let t=e.split(".");if(t.length!==3)throw new Error(kr);let o;try{o=JSON.parse(Buffer.from(t[1],"base64url").toString())}catch{throw new Error(kr)}if(typeof o!="object"||o===null||typeof o.exp!="number")throw new Error(kr);return o.exp}function Xs(e){let t=new Error("Received an unexpected response from Resend while authenticating. Please run `resend login` again.");if(typeof e!="object"||e===null)throw t;let o=e;if(typeof o.access_token!="string"||o.access_token.length===0||typeof o.refresh_token!="string"||o.refresh_token.length===0||typeof o.scope!="string")throw t;return o}async function Zs(e,t,o){try{return await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:t,signal:AbortSignal.timeout(yh)})}catch(i){let r=i instanceof Error&&i.name==="TimeoutError"?`${o} timed out after 30s. Check your connection and try again.`:"Could not reach the Resend API. Check your connection and try again.",n=new Error(r);throw n.name=Rr,n}}async function ea(e,t){let o=Math.floor(Date.now()/1e3);if(e.access_token_expires_at>o+Ch)return{access_token:e.access_token,scope:e.scope};let i=process.env.RESEND_BASE_URL??"https://api.resend.com",r=await Zs(`${i}/oauth/token`,new URLSearchParams({grant_type:"refresh_token",client_id:Zo,refresh_token:e.refresh_token}),"Token refresh");if(!r.ok)throw new Error(`Token refresh failed (${r.status}). Please run \`resend login\` again.`);let n=Xs(await r.json());return await ti({access_token:n.access_token,access_token_expires_at:Fr(n.access_token),refresh_token:n.refresh_token,scope:n.scope},t),{access_token:n.access_token,scope:n.scope}}function _r(e){return e.toString("base64url")}function zs(e){let{heading:t,message:o}=e;return`<!doctype html>
62
62
  <html lang="en">
63
63
  <head>
64
64
  <meta charset="utf-8" />
@@ -86,7 +86,7 @@ To fix: either repair the JSON manually, or delete the file and run: resend logi
86
86
  z-index: 0;
87
87
  pointer-events: none;
88
88
  user-select: none;
89
- background-image: url("${Ws}");
89
+ background-image: url("${Js}");
90
90
  background-size: cover;
91
91
  background-position: center;
92
92
  opacity: 0.2;
@@ -123,12 +123,12 @@ To fix: either repair the JSON manually, or delete the file and run: resend logi
123
123
  <body>
124
124
  <div class="bg"></div>
125
125
  <main>
126
- ${gh}
126
+ ${xh}
127
127
  <h1>${t}</h1>
128
128
  <p>${o}</p>
129
129
  </main>
130
130
  </body>
131
- </html>`}function ea(){let e=kr((0,go.randomBytes)(64)),t=kr((0,go.createHash)("sha256").update(e).digest()),o=kr((0,go.randomBytes)(24));return{codeVerifier:e,codeChallenge:t,state:o}}function ta(){return new Promise((e,t)=>{let o,i,r=new Promise((a,l)=>{o=a,i=l}),n=(0,zs.createServer)((a,l)=>{let u=new URL(a.url??"/","http://127.0.0.1");if(u.pathname!=="/oauth/callback"){l.writeHead(404,{Connection:"close"}),l.end();return}let m=u.searchParams.get("code"),p=u.searchParams.get("state"),f=u.searchParams.get("error"),y=f?`Authorization denied: ${f}`:!m||!p?"Missing code or state in OAuth callback":null,A=Vs(y?{heading:"Authentication failed",message:`${y}. Return to your terminal and try again.`}:{heading:"Authentication complete",message:"You can close this tab and return to your terminal."});l.writeHead(200,{"Content-Type":"text/html; charset=utf-8",Connection:"close"}),l.end(A,()=>{a.socket.destroy()}),n.close(),clearTimeout(s),y?i(new Error(y)):m&&p&&o({code:m,state:p})}),s=setTimeout(()=>{n.close(),i(new Error("OAuth login timed out after 5 minutes. Please try again."))},300*1e3);n.listen(0,"127.0.0.1",()=>{let{port:a}=n.address();e({port:a,waitForCallback:r})}),n.on("error",t)})}async function oa(e){let t=await Xs(`${e.baseUrl}/oauth/token`,new URLSearchParams({grant_type:"authorization_code",client_id:e.clientId,code:e.code,redirect_uri:e.redirectUri,code_verifier:e.codeVerifier}),"Token exchange");if(!t.ok){let o="";try{let i=await t.json();o=i.error_description??i.error??""}catch{}throw new Error(`Token exchange failed (${t.status})${o?`: ${o}`:""}`)}return Ys(await t.json())}var go,zs,Xo,Kr,fh,hh,Fr,gh,Zo=be(()=>{"use strict";go=require("node:crypto"),zs=require("node:http");ye();Js();Xo="7136aa0b-625c-4c9c-8820-e9784c8eb141",Kr="Received an invalid access token from Resend. Please run `resend login` to authenticate again.";fh=3e4,hh=60,Fr="OAuthNetworkError";gh=`<svg class="logo" role="img" aria-label="Resend" fill="none" viewBox="0 0 78 78" xmlns="http://www.w3.org/2000/svg">
131
+ </html>`}function ta(){let e=_r((0,go.randomBytes)(64)),t=_r((0,go.createHash)("sha256").update(e).digest()),o=_r((0,go.randomBytes)(24));return{codeVerifier:e,codeChallenge:t,state:o}}function oa(){return new Promise((e,t)=>{let o,i,r=new Promise((a,l)=>{o=a,i=l}),n=(0,Ys.createServer)((a,l)=>{let u=new URL(a.url??"/","http://127.0.0.1");if(u.pathname!=="/oauth/callback"){l.writeHead(404,{Connection:"close"}),l.end();return}let m=u.searchParams.get("code"),p=u.searchParams.get("state"),f=u.searchParams.get("error"),y=f?`Authorization denied: ${f}`:!m||!p?"Missing code or state in OAuth callback":null,A=zs(y?{heading:"Authentication failed",message:`${y}. Return to your terminal and try again.`}:{heading:"Authentication complete",message:"You can close this tab and return to your terminal."});l.writeHead(200,{"Content-Type":"text/html; charset=utf-8",Connection:"close"}),l.end(A,()=>{a.socket.destroy()}),n.close(),clearTimeout(s),y?i(new Error(y)):m&&p&&o({code:m,state:p})}),s=setTimeout(()=>{n.close(),i(new Error("OAuth login timed out after 5 minutes. Please try again."))},300*1e3);n.listen(0,"127.0.0.1",()=>{let{port:a}=n.address();e({port:a,waitForCallback:r})}),n.on("error",t)})}async function ia(e){let t=await Zs(`${e.baseUrl}/oauth/token`,new URLSearchParams({grant_type:"authorization_code",client_id:e.clientId,code:e.code,redirect_uri:e.redirectUri,code_verifier:e.codeVerifier}),"Token exchange");if(!t.ok){let o="";try{let i=await t.json();o=i.error_description??i.error??""}catch{}throw new Error(`Token exchange failed (${t.status})${o?`: ${o}`:""}`)}return Xs(await t.json())}var go,Ys,Zo,kr,yh,Ch,Rr,xh,ei=be(()=>{"use strict";go=require("node:crypto"),Ys=require("node:http");ye();Vs();Zo="7136aa0b-625c-4c9c-8820-e9784c8eb141",kr="Received an invalid access token from Resend. Please run `resend login` to authenticate again.";yh=3e4,Ch=60,Rr="OAuthNetworkError";xh=`<svg class="logo" role="img" aria-label="Resend" fill="none" viewBox="0 0 78 78" xmlns="http://www.w3.org/2000/svg">
132
132
  <rect x="1" y="1" width="76" height="76" rx="21" stroke="#FDFDFD" stroke-opacity="0.1" stroke-width="2" />
133
133
  <path d="M43.0184 21C49.9908 21 54.1374 25.1467 54.1374 30.6513C54.1374 36.1558 49.9908 40.3025 43.0184 40.3025H39.4953L57 57H44.6329L31.3118 44.3394C30.3578 43.4587 29.9174 42.4312 29.9174 41.5506C29.9174 40.3029 30.7984 39.202 32.4864 38.7249L39.3485 36.8897C41.954 36.1925 43.7522 34.1741 43.7522 31.5319C43.7522 28.3027 41.1098 26.4312 37.8438 26.4312H21V21H43.0184Z" fill="url(#resend_cli_logo_a)" />
134
134
  <path d="M54.1375 30.6513C54.1374 25.1467 49.9908 21 43.0184 21V20.55C46.5934 20.55 49.4879 21.6142 51.4941 23.4275C53.4405 25.1867 54.5189 27.6229 54.5844 30.3832L54.5875 30.6513C54.5875 33.5218 53.5032 36.0591 51.4941 37.875C49.5505 39.6317 46.7734 40.6853 43.3515 40.7495L43.0184 40.7525H40.619L58.1237 57.45H44.4532L44.3231 57.3261L31.0064 44.6694C29.978 43.7199 29.4675 42.579 29.4674 41.5506C29.4674 40.0491 30.5379 38.8082 32.3643 38.292L32.37 38.2903L39.2321 36.4551C41.6742 35.8016 43.3023 33.9377 43.3023 31.5319C43.3023 30.0523 42.7022 28.9051 41.7383 28.1191C40.7652 27.3258 39.3949 26.8812 37.8438 26.8812H20.55V20.55H43.0184V21H21V26.4312H37.8438C41.1098 26.4312 43.7522 28.3027 43.7523 31.5319C43.7523 34.1741 41.954 36.1925 39.3485 36.8897L32.4865 38.7249C30.7984 39.202 29.9174 40.3029 29.9174 41.5506C29.9175 42.4312 30.3578 43.4587 31.3118 44.3393L44.633 57H57.0001L39.4953 40.3025H43.0184C49.9909 40.3025 54.1375 36.1558 54.1375 30.6513Z" fill="url(#resend_cli_logo_b)" />
@@ -142,120 +142,120 @@ To fix: either repair the JSON manually, or delete the file and run: resend logi
142
142
  <stop offset="1" stop-color="#ADADAD" />
143
143
  </linearGradient>
144
144
  </defs>
145
- </svg>`});var ia,_e,ra,na,Ah,sa=be(()=>{"use strict";ia=require("node:crypto"),_e=require("node:fs"),ra=require("node:path"),na=(e,t,o)=>{let i=`${e}.tmp.${process.pid}.${(0,ia.randomUUID)()}`;try{let r=(0,_e.openSync)(i,"w",o);try{(0,_e.writeSync)(r,t),(0,_e.fsyncSync)(r)}finally{(0,_e.closeSync)(r)}(0,_e.renameSync)(i,e),Ah((0,ra.dirname)(e))}catch(r){try{(0,_e.unlinkSync)(i)}catch{}throw r}},Ah=e=>{if(process.platform!=="win32")try{let t=(0,_e.openSync)(e,"r");try{(0,_e.fsyncSync)(t)}finally{(0,_e.closeSync)(t)}}catch{}}});function Qe(){return process.env.XDG_CONFIG_HOME?(0,Ht.join)(process.env.XDG_CONFIG_HOME,"resend"):process.platform==="win32"&&process.env.APPDATA?(0,Ht.join)(process.env.APPDATA,"resend"):(0,Ht.join)((0,ca.homedir)(),".config","resend")}function Ft(){return(0,Ht.join)(Qe(),"credentials.json")}function aa(e){return e.type==="oauth_grant"?Dr(e)?{type:"oauth_grant",...e}:{type:"oauth_grant",scope:typeof e.scope=="string"?e.scope:""}:{type:"api_key",...e.api_key!==void 0?{api_key:e.api_key}:{},...e.permission?{permission:e.permission}:{}}}function Rr(){try{return Ke()}catch{return null}}function Ke(){let e=Ft();if(!(0,$e.existsSync)(e))return null;let t=(0,$e.readFileSync)(e,"utf-8");if(t.trim().length===0)return null;let o;try{o=JSON.parse(t)}catch{throw new Wo(e)}if(typeof o=="object"&&o!==null&&"api_key"in o&&!("profiles"in o)&&!("teams"in o))return{active_profile:"default",profiles:{default:{type:"api_key",api_key:o.api_key}}};if("profiles"in o){let i=o.storage==="keychain"?"secure_storage":o.storage,r=o.profiles;return{active_profile:o.active_profile??"default",...i?{storage:i}:{},profiles:Object.fromEntries(Object.entries(r).map(([n,s])=>[n,aa(s)]))}}if("teams"in o){let i=o.teams;return{active_profile:o.active_team??"default",profiles:Object.fromEntries(Object.entries(i).map(([r,n])=>[r,aa(n)]))}}return null}function gt(e){let t=Qe();(0,$e.mkdirSync)(t,{recursive:!0,mode:448});let o=Ft();return na(o,`${JSON.stringify(e,null,2)}
146
- `,384),(0,$e.chmodSync)(o,384),o}function ti(e){if(e)return e;let t=process.env.RESEND_PROFILE;if(t)return t;let o=Ke();return o?.active_profile?o.active_profile:"default"}function yr(e,t,o){let i=t||"default",r=ue(i);if(r)throw new Error(r);return nt(ht(),()=>{let n=Ke()||{active_profile:"default",profiles:{}},s={...n.profiles,[i]:{type:"api_key",api_key:e,...o&&{permission:o}}},a={...n,profiles:s,...Object.keys(s).length===1?{active_profile:i}:{}};return gt(a)})}function Es(e){return nt(ht(),()=>{let t=Ke();if(!t)throw new Error("No credentials file found.");let o=e||ti();if(!t.profiles[o])throw new Error(`Profile "${o}" not found. Available profiles: ${Object.keys(t.profiles).join(", ")}`);let{[o]:i,...r}=t.profiles;if(Object.keys(r).length===0){let s=Ft();return(0,$e.unlinkSync)(s),s}let n=t.active_profile===o?Object.keys(r)[0]||"default":t.active_profile;return gt({...t,active_profile:n,profiles:r})})}function Ao(e){let t=ue(e);if(t)throw new Error(t);nt(ht(),()=>{let o=Ke();if(!o)throw new Error("No credentials file found. Run: resend login");if(!o.profiles[e])throw new Error(`Profile "${e}" not found. Available profiles: ${Object.keys(o.profiles).join(", ")}`);gt({...o,active_profile:e})})}function Fe(){let e=Ke();return e?Object.keys(e.profiles).map(t=>({name:t,active:t===e.active_profile})):[]}function ue(e){if(!e||e.length===0)return"Profile name must not be empty";if(e.length>64)return"Profile name must be 64 characters or fewer";if(!/^[a-zA-Z0-9._-]+$/.test(e))return"Profile name must contain only letters, numbers, dots, dashes, and underscores"}function At(e){return e.length<=7?`${e.slice(0,3)}...`:`${e.slice(0,3)}...${e.slice(-4)}`}function Dr(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.access_token=="string"&&typeof t.access_token_expires_at=="number"&&typeof t.refresh_token=="string"&&typeof t.scope=="string"}function bh(e){return Dr(e)?e:null}function yh(e){let t;try{t=JSON.parse(e)}catch{t=null}if(!Dr(t))throw new Error("Stored OAuth credentials are invalid. Please run `resend login` to authenticate again.");return t}async function Rt(e,t,o){if(e)return{type:"api_key",key:e,source:"flag"};let i=process.env.RESEND_API_KEY;if(i)return{type:"api_key",key:i,source:"env"};let r=Ke(),n=t||process.env.RESEND_PROFILE||r?.active_profile||"default";if(r?.storage==="secure_storage"&&r.profiles[n]){let s=r.profiles[n],l=await(await rt()).get(ze,n);if(l){if(s.type==="oauth_grant"){let u=yh(l);return la(u,n,"secure_storage",o)}return{type:"api_key",key:l,source:"secure_storage",profile:n,permission:s.permission}}}if(r){let s=r.profiles[n];if(s?.type==="api_key"&&s.api_key)return{type:"api_key",key:s.api_key,source:"config",profile:n,permission:s.permission};if(s?.type==="oauth_grant"){let a=bh(s);if(a)return la(a,n,"config",o)}}return null}async function la(e,t,o,i){if(i?.refresh===!1)return{type:"oauth_grant",access_token:e.access_token,profile:t,scope:e.scope,source:o};let{access_token:r,scope:n}=await Zs(e,t);return{type:"oauth_grant",access_token:r,profile:t,scope:n,source:o}}async function da(e,t,o){let i=t||"default",r=ue(i);if(r)throw new Error(r);let n=await rt();return n.isSecure?{configPath:await nt(ht(),async()=>{await n.set(ze,i,e);let a=Ke()||{active_profile:"default",profiles:{}},l={...a.profiles,[i]:{type:"api_key",...o&&{permission:o}}};return gt({...a,storage:"secure_storage",profiles:l,...Object.keys(l).length===1?{active_profile:i}:{}})}),backend:n}:{configPath:yr(e,i,o),backend:n}}async function ei(e,t){let o=t||"default",i=ue(o);if(i)throw new Error(i);let r=await rt();return{configPath:await nt(ht(),async()=>{let s=Ke()||{active_profile:"default",profiles:{}},a=r.isSecure?{type:"oauth_grant",scope:e.scope}:{type:"oauth_grant",...e};r.isSecure&&await r.set(ze,o,JSON.stringify(e));let l={...s.profiles,[o]:a};try{return gt({...s,storage:r.isSecure?"secure_storage":"file",profiles:l,...Object.keys(l).length===1?{active_profile:o}:{}})}catch(u){throw r.isSecure&&await r.delete(ze,o).catch(()=>{}),u}}),backend:r}}async function oi(e){return nt(ht(),async()=>{let t=Ke(),o=e||process.env.RESEND_PROFILE||t?.active_profile||"default";if(!t?.profiles[o])throw new Error(t?`Profile "${o}" not found. Available profiles: ${Object.keys(t.profiles).join(", ")}`:"No credentials file found.");if(t.storage==="secure_storage"){let s=await rt();if(s.isSecure&&!await s.delete(ze,o))throw new Error(`Failed to remove API key for profile "${o}" from ${s.name}. Credential may still exist in secure storage.`)}let{[o]:i,...r}=t.profiles;if(Object.keys(r).length===0){let s=Ft();return(0,$e.unlinkSync)(s),s}let n=t.active_profile===o?Object.keys(r)[0]||"default":t.active_profile;return gt({...t,active_profile:n,profiles:r})})}async function ua(){return nt(ht(),async()=>{let e=Rr(),t=Ft();if(e?.storage==="secure_storage"){let o=await rt();if(o.isSecure){let i=Object.keys(e.profiles),r=await Promise.all(i.map(s=>o.delete(ze,s))),n=i.filter((s,a)=>!r[a]);if(n.length>0){let s=Object.fromEntries(Object.entries(e.profiles).filter(([l])=>!r[i.indexOf(l)])),a=Object.keys(s);throw gt({...e,active_profile:e.active_profile&&s[e.active_profile]?e.active_profile:a[0]??"default",profiles:s}),new Error(`Failed to remove API keys from ${o.name} for profiles: ${n.join(", ")}. Credentials may still exist in secure storage.`)}}}return(0,$e.existsSync)(t)&&(0,$e.unlinkSync)(t),t})}async function ii(e,t){if(e===t)return;let o=ue(t);if(o)throw new Error(o);await nt(ht(),async()=>{let i=Ke();if(!i)throw new Error("No credentials file found. Run: resend login");if(!i.profiles[e])throw new Error(`Profile "${e}" not found. Available profiles: ${Object.keys(i.profiles).join(", ")}`);if(i.profiles[t])throw new Error(`Profile "${t}" already exists.`);if(i.storage==="secure_storage"){let s=await rt();if(s.isSecure){let a=await s.get(ze,e);if(a&&(await s.set(ze,t,a),!await s.delete(ze,e))){let u=await s.delete(ze,t);throw new Error(u?`Failed to remove old credential "${e}" from ${s.name} during rename. The rename has been rolled back.`:`Failed to remove old credential "${e}" from ${s.name} during rename. Rollback also failed \u2014 credential "${t}" may still exist in secure storage.`)}}}let{[e]:r,...n}=i.profiles;gt({...i,active_profile:i.active_profile===e?t:i.active_profile,profiles:{...n,[t]:r}})})}var $e,ca,Ht,Qt,ht,ye=be(()=>{"use strict";$e=require("node:fs"),ca=require("node:os"),Ht=require("node:path");Os();Ur();Ls();Zo();sa();Qt=`Sending-only keys work with: emails send, emails batch, broadcasts send.
147
- Create a full access key at https://resend.com/api-keys`;ht=()=>(0,Ht.join)(Qe(),"credentials.json.lock")});function w(){return!(!process.stdin.isTTY||!process.stdout.isTTY||process.env.CI==="true"||process.env.CI==="1"||process.env.GITHUB_ACTIONS||process.env.TERM==="dumb")}var st,X=be(()=>{"use strict";st=process.platform!=="win32"||!!process.env.WT_SESSION||process.env.TERM_PROGRAM==="vscode"});function Uc(){return(0,vc.join)(Qe(),"update-state.json")}function ig(){try{return JSON.parse((0,Xt.readFileSync)(Uc(),"utf-8"))}catch{return null}}function rg(e){(0,Xt.mkdirSync)(Qe(),{recursive:!0,mode:448}),(0,Xt.writeFileSync)(Uc(),JSON.stringify(e),{mode:384})}function wi(e,t){let o=u=>u.replace(/^v/,"").split(".").map(Number),[i,r,n]=o(e),[s,a,l]=o(t);return s!==i?s>i:a!==r?a>r:l>n}async function Hr(){try{let e=await fetch(Gr,{headers:{Accept:"application/vnd.github.v3+json"},signal:AbortSignal.timeout(5e3)});if(!e.ok)return null;let t=await e.json();if(t.prerelease||t.draft)return null;let o=t.tag_name?.replace(/^v/,"");return!o||!/^\d+\.\d+\.\d+$/.test(o)?null:o}catch{return null}}function ng(e){return!!(e?.json||process.env.RESEND_NO_UPDATE_NOTIFIER==="1"||process.env.CI==="true"||process.env.CI==="1"||process.env.GITHUB_ACTIONS||!process.stdout.isTTY)}function Sc(){let e=vi();return e.startsWith("npm")?"npm":e.startsWith("brew")?"homebrew":e.startsWith("curl")||e.startsWith("irm")?"install-script":"manual"}function vi(){let e=process.execPath||process.argv[0]||"",t=process.argv[1]||"";return process.env.npm_execpath||/node_modules/.test(t)||/node_modules/.test(e)?"npm install -g resend-cli":/\/(Cellar|homebrew)\//i.test(e)?"brew update && brew upgrade resend":/[/\\]\.resend[/\\]bin[/\\]/.test(e)?process.platform==="win32"?"irm https://resend.com/install.ps1 | iex":"curl -fsSL https://resend.com/install.sh | bash":"https://github.com/resend/resend-cli/releases/latest"}function wc(e){let t=vi(),o=t.startsWith("http"),i="\x1B[2m",r="\x1B[33m",n="\x1B[36m",s="\x1B[0m",a=["",`${i}Update available: ${r}v${se}${s}${i} \u2192 ${n}v${e}${s}`,`${i}${o?"Visit":"Run"}: ${n}${t}${s}`];return process.platform==="win32"&&a.push(`${i}Or download from: ${n}https://github.com/resend/resend-cli/releases/latest${s}`),a.push(""),a.join(`
148
- `)}async function Kc(e){if(ng(e))return;let t=ig(),o=Date.now();if(t&&o-t.lastChecked<og){wi(se,t.latestVersion)&&process.stderr.write(wc(t.latestVersion));return}let i=await Hr();i&&(rg({lastChecked:o,latestVersion:i}),wi(se,i)&&process.stderr.write(wc(i)))}var Xt,vc,og,Gr,Uo=be(()=>{"use strict";Xt=require("node:fs"),vc=require("node:path");ye();Kt();og=3600*1e3,Gr="https://api.github.com/repos/resend/resend-cli/releases/latest"});var km={};io(km,{flushFromFile:()=>Jg,flushPayload:()=>Km,getOrCreateAnonymousId:()=>Sm,getSpoolDir:()=>Yr,isDisabled:()=>Um,trackCommand:()=>Xr});function Ng(){return Qg[process.platform]??process.platform}function Yr(){let e=(0,Xe.join)(Qe(),"telemetry-spool");return(0,V.mkdirSync)(e,{recursive:!0,mode:448}),e}function Um(){return!vm||process.env.DO_NOT_TRACK==="1"||process.env.RESEND_TELEMETRY_DISABLED==="1"}function Sm(){let e=Qe(),t=(0,Xe.join)(e,"telemetry-id");try{let i=(0,V.readFileSync)(t,"utf-8").trim();if(i)return i}catch{}let o=crypto.randomUUID();return(0,V.mkdirSync)(e,{recursive:!0,mode:448}),(0,V.writeFileSync)(t,o,{mode:384}),o}function Mg(e){if(!e)return;let t=Qe(),o=(0,Xe.join)(t,"telemetry-notice-shown");(0,V.existsSync)(o)||((0,V.mkdirSync)(t,{recursive:!0,mode:448}),(0,V.writeFileSync)(o,"",{mode:384}),process.stderr.write(`
145
+ </svg>`});var ra,_e,na,sa,wh,aa=be(()=>{"use strict";ra=require("node:crypto"),_e=require("node:fs"),na=require("node:path"),sa=(e,t,o)=>{let i=`${e}.tmp.${process.pid}.${(0,ra.randomUUID)()}`;try{let r=(0,_e.openSync)(i,"w",o);try{(0,_e.writeSync)(r,t),(0,_e.fsyncSync)(r)}finally{(0,_e.closeSync)(r)}(0,_e.renameSync)(i,e),wh((0,na.dirname)(e))}catch(r){try{(0,_e.unlinkSync)(i)}catch{}throw r}},wh=e=>{if(process.platform!=="win32")try{let t=(0,_e.openSync)(e,"r");try{(0,_e.fsyncSync)(t)}finally{(0,_e.closeSync)(t)}}catch{}}});function Qe(){return process.env.XDG_CONFIG_HOME?(0,Ht.join)(process.env.XDG_CONFIG_HOME,"resend"):process.platform==="win32"&&process.env.APPDATA?(0,Ht.join)(process.env.APPDATA,"resend"):(0,Ht.join)((0,ca.homedir)(),".config","resend")}function Ft(){return(0,Ht.join)(Qe(),"credentials.json")}function la(e){return e.type==="oauth_grant"?Tr(e)?{type:"oauth_grant",...e}:{type:"oauth_grant",scope:typeof e.scope=="string"?e.scope:""}:{type:"api_key",...e.api_key!==void 0?{api_key:e.api_key}:{},...e.permission?{permission:e.permission}:{}}}function Dr(){try{return Ke()}catch{return null}}function Ke(){let e=Ft();if(!(0,$e.existsSync)(e))return null;let t=(0,$e.readFileSync)(e,"utf-8");if(t.trim().length===0)return null;let o;try{o=JSON.parse(t)}catch{throw new Jo(e)}if(typeof o=="object"&&o!==null&&"api_key"in o&&!("profiles"in o)&&!("teams"in o))return{active_profile:"default",profiles:{default:{type:"api_key",api_key:o.api_key}}};if("profiles"in o){let i=o.storage==="keychain"?"secure_storage":o.storage,r=o.profiles;return{active_profile:o.active_profile??"default",...i?{storage:i}:{},profiles:Object.fromEntries(Object.entries(r).map(([n,s])=>[n,la(s)]))}}if("teams"in o){let i=o.teams;return{active_profile:o.active_team??"default",profiles:Object.fromEntries(Object.entries(i).map(([r,n])=>[r,la(n)]))}}return null}function gt(e){let t=Qe();(0,$e.mkdirSync)(t,{recursive:!0,mode:448});let o=Ft();return sa(o,`${JSON.stringify(e,null,2)}
146
+ `,384),(0,$e.chmodSync)(o,384),o}function oi(e){if(e)return e;let t=process.env.RESEND_PROFILE;if(t)return t;let o=Ke();return o?.active_profile?o.active_profile:"default"}function Cr(e,t,o){let i=t||"default",r=ue(i);if(r)throw new Error(r);return nt(ht(),()=>{let n=Ke()||{active_profile:"default",profiles:{}},s={...n.profiles,[i]:{type:"api_key",api_key:e,...o&&{permission:o}}},a={...n,profiles:s,...Object.keys(s).length===1?{active_profile:i}:{}};return gt(a)})}function Bs(e){return nt(ht(),()=>{let t=Ke();if(!t)throw new Error("No credentials file found.");let o=e||oi();if(!t.profiles[o])throw new Error(`Profile "${o}" not found. Available profiles: ${Object.keys(t.profiles).join(", ")}`);let{[o]:i,...r}=t.profiles;if(Object.keys(r).length===0){let s=Ft();return(0,$e.unlinkSync)(s),s}let n=t.active_profile===o?Object.keys(r)[0]||"default":t.active_profile;return gt({...t,active_profile:n,profiles:r})})}function Ao(e){let t=ue(e);if(t)throw new Error(t);nt(ht(),()=>{let o=Ke();if(!o)throw new Error("No credentials file found. Run: resend login");if(!o.profiles[e])throw new Error(`Profile "${e}" not found. Available profiles: ${Object.keys(o.profiles).join(", ")}`);gt({...o,active_profile:e})})}function Fe(){let e=Ke();return e?Object.keys(e.profiles).map(t=>({name:t,active:t===e.active_profile})):[]}function ue(e){if(!e||e.length===0)return"Profile name must not be empty";if(e.length>64)return"Profile name must be 64 characters or fewer";if(!/^[a-zA-Z0-9._-]+$/.test(e))return"Profile name must contain only letters, numbers, dots, dashes, and underscores"}function At(e){return e.length<=7?`${e.slice(0,3)}...`:`${e.slice(0,3)}...${e.slice(-4)}`}function Tr(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.access_token=="string"&&typeof t.access_token_expires_at=="number"&&typeof t.refresh_token=="string"&&typeof t.scope=="string"}function vh(e){return Tr(e)?e:null}function Uh(e){let t;try{t=JSON.parse(e)}catch{t=null}if(!Tr(t))throw new Error("Stored OAuth credentials are invalid. Please run `resend login` to authenticate again.");return t}async function Rt(e,t,o){if(e)return{type:"api_key",key:e,source:"flag"};let i=process.env.RESEND_API_KEY;if(i)return{type:"api_key",key:i,source:"env"};let r=Ke(),n=t||process.env.RESEND_PROFILE||r?.active_profile||"default";if(r?.storage==="secure_storage"&&r.profiles[n]){let s=r.profiles[n],l=await(await rt()).get(ze,n);if(l){if(s.type==="oauth_grant"){let u=Uh(l);return da(u,n,"secure_storage",o)}return{type:"api_key",key:l,source:"secure_storage",profile:n,permission:s.permission}}}if(r){let s=r.profiles[n];if(s?.type==="api_key"&&s.api_key)return{type:"api_key",key:s.api_key,source:"config",profile:n,permission:s.permission};if(s?.type==="oauth_grant"){let a=vh(s);if(a)return da(a,n,"config",o)}}return null}async function da(e,t,o,i){if(i?.refresh===!1)return{type:"oauth_grant",access_token:e.access_token,profile:t,scope:e.scope,source:o};let{access_token:r,scope:n}=await ea(e,t);return{type:"oauth_grant",access_token:r,profile:t,scope:n,source:o}}async function ua(e,t,o){let i=t||"default",r=ue(i);if(r)throw new Error(r);let n=await rt();return n.isSecure?{configPath:await nt(ht(),async()=>{await n.set(ze,i,e);let a=Ke()||{active_profile:"default",profiles:{}},l={...a.profiles,[i]:{type:"api_key",...o&&{permission:o}}};return gt({...a,storage:"secure_storage",profiles:l,...Object.keys(l).length===1?{active_profile:i}:{}})}),backend:n}:{configPath:Cr(e,i,o),backend:n}}async function ti(e,t){let o=t||"default",i=ue(o);if(i)throw new Error(i);let r=await rt();return{configPath:await nt(ht(),async()=>{let s=Ke()||{active_profile:"default",profiles:{}},a=r.isSecure?{type:"oauth_grant",scope:e.scope}:{type:"oauth_grant",...e};r.isSecure&&await r.set(ze,o,JSON.stringify(e));let l={...s.profiles,[o]:a};try{return gt({...s,storage:r.isSecure?"secure_storage":"file",profiles:l,...Object.keys(l).length===1?{active_profile:o}:{}})}catch(u){throw r.isSecure&&await r.delete(ze,o).catch(()=>{}),u}}),backend:r}}async function ii(e){return nt(ht(),async()=>{let t=Ke(),o=e||process.env.RESEND_PROFILE||t?.active_profile||"default";if(!t?.profiles[o])throw new Error(t?`Profile "${o}" not found. Available profiles: ${Object.keys(t.profiles).join(", ")}`:"No credentials file found.");if(t.storage==="secure_storage"){let s=await rt();if(s.isSecure&&!await s.delete(ze,o))throw new Error(`Failed to remove API key for profile "${o}" from ${s.name}. Credential may still exist in secure storage.`)}let{[o]:i,...r}=t.profiles;if(Object.keys(r).length===0){let s=Ft();return(0,$e.unlinkSync)(s),s}let n=t.active_profile===o?Object.keys(r)[0]||"default":t.active_profile;return gt({...t,active_profile:n,profiles:r})})}async function ma(){return nt(ht(),async()=>{let e=Dr(),t=Ft();if(e?.storage==="secure_storage"){let o=await rt();if(o.isSecure){let i=Object.keys(e.profiles),r=await Promise.all(i.map(s=>o.delete(ze,s))),n=i.filter((s,a)=>!r[a]);if(n.length>0){let s=Object.fromEntries(Object.entries(e.profiles).filter(([l])=>!r[i.indexOf(l)])),a=Object.keys(s);throw gt({...e,active_profile:e.active_profile&&s[e.active_profile]?e.active_profile:a[0]??"default",profiles:s}),new Error(`Failed to remove API keys from ${o.name} for profiles: ${n.join(", ")}. Credentials may still exist in secure storage.`)}}}return(0,$e.existsSync)(t)&&(0,$e.unlinkSync)(t),t})}async function ri(e,t){if(e===t)return;let o=ue(t);if(o)throw new Error(o);await nt(ht(),async()=>{let i=Ke();if(!i)throw new Error("No credentials file found. Run: resend login");if(!i.profiles[e])throw new Error(`Profile "${e}" not found. Available profiles: ${Object.keys(i.profiles).join(", ")}`);if(i.profiles[t])throw new Error(`Profile "${t}" already exists.`);if(i.storage==="secure_storage"){let s=await rt();if(s.isSecure){let a=await s.get(ze,e);if(a&&(await s.set(ze,t,a),!await s.delete(ze,e))){let u=await s.delete(ze,t);throw new Error(u?`Failed to remove old credential "${e}" from ${s.name} during rename. The rename has been rolled back.`:`Failed to remove old credential "${e}" from ${s.name} during rename. Rollback also failed \u2014 credential "${t}" may still exist in secure storage.`)}}}let{[e]:r,...n}=i.profiles;gt({...i,active_profile:i.active_profile===e?t:i.active_profile,profiles:{...n,[t]:r}})})}var $e,ca,Ht,Qt,ht,ye=be(()=>{"use strict";$e=require("node:fs"),ca=require("node:os"),Ht=require("node:path");Es();Sr();Ws();ei();aa();Qt=`Sending-only keys work with: emails send, emails batch, broadcasts send.
147
+ Create a full access key at https://resend.com/api-keys`;ht=()=>(0,Ht.join)(Qe(),"credentials.json.lock")});function w(){return!(!process.stdin.isTTY||!process.stdout.isTTY||process.env.CI==="true"||process.env.CI==="1"||process.env.GITHUB_ACTIONS||process.env.TERM==="dumb")}var st,X=be(()=>{"use strict";st=process.platform!=="win32"||!!process.env.WT_SESSION||process.env.TERM_PROGRAM==="vscode"});function Sd(){return(0,Ud.join)(Qe(),"update-state.json")}function lg(){try{return JSON.parse((0,Xt.readFileSync)(Sd(),"utf-8"))}catch{return null}}function dg(e){(0,Xt.mkdirSync)(Qe(),{recursive:!0,mode:448}),(0,Xt.writeFileSync)(Sd(),JSON.stringify(e),{mode:384})}function vi(e,t){let o=u=>u.replace(/^v/,"").split(".").map(Number),[i,r,n]=o(e),[s,a,l]=o(t);return s!==i?s>i:a!==r?a>r:l>n}async function Qr(){try{let e=await fetch(Hr,{headers:{Accept:"application/vnd.github.v3+json"},signal:AbortSignal.timeout(5e3)});if(!e.ok)return null;let t=await e.json();if(t.prerelease||t.draft)return null;let o=t.tag_name?.replace(/^v/,"");return!o||!/^\d+\.\d+\.\d+$/.test(o)?null:o}catch{return null}}function cg(e){return!!(e?.json||process.env.RESEND_NO_UPDATE_NOTIFIER==="1"||process.env.CI==="true"||process.env.CI==="1"||process.env.GITHUB_ACTIONS||!process.stdout.isTTY)}function Kd(){let e=Ui();return e.startsWith("npm")?"npm":e.startsWith("brew")?"homebrew":e.startsWith("curl")||e.startsWith("irm")?"install-script":"manual"}function Ui(){let e=process.execPath||process.argv[0]||"",t=process.argv[1]||"";return process.env.npm_execpath||/node_modules/.test(t)||/node_modules/.test(e)?"npm install -g resend-cli":/\/(Cellar|homebrew)\//i.test(e)?"brew update && brew upgrade resend":/[/\\]\.resend[/\\]bin[/\\]/.test(e)?process.platform==="win32"?"irm https://resend.com/install.ps1 | iex":"curl -fsSL https://resend.com/install.sh | bash":"https://github.com/resend/resend-cli/releases/latest"}function vd(e){let t=Ui(),o=t.startsWith("http"),i="\x1B[2m",r="\x1B[33m",n="\x1B[36m",s="\x1B[0m",a=["",`${i}Update available: ${r}v${se}${s}${i} \u2192 ${n}v${e}${s}`,`${i}${o?"Visit":"Run"}: ${n}${t}${s}`];return process.platform==="win32"&&a.push(`${i}Or download from: ${n}https://github.com/resend/resend-cli/releases/latest${s}`),a.push(""),a.join(`
148
+ `)}async function kd(e){if(cg(e))return;let t=lg(),o=Date.now();if(t&&o-t.lastChecked<ag){vi(se,t.latestVersion)&&process.stderr.write(vd(t.latestVersion));return}let i=await Qr();i&&(dg({lastChecked:o,latestVersion:i}),vi(se,i)&&process.stderr.write(vd(i)))}var Xt,Ud,ag,Hr,Uo=be(()=>{"use strict";Xt=require("node:fs"),Ud=require("node:path");ye();Kt();ag=3600*1e3,Hr="https://api.github.com/repos/resend/resend-cli/releases/latest"});var Dm={};io(Dm,{flushFromFile:()=>Zg,flushPayload:()=>Rm,getOrCreateAnonymousId:()=>Fm,getSpoolDir:()=>Xr,isDisabled:()=>_m,trackCommand:()=>Zr});function Jg(){return Wg[process.platform]??process.platform}function Xr(){let e=(0,Xe.join)(Qe(),"telemetry-spool");return(0,V.mkdirSync)(e,{recursive:!0,mode:448}),e}function _m(){return!km||process.env.DO_NOT_TRACK==="1"||process.env.RESEND_TELEMETRY_DISABLED==="1"}function Fm(){let e=Qe(),t=(0,Xe.join)(e,"telemetry-id");try{let i=(0,V.readFileSync)(t,"utf-8").trim();if(i)return i}catch{}let o=crypto.randomUUID();return(0,V.mkdirSync)(e,{recursive:!0,mode:448}),(0,V.writeFileSync)(t,o,{mode:384}),o}function Vg(e){if(!e)return;let t=Qe(),o=(0,Xe.join)(t,"telemetry-notice-shown");(0,V.existsSync)(o)||((0,V.mkdirSync)(t,{recursive:!0,mode:448}),(0,V.writeFileSync)(o,"",{mode:384}),process.stderr.write(`
149
149
  Resend collects anonymous CLI usage data to improve the tool.
150
150
  To opt out: export RESEND_TELEMETRY_DISABLED=1
151
151
 
152
- `))}function Xr(e,t){if(!Um())try{let o=w()&&!t.json;Mg(o);let i=Sm(),r={command:e,cli_version:se,os:Ng(),node_version:process.version,interactive:o,install_method:Sc()};t.flags?.length&&(r.flags=t.flags),t.globalFlags?.length&&(r.global_flags=t.globalFlags);let n=crypto.randomUUID(),s=JSON.stringify({api_key:vm,distinct_id:i,event:"cli.used",properties:r,_nonce:n}),a=Yr(),l=(0,Xe.join)(a,`resend-telemetry-${crypto.randomUUID()}.json`),u=(0,V.openSync)(l,V.constants.O_CREAT|V.constants.O_EXCL|V.constants.O_WRONLY|(V.constants.O_NOFOLLOW??0),384);try{(0,V.writeFileSync)(u,s)}finally{(0,V.closeSync)(u)}let m="pkg"in process,p=m?["telemetry","flush",l]:process.execArgv.concat([process.argv[1],"telemetry","flush",l]);(0,wm.spawn)(process.execPath,p,{detached:!0,stdio:"ignore",env:{...process.env,RESEND_TELEMETRY_DISABLED:"1",...m?{PKG_EXECPATH:""}:{}}}).unref()}catch{}}async function Km(e){let t=JSON.parse(e);if(!qg(t))throw new Error("invalid telemetry payload schema");let{_nonce:o,...i}=t,r=JSON.stringify(i),n=await fetch(Hg,{method:"POST",headers:{"Content-Type":"application/json"},body:r,signal:AbortSignal.timeout(3e3)});if(!n.ok)throw new Error(`telemetry flush failed: ${n.status}`)}async function Jg(e){let t=(0,Xe.join)(e),o=Yr(),i=(0,Xe.basename)(t);if((0,Xe.dirname)(t)!==o||!Wg.test(i)||(0,V.realpathSync)((0,Xe.dirname)(t))!==(0,V.realpathSync)(o))throw new Error("invalid telemetry flush path");let r=(0,V.openSync)(t,V.constants.O_RDONLY|V.constants.O_NOFOLLOW),n;try{let s=(0,V.fstatSync)(r);if(!s.isFile()||s.nlink!==1)throw new Error("invalid telemetry flush path");n=(0,V.readFileSync)(r,"utf-8")}finally{(0,V.closeSync)(r)}try{await Km(n)}finally{(0,V.unlinkSync)(t)}}var wm,V,Xe,vm,Hg,Qg,xm,qg,Lg,Wg,Zr=be(()=>{"use strict";wm=require("node:child_process"),V=require("node:fs"),Xe=require("node:path");ye();X();Uo();Kt();vm="phc_AgEBpcQTRsBl3UgQX2U8XvimTlgdXG6YEhfvJl2cUfc",Hg="https://us.i.posthog.com/capture/",Qg={darwin:"macOS",win32:"Windows",linux:"Linux"};xm=new Set(["api_key","distinct_id","event","properties","_nonce"]),qg=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e,o=Object.keys(t);return o.length!==xm.size||o.some(i=>!xm.has(i))?!1:typeof t.api_key=="string"&&typeof t.distinct_id=="string"&&t.event==="cli.used"&&typeof t.properties=="object"&&t.properties!==null&&!Array.isArray(t.properties)&&typeof t._nonce=="string"&&t._nonce.length>0};Lg="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Wg=new RegExp(`^resend-telemetry-${Lg}\\.json$`)});var gn=me(hn(),1),{program:iA,createCommand:rA,createArgument:nA,createOption:sA,CommanderError:aA,InvalidArgumentError:lA,InvalidOptionArgumentError:cA,Command:c,Argument:An,Option:q,Help:dA}=gn.default;var oo=me(Je(),1);var tp=`Global options:
152
+ `))}function Zr(e,t){if(!_m())try{let o=w()&&!t.json;Vg(o);let i=Fm(),r={command:e,cli_version:se,os:Jg(),node_version:process.version,interactive:o,install_method:Kd()};t.flags?.length&&(r.flags=t.flags),t.globalFlags?.length&&(r.global_flags=t.globalFlags);let n=crypto.randomUUID(),s=JSON.stringify({api_key:km,distinct_id:i,event:"cli.used",properties:r,_nonce:n}),a=Xr(),l=(0,Xe.join)(a,`resend-telemetry-${crypto.randomUUID()}.json`),u=(0,V.openSync)(l,V.constants.O_CREAT|V.constants.O_EXCL|V.constants.O_WRONLY|(V.constants.O_NOFOLLOW??0),384);try{(0,V.writeFileSync)(u,s)}finally{(0,V.closeSync)(u)}let m="pkg"in process,p=m?["telemetry","flush",l]:process.execArgv.concat([process.argv[1],"telemetry","flush",l]);(0,Km.spawn)(process.execPath,p,{detached:!0,stdio:"ignore",env:{...process.env,RESEND_TELEMETRY_DISABLED:"1",...m?{PKG_EXECPATH:""}:{}}}).unref()}catch{}}async function Rm(e){let t=JSON.parse(e);if(!zg(t))throw new Error("invalid telemetry payload schema");let{_nonce:o,...i}=t,r=JSON.stringify(i),n=await fetch(Lg,{method:"POST",headers:{"Content-Type":"application/json"},body:r,signal:AbortSignal.timeout(3e3)});if(!n.ok)throw new Error(`telemetry flush failed: ${n.status}`)}async function Zg(e){let t=(0,Xe.join)(e),o=Xr(),i=(0,Xe.basename)(t);if((0,Xe.dirname)(t)!==o||!Xg.test(i)||(0,V.realpathSync)((0,Xe.dirname)(t))!==(0,V.realpathSync)(o))throw new Error("invalid telemetry flush path");let r=(0,V.openSync)(t,V.constants.O_RDONLY|V.constants.O_NOFOLLOW),n;try{let s=(0,V.fstatSync)(r);if(!s.isFile()||s.nlink!==1)throw new Error("invalid telemetry flush path");n=(0,V.readFileSync)(r,"utf-8")}finally{(0,V.closeSync)(r)}try{await Rm(n)}finally{(0,V.unlinkSync)(t)}}var Km,V,Xe,km,Lg,Wg,Sm,zg,Yg,Xg,en=be(()=>{"use strict";Km=require("node:child_process"),V=require("node:fs"),Xe=require("node:path");ye();X();Uo();Kt();km="phc_AgEBpcQTRsBl3UgQX2U8XvimTlgdXG6YEhfvJl2cUfc",Lg="https://us.i.posthog.com/capture/",Wg={darwin:"macOS",win32:"Windows",linux:"Linux"};Sm=new Set(["api_key","distinct_id","event","properties","_nonce"]),zg=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e,o=Object.keys(t);return o.length!==Sm.size||o.some(i=>!Sm.has(i))?!1:typeof t.api_key=="string"&&typeof t.distinct_id=="string"&&t.event==="cli.used"&&typeof t.properties=="object"&&t.properties!==null&&!Array.isArray(t.properties)&&typeof t._nonce=="string"&&t._nonce.length>0};Yg="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Xg=new RegExp(`^resend-telemetry-${Yg}\\.json$`)});var An=me(gn(),1),{program:lA,createCommand:dA,createArgument:cA,createOption:uA,CommanderError:mA,InvalidArgumentError:pA,InvalidOptionArgumentError:fA,Command:d,Argument:bn,Option:q,Help:hA}=An.default;var oo=me(Je(),1);var np=`Global options:
153
153
  --api-key <key> API key (or set RESEND_API_KEY env var)
154
154
  -p, --profile <name> Profile to use (overrides RESEND_PROFILE)
155
155
  --json Force JSON output (also auto-enabled when stdout is piped)
156
- -q, --quiet Suppress spinners and status output (implies --json)`,op=`Global options:
156
+ -q, --quiet Suppress spinners and status output (implies --json)`,sp=`Global options:
157
157
  -p, --profile <name> Profile to use
158
158
  --json Force JSON output
159
- -q, --quiet Suppress spinners and status output (implies --json)`,ip=' {"error":{"message":"<message>","code":"<code>"}}';function d(e){let t=[];return e.context!=null&&t.push(e.context),t.push(e.setup?op:tp),e.output!=null&&t.push(`Output (--json or piped):
159
+ -q, --quiet Suppress spinners and status output (implies --json)`,ap=' {"error":{"message":"<message>","code":"<code>"}}';function c(e){let t=[];return e.context!=null&&t.push(e.context),t.push(e.setup?sp:np),e.output!=null&&t.push(`Output (--json or piped):
160
160
  ${e.output}`),e.errorCodes!=null&&t.push(`Errors (exit code 1, JSON on stderr when using --json or non-TTY):
161
- ${ip}
161
+ ${ap}
162
162
  Codes: ${e.errorCodes.join(" | ")}`),t.push(`Examples:
163
163
  ${e.examples.map(o=>` $ ${o}`).join(`
164
164
  `)}`),`
165
165
  ${t.join(`
166
166
 
167
- `)}`}var Tt=require("node:util"),no=require("node:process");var Bn=me(require("node:readline"),1);var Cn=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let o=0;for(e.lastIndex=0;e.test(t);)o+=1;return t.length-o}})(),xn=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,wn=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var rp=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,np=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,vn=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,sp=/\t{1,1000}/y,Un=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,ap=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,lp=/\p{M}+/gu,cp={limit:1/0,ellipsis:""},Sn=(e,t={},o={})=>{let i=t.limit??1/0,r=t.ellipsis??"",n=t?.ellipsisWidth??(r?Sn(r,cp,o).width:0),s=0,a=o.controlWidth??0,l=o.tabWidth??8,u=o.emojiWidth??2,m=2,p=o.regularWidth??1,f=o.wideWidth??m,y=[[ap,p],[rp,s],[np,a],[sp,l],[Un,u],[vn,f]],A=0,b=0,x=e.length,v=0,U=!1,K=x,k=Math.max(0,i-n),I=0,G=0,Q=0,$=0;e:for(;;){if(G>I||b>=x&&b>A){let L=e.slice(I,G)||e.slice(A,b);v=0;for(let ve of L.replaceAll(lp,"")){let re=ve.codePointAt(0)||0;if(xn(re)?$=m:wn(re)?$=f:$=p,Q+$>k&&(K=Math.min(K,Math.max(I,A)+v)),Q+$>i){U=!0;break e}v+=ve.length,Q+=$}I=G=0}if(b>=x)break e;for(let L=0,ve=y.length;L<ve;L++){let[re,Ut]=y[L];if(re.lastIndex=b,re.test(e)){if(v=re===vn?Cn(e.slice(b,re.lastIndex)):re===Un?1:re.lastIndex-b,$=v*Ut,Q+$>k&&(K=Math.min(K,b+Math.floor((k-Q)/Ut))),Q+$>i){U=!0;break e}Q+=$,I=A,G=b,b=A=re.lastIndex;continue e}}b+=1}return{width:U?k:Q,index:U?K:x,truncated:U,ellipsed:U&&i>=n}},Kn=Sn;var dp={limit:1/0,ellipsis:"",ellipsisWidth:0},up=(e,t={})=>Kn(e,dp,t).width,Ue=up;var Do="\x1B",Dn="\x9B",mp=39,zi="\x07",Tn="[",pp="]",On="m",Yi=`${pp}8;;`,kn=new RegExp(`(?:\\${Tn}(?<code>\\d+)m|\\${Yi}(?<uri>.*)${zi})`,"y"),_n=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Fn=e=>`${Do}${Tn}${e}${On}`,Rn=e=>`${Do}${Yi}${e}${zi}`,Vi=(e,t,o)=>{let i=t[Symbol.iterator](),r=!1,n=!1,s=e.at(-1),a=s===void 0?0:Ue(s),l=i.next(),u=i.next(),m=0;for(;!l.done;){let p=l.value,f=Ue(p);a+f<=o?e[e.length-1]+=p:(e.push(p),a=0),(p===Do||p===Dn)&&(r=!0,n=t.startsWith(Yi,m+1)),r?n?p===zi&&(r=!1,n=!1):p===On&&(r=!1):(a+=f,a===o&&!u.done&&(e.push(""),a=0)),l=u,u=i.next(),m+=p.length}s=e.at(-1),!a&&s!==void 0&&s.length&&e.length>1&&(e[e.length-2]+=e.pop())},fp=e=>{let t=e.split(" "),o=t.length;for(;o&&!Ue(t[o-1]);)o--;return o===t.length?e:t.slice(0,o).join(" ")+t.slice(o).join("")},hp=(e,t,o={})=>{if(o.trim!==!1&&e.trim()==="")return"";let i="",r,n,s=e.split(" "),a=[""],l=0;for(let p=0;p<s.length;p++){let f=s[p];if(o.trim!==!1){let A=a.at(-1)??"",b=A.trimStart();A.length!==b.length&&(a[a.length-1]=b,l=Ue(b))}p!==0&&(l>=t&&(o.wordWrap===!1||o.trim===!1)&&(a.push(""),l=0),(l||o.trim===!1)&&(a[a.length-1]+=" ",l++));let y=Ue(f);if(o.hard&&y>t){let A=t-l,b=1+Math.floor((y-A-1)/t);Math.floor((y-1)/t)<b&&a.push(""),Vi(a,f,t),l=Ue(a.at(-1)??"");continue}if(l+y>t&&l&&y){if(o.wordWrap===!1&&l<t){Vi(a,f,t),l=Ue(a.at(-1)??"");continue}a.push(""),l=0}if(l+y>t&&o.wordWrap===!1){Vi(a,f,t),l=Ue(a.at(-1)??"");continue}a[a.length-1]+=f,l+=y}o.trim!==!1&&(a=a.map(p=>fp(p)));let u=a.join(`
168
- `),m=!1;for(let p=0;p<u.length;p++){let f=u[p];if(i+=f,m)m=!1;else if(m=f>="\uD800"&&f<="\uDBFF",m)continue;if(f===Do||f===Dn){kn.lastIndex=p+1;let A=kn.exec(u)?.groups;if(A?.code!==void 0){let b=Number.parseFloat(A.code);r=b===mp?void 0:b}else A?.uri!==void 0&&(n=A.uri.length===0?void 0:A.uri)}if(u[p+1]===`
169
- `){n&&(i+=Rn(""));let y=r?_n(r):void 0;r&&y&&(i+=Fn(y))}else f===`
170
- `&&(r&&_n(r)&&(i+=Fn(r)),n&&(i+=Rn(n)))}return i},gp=/\r?\n/;function ct(e,t,o){return String(e).normalize().split(gp).map(i=>hp(i,t,o)).join(`
171
- `)}var Ie=me(Zi(),1);function it(e,t,o){if(!o.some(s=>!s.disabled))return e;let i=e+t,r=Math.max(o.length-1,0),n=i<0?r:i>r?0:i;return o[n].disabled?it(n,t<0?-1:1,o):n}var yp=["up","down","left","right","space","enter","cancel"],Cp=["January","February","March","April","May","June","July","August","September","October","November","December"],Ae={actions:new Set(yp),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...Cp],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function In(e,t){if(typeof e=="string")return Ae.aliases.get(e)===t;for(let o of e)if(o!==void 0&&In(o,t))return!0;return!1}function xp(e,t){if(e===t)return;let o=e.split(`
167
+ `)}`}var Tt=require("node:util"),no=require("node:process");var In=me(require("node:readline"),1);var xn=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let o=0;for(e.lastIndex=0;e.test(t);)o+=1;return t.length-o}})(),wn=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,vn=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var lp=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,dp=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Un=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,cp=/\t{1,1000}/y,Sn=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,up=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,mp=/\p{M}+/gu,pp={limit:1/0,ellipsis:""},Kn=(e,t={},o={})=>{let i=t.limit??1/0,r=t.ellipsis??"",n=t?.ellipsisWidth??(r?Kn(r,pp,o).width:0),s=0,a=o.controlWidth??0,l=o.tabWidth??8,u=o.emojiWidth??2,m=2,p=o.regularWidth??1,f=o.wideWidth??m,y=[[up,p],[lp,s],[dp,a],[cp,l],[Sn,u],[Un,f]],A=0,b=0,x=e.length,v=0,U=!1,K=x,k=Math.max(0,i-n),j=0,G=0,N=0,$=0;e:for(;;){if(G>j||b>=x&&b>A){let L=e.slice(j,G)||e.slice(A,b);v=0;for(let ve of L.replaceAll(mp,"")){let re=ve.codePointAt(0)||0;if(wn(re)?$=m:vn(re)?$=f:$=p,N+$>k&&(K=Math.min(K,Math.max(j,A)+v)),N+$>i){U=!0;break e}v+=ve.length,N+=$}j=G=0}if(b>=x)break e;for(let L=0,ve=y.length;L<ve;L++){let[re,Ut]=y[L];if(re.lastIndex=b,re.test(e)){if(v=re===Un?xn(e.slice(b,re.lastIndex)):re===Sn?1:re.lastIndex-b,$=v*Ut,N+$>k&&(K=Math.min(K,b+Math.floor((k-N)/Ut))),N+$>i){U=!0;break e}N+=$,j=A,G=b,b=A=re.lastIndex;continue e}}b+=1}return{width:U?k:N,index:U?K:x,truncated:U,ellipsed:U&&i>=n}},kn=Kn;var fp={limit:1/0,ellipsis:"",ellipsisWidth:0},hp=(e,t={})=>kn(e,fp,t).width,Ue=hp;var Do="\x1B",Tn="\x9B",gp=39,Yi="\x07",On="[",Ap="]",En="m",Xi=`${Ap}8;;`,_n=new RegExp(`(?:\\${On}(?<code>\\d+)m|\\${Xi}(?<uri>.*)${Yi})`,"y"),Fn=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Rn=e=>`${Do}${On}${e}${En}`,Dn=e=>`${Do}${Xi}${e}${Yi}`,zi=(e,t,o)=>{let i=t[Symbol.iterator](),r=!1,n=!1,s=e.at(-1),a=s===void 0?0:Ue(s),l=i.next(),u=i.next(),m=0;for(;!l.done;){let p=l.value,f=Ue(p);a+f<=o?e[e.length-1]+=p:(e.push(p),a=0),(p===Do||p===Tn)&&(r=!0,n=t.startsWith(Xi,m+1)),r?n?p===Yi&&(r=!1,n=!1):p===En&&(r=!1):(a+=f,a===o&&!u.done&&(e.push(""),a=0)),l=u,u=i.next(),m+=p.length}s=e.at(-1),!a&&s!==void 0&&s.length&&e.length>1&&(e[e.length-2]+=e.pop())},bp=e=>{let t=e.split(" "),o=t.length;for(;o&&!Ue(t[o-1]);)o--;return o===t.length?e:t.slice(0,o).join(" ")+t.slice(o).join("")},yp=(e,t,o={})=>{if(o.trim!==!1&&e.trim()==="")return"";let i="",r,n,s=e.split(" "),a=[""],l=0;for(let p=0;p<s.length;p++){let f=s[p];if(o.trim!==!1){let A=a.at(-1)??"",b=A.trimStart();A.length!==b.length&&(a[a.length-1]=b,l=Ue(b))}p!==0&&(l>=t&&(o.wordWrap===!1||o.trim===!1)&&(a.push(""),l=0),(l||o.trim===!1)&&(a[a.length-1]+=" ",l++));let y=Ue(f);if(o.hard&&y>t){let A=t-l,b=1+Math.floor((y-A-1)/t);Math.floor((y-1)/t)<b&&a.push(""),zi(a,f,t),l=Ue(a.at(-1)??"");continue}if(l+y>t&&l&&y){if(o.wordWrap===!1&&l<t){zi(a,f,t),l=Ue(a.at(-1)??"");continue}a.push(""),l=0}if(l+y>t&&o.wordWrap===!1){zi(a,f,t),l=Ue(a.at(-1)??"");continue}a[a.length-1]+=f,l+=y}o.trim!==!1&&(a=a.map(p=>bp(p)));let u=a.join(`
168
+ `),m=!1;for(let p=0;p<u.length;p++){let f=u[p];if(i+=f,m)m=!1;else if(m=f>="\uD800"&&f<="\uDBFF",m)continue;if(f===Do||f===Tn){_n.lastIndex=p+1;let A=_n.exec(u)?.groups;if(A?.code!==void 0){let b=Number.parseFloat(A.code);r=b===gp?void 0:b}else A?.uri!==void 0&&(n=A.uri.length===0?void 0:A.uri)}if(u[p+1]===`
169
+ `){n&&(i+=Dn(""));let y=r?Fn(r):void 0;r&&y&&(i+=Rn(y))}else f===`
170
+ `&&(r&&Fn(r)&&(i+=Rn(r)),n&&(i+=Dn(n)))}return i},Cp=/\r?\n/;function dt(e,t,o){return String(e).normalize().split(Cp).map(i=>yp(i,t,o)).join(`
171
+ `)}var Ie=me(er(),1);function it(e,t,o){if(!o.some(s=>!s.disabled))return e;let i=e+t,r=Math.max(o.length-1,0),n=i<0?r:i>r?0:i;return o[n].disabled?it(n,t<0?-1:1,o):n}var vp=["up","down","left","right","space","enter","cancel"],Up=["January","February","March","April","May","June","July","August","September","October","November","December"],Ae={actions:new Set(vp),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...Up],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function jn(e,t){if(typeof e=="string")return Ae.aliases.get(e)===t;for(let o of e)if(o!==void 0&&jn(o,t))return!0;return!1}function Sp(e,t){if(e===t)return;let o=e.split(`
172
172
  `),i=t.split(`
173
- `),r=Math.max(o.length,i.length),n=[];for(let s=0;s<r;s++)o[s]!==i[s]&&n.push(s);return{lines:n,numLinesBefore:o.length,numLinesAfter:i.length,numLines:r}}var vA=globalThis.process.platform.startsWith("win"),er=Symbol("clack:cancel");function F(e){return e===er}function To(e,t){let o=e;o.isTTY&&o.setRawMode(t)}var jo=e=>"columns"in e&&typeof e.columns=="number"?e.columns:80,tr=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;function dt(e,t,o,i=o,r=o,n){let s=jo(e??no.stdout);return ct(t,s-o.length,{hard:!0,trim:!1}).split(`
173
+ `),r=Math.max(o.length,i.length),n=[];for(let s=0;s<r;s++)o[s]!==i[s]&&n.push(s);return{lines:n,numLinesBefore:o.length,numLinesAfter:i.length,numLines:r}}var _A=globalThis.process.platform.startsWith("win"),tr=Symbol("clack:cancel");function R(e){return e===tr}function To(e,t){let o=e;o.isTTY&&o.setRawMode(t)}var jo=e=>"columns"in e&&typeof e.columns=="number"?e.columns:80,or=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;function ct(e,t,o,i=o,r=o,n){let s=jo(e??no.stdout);return dt(t,s-o.length,{hard:!0,trim:!1}).split(`
174
174
  `).map((a,l,u)=>{let m=n?n(a,l):a;return l===0?`${i}${m}`:l===u.length-1?`${r}${m}`:`${o}${m}`}).join(`
175
- `)}var Ot=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(e,t=!0){let{input:o=no.stdin,output:i=no.stdout,render:r,signal:n,...s}=e;this.opts=s,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=t,this._abortSignal=n,this.input=o,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let o=this._subscribers.get(e)??[];o.push(t),this._subscribers.set(e,o)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let o=this._subscribers.get(e)??[],i=[];for(let r of o)r.cb(...t),r.once&&i.push(()=>o.splice(o.indexOf(r),1));for(let r of i)r()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(er);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=Bn.default.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),To(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(Ie.cursor.show),this.output.off("resize",this.render),To(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(Ie.cursor.show),this.output.off("resize",this.render),To(this.input,!1),e(er)})})}_isActionKey(e,t){return e===" "}_shouldSubmit(e,t){return!0}_setValue(e){this.value=e,this.emit("value",this.value)}_setUserInput(e,t){this.userInput=e??"",this.emit("userInput",this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(e,t){if(this._track&&t.name!=="return"&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&Ae.aliases.has(t.name)&&this.emit("cursor",Ae.aliases.get(t.name)),Ae.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),this.emit("key",e?.toLowerCase(),t),t?.name==="return"&&this._shouldSubmit(e,t)){if(this.opts.validate){let o=this.opts.validate(this.value);o&&(this.error=o instanceof Error?o.message:o,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}In([e,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
176
- `),To(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=ct(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
177
- `).length-1;this.output.write(Ie.cursor.move(-999,e*-1))}render(){let e=ct(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(Ie.cursor.hide);else{let t=xp(this._prevFrame,e),o=tr(this.output);if(this.restoreCursor(),t){let i=Math.max(0,t.numLinesAfter-o),r=Math.max(0,t.numLinesBefore-o),n=t.lines.find(s=>s>=i);if(n===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(Ie.cursor.move(0,n-r)),this.output.write(Ie.erase.lines(1));let s=e.split(`
175
+ `)}var Ot=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(e,t=!0){let{input:o=no.stdin,output:i=no.stdout,render:r,signal:n,...s}=e;this.opts=s,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=t,this._abortSignal=n,this.input=o,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let o=this._subscribers.get(e)??[];o.push(t),this._subscribers.set(e,o)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let o=this._subscribers.get(e)??[],i=[];for(let r of o)r.cb(...t),r.once&&i.push(()=>o.splice(o.indexOf(r),1));for(let r of i)r()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(tr);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=In.default.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),To(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(Ie.cursor.show),this.output.off("resize",this.render),To(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(Ie.cursor.show),this.output.off("resize",this.render),To(this.input,!1),e(tr)})})}_isActionKey(e,t){return e===" "}_shouldSubmit(e,t){return!0}_setValue(e){this.value=e,this.emit("value",this.value)}_setUserInput(e,t){this.userInput=e??"",this.emit("userInput",this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(e,t){if(this._track&&t.name!=="return"&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&Ae.aliases.has(t.name)&&this.emit("cursor",Ae.aliases.get(t.name)),Ae.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),this.emit("key",e?.toLowerCase(),t),t?.name==="return"&&this._shouldSubmit(e,t)){if(this.opts.validate){let o=this.opts.validate(this.value);o&&(this.error=o instanceof Error?o.message:o,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}jn([e,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
176
+ `),To(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=dt(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
177
+ `).length-1;this.output.write(Ie.cursor.move(-999,e*-1))}render(){let e=dt(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(Ie.cursor.hide);else{let t=Sp(this._prevFrame,e),o=or(this.output);if(this.restoreCursor(),t){let i=Math.max(0,t.numLinesAfter-o),r=Math.max(0,t.numLinesBefore-o),n=t.lines.find(s=>s>=i);if(n===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(Ie.cursor.move(0,n-r)),this.output.write(Ie.erase.lines(1));let s=e.split(`
178
178
  `);this.output.write(s[n]),this._prevFrame=e,this.output.write(Ie.cursor.move(0,s.length-n-1));return}else if(t.lines.length>1){if(i<r)n=i;else{let a=n-r;a>0&&this.output.write(Ie.cursor.move(0,a))}this.output.write(Ie.erase.down());let s=e.split(`
179
179
  `).slice(n);this.output.write(s.join(`
180
- `)),this._prevFrame=e;return}}this.output.write(Ie.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};function wp(e,t){if(e===void 0||t.length===0)return 0;let o=t.findIndex(i=>i.value===e);return o!==-1?o:0}function vp(e,t){return(t.label??String(t.value)).toLowerCase().includes(e.toLowerCase())}function Up(e,t){if(t)return e?t:t[0]}var jn=class extends Ot{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#e=0;#i="";#t;#o;#r;get cursor(){return this.#e}get userInputWithCursor(){if(!this.userInput)return(0,Tt.styleText)(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}\u2588`;let e=this.userInput.slice(0,this._cursor),[t,...o]=this.userInput.slice(this._cursor);return`${e}${(0,Tt.styleText)("inverse",t)}${o.join("")}`}get options(){return typeof this.#o=="function"?this.#o():this.#o}constructor(e){super(e),this.#o=e.options,this.#r=e.placeholder;let t=this.options;this.filteredOptions=[...t],this.multiple=e.multiple===!0,this.#t=typeof e.options=="function"?e.filter:e.filter??vp;let o;if(e.initialValue&&Array.isArray(e.initialValue)?this.multiple?o=e.initialValue:o=e.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(o=[this.options[0].value]),o)for(let i of o){let r=t.findIndex(n=>n.value===i);r!==-1&&(this.toggleSelected(i),this.#e=r)}this.focusedValue=this.options[this.#e]?.value,this.on("key",(i,r)=>this.#n(i,r)),this.on("userInput",i=>this.#s(i))}_isActionKey(e,t){return e===" "||this.multiple&&this.isNavigating&&t.name==="space"&&e!==void 0&&e!==""}#n(e,t){let o=t.name==="up",i=t.name==="down",r=t.name==="return",n=this.userInput===""||this.userInput===" ",s=this.#r,a=this.options,l=s!==void 0&&s!==""&&a.some(u=>!u.disabled&&(this.#t?this.#t(s,u):!0));if(t.name==="tab"&&n&&l){this.userInput===" "&&this._clearUserInput(),this._setUserInput(s,!0),this.isNavigating=!1;return}o||i?(this.#e=it(this.#e,o?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#e]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):r?this.value=Up(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(t.name==="tab"||this.isNavigating&&t.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected(e){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes(e)?this.selectedValues=this.selectedValues.filter(t=>t!==e):this.selectedValues=[...this.selectedValues,e]:this.selectedValues=[e])}#s(e){if(e!==this.#i){this.#i=e;let t=this.options;e&&this.#t?this.filteredOptions=t.filter(r=>this.#t?.(e,r)):this.filteredOptions=[...t];let o=wp(this.focusedValue,this.filteredOptions);this.#e=it(o,0,this.filteredOptions);let i=this.filteredOptions[this.#e];i&&!i.disabled?this.focusedValue=i.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}},Oo=class extends Ot{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",o=>{this.output.write(Ie.cursor.move(0,-1)),this.value=o,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var Pn=class extends Ot{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(o=>o.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(o=>!e.includes(o.value));this.value=t.map(o=>o.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:o})=>o===e.cursorAt),0);this.cursor=this.options[t].disabled?it(t,1,this.options):t,this.on("key",o=>{o==="a"&&this.toggleAll(),o==="i"&&this.toggleInvert()}),this.on("cursor",o=>{switch(o){case"left":case"up":this.cursor=it(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=it(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}},Eo=class extends Ot{_mask="\u2022";get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state==="submit"||this.state==="cancel")return this.masked;let t=this.userInput;if(this.cursor>=t.length)return`${this.masked}${(0,Tt.styleText)(["inverse","hidden"],"_")}`;let o=this.masked,i=o.slice(0,this.cursor),r=o.slice(this.cursor);return`${i}${(0,Tt.styleText)("inverse",r[0])}${r.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:t,...o}){super(o),this._mask=t??"\u2022",this.on("userInput",i=>{this._setValue(i)})}},Bo=class extends Ot{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(t){super(t,!1),this.options=t.options;let o=this.options.findIndex(({value:r})=>r===t.initialValue),i=o===-1?0:o;this.cursor=this.options[i].disabled?it(i,1,this.options):i,this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=it(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=it(this.cursor,1,this.options);break}this.changeValue()})}};var Io=class extends Ot{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;let o=t.slice(0,this.cursor),[i,...r]=t.slice(this.cursor);return`${o}${(0,Tt.styleText)("inverse",i)}${r.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",o=>{this._setValue(o)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}};var C=require("node:util"),je=me(require("node:process"),1);var Mn=me(Zi(),1);function Sp(){return je.default.platform!=="win32"?je.default.env.TERM!=="linux":!!je.default.env.CI||!!je.default.env.WT_SESSION||!!je.default.env.TERMINUS_SUBLIME||je.default.env.ConEmuTask==="{cmd::Cmder}"||je.default.env.TERM_PROGRAM==="Terminus-Sublime"||je.default.env.TERM_PROGRAM==="vscode"||je.default.env.TERM==="xterm-256color"||je.default.env.TERM==="alacritty"||je.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Kp=Sp();var oe=(e,t)=>Kp?e:t,kp=oe("\u25C6","*"),_p=oe("\u25A0","x"),Fp=oe("\u25B2","x"),or=oe("\u25C7","o"),Rp=oe("\u250C","T"),H=oe("\u2502","|"),Ve=oe("\u2514","\u2014"),jA=oe("\u2510","T"),PA=oe("\u2518","\u2014"),$o=oe("\u25CF",">"),Et=oe("\u25CB"," "),Dp=oe("\u25FB","[\u2022]"),$n=oe("\u25FC","[+]"),Gn=oe("\u25FB","[ ]"),Tp=oe("\u25AA","\u2022"),Hn=oe("\u2500","-"),Op=oe("\u256E","+"),Ep=oe("\u251C","+"),Bp=oe("\u256F","+"),Ip=oe("\u2570","+"),$A=oe("\u256D","+"),jp=oe("\u25CF","\u2022"),Pp=oe("\u25C6","*"),$p=oe("\u25B2","!"),Gp=oe("\u25A0","x"),St=e=>{switch(e){case"initial":case"active":return(0,C.styleText)("cyan",kp);case"cancel":return(0,C.styleText)("red",_p);case"error":return(0,C.styleText)("yellow",Fp);case"submit":return(0,C.styleText)("green",or)}},qn=e=>{switch(e){case"initial":case"active":return(0,C.styleText)("cyan",H);case"cancel":return(0,C.styleText)("red",H);case"error":return(0,C.styleText)("yellow",H);case"submit":return(0,C.styleText)("green",H)}},Qn=(e,t,o,i,r,n=!1)=>{let s=t,a=0;if(n)for(let l=i-1;l>=o&&(s-=e[l].length,a++,!(s<=r));l--);else for(let l=o;l<i&&(s-=e[l].length,a++,!(s<=r));l++);return{lineCount:s,removals:a}},Go=({cursor:e,options:t,style:o,output:i=process.stdout,maxItems:r=Number.POSITIVE_INFINITY,columnPadding:n=0,rowPadding:s=4})=>{let a=jo(i)-n,l=tr(i),u=(0,C.styleText)("dim","..."),m=Math.max(l-s,0),p=Math.max(Math.min(r,m),5),f=0;e>=p-3&&(f=Math.max(Math.min(e-p+3,t.length-p),0));let y=p<t.length&&f>0,A=p<t.length&&f+p<t.length,b=Math.min(f+p,t.length),x=[],v=0;y&&v++,A&&v++;let U=f+(y?1:0),K=b-(A?1:0);for(let I=U;I<K;I++){let G=ct(o(t[I],I===e),a,{hard:!0,trim:!1}).split(`
181
- `);x.push(G),v+=G.length}if(v>m){let I=0,G=0,Q=v,$=e-U,L=m,ve=()=>Qn(x,Q,0,$,L),re=()=>Qn(x,Q,$+1,x.length,L,!0);y?({lineCount:Q,removals:I}=ve(),Q>L&&(A||(L-=1),{lineCount:Q,removals:G}=re())):(A||(L-=1),{lineCount:Q,removals:G}=re(),Q>L&&(L-=1,{lineCount:Q,removals:I}=ve())),I>0&&(y=!0,x.splice(0,I)),G>0&&(A=!0,x.splice(x.length-G,G))}let k=[];y&&k.push(u);for(let I of x)for(let G of I)k.push(G);return A&&k.push(u),k};function Nn(e){return e.label??String(e.value??"")}function Hp(e,t){if(!e)return!0;let o=(t.label??String(t.value??"")).toLowerCase(),i=(t.hint??"").toLowerCase(),r=String(t.value).toLowerCase(),n=e.toLowerCase();return o.includes(n)||i.includes(n)||r.includes(n)}function Qp(e,t){let o=[];for(let i of t)e.includes(i.value)&&o.push(i);return o}var Ln=e=>new jn({options:e.options,initialValue:e.initialValue?[e.initialValue]:void 0,initialUserInput:e.initialUserInput,placeholder:e.placeholder,filter:e.filter??((t,o)=>Hp(t,o)),signal:e.signal,input:e.input,output:e.output,validate:e.validate,render(){let t=e.withGuide??Ae.withGuide,o=t?[`${(0,C.styleText)("gray",H)}`,`${St(this.state)} ${e.message}`]:[`${St(this.state)} ${e.message}`],i=this.userInput,r=this.options,n=e.placeholder,s=i===""&&n!==void 0,a=(l,u)=>{let m=Nn(l),p=l.hint&&l.value===this.focusedValue?(0,C.styleText)("dim",` (${l.hint})`):"";switch(u){case"active":return`${(0,C.styleText)("green",$o)} ${m}${p}`;case"inactive":return`${(0,C.styleText)("dim",Et)} ${(0,C.styleText)("dim",m)}`;case"disabled":return`${(0,C.styleText)("gray",Et)} ${(0,C.styleText)(["strikethrough","gray"],m)}`}};switch(this.state){case"submit":{let l=Qp(this.selectedValues,r),u=l.length>0?` ${(0,C.styleText)("dim",l.map(Nn).join(", "))}`:"",m=t?(0,C.styleText)("gray",H):"";return`${o.join(`
180
+ `)),this._prevFrame=e;return}}this.output.write(Ie.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};function Kp(e,t){if(e===void 0||t.length===0)return 0;let o=t.findIndex(i=>i.value===e);return o!==-1?o:0}function kp(e,t){return(t.label??String(t.value)).toLowerCase().includes(e.toLowerCase())}function _p(e,t){if(t)return e?t:t[0]}var Pn=class extends Ot{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#e=0;#i="";#t;#o;#r;get cursor(){return this.#e}get userInputWithCursor(){if(!this.userInput)return(0,Tt.styleText)(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}\u2588`;let e=this.userInput.slice(0,this._cursor),[t,...o]=this.userInput.slice(this._cursor);return`${e}${(0,Tt.styleText)("inverse",t)}${o.join("")}`}get options(){return typeof this.#o=="function"?this.#o():this.#o}constructor(e){super(e),this.#o=e.options,this.#r=e.placeholder;let t=this.options;this.filteredOptions=[...t],this.multiple=e.multiple===!0,this.#t=typeof e.options=="function"?e.filter:e.filter??kp;let o;if(e.initialValue&&Array.isArray(e.initialValue)?this.multiple?o=e.initialValue:o=e.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(o=[this.options[0].value]),o)for(let i of o){let r=t.findIndex(n=>n.value===i);r!==-1&&(this.toggleSelected(i),this.#e=r)}this.focusedValue=this.options[this.#e]?.value,this.on("key",(i,r)=>this.#n(i,r)),this.on("userInput",i=>this.#s(i))}_isActionKey(e,t){return e===" "||this.multiple&&this.isNavigating&&t.name==="space"&&e!==void 0&&e!==""}#n(e,t){let o=t.name==="up",i=t.name==="down",r=t.name==="return",n=this.userInput===""||this.userInput===" ",s=this.#r,a=this.options,l=s!==void 0&&s!==""&&a.some(u=>!u.disabled&&(this.#t?this.#t(s,u):!0));if(t.name==="tab"&&n&&l){this.userInput===" "&&this._clearUserInput(),this._setUserInput(s,!0),this.isNavigating=!1;return}o||i?(this.#e=it(this.#e,o?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#e]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):r?this.value=_p(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(t.name==="tab"||this.isNavigating&&t.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected(e){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes(e)?this.selectedValues=this.selectedValues.filter(t=>t!==e):this.selectedValues=[...this.selectedValues,e]:this.selectedValues=[e])}#s(e){if(e!==this.#i){this.#i=e;let t=this.options;e&&this.#t?this.filteredOptions=t.filter(r=>this.#t?.(e,r)):this.filteredOptions=[...t];let o=Kp(this.focusedValue,this.filteredOptions);this.#e=it(o,0,this.filteredOptions);let i=this.filteredOptions[this.#e];i&&!i.disabled?this.focusedValue=i.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}},Oo=class extends Ot{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",o=>{this.output.write(Ie.cursor.move(0,-1)),this.value=o,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var $n=class extends Ot{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(o=>o.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(o=>!e.includes(o.value));this.value=t.map(o=>o.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:o})=>o===e.cursorAt),0);this.cursor=this.options[t].disabled?it(t,1,this.options):t,this.on("key",o=>{o==="a"&&this.toggleAll(),o==="i"&&this.toggleInvert()}),this.on("cursor",o=>{switch(o){case"left":case"up":this.cursor=it(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=it(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}},Eo=class extends Ot{_mask="\u2022";get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state==="submit"||this.state==="cancel")return this.masked;let t=this.userInput;if(this.cursor>=t.length)return`${this.masked}${(0,Tt.styleText)(["inverse","hidden"],"_")}`;let o=this.masked,i=o.slice(0,this.cursor),r=o.slice(this.cursor);return`${i}${(0,Tt.styleText)("inverse",r[0])}${r.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:t,...o}){super(o),this._mask=t??"\u2022",this.on("userInput",i=>{this._setValue(i)})}},Bo=class extends Ot{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(t){super(t,!1),this.options=t.options;let o=this.options.findIndex(({value:r})=>r===t.initialValue),i=o===-1?0:o;this.cursor=this.options[i].disabled?it(i,1,this.options):i,this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=it(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=it(this.cursor,1,this.options);break}this.changeValue()})}};var Io=class extends Ot{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;let o=t.slice(0,this.cursor),[i,...r]=t.slice(this.cursor);return`${o}${(0,Tt.styleText)("inverse",i)}${r.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",o=>{this._setValue(o)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}};var C=require("node:util"),je=me(require("node:process"),1);var qn=me(er(),1);function Fp(){return je.default.platform!=="win32"?je.default.env.TERM!=="linux":!!je.default.env.CI||!!je.default.env.WT_SESSION||!!je.default.env.TERMINUS_SUBLIME||je.default.env.ConEmuTask==="{cmd::Cmder}"||je.default.env.TERM_PROGRAM==="Terminus-Sublime"||je.default.env.TERM_PROGRAM==="vscode"||je.default.env.TERM==="xterm-256color"||je.default.env.TERM==="alacritty"||je.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Rp=Fp();var oe=(e,t)=>Rp?e:t,Dp=oe("\u25C6","*"),Tp=oe("\u25A0","x"),Op=oe("\u25B2","x"),ir=oe("\u25C7","o"),Ep=oe("\u250C","T"),Q=oe("\u2502","|"),Ve=oe("\u2514","\u2014"),QA=oe("\u2510","T"),NA=oe("\u2518","\u2014"),$o=oe("\u25CF",">"),Et=oe("\u25CB"," "),Bp=oe("\u25FB","[\u2022]"),Gn=oe("\u25FC","[+]"),Hn=oe("\u25FB","[ ]"),Ip=oe("\u25AA","\u2022"),Qn=oe("\u2500","-"),jp=oe("\u256E","+"),Pp=oe("\u251C","+"),$p=oe("\u256F","+"),Gp=oe("\u2570","+"),MA=oe("\u256D","+"),Hp=oe("\u25CF","\u2022"),Qp=oe("\u25C6","*"),Np=oe("\u25B2","!"),Mp=oe("\u25A0","x"),St=e=>{switch(e){case"initial":case"active":return(0,C.styleText)("cyan",Dp);case"cancel":return(0,C.styleText)("red",Tp);case"error":return(0,C.styleText)("yellow",Op);case"submit":return(0,C.styleText)("green",ir)}},Ln=e=>{switch(e){case"initial":case"active":return(0,C.styleText)("cyan",Q);case"cancel":return(0,C.styleText)("red",Q);case"error":return(0,C.styleText)("yellow",Q);case"submit":return(0,C.styleText)("green",Q)}},Nn=(e,t,o,i,r,n=!1)=>{let s=t,a=0;if(n)for(let l=i-1;l>=o&&(s-=e[l].length,a++,!(s<=r));l--);else for(let l=o;l<i&&(s-=e[l].length,a++,!(s<=r));l++);return{lineCount:s,removals:a}},Go=({cursor:e,options:t,style:o,output:i=process.stdout,maxItems:r=Number.POSITIVE_INFINITY,columnPadding:n=0,rowPadding:s=4})=>{let a=jo(i)-n,l=or(i),u=(0,C.styleText)("dim","..."),m=Math.max(l-s,0),p=Math.max(Math.min(r,m),5),f=0;e>=p-3&&(f=Math.max(Math.min(e-p+3,t.length-p),0));let y=p<t.length&&f>0,A=p<t.length&&f+p<t.length,b=Math.min(f+p,t.length),x=[],v=0;y&&v++,A&&v++;let U=f+(y?1:0),K=b-(A?1:0);for(let j=U;j<K;j++){let G=dt(o(t[j],j===e),a,{hard:!0,trim:!1}).split(`
181
+ `);x.push(G),v+=G.length}if(v>m){let j=0,G=0,N=v,$=e-U,L=m,ve=()=>Nn(x,N,0,$,L),re=()=>Nn(x,N,$+1,x.length,L,!0);y?({lineCount:N,removals:j}=ve(),N>L&&(A||(L-=1),{lineCount:N,removals:G}=re())):(A||(L-=1),{lineCount:N,removals:G}=re(),N>L&&(L-=1,{lineCount:N,removals:j}=ve())),j>0&&(y=!0,x.splice(0,j)),G>0&&(A=!0,x.splice(x.length-G,G))}let k=[];y&&k.push(u);for(let j of x)for(let G of j)k.push(G);return A&&k.push(u),k};function Mn(e){return e.label??String(e.value??"")}function qp(e,t){if(!e)return!0;let o=(t.label??String(t.value??"")).toLowerCase(),i=(t.hint??"").toLowerCase(),r=String(t.value).toLowerCase(),n=e.toLowerCase();return o.includes(n)||i.includes(n)||r.includes(n)}function Lp(e,t){let o=[];for(let i of t)e.includes(i.value)&&o.push(i);return o}var Wn=e=>new Pn({options:e.options,initialValue:e.initialValue?[e.initialValue]:void 0,initialUserInput:e.initialUserInput,placeholder:e.placeholder,filter:e.filter??((t,o)=>qp(t,o)),signal:e.signal,input:e.input,output:e.output,validate:e.validate,render(){let t=e.withGuide??Ae.withGuide,o=t?[`${(0,C.styleText)("gray",Q)}`,`${St(this.state)} ${e.message}`]:[`${St(this.state)} ${e.message}`],i=this.userInput,r=this.options,n=e.placeholder,s=i===""&&n!==void 0,a=(l,u)=>{let m=Mn(l),p=l.hint&&l.value===this.focusedValue?(0,C.styleText)("dim",` (${l.hint})`):"";switch(u){case"active":return`${(0,C.styleText)("green",$o)} ${m}${p}`;case"inactive":return`${(0,C.styleText)("dim",Et)} ${(0,C.styleText)("dim",m)}`;case"disabled":return`${(0,C.styleText)("gray",Et)} ${(0,C.styleText)(["strikethrough","gray"],m)}`}};switch(this.state){case"submit":{let l=Lp(this.selectedValues,r),u=l.length>0?` ${(0,C.styleText)("dim",l.map(Mn).join(", "))}`:"",m=t?(0,C.styleText)("gray",Q):"";return`${o.join(`
182
182
  `)}
183
- ${m}${u}`}case"cancel":{let l=i?` ${(0,C.styleText)(["strikethrough","dim"],i)}`:"",u=t?(0,C.styleText)("gray",H):"";return`${o.join(`
183
+ ${m}${u}`}case"cancel":{let l=i?` ${(0,C.styleText)(["strikethrough","dim"],i)}`:"",u=t?(0,C.styleText)("gray",Q):"";return`${o.join(`
184
184
  `)}
185
- ${u}${l}`}default:{let l=this.state==="error"?"yellow":"cyan",u=t?`${(0,C.styleText)(l,H)} `:"",m=t?(0,C.styleText)(l,Ve):"",p="";if(this.isNavigating||s){let U=s?n:i;p=U!==""?` ${(0,C.styleText)("dim",U)}`:""}else p=` ${this.userInputWithCursor}`;let f=this.filteredOptions.length!==r.length?(0,C.styleText)("dim",` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"",y=this.filteredOptions.length===0&&i?[`${u}${(0,C.styleText)("yellow","No matches found")}`]:[],A=this.state==="error"?[`${u}${(0,C.styleText)("yellow",this.error)}`]:[];t&&o.push(`${u.trimEnd()}`),o.push(`${u}${(0,C.styleText)("dim","Search:")}${p}${f}`,...y,...A);let b=[`${(0,C.styleText)("dim","\u2191/\u2193")} to select`,`${(0,C.styleText)("dim","Enter:")} confirm`,`${(0,C.styleText)("dim","Type:")} to search`],x=[`${u}${b.join(" \u2022 ")}`,m],v=this.filteredOptions.length===0?[]:Go({cursor:this.cursor,options:this.filteredOptions,columnPadding:t?3:0,rowPadding:o.length+x.length,style:(U,K)=>a(U,U.disabled?"disabled":K?"active":"inactive"),maxItems:e.maxItems,output:e.output});return[...o,...v.map(U=>`${u}${U}`),...x].join(`
186
- `)}}}}).prompt();var Ze=e=>{let t=e.active??"Yes",o=e.inactive??"No";return new Oo({active:t,inactive:o,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let i=e.withGuide??Ae.withGuide,r=`${St(this.state)} `,n=i?`${(0,C.styleText)("gray",H)} `:"",s=dt(e.output,e.message,n,r),a=`${i?`${(0,C.styleText)("gray",H)}
185
+ ${u}${l}`}default:{let l=this.state==="error"?"yellow":"cyan",u=t?`${(0,C.styleText)(l,Q)} `:"",m=t?(0,C.styleText)(l,Ve):"",p="";if(this.isNavigating||s){let U=s?n:i;p=U!==""?` ${(0,C.styleText)("dim",U)}`:""}else p=` ${this.userInputWithCursor}`;let f=this.filteredOptions.length!==r.length?(0,C.styleText)("dim",` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"",y=this.filteredOptions.length===0&&i?[`${u}${(0,C.styleText)("yellow","No matches found")}`]:[],A=this.state==="error"?[`${u}${(0,C.styleText)("yellow",this.error)}`]:[];t&&o.push(`${u.trimEnd()}`),o.push(`${u}${(0,C.styleText)("dim","Search:")}${p}${f}`,...y,...A);let b=[`${(0,C.styleText)("dim","\u2191/\u2193")} to select`,`${(0,C.styleText)("dim","Enter:")} confirm`,`${(0,C.styleText)("dim","Type:")} to search`],x=[`${u}${b.join(" \u2022 ")}`,m],v=this.filteredOptions.length===0?[]:Go({cursor:this.cursor,options:this.filteredOptions,columnPadding:t?3:0,rowPadding:o.length+x.length,style:(U,K)=>a(U,U.disabled?"disabled":K?"active":"inactive"),maxItems:e.maxItems,output:e.output});return[...o,...v.map(U=>`${u}${U}`),...x].join(`
186
+ `)}}}}).prompt();var Ze=e=>{let t=e.active??"Yes",o=e.inactive??"No";return new Oo({active:t,inactive:o,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let i=e.withGuide??Ae.withGuide,r=`${St(this.state)} `,n=i?`${(0,C.styleText)("gray",Q)} `:"",s=ct(e.output,e.message,n,r),a=`${i?`${(0,C.styleText)("gray",Q)}
187
187
  `:""}${s}
188
- `,l=this.value?t:o;switch(this.state){case"submit":{let u=i?`${(0,C.styleText)("gray",H)} `:"";return`${a}${u}${(0,C.styleText)("dim",l)}`}case"cancel":{let u=i?`${(0,C.styleText)("gray",H)} `:"";return`${a}${u}${(0,C.styleText)(["strikethrough","dim"],l)}${i?`
189
- ${(0,C.styleText)("gray",H)}`:""}`}default:{let u=i?`${(0,C.styleText)("cyan",H)} `:"",m=i?(0,C.styleText)("cyan",Ve):"";return`${a}${u}${this.value?`${(0,C.styleText)("green",$o)} ${t}`:`${(0,C.styleText)("dim",Et)} ${(0,C.styleText)("dim",t)}`}${e.vertical?i?`
190
- ${(0,C.styleText)("cyan",H)} `:`
188
+ `,l=this.value?t:o;switch(this.state){case"submit":{let u=i?`${(0,C.styleText)("gray",Q)} `:"";return`${a}${u}${(0,C.styleText)("dim",l)}`}case"cancel":{let u=i?`${(0,C.styleText)("gray",Q)} `:"";return`${a}${u}${(0,C.styleText)(["strikethrough","dim"],l)}${i?`
189
+ ${(0,C.styleText)("gray",Q)}`:""}`}default:{let u=i?`${(0,C.styleText)("cyan",Q)} `:"",m=i?(0,C.styleText)("cyan",Ve):"";return`${a}${u}${this.value?`${(0,C.styleText)("green",$o)} ${t}`:`${(0,C.styleText)("dim",Et)} ${(0,C.styleText)("dim",t)}`}${e.vertical?i?`
190
+ ${(0,C.styleText)("cyan",Q)} `:`
191
191
  `:` ${(0,C.styleText)("dim","/")} `}${this.value?`${(0,C.styleText)("dim",Et)} ${(0,C.styleText)("dim",o)}`:`${(0,C.styleText)("green",$o)} ${o}`}
192
192
  ${m}
193
- `}}}}).prompt()};var Wn=async(e,t)=>{let o={},i=Object.keys(e);for(let r of i){let n=e[r],s=await n({results:o})?.catch(a=>{throw a});if(typeof t?.onCancel=="function"&&F(s)){o[r]="canceled",t.onCancel({results:o});continue}o[r]=s}return o};var te={message:(e=[],{symbol:t=(0,C.styleText)("gray",H),secondarySymbol:o=(0,C.styleText)("gray",H),output:i=process.stdout,spacing:r=1,withGuide:n}={})=>{let s=[],a=n??Ae.withGuide,l=a?o:"",u=a?`${t} `:"",m=a?`${o} `:"";for(let f=0;f<r;f++)s.push(l);let p=Array.isArray(e)?e:e.split(`
193
+ `}}}}).prompt()};var Jn=async(e,t)=>{let o={},i=Object.keys(e);for(let r of i){let n=e[r],s=await n({results:o})?.catch(a=>{throw a});if(typeof t?.onCancel=="function"&&R(s)){o[r]="canceled",t.onCancel({results:o});continue}o[r]=s}return o};var te={message:(e=[],{symbol:t=(0,C.styleText)("gray",Q),secondarySymbol:o=(0,C.styleText)("gray",Q),output:i=process.stdout,spacing:r=1,withGuide:n}={})=>{let s=[],a=n??Ae.withGuide,l=a?o:"",u=a?`${t} `:"",m=a?`${o} `:"";for(let f=0;f<r;f++)s.push(l);let p=Array.isArray(e)?e:e.split(`
194
194
  `);if(p.length>0){let[f,...y]=p;f.length>0?s.push(`${u}${f}`):s.push(a?t:"");for(let A of y)A.length>0?s.push(`${m}${A}`):s.push(a?o:"")}i.write(`${s.join(`
195
195
  `)}
196
- `)},info:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("blue",jp)})},success:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("green",Pp)})},step:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("green",or)})},warn:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("yellow",$p)})},warning:(e,t)=>{te.warn(e,t)},error:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("red",Gp)})}},Jn=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ae.withGuide?`${(0,C.styleText)("gray",Ve)} `:"";o.write(`${i}${(0,C.styleText)("red",e)}
196
+ `)},info:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("blue",Hp)})},success:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("green",Qp)})},step:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("green",ir)})},warn:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("yellow",Np)})},warning:(e,t)=>{te.warn(e,t)},error:(e,t)=>{te.message(e,{...t,symbol:(0,C.styleText)("red",Mp)})}},Vn=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ae.withGuide?`${(0,C.styleText)("gray",Ve)} `:"";o.write(`${i}${(0,C.styleText)("red",e)}
197
197
 
198
- `)},Ho=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ae.withGuide?`${(0,C.styleText)("gray",Rp)} `:"";o.write(`${i}${e}
199
- `)},Bt=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ae.withGuide?`${(0,C.styleText)("gray",H)}
198
+ `)},Ho=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ae.withGuide?`${(0,C.styleText)("gray",Ep)} `:"";o.write(`${i}${e}
199
+ `)},Bt=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ae.withGuide?`${(0,C.styleText)("gray",Q)}
200
200
  ${(0,C.styleText)("gray",Ve)} `:"";o.write(`${i}${e}
201
201
 
202
202
  `)};var so=(e,t)=>e.split(`
203
203
  `).map(o=>t(o)).join(`
204
- `),Vn=e=>{let t=(i,r)=>{let n=i.label??String(i.value);return r==="disabled"?`${(0,C.styleText)("gray",Gn)} ${so(n,s=>(0,C.styleText)(["strikethrough","gray"],s))}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint??"disabled"})`)}`:""}`:r==="active"?`${(0,C.styleText)("cyan",Dp)} ${n}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="selected"?`${(0,C.styleText)("green",$n)} ${so(n,s=>(0,C.styleText)("dim",s))}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="cancelled"?`${so(n,s=>(0,C.styleText)(["strikethrough","dim"],s))}`:r==="active-selected"?`${(0,C.styleText)("green",$n)} ${n}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="submitted"?`${so(n,s=>(0,C.styleText)("dim",s))}`:`${(0,C.styleText)("dim",Gn)} ${so(n,s=>(0,C.styleText)("dim",s))}`},o=e.required??!0;return new Pn({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:o,cursorAt:e.cursorAt,validate(i){if(o&&(i===void 0||i.length===0))return`Please select at least one option.
205
- ${(0,C.styleText)("reset",(0,C.styleText)("dim",`Press ${(0,C.styleText)(["gray","bgWhite","inverse"]," space ")} to select, ${(0,C.styleText)("gray",(0,C.styleText)("bgWhite",(0,C.styleText)("inverse"," enter ")))} to submit`))}`},render(){let i=e.withGuide??Ae.withGuide,r=dt(e.output,e.message,i?`${qn(this.state)} `:"",`${St(this.state)} `),n=`${i?`${(0,C.styleText)("gray",H)}
204
+ `),zn=e=>{let t=(i,r)=>{let n=i.label??String(i.value);return r==="disabled"?`${(0,C.styleText)("gray",Hn)} ${so(n,s=>(0,C.styleText)(["strikethrough","gray"],s))}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint??"disabled"})`)}`:""}`:r==="active"?`${(0,C.styleText)("cyan",Bp)} ${n}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="selected"?`${(0,C.styleText)("green",Gn)} ${so(n,s=>(0,C.styleText)("dim",s))}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="cancelled"?`${so(n,s=>(0,C.styleText)(["strikethrough","dim"],s))}`:r==="active-selected"?`${(0,C.styleText)("green",Gn)} ${n}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="submitted"?`${so(n,s=>(0,C.styleText)("dim",s))}`:`${(0,C.styleText)("dim",Hn)} ${so(n,s=>(0,C.styleText)("dim",s))}`},o=e.required??!0;return new $n({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:o,cursorAt:e.cursorAt,validate(i){if(o&&(i===void 0||i.length===0))return`Please select at least one option.
205
+ ${(0,C.styleText)("reset",(0,C.styleText)("dim",`Press ${(0,C.styleText)(["gray","bgWhite","inverse"]," space ")} to select, ${(0,C.styleText)("gray",(0,C.styleText)("bgWhite",(0,C.styleText)("inverse"," enter ")))} to submit`))}`},render(){let i=e.withGuide??Ae.withGuide,r=ct(e.output,e.message,i?`${Ln(this.state)} `:"",`${St(this.state)} `),n=`${i?`${(0,C.styleText)("gray",Q)}
206
206
  `:""}${r}
207
- `,s=this.value??[],a=(l,u)=>{if(l.disabled)return t(l,"disabled");let m=s.includes(l.value);return u&&m?t(l,"active-selected"):m?t(l,"selected"):t(l,u?"active":"inactive")};switch(this.state){case"submit":{let l=this.options.filter(({value:m})=>s.includes(m)).map(m=>t(m,"submitted")).join((0,C.styleText)("dim",", "))||(0,C.styleText)("dim","none"),u=dt(e.output,l,i?`${(0,C.styleText)("gray",H)} `:"");return`${n}${u}`}case"cancel":{let l=this.options.filter(({value:m})=>s.includes(m)).map(m=>t(m,"cancelled")).join((0,C.styleText)("dim",", "));if(l.trim()==="")return`${n}${(0,C.styleText)("gray",H)}`;let u=dt(e.output,l,i?`${(0,C.styleText)("gray",H)} `:"");return`${n}${u}${i?`
208
- ${(0,C.styleText)("gray",H)}`:""}`}case"error":{let l=i?`${(0,C.styleText)("yellow",H)} `:"",u=this.error.split(`
207
+ `,s=this.value??[],a=(l,u)=>{if(l.disabled)return t(l,"disabled");let m=s.includes(l.value);return u&&m?t(l,"active-selected"):m?t(l,"selected"):t(l,u?"active":"inactive")};switch(this.state){case"submit":{let l=this.options.filter(({value:m})=>s.includes(m)).map(m=>t(m,"submitted")).join((0,C.styleText)("dim",", "))||(0,C.styleText)("dim","none"),u=ct(e.output,l,i?`${(0,C.styleText)("gray",Q)} `:"");return`${n}${u}`}case"cancel":{let l=this.options.filter(({value:m})=>s.includes(m)).map(m=>t(m,"cancelled")).join((0,C.styleText)("dim",", "));if(l.trim()==="")return`${n}${(0,C.styleText)("gray",Q)}`;let u=ct(e.output,l,i?`${(0,C.styleText)("gray",Q)} `:"");return`${n}${u}${i?`
208
+ ${(0,C.styleText)("gray",Q)}`:""}`}case"error":{let l=i?`${(0,C.styleText)("yellow",Q)} `:"",u=this.error.split(`
209
209
  `).map((f,y)=>y===0?`${i?`${(0,C.styleText)("yellow",Ve)} `:""}${(0,C.styleText)("yellow",f)}`:` ${f}`).join(`
210
210
  `),m=n.split(`
211
211
  `).length,p=u.split(`
212
212
  `).length+1;return`${n}${l}${Go({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,rowPadding:m+p,style:a}).join(`
213
213
  ${l}`)}
214
214
  ${u}
215
- `}default:{let l=i?`${(0,C.styleText)("cyan",H)} `:"",u=n.split(`
215
+ `}default:{let l=i?`${(0,C.styleText)("cyan",Q)} `:"",u=n.split(`
216
216
  `).length,m=i?2:1;return`${n}${l}${Go({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,rowPadding:u+m,style:a}).join(`
217
217
  ${l}`)}
218
218
  ${i?(0,C.styleText)("cyan",Ve):""}
219
- `}}}}).prompt()},Np=e=>(0,C.styleText)("dim",e),Mp=(e,t,o)=>{let i={hard:!0,trim:!1},r=ct(e,t,i).split(`
220
- `),n=r.reduce((l,u)=>Math.max(Ue(u),l),0),s=r.map(o).reduce((l,u)=>Math.max(Ue(u),l),0),a=t-(s-n);return ct(e,a,i)},zn=(e="",t="",o)=>{let i=o?.output??je.default.stdout,r=o?.withGuide??Ae.withGuide,n=o?.format??Np,s=["",...Mp(e,jo(i)-6,n).split(`
221
- `).map(n),""],a=Ue(t),l=Math.max(s.reduce((f,y)=>{let A=Ue(y);return A>f?A:f},0),a)+2,u=s.map(f=>`${(0,C.styleText)("gray",H)} ${f}${" ".repeat(l-Ue(f))}${(0,C.styleText)("gray",H)}`).join(`
222
- `),m=r?`${(0,C.styleText)("gray",H)}
223
- `:"",p=r?Ep:Ip;i.write(`${m}${(0,C.styleText)("green",or)} ${(0,C.styleText)("reset",t)} ${(0,C.styleText)("gray",Hn.repeat(Math.max(l-a-1,1))+Op)}
219
+ `}}}}).prompt()},Wp=e=>(0,C.styleText)("dim",e),Jp=(e,t,o)=>{let i={hard:!0,trim:!1},r=dt(e,t,i).split(`
220
+ `),n=r.reduce((l,u)=>Math.max(Ue(u),l),0),s=r.map(o).reduce((l,u)=>Math.max(Ue(u),l),0),a=t-(s-n);return dt(e,a,i)},Yn=(e="",t="",o)=>{let i=o?.output??je.default.stdout,r=o?.withGuide??Ae.withGuide,n=o?.format??Wp,s=["",...Jp(e,jo(i)-6,n).split(`
221
+ `).map(n),""],a=Ue(t),l=Math.max(s.reduce((f,y)=>{let A=Ue(y);return A>f?A:f},0),a)+2,u=s.map(f=>`${(0,C.styleText)("gray",Q)} ${f}${" ".repeat(l-Ue(f))}${(0,C.styleText)("gray",Q)}`).join(`
222
+ `),m=r?`${(0,C.styleText)("gray",Q)}
223
+ `:"",p=r?Pp:Gp;i.write(`${m}${(0,C.styleText)("green",ir)} ${(0,C.styleText)("reset",t)} ${(0,C.styleText)("gray",Qn.repeat(Math.max(l-a-1,1))+jp)}
224
224
  ${u}
225
- ${(0,C.styleText)("gray",p+Hn.repeat(l+2)+Bp)}
226
- `)},Yn=e=>new Eo({validate:e.validate,mask:e.mask??Tp,signal:e.signal,input:e.input,output:e.output,render(){let t=e.withGuide??Ae.withGuide,o=`${t?`${(0,C.styleText)("gray",H)}
225
+ ${(0,C.styleText)("gray",p+Qn.repeat(l+2)+$p)}
226
+ `)},Xn=e=>new Eo({validate:e.validate,mask:e.mask??Ip,signal:e.signal,input:e.input,output:e.output,render(){let t=e.withGuide??Ae.withGuide,o=`${t?`${(0,C.styleText)("gray",Q)}
227
227
  `:""}${St(this.state)} ${e.message}
228
- `,i=this.userInputWithCursor,r=this.masked;switch(this.state){case"error":{let n=t?`${(0,C.styleText)("yellow",H)} `:"",s=t?`${(0,C.styleText)("yellow",Ve)} `:"",a=r??"";return e.clearOnError&&this.clear(),`${o.trim()}
228
+ `,i=this.userInputWithCursor,r=this.masked;switch(this.state){case"error":{let n=t?`${(0,C.styleText)("yellow",Q)} `:"",s=t?`${(0,C.styleText)("yellow",Ve)} `:"",a=r??"";return e.clearOnError&&this.clear(),`${o.trim()}
229
229
  ${n}${a}
230
230
  ${s}${(0,C.styleText)("yellow",this.error)}
231
- `}case"submit":{let n=t?`${(0,C.styleText)("gray",H)} `:"",s=r?(0,C.styleText)("dim",r):"";return`${o}${n}${s}`}case"cancel":{let n=t?`${(0,C.styleText)("gray",H)} `:"",s=r?(0,C.styleText)(["strikethrough","dim"],r):"";return`${o}${n}${s}${r&&t?`
232
- ${(0,C.styleText)("gray",H)}`:""}`}default:{let n=t?`${(0,C.styleText)("cyan",H)} `:"",s=t?(0,C.styleText)("cyan",Ve):"";return`${o}${n}${i}
231
+ `}case"submit":{let n=t?`${(0,C.styleText)("gray",Q)} `:"",s=r?(0,C.styleText)("dim",r):"";return`${o}${n}${s}`}case"cancel":{let n=t?`${(0,C.styleText)("gray",Q)} `:"",s=r?(0,C.styleText)(["strikethrough","dim"],r):"";return`${o}${n}${s}${r&&t?`
232
+ ${(0,C.styleText)("gray",Q)}`:""}`}default:{let n=t?`${(0,C.styleText)("cyan",Q)} `:"",s=t?(0,C.styleText)("cyan",Ve):"";return`${o}${n}${i}
233
233
  ${s}
234
- `}}}}).prompt();var GA={light:oe("\u2500","-"),heavy:oe("\u2501","="),block:oe("\u2588","#")};var Po=(e,t)=>e.includes(`
234
+ `}}}}).prompt();var qA={light:oe("\u2500","-"),heavy:oe("\u2501","="),block:oe("\u2588","#")};var Po=(e,t)=>e.includes(`
235
235
  `)?e.split(`
236
236
  `).map(o=>t(o)).join(`
237
- `):t(e),ne=e=>{let t=(o,i)=>{let r=o.label??String(o.value);switch(i){case"disabled":return`${(0,C.styleText)("gray",Et)} ${Po(r,n=>(0,C.styleText)("gray",n))}${o.hint?` ${(0,C.styleText)("dim",`(${o.hint??"disabled"})`)}`:""}`;case"selected":return`${Po(r,n=>(0,C.styleText)("dim",n))}`;case"active":return`${(0,C.styleText)("green",$o)} ${r}${o.hint?` ${(0,C.styleText)("dim",`(${o.hint})`)}`:""}`;case"cancelled":return`${Po(r,n=>(0,C.styleText)(["strikethrough","dim"],n))}`;default:return`${(0,C.styleText)("dim",Et)} ${Po(r,n=>(0,C.styleText)("dim",n))}`}};return new Bo({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){let o=e.withGuide??Ae.withGuide,i=`${St(this.state)} `,r=`${qn(this.state)} `,n=dt(e.output,e.message,r,i),s=`${o?`${(0,C.styleText)("gray",H)}
237
+ `):t(e),ne=e=>{let t=(o,i)=>{let r=o.label??String(o.value);switch(i){case"disabled":return`${(0,C.styleText)("gray",Et)} ${Po(r,n=>(0,C.styleText)("gray",n))}${o.hint?` ${(0,C.styleText)("dim",`(${o.hint??"disabled"})`)}`:""}`;case"selected":return`${Po(r,n=>(0,C.styleText)("dim",n))}`;case"active":return`${(0,C.styleText)("green",$o)} ${r}${o.hint?` ${(0,C.styleText)("dim",`(${o.hint})`)}`:""}`;case"cancelled":return`${Po(r,n=>(0,C.styleText)(["strikethrough","dim"],n))}`;default:return`${(0,C.styleText)("dim",Et)} ${Po(r,n=>(0,C.styleText)("dim",n))}`}};return new Bo({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){let o=e.withGuide??Ae.withGuide,i=`${St(this.state)} `,r=`${Ln(this.state)} `,n=ct(e.output,e.message,r,i),s=`${o?`${(0,C.styleText)("gray",Q)}
238
238
  `:""}${n}
239
- `;switch(this.state){case"submit":{let a=o?`${(0,C.styleText)("gray",H)} `:"",l=dt(e.output,t(this.options[this.cursor],"selected"),a);return`${s}${l}`}case"cancel":{let a=o?`${(0,C.styleText)("gray",H)} `:"",l=dt(e.output,t(this.options[this.cursor],"cancelled"),a);return`${s}${l}${o?`
240
- ${(0,C.styleText)("gray",H)}`:""}`}default:{let a=o?`${(0,C.styleText)("cyan",H)} `:"",l=o?(0,C.styleText)("cyan",Ve):"",u=s.split(`
239
+ `;switch(this.state){case"submit":{let a=o?`${(0,C.styleText)("gray",Q)} `:"",l=ct(e.output,t(this.options[this.cursor],"selected"),a);return`${s}${l}`}case"cancel":{let a=o?`${(0,C.styleText)("gray",Q)} `:"",l=ct(e.output,t(this.options[this.cursor],"cancelled"),a);return`${s}${l}${o?`
240
+ ${(0,C.styleText)("gray",Q)}`:""}`}default:{let a=o?`${(0,C.styleText)("cyan",Q)} `:"",l=o?(0,C.styleText)("cyan",Ve):"",u=s.split(`
241
241
  `).length,m=o?2:1;return`${s}${a}${Go({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,columnPadding:a.length,rowPadding:u+m,style:(p,f)=>t(p,p.disabled?"disabled":f?"active":"inactive")}).join(`
242
242
  ${a}`)}
243
243
  ${l}
244
- `}}}}).prompt()};var HA=`${(0,C.styleText)("gray",H)} `;var Z=e=>new Io({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??Ae.withGuide,o=`${`${t?`${(0,C.styleText)("gray",H)}
244
+ `}}}}).prompt()};var LA=`${(0,C.styleText)("gray",Q)} `;var Z=e=>new Io({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??Ae.withGuide,o=`${`${t?`${(0,C.styleText)("gray",Q)}
245
245
  `:""}${St(this.state)} `}${e.message}
246
- `,i=e.placeholder?(0,C.styleText)("inverse",e.placeholder[0])+(0,C.styleText)("dim",e.placeholder.slice(1)):(0,C.styleText)(["inverse","hidden"],"_"),r=this.userInput?this.userInputWithCursor:i,n=this.value??"";switch(this.state){case"error":{let s=this.error?` ${(0,C.styleText)("yellow",this.error)}`:"",a=t?`${(0,C.styleText)("yellow",H)} `:"",l=t?(0,C.styleText)("yellow",Ve):"";return`${o.trim()}
246
+ `,i=e.placeholder?(0,C.styleText)("inverse",e.placeholder[0])+(0,C.styleText)("dim",e.placeholder.slice(1)):(0,C.styleText)(["inverse","hidden"],"_"),r=this.userInput?this.userInputWithCursor:i,n=this.value??"";switch(this.state){case"error":{let s=this.error?` ${(0,C.styleText)("yellow",this.error)}`:"",a=t?`${(0,C.styleText)("yellow",Q)} `:"",l=t?(0,C.styleText)("yellow",Ve):"";return`${o.trim()}
247
247
  ${a}${r}
248
248
  ${l}${s}
249
- `}case"submit":{let s=n?` ${(0,C.styleText)("dim",n)}`:"",a=t?(0,C.styleText)("gray",H):"";return`${o}${a}${s}`}case"cancel":{let s=n?` ${(0,C.styleText)(["strikethrough","dim"],n)}`:"",a=t?(0,C.styleText)("gray",H):"";return`${o}${a}${s}${n.trim()?`
250
- ${a}`:""}`}default:{let s=t?`${(0,C.styleText)("cyan",H)} `:"",a=t?(0,C.styleText)("cyan",Ve):"";return`${o}${s}${r}
249
+ `}case"submit":{let s=n?` ${(0,C.styleText)("dim",n)}`:"",a=t?(0,C.styleText)("gray",Q):"";return`${o}${a}${s}`}case"cancel":{let s=n?` ${(0,C.styleText)(["strikethrough","dim"],n)}`:"",a=t?(0,C.styleText)("gray",Q):"";return`${o}${a}${s}${n.trim()?`
250
+ ${a}`:""}`}default:{let s=t?`${(0,C.styleText)("cyan",Q)} `:"",a=t?(0,C.styleText)("cyan",Ve):"";return`${o}${s}${r}
251
251
  ${a}
252
- `}}}}).prompt();var yo=me(Je(),1);Kt();process.env.RESEND_USER_AGENT=`resend-cli:${se}`;var ut=new TextEncoder,es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ao=new Uint8Array(256);for(let e=0;e<es.length;e++)ao[es.charCodeAt(e)]=e;function Qo(e){let t=Math.ceil(e.length/4)*3,o=e.length,i=0;e.length%4===3?t--:e.length%4===2?t-=2:e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let r=new ArrayBuffer(t),n=new Uint8Array(r);for(let s=0;s<o;s+=4){let a=ao[e.charCodeAt(s)],l=ao[e.charCodeAt(s+1)],u=ao[e.charCodeAt(s+2)],m=ao[e.charCodeAt(s+3)];n[i++]=a<<2|l>>4,n[i++]=(l&15)<<4|u>>2,n[i++]=(u&3)<<6|m&63}return r}var Lp=new Map([["iso-8859-8-i","iso-8859-8"],["iso-8859-8-e","iso-8859-8"]]);function It(e){e=(e||"utf8").trim().toLowerCase(),e=Lp.get(e)||e;let t;try{t=new TextDecoder(e)}catch{t=new TextDecoder("windows-1252")}return t}async function mt(e){if("arrayBuffer"in e)return await e.arrayBuffer();let t=new FileReader;return new Promise((o,i)=>{t.onload=function(r){o(r.target.result)},t.onerror=function(r){i(t.error)},t.readAsArrayBuffer(e)})}function ts(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70?String.fromCharCode(e):!1}function Wp(e,t,o){let i=e.indexOf("*");i>=0&&(e=e.substr(0,i)),t=t.toUpperCase();let r;if(t==="Q"){o=o.replace(/=\s+([0-9a-fA-F])/g,"=$1").replace(/[_\s]/g," ");let n=ut.encode(o),s=[];for(let l=0,u=n.length;l<u;l++){let m=n[l];if(l<=u-2&&m===61){let p=ts(n[l+1]),f=ts(n[l+2]);if(p&&f){let y=parseInt(p+f,16);s.push(y),l+=2;continue}}s.push(m)}r=new ArrayBuffer(s.length);let a=new DataView(r);for(let l=0,u=s.length;l<u;l++)a.setUint8(l,s[l])}else t==="B"?r=Qo(o.replace(/[^a-zA-Z0-9\+\/=]+/g,"")):r=ut.encode(o);return It(e).decode(r)}function kt(e){let t=!0,o=!1;for(;!o;){let i=(e||"").toString().replace(/(=\?([^?]+)\?[Bb]\?([^?]*)\?=)\s*(?==\?([^?]+)\?[Bb]\?[^?]*\?=)/g,(r,n,s,a,l)=>t&&s===l&&a.length%4===0&&!/=$/.test(a)?n+"__\0JOIN\0__":r).replace(/(=\?([^?]+)\?[Qq]\?[^?]*\?=)\s*(?==\?([^?]+)\?[Qq]\?[^?]*\?=)/g,(r,n,s,a)=>t&&s===a?n+"__\0JOIN\0__":r).replace(/(\?=)?__\x00JOIN\x00__(=\?([^?]+)\?[QqBb]\?)?/g,"").replace(/(=\?[^?]+\?[QqBb]\?[^?]*\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]*\?=)/g,"$1").replace(/=\?([\w_\-*]+)\?([QqBb])\?([^?]*)\?=/g,(r,n,s,a)=>Wp(n,s,a));if(t&&i.indexOf("\uFFFD")>=0)t=!1;else return i}}function Jp(e,t){t=t||"utf-8";let o=[];for(let n=0;n<e.length;n++){let s=e.charAt(n);if(s==="%"&&/^[a-f0-9]{2}/i.test(e.substr(n+1,2))){let a=e.substr(n+1,2);n+=2,o.push(parseInt(a,16))}else if(s.charCodeAt(0)>126){s=ut.encode(s);for(let a=0;a<s.length;a++)o.push(s[a])}else o.push(s.charCodeAt(0))}let i=new ArrayBuffer(o.length),r=new DataView(i);for(let n=0,s=o.length;n<s;n++)r.setUint8(n,o[n]);return It(t).decode(i)}function os(e){let t=new Map;Object.keys(e.params).forEach(o=>{let i=o.match(/\*((\d+)\*?)?$/);if(!i)return;let r=o.substr(0,i.index).toLowerCase(),n=Number(i[2])||0,s;t.has(r)?s=t.get(r):(s={charset:!1,values:[]},t.set(r,s));let a=e.params[o];n===0&&i[0].charAt(i[0].length-1)==="*"&&(i=a.match(/^([^']*)'[^']*'(.*)$/))&&(s.charset=i[1]||"utf-8",a=i[2]),s.values.push({nr:n,value:a}),delete e.params[o]}),t.forEach((o,i)=>{e.params[i]=Jp(o.values.sort((r,n)=>r.nr-n.nr).map(r=>r.value).join(""),o.charset)})}var lo=class{constructor(){this.chunks=[]}update(t){this.chunks.push(t),this.chunks.push(`
253
- `)}finalize(){return mt(new Blob(this.chunks,{type:"application/octet-stream"}))}};var co=class{constructor(t){t=t||{},this.decoder=t.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.chunks=[],this.remainder=""}update(t){let o=this.decoder.decode(t);if(o=o.replace(/[^a-zA-Z0-9+\/]+/g,""),this.remainder+=o,this.remainder.length>=this.maxChunkSize){let i=Math.floor(this.remainder.length/4)*4,r;i===this.remainder.length?(r=this.remainder,this.remainder=""):(r=this.remainder.substr(0,i),this.remainder=this.remainder.substr(i)),r.length&&this.chunks.push(Qo(r))}}finalize(){return this.remainder&&!/^=+$/.test(this.remainder)&&this.chunks.push(Qo(this.remainder)),mt(new Blob(this.chunks,{type:"application/octet-stream"}))}};var is=/^=[a-f0-9]{2}$/i,Vp=/(?==[a-f0-9]{2})/i,zp=/=\r?\n/g,Yp=/=[a-fA-F0-9]?$/,uo=class{constructor(t){t=t||{},this.decoder=t.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.remainder="",this.chunks=[]}decodeQPBytes(t){let o=new ArrayBuffer(t.length),i=new DataView(o);for(let r=0,n=t.length;r<n;r++)i.setUint8(r,parseInt(t[r],16));return o}decodeChunks(t){t=t.replace(zp,"");let o=t.split(Vp),i=[];for(let r of o){if(r.charAt(0)!=="="){i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r);continue}if(r.length===3){is.test(r)?i.push(r.substr(1)):(i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r));continue}if(r.length>3){let n=r.substr(0,3);is.test(n)?(i.push(r.substr(1,2)),this.chunks.push(this.decodeQPBytes(i)),i=[],r=r.substr(3),this.chunks.push(r)):(i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r))}}i.length&&this.chunks.push(this.decodeQPBytes(i))}update(t){let o=this.decoder.decode(t)+`
254
- `;if(o=this.remainder+o,o.length<this.maxChunkSize){this.remainder=o;return}this.remainder="";let i=o.match(Yp);if(i){if(i.index===0){this.remainder=o;return}this.remainder=o.substr(i.index),o=o.substr(0,i.index)}this.decodeChunks(o)}finalize(){return this.remainder.length&&(this.decodeChunks(this.remainder),this.remainder=""),mt(new Blob(this.chunks,{type:"application/octet-stream"}))}};var Xp=It(),jt=class{constructor(t){if(this.options=t||{},this.postalMime=this.options.postalMime,this.root=!!this.options.parentNode,this.childNodes=[],this.options.parentNode){if(this.parentNode=this.options.parentNode,this.depth=this.parentNode.depth+1,this.depth>this.options.maxNestingDepth)throw new Error(`Maximum MIME nesting depth of ${this.options.maxNestingDepth} levels exceeded`);this.options.parentNode.childNodes.push(this)}else this.depth=0;this.state="header",this.headerLines=[],this.headerSize=0;let i=(this.options.parentMultipartType||null)==="digest"?"message/rfc822":"text/plain";this.contentType={value:i,default:!0},this.contentTransferEncoding={value:"8bit"},this.contentDisposition={value:""},this.headers=[],this.contentDecoder=!1}setupContentDecoder(t){/base64/i.test(t)?this.contentDecoder=new co:/quoted-printable/i.test(t)?this.contentDecoder=new uo({decoder:It(this.contentType.parsed.params.charset)}):this.contentDecoder=new lo}async finalize(){if(this.state==="finished")return;this.state==="header"&&this.processHeaders();let t=this.postalMime.boundaries;for(let o=t.length-1;o>=0;o--)if(t[o].node===this){t.splice(o,1);break}await this.finalizeChildNodes(),this.content=this.contentDecoder?await this.contentDecoder.finalize():null,this.contentDecoder=!1,this.state="finished"}async finalizeChildNodes(){for(let t of this.childNodes)await t.finalize()}stripComments(t){let o="",i=0,r=!1,n=!1;for(let s=0;s<t.length;s++){let a=t.charAt(s);if(r){i===0&&(o+=a),r=!1;continue}if(a==="\\"){r=!0,i===0&&(o+=a);continue}if(a==='"'&&i===0){n=!n,o+=a;continue}if(!n){if(a==="("){i++;continue}if(a===")"&&i>0){i--;continue}}i===0&&(o+=a)}return o}parseStructuredHeader(t){t=this.stripComments(t);let o={value:!1,params:{}},i=!1,r="",n="value",s=!1,a=!1,l;for(let u=0,m=t.length;u<m;u++)switch(l=t.charAt(u),n){case"key":if(l==="="){i=r.trim().toLowerCase(),n="value",r="";break}r+=l;break;case"value":if(a)r+=l;else if(l==="\\"){a=!0;continue}else s&&l===s?s=!1:!s&&l==='"'?s=l:!s&&l===";"?(i===!1?o.value=r.trim():o.params[i]=r.trim(),n="key",r=""):r+=l;a=!1;break}return r=r.trim(),n==="value"?i===!1?o.value=r:o.params[i]=r:r&&(o.params[r.toLowerCase()]=""),o.value&&(o.value=o.value.toLowerCase()),os(o),o}decodeFlowedText(t,o){return t.split(/\r?\n/).reduce((i,r)=>i.endsWith(" ")&&i!=="-- "&&!i.endsWith(`
252
+ `}}}}).prompt();var yo=me(Je(),1);Kt();process.env.RESEND_USER_AGENT=`resend-cli:${se}`;var ut=new TextEncoder,ts="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ao=new Uint8Array(256);for(let e=0;e<ts.length;e++)ao[ts.charCodeAt(e)]=e;function Qo(e){let t=Math.ceil(e.length/4)*3,o=e.length,i=0;e.length%4===3?t--:e.length%4===2?t-=2:e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let r=new ArrayBuffer(t),n=new Uint8Array(r);for(let s=0;s<o;s+=4){let a=ao[e.charCodeAt(s)],l=ao[e.charCodeAt(s+1)],u=ao[e.charCodeAt(s+2)],m=ao[e.charCodeAt(s+3)];n[i++]=a<<2|l>>4,n[i++]=(l&15)<<4|u>>2,n[i++]=(u&3)<<6|m&63}return r}var zp=new Map([["iso-8859-8-i","iso-8859-8"],["iso-8859-8-e","iso-8859-8"]]);function It(e){e=(e||"utf8").trim().toLowerCase(),e=zp.get(e)||e;let t;try{t=new TextDecoder(e)}catch{t=new TextDecoder("windows-1252")}return t}async function mt(e){if("arrayBuffer"in e)return await e.arrayBuffer();let t=new FileReader;return new Promise((o,i)=>{t.onload=function(r){o(r.target.result)},t.onerror=function(r){i(t.error)},t.readAsArrayBuffer(e)})}function os(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70?String.fromCharCode(e):!1}function Yp(e,t,o){let i=e.indexOf("*");i>=0&&(e=e.substr(0,i)),t=t.toUpperCase();let r;if(t==="Q"){o=o.replace(/=\s+([0-9a-fA-F])/g,"=$1").replace(/[_\s]/g," ");let n=ut.encode(o),s=[];for(let l=0,u=n.length;l<u;l++){let m=n[l];if(l<=u-2&&m===61){let p=os(n[l+1]),f=os(n[l+2]);if(p&&f){let y=parseInt(p+f,16);s.push(y),l+=2;continue}}s.push(m)}r=new ArrayBuffer(s.length);let a=new DataView(r);for(let l=0,u=s.length;l<u;l++)a.setUint8(l,s[l])}else t==="B"?r=Qo(o.replace(/[^a-zA-Z0-9\+\/=]+/g,"")):r=ut.encode(o);return It(e).decode(r)}function kt(e){let t=!0,o=!1;for(;!o;){let i=(e||"").toString().replace(/(=\?([^?]+)\?[Bb]\?([^?]*)\?=)\s*(?==\?([^?]+)\?[Bb]\?[^?]*\?=)/g,(r,n,s,a,l)=>t&&s===l&&a.length%4===0&&!/=$/.test(a)?n+"__\0JOIN\0__":r).replace(/(=\?([^?]+)\?[Qq]\?[^?]*\?=)\s*(?==\?([^?]+)\?[Qq]\?[^?]*\?=)/g,(r,n,s,a)=>t&&s===a?n+"__\0JOIN\0__":r).replace(/(\?=)?__\x00JOIN\x00__(=\?([^?]+)\?[QqBb]\?)?/g,"").replace(/(=\?[^?]+\?[QqBb]\?[^?]*\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]*\?=)/g,"$1").replace(/=\?([\w_\-*]+)\?([QqBb])\?([^?]*)\?=/g,(r,n,s,a)=>Yp(n,s,a));if(t&&i.indexOf("\uFFFD")>=0)t=!1;else return i}}function Xp(e,t){t=t||"utf-8";let o=[];for(let n=0;n<e.length;n++){let s=e.charAt(n);if(s==="%"&&/^[a-f0-9]{2}/i.test(e.substr(n+1,2))){let a=e.substr(n+1,2);n+=2,o.push(parseInt(a,16))}else if(s.charCodeAt(0)>126){s=ut.encode(s);for(let a=0;a<s.length;a++)o.push(s[a])}else o.push(s.charCodeAt(0))}let i=new ArrayBuffer(o.length),r=new DataView(i);for(let n=0,s=o.length;n<s;n++)r.setUint8(n,o[n]);return It(t).decode(i)}function is(e){let t=new Map;Object.keys(e.params).forEach(o=>{let i=o.match(/\*((\d+)\*?)?$/);if(!i)return;let r=o.substr(0,i.index).toLowerCase(),n=Number(i[2])||0,s;t.has(r)?s=t.get(r):(s={charset:!1,values:[]},t.set(r,s));let a=e.params[o];n===0&&i[0].charAt(i[0].length-1)==="*"&&(i=a.match(/^([^']*)'[^']*'(.*)$/))&&(s.charset=i[1]||"utf-8",a=i[2]),s.values.push({nr:n,value:a}),delete e.params[o]}),t.forEach((o,i)=>{e.params[i]=Xp(o.values.sort((r,n)=>r.nr-n.nr).map(r=>r.value).join(""),o.charset)})}var lo=class{constructor(){this.chunks=[]}update(t){this.chunks.push(t),this.chunks.push(`
253
+ `)}finalize(){return mt(new Blob(this.chunks,{type:"application/octet-stream"}))}};var co=class{constructor(t){t=t||{},this.decoder=t.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.chunks=[],this.remainder=""}update(t){let o=this.decoder.decode(t);if(o=o.replace(/[^a-zA-Z0-9+\/]+/g,""),this.remainder+=o,this.remainder.length>=this.maxChunkSize){let i=Math.floor(this.remainder.length/4)*4,r;i===this.remainder.length?(r=this.remainder,this.remainder=""):(r=this.remainder.substr(0,i),this.remainder=this.remainder.substr(i)),r.length&&this.chunks.push(Qo(r))}}finalize(){return this.remainder&&!/^=+$/.test(this.remainder)&&this.chunks.push(Qo(this.remainder)),mt(new Blob(this.chunks,{type:"application/octet-stream"}))}};var rs=/^=[a-f0-9]{2}$/i,Zp=/(?==[a-f0-9]{2})/i,ef=/=\r?\n/g,tf=/=[a-fA-F0-9]?$/,uo=class{constructor(t){t=t||{},this.decoder=t.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.remainder="",this.chunks=[]}decodeQPBytes(t){let o=new ArrayBuffer(t.length),i=new DataView(o);for(let r=0,n=t.length;r<n;r++)i.setUint8(r,parseInt(t[r],16));return o}decodeChunks(t){t=t.replace(ef,"");let o=t.split(Zp),i=[];for(let r of o){if(r.charAt(0)!=="="){i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r);continue}if(r.length===3){rs.test(r)?i.push(r.substr(1)):(i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r));continue}if(r.length>3){let n=r.substr(0,3);rs.test(n)?(i.push(r.substr(1,2)),this.chunks.push(this.decodeQPBytes(i)),i=[],r=r.substr(3),this.chunks.push(r)):(i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r))}}i.length&&this.chunks.push(this.decodeQPBytes(i))}update(t){let o=this.decoder.decode(t)+`
254
+ `;if(o=this.remainder+o,o.length<this.maxChunkSize){this.remainder=o;return}this.remainder="";let i=o.match(tf);if(i){if(i.index===0){this.remainder=o;return}this.remainder=o.substr(i.index),o=o.substr(0,i.index)}this.decodeChunks(o)}finalize(){return this.remainder.length&&(this.decodeChunks(this.remainder),this.remainder=""),mt(new Blob(this.chunks,{type:"application/octet-stream"}))}};var of=It(),jt=class{constructor(t){if(this.options=t||{},this.postalMime=this.options.postalMime,this.root=!!this.options.parentNode,this.childNodes=[],this.options.parentNode){if(this.parentNode=this.options.parentNode,this.depth=this.parentNode.depth+1,this.depth>this.options.maxNestingDepth)throw new Error(`Maximum MIME nesting depth of ${this.options.maxNestingDepth} levels exceeded`);this.options.parentNode.childNodes.push(this)}else this.depth=0;this.state="header",this.headerLines=[],this.headerSize=0;let i=(this.options.parentMultipartType||null)==="digest"?"message/rfc822":"text/plain";this.contentType={value:i,default:!0},this.contentTransferEncoding={value:"8bit"},this.contentDisposition={value:""},this.headers=[],this.contentDecoder=!1}setupContentDecoder(t){/base64/i.test(t)?this.contentDecoder=new co:/quoted-printable/i.test(t)?this.contentDecoder=new uo({decoder:It(this.contentType.parsed.params.charset)}):this.contentDecoder=new lo}async finalize(){if(this.state==="finished")return;this.state==="header"&&this.processHeaders();let t=this.postalMime.boundaries;for(let o=t.length-1;o>=0;o--)if(t[o].node===this){t.splice(o,1);break}await this.finalizeChildNodes(),this.content=this.contentDecoder?await this.contentDecoder.finalize():null,this.contentDecoder=!1,this.state="finished"}async finalizeChildNodes(){for(let t of this.childNodes)await t.finalize()}stripComments(t){let o="",i=0,r=!1,n=!1;for(let s=0;s<t.length;s++){let a=t.charAt(s);if(r){i===0&&(o+=a),r=!1;continue}if(a==="\\"){r=!0,i===0&&(o+=a);continue}if(a==='"'&&i===0){n=!n,o+=a;continue}if(!n){if(a==="("){i++;continue}if(a===")"&&i>0){i--;continue}}i===0&&(o+=a)}return o}parseStructuredHeader(t){t=this.stripComments(t);let o={value:!1,params:{}},i=!1,r="",n="value",s=!1,a=!1,l;for(let u=0,m=t.length;u<m;u++)switch(l=t.charAt(u),n){case"key":if(l==="="){i=r.trim().toLowerCase(),n="value",r="";break}r+=l;break;case"value":if(a)r+=l;else if(l==="\\"){a=!0;continue}else s&&l===s?s=!1:!s&&l==='"'?s=l:!s&&l===";"?(i===!1?o.value=r.trim():o.params[i]=r.trim(),n="key",r=""):r+=l;a=!1;break}return r=r.trim(),n==="value"?i===!1?o.value=r:o.params[i]=r:r&&(o.params[r.toLowerCase()]=""),o.value&&(o.value=o.value.toLowerCase()),is(o),o}decodeFlowedText(t,o){return t.split(/\r?\n/).reduce((i,r)=>i.endsWith(" ")&&i!=="-- "&&!i.endsWith(`
255
255
  -- `)?o?i.slice(0,-1)+r:i+r:i+`
256
256
  `+r).replace(/^ /gm,"")}getTextContent(){if(!this.content)return"";let t=It(this.contentType.parsed.params.charset).decode(this.content);return/^flowed$/i.test(this.contentType.parsed.params.format)&&(t=this.decodeFlowedText(t,/^yes$/i.test(this.contentType.parsed.params.delsp))),t}processHeaders(){for(let t=this.headerLines.length-1;t>=0;t--){let o=this.headerLines[t];t&&/^\s/.test(o)&&(this.headerLines[t-1]+=`
257
- `+o,this.headerLines.splice(t,1))}this.rawHeaderLines=[];for(let t=this.headerLines.length-1;t>=0;t--){let o=this.headerLines[t],i=o.indexOf(":"),r=i<0?o.trim():o.substr(0,i).trim();this.rawHeaderLines.push({key:r.toLowerCase(),line:o});let n=o.replace(/\s+/g," ");i=n.indexOf(":");let s=i<0?n.trim():n.substr(0,i).trim(),a=i<0?"":n.substr(i+1).trim();switch(this.headers.push({key:s.toLowerCase(),originalKey:s,value:a}),s.toLowerCase()){case"content-type":this.contentType.default&&(this.contentType={value:a,parsed:{}});break;case"content-transfer-encoding":this.contentTransferEncoding={value:a,parsed:{}};break;case"content-disposition":this.contentDisposition={value:a,parsed:{}};break;case"content-id":this.contentId=a;break;case"content-description":this.contentDescription=a;break}}this.contentType.parsed=this.parseStructuredHeader(this.contentType.value),this.contentType.multipart=/^multipart\//i.test(this.contentType.parsed.value)?this.contentType.parsed.value.substr(this.contentType.parsed.value.indexOf("/")+1):!1,this.contentType.multipart&&this.contentType.parsed.params.boundary&&this.postalMime.boundaries.push({value:ut.encode(this.contentType.parsed.params.boundary),node:this}),this.contentDisposition.parsed=this.parseStructuredHeader(this.contentDisposition.value),this.contentTransferEncoding.encoding=this.contentTransferEncoding.value.toLowerCase().split(/[^\w-]/).shift(),this.setupContentDecoder(this.contentTransferEncoding.encoding)}feed(t){switch(this.state){case"header":if(!t.length)return this.state="body",this.processHeaders();if(this.headerSize+=t.length,this.headerSize>this.options.maxHeadersSize)throw new Error(`Maximum header size of ${this.options.maxHeadersSize} bytes exceeded`);this.headerLines.push(Xp.decode(t));break;case"body":this.contentDecoder.update(t)}}};var Zp={"&AElig":"\xC6","&AElig;":"\xC6","&AMP":"&","&AMP;":"&","&Aacute":"\xC1","&Aacute;":"\xC1","&Abreve;":"\u0102","&Acirc":"\xC2","&Acirc;":"\xC2","&Acy;":"\u0410","&Afr;":"\u{1D504}","&Agrave":"\xC0","&Agrave;":"\xC0","&Alpha;":"\u0391","&Amacr;":"\u0100","&And;":"\u2A53","&Aogon;":"\u0104","&Aopf;":"\u{1D538}","&ApplyFunction;":"\u2061","&Aring":"\xC5","&Aring;":"\xC5","&Ascr;":"\u{1D49C}","&Assign;":"\u2254","&Atilde":"\xC3","&Atilde;":"\xC3","&Auml":"\xC4","&Auml;":"\xC4","&Backslash;":"\u2216","&Barv;":"\u2AE7","&Barwed;":"\u2306","&Bcy;":"\u0411","&Because;":"\u2235","&Bernoullis;":"\u212C","&Beta;":"\u0392","&Bfr;":"\u{1D505}","&Bopf;":"\u{1D539}","&Breve;":"\u02D8","&Bscr;":"\u212C","&Bumpeq;":"\u224E","&CHcy;":"\u0427","&COPY":"\xA9","&COPY;":"\xA9","&Cacute;":"\u0106","&Cap;":"\u22D2","&CapitalDifferentialD;":"\u2145","&Cayleys;":"\u212D","&Ccaron;":"\u010C","&Ccedil":"\xC7","&Ccedil;":"\xC7","&Ccirc;":"\u0108","&Cconint;":"\u2230","&Cdot;":"\u010A","&Cedilla;":"\xB8","&CenterDot;":"\xB7","&Cfr;":"\u212D","&Chi;":"\u03A7","&CircleDot;":"\u2299","&CircleMinus;":"\u2296","&CirclePlus;":"\u2295","&CircleTimes;":"\u2297","&ClockwiseContourIntegral;":"\u2232","&CloseCurlyDoubleQuote;":"\u201D","&CloseCurlyQuote;":"\u2019","&Colon;":"\u2237","&Colone;":"\u2A74","&Congruent;":"\u2261","&Conint;":"\u222F","&ContourIntegral;":"\u222E","&Copf;":"\u2102","&Coproduct;":"\u2210","&CounterClockwiseContourIntegral;":"\u2233","&Cross;":"\u2A2F","&Cscr;":"\u{1D49E}","&Cup;":"\u22D3","&CupCap;":"\u224D","&DD;":"\u2145","&DDotrahd;":"\u2911","&DJcy;":"\u0402","&DScy;":"\u0405","&DZcy;":"\u040F","&Dagger;":"\u2021","&Darr;":"\u21A1","&Dashv;":"\u2AE4","&Dcaron;":"\u010E","&Dcy;":"\u0414","&Del;":"\u2207","&Delta;":"\u0394","&Dfr;":"\u{1D507}","&DiacriticalAcute;":"\xB4","&DiacriticalDot;":"\u02D9","&DiacriticalDoubleAcute;":"\u02DD","&DiacriticalGrave;":"`","&DiacriticalTilde;":"\u02DC","&Diamond;":"\u22C4","&DifferentialD;":"\u2146","&Dopf;":"\u{1D53B}","&Dot;":"\xA8","&DotDot;":"\u20DC","&DotEqual;":"\u2250","&DoubleContourIntegral;":"\u222F","&DoubleDot;":"\xA8","&DoubleDownArrow;":"\u21D3","&DoubleLeftArrow;":"\u21D0","&DoubleLeftRightArrow;":"\u21D4","&DoubleLeftTee;":"\u2AE4","&DoubleLongLeftArrow;":"\u27F8","&DoubleLongLeftRightArrow;":"\u27FA","&DoubleLongRightArrow;":"\u27F9","&DoubleRightArrow;":"\u21D2","&DoubleRightTee;":"\u22A8","&DoubleUpArrow;":"\u21D1","&DoubleUpDownArrow;":"\u21D5","&DoubleVerticalBar;":"\u2225","&DownArrow;":"\u2193","&DownArrowBar;":"\u2913","&DownArrowUpArrow;":"\u21F5","&DownBreve;":"\u0311","&DownLeftRightVector;":"\u2950","&DownLeftTeeVector;":"\u295E","&DownLeftVector;":"\u21BD","&DownLeftVectorBar;":"\u2956","&DownRightTeeVector;":"\u295F","&DownRightVector;":"\u21C1","&DownRightVectorBar;":"\u2957","&DownTee;":"\u22A4","&DownTeeArrow;":"\u21A7","&Downarrow;":"\u21D3","&Dscr;":"\u{1D49F}","&Dstrok;":"\u0110","&ENG;":"\u014A","&ETH":"\xD0","&ETH;":"\xD0","&Eacute":"\xC9","&Eacute;":"\xC9","&Ecaron;":"\u011A","&Ecirc":"\xCA","&Ecirc;":"\xCA","&Ecy;":"\u042D","&Edot;":"\u0116","&Efr;":"\u{1D508}","&Egrave":"\xC8","&Egrave;":"\xC8","&Element;":"\u2208","&Emacr;":"\u0112","&EmptySmallSquare;":"\u25FB","&EmptyVerySmallSquare;":"\u25AB","&Eogon;":"\u0118","&Eopf;":"\u{1D53C}","&Epsilon;":"\u0395","&Equal;":"\u2A75","&EqualTilde;":"\u2242","&Equilibrium;":"\u21CC","&Escr;":"\u2130","&Esim;":"\u2A73","&Eta;":"\u0397","&Euml":"\xCB","&Euml;":"\xCB","&Exists;":"\u2203","&ExponentialE;":"\u2147","&Fcy;":"\u0424","&Ffr;":"\u{1D509}","&FilledSmallSquare;":"\u25FC","&FilledVerySmallSquare;":"\u25AA","&Fopf;":"\u{1D53D}","&ForAll;":"\u2200","&Fouriertrf;":"\u2131","&Fscr;":"\u2131","&GJcy;":"\u0403","&GT":">","&GT;":">","&Gamma;":"\u0393","&Gammad;":"\u03DC","&Gbreve;":"\u011E","&Gcedil;":"\u0122","&Gcirc;":"\u011C","&Gcy;":"\u0413","&Gdot;":"\u0120","&Gfr;":"\u{1D50A}","&Gg;":"\u22D9","&Gopf;":"\u{1D53E}","&GreaterEqual;":"\u2265","&GreaterEqualLess;":"\u22DB","&GreaterFullEqual;":"\u2267","&GreaterGreater;":"\u2AA2","&GreaterLess;":"\u2277","&GreaterSlantEqual;":"\u2A7E","&GreaterTilde;":"\u2273","&Gscr;":"\u{1D4A2}","&Gt;":"\u226B","&HARDcy;":"\u042A","&Hacek;":"\u02C7","&Hat;":"^","&Hcirc;":"\u0124","&Hfr;":"\u210C","&HilbertSpace;":"\u210B","&Hopf;":"\u210D","&HorizontalLine;":"\u2500","&Hscr;":"\u210B","&Hstrok;":"\u0126","&HumpDownHump;":"\u224E","&HumpEqual;":"\u224F","&IEcy;":"\u0415","&IJlig;":"\u0132","&IOcy;":"\u0401","&Iacute":"\xCD","&Iacute;":"\xCD","&Icirc":"\xCE","&Icirc;":"\xCE","&Icy;":"\u0418","&Idot;":"\u0130","&Ifr;":"\u2111","&Igrave":"\xCC","&Igrave;":"\xCC","&Im;":"\u2111","&Imacr;":"\u012A","&ImaginaryI;":"\u2148","&Implies;":"\u21D2","&Int;":"\u222C","&Integral;":"\u222B","&Intersection;":"\u22C2","&InvisibleComma;":"\u2063","&InvisibleTimes;":"\u2062","&Iogon;":"\u012E","&Iopf;":"\u{1D540}","&Iota;":"\u0399","&Iscr;":"\u2110","&Itilde;":"\u0128","&Iukcy;":"\u0406","&Iuml":"\xCF","&Iuml;":"\xCF","&Jcirc;":"\u0134","&Jcy;":"\u0419","&Jfr;":"\u{1D50D}","&Jopf;":"\u{1D541}","&Jscr;":"\u{1D4A5}","&Jsercy;":"\u0408","&Jukcy;":"\u0404","&KHcy;":"\u0425","&KJcy;":"\u040C","&Kappa;":"\u039A","&Kcedil;":"\u0136","&Kcy;":"\u041A","&Kfr;":"\u{1D50E}","&Kopf;":"\u{1D542}","&Kscr;":"\u{1D4A6}","&LJcy;":"\u0409","&LT":"<","&LT;":"<","&Lacute;":"\u0139","&Lambda;":"\u039B","&Lang;":"\u27EA","&Laplacetrf;":"\u2112","&Larr;":"\u219E","&Lcaron;":"\u013D","&Lcedil;":"\u013B","&Lcy;":"\u041B","&LeftAngleBracket;":"\u27E8","&LeftArrow;":"\u2190","&LeftArrowBar;":"\u21E4","&LeftArrowRightArrow;":"\u21C6","&LeftCeiling;":"\u2308","&LeftDoubleBracket;":"\u27E6","&LeftDownTeeVector;":"\u2961","&LeftDownVector;":"\u21C3","&LeftDownVectorBar;":"\u2959","&LeftFloor;":"\u230A","&LeftRightArrow;":"\u2194","&LeftRightVector;":"\u294E","&LeftTee;":"\u22A3","&LeftTeeArrow;":"\u21A4","&LeftTeeVector;":"\u295A","&LeftTriangle;":"\u22B2","&LeftTriangleBar;":"\u29CF","&LeftTriangleEqual;":"\u22B4","&LeftUpDownVector;":"\u2951","&LeftUpTeeVector;":"\u2960","&LeftUpVector;":"\u21BF","&LeftUpVectorBar;":"\u2958","&LeftVector;":"\u21BC","&LeftVectorBar;":"\u2952","&Leftarrow;":"\u21D0","&Leftrightarrow;":"\u21D4","&LessEqualGreater;":"\u22DA","&LessFullEqual;":"\u2266","&LessGreater;":"\u2276","&LessLess;":"\u2AA1","&LessSlantEqual;":"\u2A7D","&LessTilde;":"\u2272","&Lfr;":"\u{1D50F}","&Ll;":"\u22D8","&Lleftarrow;":"\u21DA","&Lmidot;":"\u013F","&LongLeftArrow;":"\u27F5","&LongLeftRightArrow;":"\u27F7","&LongRightArrow;":"\u27F6","&Longleftarrow;":"\u27F8","&Longleftrightarrow;":"\u27FA","&Longrightarrow;":"\u27F9","&Lopf;":"\u{1D543}","&LowerLeftArrow;":"\u2199","&LowerRightArrow;":"\u2198","&Lscr;":"\u2112","&Lsh;":"\u21B0","&Lstrok;":"\u0141","&Lt;":"\u226A","&Map;":"\u2905","&Mcy;":"\u041C","&MediumSpace;":"\u205F","&Mellintrf;":"\u2133","&Mfr;":"\u{1D510}","&MinusPlus;":"\u2213","&Mopf;":"\u{1D544}","&Mscr;":"\u2133","&Mu;":"\u039C","&NJcy;":"\u040A","&Nacute;":"\u0143","&Ncaron;":"\u0147","&Ncedil;":"\u0145","&Ncy;":"\u041D","&NegativeMediumSpace;":"\u200B","&NegativeThickSpace;":"\u200B","&NegativeThinSpace;":"\u200B","&NegativeVeryThinSpace;":"\u200B","&NestedGreaterGreater;":"\u226B","&NestedLessLess;":"\u226A","&NewLine;":`
258
- `,"&Nfr;":"\u{1D511}","&NoBreak;":"\u2060","&NonBreakingSpace;":"\xA0","&Nopf;":"\u2115","&Not;":"\u2AEC","&NotCongruent;":"\u2262","&NotCupCap;":"\u226D","&NotDoubleVerticalBar;":"\u2226","&NotElement;":"\u2209","&NotEqual;":"\u2260","&NotEqualTilde;":"\u2242\u0338","&NotExists;":"\u2204","&NotGreater;":"\u226F","&NotGreaterEqual;":"\u2271","&NotGreaterFullEqual;":"\u2267\u0338","&NotGreaterGreater;":"\u226B\u0338","&NotGreaterLess;":"\u2279","&NotGreaterSlantEqual;":"\u2A7E\u0338","&NotGreaterTilde;":"\u2275","&NotHumpDownHump;":"\u224E\u0338","&NotHumpEqual;":"\u224F\u0338","&NotLeftTriangle;":"\u22EA","&NotLeftTriangleBar;":"\u29CF\u0338","&NotLeftTriangleEqual;":"\u22EC","&NotLess;":"\u226E","&NotLessEqual;":"\u2270","&NotLessGreater;":"\u2278","&NotLessLess;":"\u226A\u0338","&NotLessSlantEqual;":"\u2A7D\u0338","&NotLessTilde;":"\u2274","&NotNestedGreaterGreater;":"\u2AA2\u0338","&NotNestedLessLess;":"\u2AA1\u0338","&NotPrecedes;":"\u2280","&NotPrecedesEqual;":"\u2AAF\u0338","&NotPrecedesSlantEqual;":"\u22E0","&NotReverseElement;":"\u220C","&NotRightTriangle;":"\u22EB","&NotRightTriangleBar;":"\u29D0\u0338","&NotRightTriangleEqual;":"\u22ED","&NotSquareSubset;":"\u228F\u0338","&NotSquareSubsetEqual;":"\u22E2","&NotSquareSuperset;":"\u2290\u0338","&NotSquareSupersetEqual;":"\u22E3","&NotSubset;":"\u2282\u20D2","&NotSubsetEqual;":"\u2288","&NotSucceeds;":"\u2281","&NotSucceedsEqual;":"\u2AB0\u0338","&NotSucceedsSlantEqual;":"\u22E1","&NotSucceedsTilde;":"\u227F\u0338","&NotSuperset;":"\u2283\u20D2","&NotSupersetEqual;":"\u2289","&NotTilde;":"\u2241","&NotTildeEqual;":"\u2244","&NotTildeFullEqual;":"\u2247","&NotTildeTilde;":"\u2249","&NotVerticalBar;":"\u2224","&Nscr;":"\u{1D4A9}","&Ntilde":"\xD1","&Ntilde;":"\xD1","&Nu;":"\u039D","&OElig;":"\u0152","&Oacute":"\xD3","&Oacute;":"\xD3","&Ocirc":"\xD4","&Ocirc;":"\xD4","&Ocy;":"\u041E","&Odblac;":"\u0150","&Ofr;":"\u{1D512}","&Ograve":"\xD2","&Ograve;":"\xD2","&Omacr;":"\u014C","&Omega;":"\u03A9","&Omicron;":"\u039F","&Oopf;":"\u{1D546}","&OpenCurlyDoubleQuote;":"\u201C","&OpenCurlyQuote;":"\u2018","&Or;":"\u2A54","&Oscr;":"\u{1D4AA}","&Oslash":"\xD8","&Oslash;":"\xD8","&Otilde":"\xD5","&Otilde;":"\xD5","&Otimes;":"\u2A37","&Ouml":"\xD6","&Ouml;":"\xD6","&OverBar;":"\u203E","&OverBrace;":"\u23DE","&OverBracket;":"\u23B4","&OverParenthesis;":"\u23DC","&PartialD;":"\u2202","&Pcy;":"\u041F","&Pfr;":"\u{1D513}","&Phi;":"\u03A6","&Pi;":"\u03A0","&PlusMinus;":"\xB1","&Poincareplane;":"\u210C","&Popf;":"\u2119","&Pr;":"\u2ABB","&Precedes;":"\u227A","&PrecedesEqual;":"\u2AAF","&PrecedesSlantEqual;":"\u227C","&PrecedesTilde;":"\u227E","&Prime;":"\u2033","&Product;":"\u220F","&Proportion;":"\u2237","&Proportional;":"\u221D","&Pscr;":"\u{1D4AB}","&Psi;":"\u03A8","&QUOT":'"',"&QUOT;":'"',"&Qfr;":"\u{1D514}","&Qopf;":"\u211A","&Qscr;":"\u{1D4AC}","&RBarr;":"\u2910","&REG":"\xAE","&REG;":"\xAE","&Racute;":"\u0154","&Rang;":"\u27EB","&Rarr;":"\u21A0","&Rarrtl;":"\u2916","&Rcaron;":"\u0158","&Rcedil;":"\u0156","&Rcy;":"\u0420","&Re;":"\u211C","&ReverseElement;":"\u220B","&ReverseEquilibrium;":"\u21CB","&ReverseUpEquilibrium;":"\u296F","&Rfr;":"\u211C","&Rho;":"\u03A1","&RightAngleBracket;":"\u27E9","&RightArrow;":"\u2192","&RightArrowBar;":"\u21E5","&RightArrowLeftArrow;":"\u21C4","&RightCeiling;":"\u2309","&RightDoubleBracket;":"\u27E7","&RightDownTeeVector;":"\u295D","&RightDownVector;":"\u21C2","&RightDownVectorBar;":"\u2955","&RightFloor;":"\u230B","&RightTee;":"\u22A2","&RightTeeArrow;":"\u21A6","&RightTeeVector;":"\u295B","&RightTriangle;":"\u22B3","&RightTriangleBar;":"\u29D0","&RightTriangleEqual;":"\u22B5","&RightUpDownVector;":"\u294F","&RightUpTeeVector;":"\u295C","&RightUpVector;":"\u21BE","&RightUpVectorBar;":"\u2954","&RightVector;":"\u21C0","&RightVectorBar;":"\u2953","&Rightarrow;":"\u21D2","&Ropf;":"\u211D","&RoundImplies;":"\u2970","&Rrightarrow;":"\u21DB","&Rscr;":"\u211B","&Rsh;":"\u21B1","&RuleDelayed;":"\u29F4","&SHCHcy;":"\u0429","&SHcy;":"\u0428","&SOFTcy;":"\u042C","&Sacute;":"\u015A","&Sc;":"\u2ABC","&Scaron;":"\u0160","&Scedil;":"\u015E","&Scirc;":"\u015C","&Scy;":"\u0421","&Sfr;":"\u{1D516}","&ShortDownArrow;":"\u2193","&ShortLeftArrow;":"\u2190","&ShortRightArrow;":"\u2192","&ShortUpArrow;":"\u2191","&Sigma;":"\u03A3","&SmallCircle;":"\u2218","&Sopf;":"\u{1D54A}","&Sqrt;":"\u221A","&Square;":"\u25A1","&SquareIntersection;":"\u2293","&SquareSubset;":"\u228F","&SquareSubsetEqual;":"\u2291","&SquareSuperset;":"\u2290","&SquareSupersetEqual;":"\u2292","&SquareUnion;":"\u2294","&Sscr;":"\u{1D4AE}","&Star;":"\u22C6","&Sub;":"\u22D0","&Subset;":"\u22D0","&SubsetEqual;":"\u2286","&Succeeds;":"\u227B","&SucceedsEqual;":"\u2AB0","&SucceedsSlantEqual;":"\u227D","&SucceedsTilde;":"\u227F","&SuchThat;":"\u220B","&Sum;":"\u2211","&Sup;":"\u22D1","&Superset;":"\u2283","&SupersetEqual;":"\u2287","&Supset;":"\u22D1","&THORN":"\xDE","&THORN;":"\xDE","&TRADE;":"\u2122","&TSHcy;":"\u040B","&TScy;":"\u0426","&Tab;":" ","&Tau;":"\u03A4","&Tcaron;":"\u0164","&Tcedil;":"\u0162","&Tcy;":"\u0422","&Tfr;":"\u{1D517}","&Therefore;":"\u2234","&Theta;":"\u0398","&ThickSpace;":"\u205F\u200A","&ThinSpace;":"\u2009","&Tilde;":"\u223C","&TildeEqual;":"\u2243","&TildeFullEqual;":"\u2245","&TildeTilde;":"\u2248","&Topf;":"\u{1D54B}","&TripleDot;":"\u20DB","&Tscr;":"\u{1D4AF}","&Tstrok;":"\u0166","&Uacute":"\xDA","&Uacute;":"\xDA","&Uarr;":"\u219F","&Uarrocir;":"\u2949","&Ubrcy;":"\u040E","&Ubreve;":"\u016C","&Ucirc":"\xDB","&Ucirc;":"\xDB","&Ucy;":"\u0423","&Udblac;":"\u0170","&Ufr;":"\u{1D518}","&Ugrave":"\xD9","&Ugrave;":"\xD9","&Umacr;":"\u016A","&UnderBar;":"_","&UnderBrace;":"\u23DF","&UnderBracket;":"\u23B5","&UnderParenthesis;":"\u23DD","&Union;":"\u22C3","&UnionPlus;":"\u228E","&Uogon;":"\u0172","&Uopf;":"\u{1D54C}","&UpArrow;":"\u2191","&UpArrowBar;":"\u2912","&UpArrowDownArrow;":"\u21C5","&UpDownArrow;":"\u2195","&UpEquilibrium;":"\u296E","&UpTee;":"\u22A5","&UpTeeArrow;":"\u21A5","&Uparrow;":"\u21D1","&Updownarrow;":"\u21D5","&UpperLeftArrow;":"\u2196","&UpperRightArrow;":"\u2197","&Upsi;":"\u03D2","&Upsilon;":"\u03A5","&Uring;":"\u016E","&Uscr;":"\u{1D4B0}","&Utilde;":"\u0168","&Uuml":"\xDC","&Uuml;":"\xDC","&VDash;":"\u22AB","&Vbar;":"\u2AEB","&Vcy;":"\u0412","&Vdash;":"\u22A9","&Vdashl;":"\u2AE6","&Vee;":"\u22C1","&Verbar;":"\u2016","&Vert;":"\u2016","&VerticalBar;":"\u2223","&VerticalLine;":"|","&VerticalSeparator;":"\u2758","&VerticalTilde;":"\u2240","&VeryThinSpace;":"\u200A","&Vfr;":"\u{1D519}","&Vopf;":"\u{1D54D}","&Vscr;":"\u{1D4B1}","&Vvdash;":"\u22AA","&Wcirc;":"\u0174","&Wedge;":"\u22C0","&Wfr;":"\u{1D51A}","&Wopf;":"\u{1D54E}","&Wscr;":"\u{1D4B2}","&Xfr;":"\u{1D51B}","&Xi;":"\u039E","&Xopf;":"\u{1D54F}","&Xscr;":"\u{1D4B3}","&YAcy;":"\u042F","&YIcy;":"\u0407","&YUcy;":"\u042E","&Yacute":"\xDD","&Yacute;":"\xDD","&Ycirc;":"\u0176","&Ycy;":"\u042B","&Yfr;":"\u{1D51C}","&Yopf;":"\u{1D550}","&Yscr;":"\u{1D4B4}","&Yuml;":"\u0178","&ZHcy;":"\u0416","&Zacute;":"\u0179","&Zcaron;":"\u017D","&Zcy;":"\u0417","&Zdot;":"\u017B","&ZeroWidthSpace;":"\u200B","&Zeta;":"\u0396","&Zfr;":"\u2128","&Zopf;":"\u2124","&Zscr;":"\u{1D4B5}","&aacute":"\xE1","&aacute;":"\xE1","&abreve;":"\u0103","&ac;":"\u223E","&acE;":"\u223E\u0333","&acd;":"\u223F","&acirc":"\xE2","&acirc;":"\xE2","&acute":"\xB4","&acute;":"\xB4","&acy;":"\u0430","&aelig":"\xE6","&aelig;":"\xE6","&af;":"\u2061","&afr;":"\u{1D51E}","&agrave":"\xE0","&agrave;":"\xE0","&alefsym;":"\u2135","&aleph;":"\u2135","&alpha;":"\u03B1","&amacr;":"\u0101","&amalg;":"\u2A3F","&amp":"&","&amp;":"&","&and;":"\u2227","&andand;":"\u2A55","&andd;":"\u2A5C","&andslope;":"\u2A58","&andv;":"\u2A5A","&ang;":"\u2220","&ange;":"\u29A4","&angle;":"\u2220","&angmsd;":"\u2221","&angmsdaa;":"\u29A8","&angmsdab;":"\u29A9","&angmsdac;":"\u29AA","&angmsdad;":"\u29AB","&angmsdae;":"\u29AC","&angmsdaf;":"\u29AD","&angmsdag;":"\u29AE","&angmsdah;":"\u29AF","&angrt;":"\u221F","&angrtvb;":"\u22BE","&angrtvbd;":"\u299D","&angsph;":"\u2222","&angst;":"\xC5","&angzarr;":"\u237C","&aogon;":"\u0105","&aopf;":"\u{1D552}","&ap;":"\u2248","&apE;":"\u2A70","&apacir;":"\u2A6F","&ape;":"\u224A","&apid;":"\u224B","&apos;":"'","&approx;":"\u2248","&approxeq;":"\u224A","&aring":"\xE5","&aring;":"\xE5","&ascr;":"\u{1D4B6}","&ast;":"*","&asymp;":"\u2248","&asympeq;":"\u224D","&atilde":"\xE3","&atilde;":"\xE3","&auml":"\xE4","&auml;":"\xE4","&awconint;":"\u2233","&awint;":"\u2A11","&bNot;":"\u2AED","&backcong;":"\u224C","&backepsilon;":"\u03F6","&backprime;":"\u2035","&backsim;":"\u223D","&backsimeq;":"\u22CD","&barvee;":"\u22BD","&barwed;":"\u2305","&barwedge;":"\u2305","&bbrk;":"\u23B5","&bbrktbrk;":"\u23B6","&bcong;":"\u224C","&bcy;":"\u0431","&bdquo;":"\u201E","&becaus;":"\u2235","&because;":"\u2235","&bemptyv;":"\u29B0","&bepsi;":"\u03F6","&bernou;":"\u212C","&beta;":"\u03B2","&beth;":"\u2136","&between;":"\u226C","&bfr;":"\u{1D51F}","&bigcap;":"\u22C2","&bigcirc;":"\u25EF","&bigcup;":"\u22C3","&bigodot;":"\u2A00","&bigoplus;":"\u2A01","&bigotimes;":"\u2A02","&bigsqcup;":"\u2A06","&bigstar;":"\u2605","&bigtriangledown;":"\u25BD","&bigtriangleup;":"\u25B3","&biguplus;":"\u2A04","&bigvee;":"\u22C1","&bigwedge;":"\u22C0","&bkarow;":"\u290D","&blacklozenge;":"\u29EB","&blacksquare;":"\u25AA","&blacktriangle;":"\u25B4","&blacktriangledown;":"\u25BE","&blacktriangleleft;":"\u25C2","&blacktriangleright;":"\u25B8","&blank;":"\u2423","&blk12;":"\u2592","&blk14;":"\u2591","&blk34;":"\u2593","&block;":"\u2588","&bne;":"=\u20E5","&bnequiv;":"\u2261\u20E5","&bnot;":"\u2310","&bopf;":"\u{1D553}","&bot;":"\u22A5","&bottom;":"\u22A5","&bowtie;":"\u22C8","&boxDL;":"\u2557","&boxDR;":"\u2554","&boxDl;":"\u2556","&boxDr;":"\u2553","&boxH;":"\u2550","&boxHD;":"\u2566","&boxHU;":"\u2569","&boxHd;":"\u2564","&boxHu;":"\u2567","&boxUL;":"\u255D","&boxUR;":"\u255A","&boxUl;":"\u255C","&boxUr;":"\u2559","&boxV;":"\u2551","&boxVH;":"\u256C","&boxVL;":"\u2563","&boxVR;":"\u2560","&boxVh;":"\u256B","&boxVl;":"\u2562","&boxVr;":"\u255F","&boxbox;":"\u29C9","&boxdL;":"\u2555","&boxdR;":"\u2552","&boxdl;":"\u2510","&boxdr;":"\u250C","&boxh;":"\u2500","&boxhD;":"\u2565","&boxhU;":"\u2568","&boxhd;":"\u252C","&boxhu;":"\u2534","&boxminus;":"\u229F","&boxplus;":"\u229E","&boxtimes;":"\u22A0","&boxuL;":"\u255B","&boxuR;":"\u2558","&boxul;":"\u2518","&boxur;":"\u2514","&boxv;":"\u2502","&boxvH;":"\u256A","&boxvL;":"\u2561","&boxvR;":"\u255E","&boxvh;":"\u253C","&boxvl;":"\u2524","&boxvr;":"\u251C","&bprime;":"\u2035","&breve;":"\u02D8","&brvbar":"\xA6","&brvbar;":"\xA6","&bscr;":"\u{1D4B7}","&bsemi;":"\u204F","&bsim;":"\u223D","&bsime;":"\u22CD","&bsol;":"\\","&bsolb;":"\u29C5","&bsolhsub;":"\u27C8","&bull;":"\u2022","&bullet;":"\u2022","&bump;":"\u224E","&bumpE;":"\u2AAE","&bumpe;":"\u224F","&bumpeq;":"\u224F","&cacute;":"\u0107","&cap;":"\u2229","&capand;":"\u2A44","&capbrcup;":"\u2A49","&capcap;":"\u2A4B","&capcup;":"\u2A47","&capdot;":"\u2A40","&caps;":"\u2229\uFE00","&caret;":"\u2041","&caron;":"\u02C7","&ccaps;":"\u2A4D","&ccaron;":"\u010D","&ccedil":"\xE7","&ccedil;":"\xE7","&ccirc;":"\u0109","&ccups;":"\u2A4C","&ccupssm;":"\u2A50","&cdot;":"\u010B","&cedil":"\xB8","&cedil;":"\xB8","&cemptyv;":"\u29B2","&cent":"\xA2","&cent;":"\xA2","&centerdot;":"\xB7","&cfr;":"\u{1D520}","&chcy;":"\u0447","&check;":"\u2713","&checkmark;":"\u2713","&chi;":"\u03C7","&cir;":"\u25CB","&cirE;":"\u29C3","&circ;":"\u02C6","&circeq;":"\u2257","&circlearrowleft;":"\u21BA","&circlearrowright;":"\u21BB","&circledR;":"\xAE","&circledS;":"\u24C8","&circledast;":"\u229B","&circledcirc;":"\u229A","&circleddash;":"\u229D","&cire;":"\u2257","&cirfnint;":"\u2A10","&cirmid;":"\u2AEF","&cirscir;":"\u29C2","&clubs;":"\u2663","&clubsuit;":"\u2663","&colon;":":","&colone;":"\u2254","&coloneq;":"\u2254","&comma;":",","&commat;":"@","&comp;":"\u2201","&compfn;":"\u2218","&complement;":"\u2201","&complexes;":"\u2102","&cong;":"\u2245","&congdot;":"\u2A6D","&conint;":"\u222E","&copf;":"\u{1D554}","&coprod;":"\u2210","&copy":"\xA9","&copy;":"\xA9","&copysr;":"\u2117","&crarr;":"\u21B5","&cross;":"\u2717","&cscr;":"\u{1D4B8}","&csub;":"\u2ACF","&csube;":"\u2AD1","&csup;":"\u2AD0","&csupe;":"\u2AD2","&ctdot;":"\u22EF","&cudarrl;":"\u2938","&cudarrr;":"\u2935","&cuepr;":"\u22DE","&cuesc;":"\u22DF","&cularr;":"\u21B6","&cularrp;":"\u293D","&cup;":"\u222A","&cupbrcap;":"\u2A48","&cupcap;":"\u2A46","&cupcup;":"\u2A4A","&cupdot;":"\u228D","&cupor;":"\u2A45","&cups;":"\u222A\uFE00","&curarr;":"\u21B7","&curarrm;":"\u293C","&curlyeqprec;":"\u22DE","&curlyeqsucc;":"\u22DF","&curlyvee;":"\u22CE","&curlywedge;":"\u22CF","&curren":"\xA4","&curren;":"\xA4","&curvearrowleft;":"\u21B6","&curvearrowright;":"\u21B7","&cuvee;":"\u22CE","&cuwed;":"\u22CF","&cwconint;":"\u2232","&cwint;":"\u2231","&cylcty;":"\u232D","&dArr;":"\u21D3","&dHar;":"\u2965","&dagger;":"\u2020","&daleth;":"\u2138","&darr;":"\u2193","&dash;":"\u2010","&dashv;":"\u22A3","&dbkarow;":"\u290F","&dblac;":"\u02DD","&dcaron;":"\u010F","&dcy;":"\u0434","&dd;":"\u2146","&ddagger;":"\u2021","&ddarr;":"\u21CA","&ddotseq;":"\u2A77","&deg":"\xB0","&deg;":"\xB0","&delta;":"\u03B4","&demptyv;":"\u29B1","&dfisht;":"\u297F","&dfr;":"\u{1D521}","&dharl;":"\u21C3","&dharr;":"\u21C2","&diam;":"\u22C4","&diamond;":"\u22C4","&diamondsuit;":"\u2666","&diams;":"\u2666","&die;":"\xA8","&digamma;":"\u03DD","&disin;":"\u22F2","&div;":"\xF7","&divide":"\xF7","&divide;":"\xF7","&divideontimes;":"\u22C7","&divonx;":"\u22C7","&djcy;":"\u0452","&dlcorn;":"\u231E","&dlcrop;":"\u230D","&dollar;":"$","&dopf;":"\u{1D555}","&dot;":"\u02D9","&doteq;":"\u2250","&doteqdot;":"\u2251","&dotminus;":"\u2238","&dotplus;":"\u2214","&dotsquare;":"\u22A1","&doublebarwedge;":"\u2306","&downarrow;":"\u2193","&downdownarrows;":"\u21CA","&downharpoonleft;":"\u21C3","&downharpoonright;":"\u21C2","&drbkarow;":"\u2910","&drcorn;":"\u231F","&drcrop;":"\u230C","&dscr;":"\u{1D4B9}","&dscy;":"\u0455","&dsol;":"\u29F6","&dstrok;":"\u0111","&dtdot;":"\u22F1","&dtri;":"\u25BF","&dtrif;":"\u25BE","&duarr;":"\u21F5","&duhar;":"\u296F","&dwangle;":"\u29A6","&dzcy;":"\u045F","&dzigrarr;":"\u27FF","&eDDot;":"\u2A77","&eDot;":"\u2251","&eacute":"\xE9","&eacute;":"\xE9","&easter;":"\u2A6E","&ecaron;":"\u011B","&ecir;":"\u2256","&ecirc":"\xEA","&ecirc;":"\xEA","&ecolon;":"\u2255","&ecy;":"\u044D","&edot;":"\u0117","&ee;":"\u2147","&efDot;":"\u2252","&efr;":"\u{1D522}","&eg;":"\u2A9A","&egrave":"\xE8","&egrave;":"\xE8","&egs;":"\u2A96","&egsdot;":"\u2A98","&el;":"\u2A99","&elinters;":"\u23E7","&ell;":"\u2113","&els;":"\u2A95","&elsdot;":"\u2A97","&emacr;":"\u0113","&empty;":"\u2205","&emptyset;":"\u2205","&emptyv;":"\u2205","&emsp13;":"\u2004","&emsp14;":"\u2005","&emsp;":"\u2003","&eng;":"\u014B","&ensp;":"\u2002","&eogon;":"\u0119","&eopf;":"\u{1D556}","&epar;":"\u22D5","&eparsl;":"\u29E3","&eplus;":"\u2A71","&epsi;":"\u03B5","&epsilon;":"\u03B5","&epsiv;":"\u03F5","&eqcirc;":"\u2256","&eqcolon;":"\u2255","&eqsim;":"\u2242","&eqslantgtr;":"\u2A96","&eqslantless;":"\u2A95","&equals;":"=","&equest;":"\u225F","&equiv;":"\u2261","&equivDD;":"\u2A78","&eqvparsl;":"\u29E5","&erDot;":"\u2253","&erarr;":"\u2971","&escr;":"\u212F","&esdot;":"\u2250","&esim;":"\u2242","&eta;":"\u03B7","&eth":"\xF0","&eth;":"\xF0","&euml":"\xEB","&euml;":"\xEB","&euro;":"\u20AC","&excl;":"!","&exist;":"\u2203","&expectation;":"\u2130","&exponentiale;":"\u2147","&fallingdotseq;":"\u2252","&fcy;":"\u0444","&female;":"\u2640","&ffilig;":"\uFB03","&fflig;":"\uFB00","&ffllig;":"\uFB04","&ffr;":"\u{1D523}","&filig;":"\uFB01","&fjlig;":"fj","&flat;":"\u266D","&fllig;":"\uFB02","&fltns;":"\u25B1","&fnof;":"\u0192","&fopf;":"\u{1D557}","&forall;":"\u2200","&fork;":"\u22D4","&forkv;":"\u2AD9","&fpartint;":"\u2A0D","&frac12":"\xBD","&frac12;":"\xBD","&frac13;":"\u2153","&frac14":"\xBC","&frac14;":"\xBC","&frac15;":"\u2155","&frac16;":"\u2159","&frac18;":"\u215B","&frac23;":"\u2154","&frac25;":"\u2156","&frac34":"\xBE","&frac34;":"\xBE","&frac35;":"\u2157","&frac38;":"\u215C","&frac45;":"\u2158","&frac56;":"\u215A","&frac58;":"\u215D","&frac78;":"\u215E","&frasl;":"\u2044","&frown;":"\u2322","&fscr;":"\u{1D4BB}","&gE;":"\u2267","&gEl;":"\u2A8C","&gacute;":"\u01F5","&gamma;":"\u03B3","&gammad;":"\u03DD","&gap;":"\u2A86","&gbreve;":"\u011F","&gcirc;":"\u011D","&gcy;":"\u0433","&gdot;":"\u0121","&ge;":"\u2265","&gel;":"\u22DB","&geq;":"\u2265","&geqq;":"\u2267","&geqslant;":"\u2A7E","&ges;":"\u2A7E","&gescc;":"\u2AA9","&gesdot;":"\u2A80","&gesdoto;":"\u2A82","&gesdotol;":"\u2A84","&gesl;":"\u22DB\uFE00","&gesles;":"\u2A94","&gfr;":"\u{1D524}","&gg;":"\u226B","&ggg;":"\u22D9","&gimel;":"\u2137","&gjcy;":"\u0453","&gl;":"\u2277","&glE;":"\u2A92","&gla;":"\u2AA5","&glj;":"\u2AA4","&gnE;":"\u2269","&gnap;":"\u2A8A","&gnapprox;":"\u2A8A","&gne;":"\u2A88","&gneq;":"\u2A88","&gneqq;":"\u2269","&gnsim;":"\u22E7","&gopf;":"\u{1D558}","&grave;":"`","&gscr;":"\u210A","&gsim;":"\u2273","&gsime;":"\u2A8E","&gsiml;":"\u2A90","&gt":">","&gt;":">","&gtcc;":"\u2AA7","&gtcir;":"\u2A7A","&gtdot;":"\u22D7","&gtlPar;":"\u2995","&gtquest;":"\u2A7C","&gtrapprox;":"\u2A86","&gtrarr;":"\u2978","&gtrdot;":"\u22D7","&gtreqless;":"\u22DB","&gtreqqless;":"\u2A8C","&gtrless;":"\u2277","&gtrsim;":"\u2273","&gvertneqq;":"\u2269\uFE00","&gvnE;":"\u2269\uFE00","&hArr;":"\u21D4","&hairsp;":"\u200A","&half;":"\xBD","&hamilt;":"\u210B","&hardcy;":"\u044A","&harr;":"\u2194","&harrcir;":"\u2948","&harrw;":"\u21AD","&hbar;":"\u210F","&hcirc;":"\u0125","&hearts;":"\u2665","&heartsuit;":"\u2665","&hellip;":"\u2026","&hercon;":"\u22B9","&hfr;":"\u{1D525}","&hksearow;":"\u2925","&hkswarow;":"\u2926","&hoarr;":"\u21FF","&homtht;":"\u223B","&hookleftarrow;":"\u21A9","&hookrightarrow;":"\u21AA","&hopf;":"\u{1D559}","&horbar;":"\u2015","&hscr;":"\u{1D4BD}","&hslash;":"\u210F","&hstrok;":"\u0127","&hybull;":"\u2043","&hyphen;":"\u2010","&iacute":"\xED","&iacute;":"\xED","&ic;":"\u2063","&icirc":"\xEE","&icirc;":"\xEE","&icy;":"\u0438","&iecy;":"\u0435","&iexcl":"\xA1","&iexcl;":"\xA1","&iff;":"\u21D4","&ifr;":"\u{1D526}","&igrave":"\xEC","&igrave;":"\xEC","&ii;":"\u2148","&iiiint;":"\u2A0C","&iiint;":"\u222D","&iinfin;":"\u29DC","&iiota;":"\u2129","&ijlig;":"\u0133","&imacr;":"\u012B","&image;":"\u2111","&imagline;":"\u2110","&imagpart;":"\u2111","&imath;":"\u0131","&imof;":"\u22B7","&imped;":"\u01B5","&in;":"\u2208","&incare;":"\u2105","&infin;":"\u221E","&infintie;":"\u29DD","&inodot;":"\u0131","&int;":"\u222B","&intcal;":"\u22BA","&integers;":"\u2124","&intercal;":"\u22BA","&intlarhk;":"\u2A17","&intprod;":"\u2A3C","&iocy;":"\u0451","&iogon;":"\u012F","&iopf;":"\u{1D55A}","&iota;":"\u03B9","&iprod;":"\u2A3C","&iquest":"\xBF","&iquest;":"\xBF","&iscr;":"\u{1D4BE}","&isin;":"\u2208","&isinE;":"\u22F9","&isindot;":"\u22F5","&isins;":"\u22F4","&isinsv;":"\u22F3","&isinv;":"\u2208","&it;":"\u2062","&itilde;":"\u0129","&iukcy;":"\u0456","&iuml":"\xEF","&iuml;":"\xEF","&jcirc;":"\u0135","&jcy;":"\u0439","&jfr;":"\u{1D527}","&jmath;":"\u0237","&jopf;":"\u{1D55B}","&jscr;":"\u{1D4BF}","&jsercy;":"\u0458","&jukcy;":"\u0454","&kappa;":"\u03BA","&kappav;":"\u03F0","&kcedil;":"\u0137","&kcy;":"\u043A","&kfr;":"\u{1D528}","&kgreen;":"\u0138","&khcy;":"\u0445","&kjcy;":"\u045C","&kopf;":"\u{1D55C}","&kscr;":"\u{1D4C0}","&lAarr;":"\u21DA","&lArr;":"\u21D0","&lAtail;":"\u291B","&lBarr;":"\u290E","&lE;":"\u2266","&lEg;":"\u2A8B","&lHar;":"\u2962","&lacute;":"\u013A","&laemptyv;":"\u29B4","&lagran;":"\u2112","&lambda;":"\u03BB","&lang;":"\u27E8","&langd;":"\u2991","&langle;":"\u27E8","&lap;":"\u2A85","&laquo":"\xAB","&laquo;":"\xAB","&larr;":"\u2190","&larrb;":"\u21E4","&larrbfs;":"\u291F","&larrfs;":"\u291D","&larrhk;":"\u21A9","&larrlp;":"\u21AB","&larrpl;":"\u2939","&larrsim;":"\u2973","&larrtl;":"\u21A2","&lat;":"\u2AAB","&latail;":"\u2919","&late;":"\u2AAD","&lates;":"\u2AAD\uFE00","&lbarr;":"\u290C","&lbbrk;":"\u2772","&lbrace;":"{","&lbrack;":"[","&lbrke;":"\u298B","&lbrksld;":"\u298F","&lbrkslu;":"\u298D","&lcaron;":"\u013E","&lcedil;":"\u013C","&lceil;":"\u2308","&lcub;":"{","&lcy;":"\u043B","&ldca;":"\u2936","&ldquo;":"\u201C","&ldquor;":"\u201E","&ldrdhar;":"\u2967","&ldrushar;":"\u294B","&ldsh;":"\u21B2","&le;":"\u2264","&leftarrow;":"\u2190","&leftarrowtail;":"\u21A2","&leftharpoondown;":"\u21BD","&leftharpoonup;":"\u21BC","&leftleftarrows;":"\u21C7","&leftrightarrow;":"\u2194","&leftrightarrows;":"\u21C6","&leftrightharpoons;":"\u21CB","&leftrightsquigarrow;":"\u21AD","&leftthreetimes;":"\u22CB","&leg;":"\u22DA","&leq;":"\u2264","&leqq;":"\u2266","&leqslant;":"\u2A7D","&les;":"\u2A7D","&lescc;":"\u2AA8","&lesdot;":"\u2A7F","&lesdoto;":"\u2A81","&lesdotor;":"\u2A83","&lesg;":"\u22DA\uFE00","&lesges;":"\u2A93","&lessapprox;":"\u2A85","&lessdot;":"\u22D6","&lesseqgtr;":"\u22DA","&lesseqqgtr;":"\u2A8B","&lessgtr;":"\u2276","&lesssim;":"\u2272","&lfisht;":"\u297C","&lfloor;":"\u230A","&lfr;":"\u{1D529}","&lg;":"\u2276","&lgE;":"\u2A91","&lhard;":"\u21BD","&lharu;":"\u21BC","&lharul;":"\u296A","&lhblk;":"\u2584","&ljcy;":"\u0459","&ll;":"\u226A","&llarr;":"\u21C7","&llcorner;":"\u231E","&llhard;":"\u296B","&lltri;":"\u25FA","&lmidot;":"\u0140","&lmoust;":"\u23B0","&lmoustache;":"\u23B0","&lnE;":"\u2268","&lnap;":"\u2A89","&lnapprox;":"\u2A89","&lne;":"\u2A87","&lneq;":"\u2A87","&lneqq;":"\u2268","&lnsim;":"\u22E6","&loang;":"\u27EC","&loarr;":"\u21FD","&lobrk;":"\u27E6","&longleftarrow;":"\u27F5","&longleftrightarrow;":"\u27F7","&longmapsto;":"\u27FC","&longrightarrow;":"\u27F6","&looparrowleft;":"\u21AB","&looparrowright;":"\u21AC","&lopar;":"\u2985","&lopf;":"\u{1D55D}","&loplus;":"\u2A2D","&lotimes;":"\u2A34","&lowast;":"\u2217","&lowbar;":"_","&loz;":"\u25CA","&lozenge;":"\u25CA","&lozf;":"\u29EB","&lpar;":"(","&lparlt;":"\u2993","&lrarr;":"\u21C6","&lrcorner;":"\u231F","&lrhar;":"\u21CB","&lrhard;":"\u296D","&lrm;":"\u200E","&lrtri;":"\u22BF","&lsaquo;":"\u2039","&lscr;":"\u{1D4C1}","&lsh;":"\u21B0","&lsim;":"\u2272","&lsime;":"\u2A8D","&lsimg;":"\u2A8F","&lsqb;":"[","&lsquo;":"\u2018","&lsquor;":"\u201A","&lstrok;":"\u0142","&lt":"<","&lt;":"<","&ltcc;":"\u2AA6","&ltcir;":"\u2A79","&ltdot;":"\u22D6","&lthree;":"\u22CB","&ltimes;":"\u22C9","&ltlarr;":"\u2976","&ltquest;":"\u2A7B","&ltrPar;":"\u2996","&ltri;":"\u25C3","&ltrie;":"\u22B4","&ltrif;":"\u25C2","&lurdshar;":"\u294A","&luruhar;":"\u2966","&lvertneqq;":"\u2268\uFE00","&lvnE;":"\u2268\uFE00","&mDDot;":"\u223A","&macr":"\xAF","&macr;":"\xAF","&male;":"\u2642","&malt;":"\u2720","&maltese;":"\u2720","&map;":"\u21A6","&mapsto;":"\u21A6","&mapstodown;":"\u21A7","&mapstoleft;":"\u21A4","&mapstoup;":"\u21A5","&marker;":"\u25AE","&mcomma;":"\u2A29","&mcy;":"\u043C","&mdash;":"\u2014","&measuredangle;":"\u2221","&mfr;":"\u{1D52A}","&mho;":"\u2127","&micro":"\xB5","&micro;":"\xB5","&mid;":"\u2223","&midast;":"*","&midcir;":"\u2AF0","&middot":"\xB7","&middot;":"\xB7","&minus;":"\u2212","&minusb;":"\u229F","&minusd;":"\u2238","&minusdu;":"\u2A2A","&mlcp;":"\u2ADB","&mldr;":"\u2026","&mnplus;":"\u2213","&models;":"\u22A7","&mopf;":"\u{1D55E}","&mp;":"\u2213","&mscr;":"\u{1D4C2}","&mstpos;":"\u223E","&mu;":"\u03BC","&multimap;":"\u22B8","&mumap;":"\u22B8","&nGg;":"\u22D9\u0338","&nGt;":"\u226B\u20D2","&nGtv;":"\u226B\u0338","&nLeftarrow;":"\u21CD","&nLeftrightarrow;":"\u21CE","&nLl;":"\u22D8\u0338","&nLt;":"\u226A\u20D2","&nLtv;":"\u226A\u0338","&nRightarrow;":"\u21CF","&nVDash;":"\u22AF","&nVdash;":"\u22AE","&nabla;":"\u2207","&nacute;":"\u0144","&nang;":"\u2220\u20D2","&nap;":"\u2249","&napE;":"\u2A70\u0338","&napid;":"\u224B\u0338","&napos;":"\u0149","&napprox;":"\u2249","&natur;":"\u266E","&natural;":"\u266E","&naturals;":"\u2115","&nbsp":"\xA0","&nbsp;":"\xA0","&nbump;":"\u224E\u0338","&nbumpe;":"\u224F\u0338","&ncap;":"\u2A43","&ncaron;":"\u0148","&ncedil;":"\u0146","&ncong;":"\u2247","&ncongdot;":"\u2A6D\u0338","&ncup;":"\u2A42","&ncy;":"\u043D","&ndash;":"\u2013","&ne;":"\u2260","&neArr;":"\u21D7","&nearhk;":"\u2924","&nearr;":"\u2197","&nearrow;":"\u2197","&nedot;":"\u2250\u0338","&nequiv;":"\u2262","&nesear;":"\u2928","&nesim;":"\u2242\u0338","&nexist;":"\u2204","&nexists;":"\u2204","&nfr;":"\u{1D52B}","&ngE;":"\u2267\u0338","&nge;":"\u2271","&ngeq;":"\u2271","&ngeqq;":"\u2267\u0338","&ngeqslant;":"\u2A7E\u0338","&nges;":"\u2A7E\u0338","&ngsim;":"\u2275","&ngt;":"\u226F","&ngtr;":"\u226F","&nhArr;":"\u21CE","&nharr;":"\u21AE","&nhpar;":"\u2AF2","&ni;":"\u220B","&nis;":"\u22FC","&nisd;":"\u22FA","&niv;":"\u220B","&njcy;":"\u045A","&nlArr;":"\u21CD","&nlE;":"\u2266\u0338","&nlarr;":"\u219A","&nldr;":"\u2025","&nle;":"\u2270","&nleftarrow;":"\u219A","&nleftrightarrow;":"\u21AE","&nleq;":"\u2270","&nleqq;":"\u2266\u0338","&nleqslant;":"\u2A7D\u0338","&nles;":"\u2A7D\u0338","&nless;":"\u226E","&nlsim;":"\u2274","&nlt;":"\u226E","&nltri;":"\u22EA","&nltrie;":"\u22EC","&nmid;":"\u2224","&nopf;":"\u{1D55F}","&not":"\xAC","&not;":"\xAC","&notin;":"\u2209","&notinE;":"\u22F9\u0338","&notindot;":"\u22F5\u0338","&notinva;":"\u2209","&notinvb;":"\u22F7","&notinvc;":"\u22F6","&notni;":"\u220C","&notniva;":"\u220C","&notnivb;":"\u22FE","&notnivc;":"\u22FD","&npar;":"\u2226","&nparallel;":"\u2226","&nparsl;":"\u2AFD\u20E5","&npart;":"\u2202\u0338","&npolint;":"\u2A14","&npr;":"\u2280","&nprcue;":"\u22E0","&npre;":"\u2AAF\u0338","&nprec;":"\u2280","&npreceq;":"\u2AAF\u0338","&nrArr;":"\u21CF","&nrarr;":"\u219B","&nrarrc;":"\u2933\u0338","&nrarrw;":"\u219D\u0338","&nrightarrow;":"\u219B","&nrtri;":"\u22EB","&nrtrie;":"\u22ED","&nsc;":"\u2281","&nsccue;":"\u22E1","&nsce;":"\u2AB0\u0338","&nscr;":"\u{1D4C3}","&nshortmid;":"\u2224","&nshortparallel;":"\u2226","&nsim;":"\u2241","&nsime;":"\u2244","&nsimeq;":"\u2244","&nsmid;":"\u2224","&nspar;":"\u2226","&nsqsube;":"\u22E2","&nsqsupe;":"\u22E3","&nsub;":"\u2284","&nsubE;":"\u2AC5\u0338","&nsube;":"\u2288","&nsubset;":"\u2282\u20D2","&nsubseteq;":"\u2288","&nsubseteqq;":"\u2AC5\u0338","&nsucc;":"\u2281","&nsucceq;":"\u2AB0\u0338","&nsup;":"\u2285","&nsupE;":"\u2AC6\u0338","&nsupe;":"\u2289","&nsupset;":"\u2283\u20D2","&nsupseteq;":"\u2289","&nsupseteqq;":"\u2AC6\u0338","&ntgl;":"\u2279","&ntilde":"\xF1","&ntilde;":"\xF1","&ntlg;":"\u2278","&ntriangleleft;":"\u22EA","&ntrianglelefteq;":"\u22EC","&ntriangleright;":"\u22EB","&ntrianglerighteq;":"\u22ED","&nu;":"\u03BD","&num;":"#","&numero;":"\u2116","&numsp;":"\u2007","&nvDash;":"\u22AD","&nvHarr;":"\u2904","&nvap;":"\u224D\u20D2","&nvdash;":"\u22AC","&nvge;":"\u2265\u20D2","&nvgt;":">\u20D2","&nvinfin;":"\u29DE","&nvlArr;":"\u2902","&nvle;":"\u2264\u20D2","&nvlt;":"<\u20D2","&nvltrie;":"\u22B4\u20D2","&nvrArr;":"\u2903","&nvrtrie;":"\u22B5\u20D2","&nvsim;":"\u223C\u20D2","&nwArr;":"\u21D6","&nwarhk;":"\u2923","&nwarr;":"\u2196","&nwarrow;":"\u2196","&nwnear;":"\u2927","&oS;":"\u24C8","&oacute":"\xF3","&oacute;":"\xF3","&oast;":"\u229B","&ocir;":"\u229A","&ocirc":"\xF4","&ocirc;":"\xF4","&ocy;":"\u043E","&odash;":"\u229D","&odblac;":"\u0151","&odiv;":"\u2A38","&odot;":"\u2299","&odsold;":"\u29BC","&oelig;":"\u0153","&ofcir;":"\u29BF","&ofr;":"\u{1D52C}","&ogon;":"\u02DB","&ograve":"\xF2","&ograve;":"\xF2","&ogt;":"\u29C1","&ohbar;":"\u29B5","&ohm;":"\u03A9","&oint;":"\u222E","&olarr;":"\u21BA","&olcir;":"\u29BE","&olcross;":"\u29BB","&oline;":"\u203E","&olt;":"\u29C0","&omacr;":"\u014D","&omega;":"\u03C9","&omicron;":"\u03BF","&omid;":"\u29B6","&ominus;":"\u2296","&oopf;":"\u{1D560}","&opar;":"\u29B7","&operp;":"\u29B9","&oplus;":"\u2295","&or;":"\u2228","&orarr;":"\u21BB","&ord;":"\u2A5D","&order;":"\u2134","&orderof;":"\u2134","&ordf":"\xAA","&ordf;":"\xAA","&ordm":"\xBA","&ordm;":"\xBA","&origof;":"\u22B6","&oror;":"\u2A56","&orslope;":"\u2A57","&orv;":"\u2A5B","&oscr;":"\u2134","&oslash":"\xF8","&oslash;":"\xF8","&osol;":"\u2298","&otilde":"\xF5","&otilde;":"\xF5","&otimes;":"\u2297","&otimesas;":"\u2A36","&ouml":"\xF6","&ouml;":"\xF6","&ovbar;":"\u233D","&par;":"\u2225","&para":"\xB6","&para;":"\xB6","&parallel;":"\u2225","&parsim;":"\u2AF3","&parsl;":"\u2AFD","&part;":"\u2202","&pcy;":"\u043F","&percnt;":"%","&period;":".","&permil;":"\u2030","&perp;":"\u22A5","&pertenk;":"\u2031","&pfr;":"\u{1D52D}","&phi;":"\u03C6","&phiv;":"\u03D5","&phmmat;":"\u2133","&phone;":"\u260E","&pi;":"\u03C0","&pitchfork;":"\u22D4","&piv;":"\u03D6","&planck;":"\u210F","&planckh;":"\u210E","&plankv;":"\u210F","&plus;":"+","&plusacir;":"\u2A23","&plusb;":"\u229E","&pluscir;":"\u2A22","&plusdo;":"\u2214","&plusdu;":"\u2A25","&pluse;":"\u2A72","&plusmn":"\xB1","&plusmn;":"\xB1","&plussim;":"\u2A26","&plustwo;":"\u2A27","&pm;":"\xB1","&pointint;":"\u2A15","&popf;":"\u{1D561}","&pound":"\xA3","&pound;":"\xA3","&pr;":"\u227A","&prE;":"\u2AB3","&prap;":"\u2AB7","&prcue;":"\u227C","&pre;":"\u2AAF","&prec;":"\u227A","&precapprox;":"\u2AB7","&preccurlyeq;":"\u227C","&preceq;":"\u2AAF","&precnapprox;":"\u2AB9","&precneqq;":"\u2AB5","&precnsim;":"\u22E8","&precsim;":"\u227E","&prime;":"\u2032","&primes;":"\u2119","&prnE;":"\u2AB5","&prnap;":"\u2AB9","&prnsim;":"\u22E8","&prod;":"\u220F","&profalar;":"\u232E","&profline;":"\u2312","&profsurf;":"\u2313","&prop;":"\u221D","&propto;":"\u221D","&prsim;":"\u227E","&prurel;":"\u22B0","&pscr;":"\u{1D4C5}","&psi;":"\u03C8","&puncsp;":"\u2008","&qfr;":"\u{1D52E}","&qint;":"\u2A0C","&qopf;":"\u{1D562}","&qprime;":"\u2057","&qscr;":"\u{1D4C6}","&quaternions;":"\u210D","&quatint;":"\u2A16","&quest;":"?","&questeq;":"\u225F","&quot":'"',"&quot;":'"',"&rAarr;":"\u21DB","&rArr;":"\u21D2","&rAtail;":"\u291C","&rBarr;":"\u290F","&rHar;":"\u2964","&race;":"\u223D\u0331","&racute;":"\u0155","&radic;":"\u221A","&raemptyv;":"\u29B3","&rang;":"\u27E9","&rangd;":"\u2992","&range;":"\u29A5","&rangle;":"\u27E9","&raquo":"\xBB","&raquo;":"\xBB","&rarr;":"\u2192","&rarrap;":"\u2975","&rarrb;":"\u21E5","&rarrbfs;":"\u2920","&rarrc;":"\u2933","&rarrfs;":"\u291E","&rarrhk;":"\u21AA","&rarrlp;":"\u21AC","&rarrpl;":"\u2945","&rarrsim;":"\u2974","&rarrtl;":"\u21A3","&rarrw;":"\u219D","&ratail;":"\u291A","&ratio;":"\u2236","&rationals;":"\u211A","&rbarr;":"\u290D","&rbbrk;":"\u2773","&rbrace;":"}","&rbrack;":"]","&rbrke;":"\u298C","&rbrksld;":"\u298E","&rbrkslu;":"\u2990","&rcaron;":"\u0159","&rcedil;":"\u0157","&rceil;":"\u2309","&rcub;":"}","&rcy;":"\u0440","&rdca;":"\u2937","&rdldhar;":"\u2969","&rdquo;":"\u201D","&rdquor;":"\u201D","&rdsh;":"\u21B3","&real;":"\u211C","&realine;":"\u211B","&realpart;":"\u211C","&reals;":"\u211D","&rect;":"\u25AD","&reg":"\xAE","&reg;":"\xAE","&rfisht;":"\u297D","&rfloor;":"\u230B","&rfr;":"\u{1D52F}","&rhard;":"\u21C1","&rharu;":"\u21C0","&rharul;":"\u296C","&rho;":"\u03C1","&rhov;":"\u03F1","&rightarrow;":"\u2192","&rightarrowtail;":"\u21A3","&rightharpoondown;":"\u21C1","&rightharpoonup;":"\u21C0","&rightleftarrows;":"\u21C4","&rightleftharpoons;":"\u21CC","&rightrightarrows;":"\u21C9","&rightsquigarrow;":"\u219D","&rightthreetimes;":"\u22CC","&ring;":"\u02DA","&risingdotseq;":"\u2253","&rlarr;":"\u21C4","&rlhar;":"\u21CC","&rlm;":"\u200F","&rmoust;":"\u23B1","&rmoustache;":"\u23B1","&rnmid;":"\u2AEE","&roang;":"\u27ED","&roarr;":"\u21FE","&robrk;":"\u27E7","&ropar;":"\u2986","&ropf;":"\u{1D563}","&roplus;":"\u2A2E","&rotimes;":"\u2A35","&rpar;":")","&rpargt;":"\u2994","&rppolint;":"\u2A12","&rrarr;":"\u21C9","&rsaquo;":"\u203A","&rscr;":"\u{1D4C7}","&rsh;":"\u21B1","&rsqb;":"]","&rsquo;":"\u2019","&rsquor;":"\u2019","&rthree;":"\u22CC","&rtimes;":"\u22CA","&rtri;":"\u25B9","&rtrie;":"\u22B5","&rtrif;":"\u25B8","&rtriltri;":"\u29CE","&ruluhar;":"\u2968","&rx;":"\u211E","&sacute;":"\u015B","&sbquo;":"\u201A","&sc;":"\u227B","&scE;":"\u2AB4","&scap;":"\u2AB8","&scaron;":"\u0161","&sccue;":"\u227D","&sce;":"\u2AB0","&scedil;":"\u015F","&scirc;":"\u015D","&scnE;":"\u2AB6","&scnap;":"\u2ABA","&scnsim;":"\u22E9","&scpolint;":"\u2A13","&scsim;":"\u227F","&scy;":"\u0441","&sdot;":"\u22C5","&sdotb;":"\u22A1","&sdote;":"\u2A66","&seArr;":"\u21D8","&searhk;":"\u2925","&searr;":"\u2198","&searrow;":"\u2198","&sect":"\xA7","&sect;":"\xA7","&semi;":";","&seswar;":"\u2929","&setminus;":"\u2216","&setmn;":"\u2216","&sext;":"\u2736","&sfr;":"\u{1D530}","&sfrown;":"\u2322","&sharp;":"\u266F","&shchcy;":"\u0449","&shcy;":"\u0448","&shortmid;":"\u2223","&shortparallel;":"\u2225","&shy":"\xAD","&shy;":"\xAD","&sigma;":"\u03C3","&sigmaf;":"\u03C2","&sigmav;":"\u03C2","&sim;":"\u223C","&simdot;":"\u2A6A","&sime;":"\u2243","&simeq;":"\u2243","&simg;":"\u2A9E","&simgE;":"\u2AA0","&siml;":"\u2A9D","&simlE;":"\u2A9F","&simne;":"\u2246","&simplus;":"\u2A24","&simrarr;":"\u2972","&slarr;":"\u2190","&smallsetminus;":"\u2216","&smashp;":"\u2A33","&smeparsl;":"\u29E4","&smid;":"\u2223","&smile;":"\u2323","&smt;":"\u2AAA","&smte;":"\u2AAC","&smtes;":"\u2AAC\uFE00","&softcy;":"\u044C","&sol;":"/","&solb;":"\u29C4","&solbar;":"\u233F","&sopf;":"\u{1D564}","&spades;":"\u2660","&spadesuit;":"\u2660","&spar;":"\u2225","&sqcap;":"\u2293","&sqcaps;":"\u2293\uFE00","&sqcup;":"\u2294","&sqcups;":"\u2294\uFE00","&sqsub;":"\u228F","&sqsube;":"\u2291","&sqsubset;":"\u228F","&sqsubseteq;":"\u2291","&sqsup;":"\u2290","&sqsupe;":"\u2292","&sqsupset;":"\u2290","&sqsupseteq;":"\u2292","&squ;":"\u25A1","&square;":"\u25A1","&squarf;":"\u25AA","&squf;":"\u25AA","&srarr;":"\u2192","&sscr;":"\u{1D4C8}","&ssetmn;":"\u2216","&ssmile;":"\u2323","&sstarf;":"\u22C6","&star;":"\u2606","&starf;":"\u2605","&straightepsilon;":"\u03F5","&straightphi;":"\u03D5","&strns;":"\xAF","&sub;":"\u2282","&subE;":"\u2AC5","&subdot;":"\u2ABD","&sube;":"\u2286","&subedot;":"\u2AC3","&submult;":"\u2AC1","&subnE;":"\u2ACB","&subne;":"\u228A","&subplus;":"\u2ABF","&subrarr;":"\u2979","&subset;":"\u2282","&subseteq;":"\u2286","&subseteqq;":"\u2AC5","&subsetneq;":"\u228A","&subsetneqq;":"\u2ACB","&subsim;":"\u2AC7","&subsub;":"\u2AD5","&subsup;":"\u2AD3","&succ;":"\u227B","&succapprox;":"\u2AB8","&succcurlyeq;":"\u227D","&succeq;":"\u2AB0","&succnapprox;":"\u2ABA","&succneqq;":"\u2AB6","&succnsim;":"\u22E9","&succsim;":"\u227F","&sum;":"\u2211","&sung;":"\u266A","&sup1":"\xB9","&sup1;":"\xB9","&sup2":"\xB2","&sup2;":"\xB2","&sup3":"\xB3","&sup3;":"\xB3","&sup;":"\u2283","&supE;":"\u2AC6","&supdot;":"\u2ABE","&supdsub;":"\u2AD8","&supe;":"\u2287","&supedot;":"\u2AC4","&suphsol;":"\u27C9","&suphsub;":"\u2AD7","&suplarr;":"\u297B","&supmult;":"\u2AC2","&supnE;":"\u2ACC","&supne;":"\u228B","&supplus;":"\u2AC0","&supset;":"\u2283","&supseteq;":"\u2287","&supseteqq;":"\u2AC6","&supsetneq;":"\u228B","&supsetneqq;":"\u2ACC","&supsim;":"\u2AC8","&supsub;":"\u2AD4","&supsup;":"\u2AD6","&swArr;":"\u21D9","&swarhk;":"\u2926","&swarr;":"\u2199","&swarrow;":"\u2199","&swnwar;":"\u292A","&szlig":"\xDF","&szlig;":"\xDF","&target;":"\u2316","&tau;":"\u03C4","&tbrk;":"\u23B4","&tcaron;":"\u0165","&tcedil;":"\u0163","&tcy;":"\u0442","&tdot;":"\u20DB","&telrec;":"\u2315","&tfr;":"\u{1D531}","&there4;":"\u2234","&therefore;":"\u2234","&theta;":"\u03B8","&thetasym;":"\u03D1","&thetav;":"\u03D1","&thickapprox;":"\u2248","&thicksim;":"\u223C","&thinsp;":"\u2009","&thkap;":"\u2248","&thksim;":"\u223C","&thorn":"\xFE","&thorn;":"\xFE","&tilde;":"\u02DC","&times":"\xD7","&times;":"\xD7","&timesb;":"\u22A0","&timesbar;":"\u2A31","&timesd;":"\u2A30","&tint;":"\u222D","&toea;":"\u2928","&top;":"\u22A4","&topbot;":"\u2336","&topcir;":"\u2AF1","&topf;":"\u{1D565}","&topfork;":"\u2ADA","&tosa;":"\u2929","&tprime;":"\u2034","&trade;":"\u2122","&triangle;":"\u25B5","&triangledown;":"\u25BF","&triangleleft;":"\u25C3","&trianglelefteq;":"\u22B4","&triangleq;":"\u225C","&triangleright;":"\u25B9","&trianglerighteq;":"\u22B5","&tridot;":"\u25EC","&trie;":"\u225C","&triminus;":"\u2A3A","&triplus;":"\u2A39","&trisb;":"\u29CD","&tritime;":"\u2A3B","&trpezium;":"\u23E2","&tscr;":"\u{1D4C9}","&tscy;":"\u0446","&tshcy;":"\u045B","&tstrok;":"\u0167","&twixt;":"\u226C","&twoheadleftarrow;":"\u219E","&twoheadrightarrow;":"\u21A0","&uArr;":"\u21D1","&uHar;":"\u2963","&uacute":"\xFA","&uacute;":"\xFA","&uarr;":"\u2191","&ubrcy;":"\u045E","&ubreve;":"\u016D","&ucirc":"\xFB","&ucirc;":"\xFB","&ucy;":"\u0443","&udarr;":"\u21C5","&udblac;":"\u0171","&udhar;":"\u296E","&ufisht;":"\u297E","&ufr;":"\u{1D532}","&ugrave":"\xF9","&ugrave;":"\xF9","&uharl;":"\u21BF","&uharr;":"\u21BE","&uhblk;":"\u2580","&ulcorn;":"\u231C","&ulcorner;":"\u231C","&ulcrop;":"\u230F","&ultri;":"\u25F8","&umacr;":"\u016B","&uml":"\xA8","&uml;":"\xA8","&uogon;":"\u0173","&uopf;":"\u{1D566}","&uparrow;":"\u2191","&updownarrow;":"\u2195","&upharpoonleft;":"\u21BF","&upharpoonright;":"\u21BE","&uplus;":"\u228E","&upsi;":"\u03C5","&upsih;":"\u03D2","&upsilon;":"\u03C5","&upuparrows;":"\u21C8","&urcorn;":"\u231D","&urcorner;":"\u231D","&urcrop;":"\u230E","&uring;":"\u016F","&urtri;":"\u25F9","&uscr;":"\u{1D4CA}","&utdot;":"\u22F0","&utilde;":"\u0169","&utri;":"\u25B5","&utrif;":"\u25B4","&uuarr;":"\u21C8","&uuml":"\xFC","&uuml;":"\xFC","&uwangle;":"\u29A7","&vArr;":"\u21D5","&vBar;":"\u2AE8","&vBarv;":"\u2AE9","&vDash;":"\u22A8","&vangrt;":"\u299C","&varepsilon;":"\u03F5","&varkappa;":"\u03F0","&varnothing;":"\u2205","&varphi;":"\u03D5","&varpi;":"\u03D6","&varpropto;":"\u221D","&varr;":"\u2195","&varrho;":"\u03F1","&varsigma;":"\u03C2","&varsubsetneq;":"\u228A\uFE00","&varsubsetneqq;":"\u2ACB\uFE00","&varsupsetneq;":"\u228B\uFE00","&varsupsetneqq;":"\u2ACC\uFE00","&vartheta;":"\u03D1","&vartriangleleft;":"\u22B2","&vartriangleright;":"\u22B3","&vcy;":"\u0432","&vdash;":"\u22A2","&vee;":"\u2228","&veebar;":"\u22BB","&veeeq;":"\u225A","&vellip;":"\u22EE","&verbar;":"|","&vert;":"|","&vfr;":"\u{1D533}","&vltri;":"\u22B2","&vnsub;":"\u2282\u20D2","&vnsup;":"\u2283\u20D2","&vopf;":"\u{1D567}","&vprop;":"\u221D","&vrtri;":"\u22B3","&vscr;":"\u{1D4CB}","&vsubnE;":"\u2ACB\uFE00","&vsubne;":"\u228A\uFE00","&vsupnE;":"\u2ACC\uFE00","&vsupne;":"\u228B\uFE00","&vzigzag;":"\u299A","&wcirc;":"\u0175","&wedbar;":"\u2A5F","&wedge;":"\u2227","&wedgeq;":"\u2259","&weierp;":"\u2118","&wfr;":"\u{1D534}","&wopf;":"\u{1D568}","&wp;":"\u2118","&wr;":"\u2240","&wreath;":"\u2240","&wscr;":"\u{1D4CC}","&xcap;":"\u22C2","&xcirc;":"\u25EF","&xcup;":"\u22C3","&xdtri;":"\u25BD","&xfr;":"\u{1D535}","&xhArr;":"\u27FA","&xharr;":"\u27F7","&xi;":"\u03BE","&xlArr;":"\u27F8","&xlarr;":"\u27F5","&xmap;":"\u27FC","&xnis;":"\u22FB","&xodot;":"\u2A00","&xopf;":"\u{1D569}","&xoplus;":"\u2A01","&xotime;":"\u2A02","&xrArr;":"\u27F9","&xrarr;":"\u27F6","&xscr;":"\u{1D4CD}","&xsqcup;":"\u2A06","&xuplus;":"\u2A04","&xutri;":"\u25B3","&xvee;":"\u22C1","&xwedge;":"\u22C0","&yacute":"\xFD","&yacute;":"\xFD","&yacy;":"\u044F","&ycirc;":"\u0177","&ycy;":"\u044B","&yen":"\xA5","&yen;":"\xA5","&yfr;":"\u{1D536}","&yicy;":"\u0457","&yopf;":"\u{1D56A}","&yscr;":"\u{1D4CE}","&yucy;":"\u044E","&yuml":"\xFF","&yuml;":"\xFF","&zacute;":"\u017A","&zcaron;":"\u017E","&zcy;":"\u0437","&zdot;":"\u017C","&zeetrf;":"\u2128","&zeta;":"\u03B6","&zfr;":"\u{1D537}","&zhcy;":"\u0436","&zigrarr;":"\u21DD","&zopf;":"\u{1D56B}","&zscr;":"\u{1D4CF}","&zwj;":"\u200D","&zwnj;":"\u200C"},rr=Zp;function ef(e){return e.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi,(t,o)=>{if(typeof rr[t]=="string")return rr[t];if(o.charAt(0)!=="#"||t.charAt(t.length-1)!==";")return t;let i;o.charAt(1)==="x"?i=parseInt(o.substr(2),16):i=parseInt(o.substr(1),10);let r="";return i>=55296&&i<=57343||i>1114111?"\uFFFD":(i>65535&&(i-=65536,r+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),r+=String.fromCharCode(i),r)})}function _t(e){return e.trim().replace(/[<>"'?&]/g,t=>{let o=t.charCodeAt(0).toString(16);return o.length<2&&(o="0"+o),"&#x"+o.toUpperCase()+";"})}function rs(e){return"<div>"+_t(e).replace(/\n/g,"<br />")+"</div>"}function ns(e){return e=e.replace(/\r?\n/g,"").replace(/<\!\-\-.*?\-\->/gi," ").replace(/<br\b[^>]*>/gi,`
257
+ `+o,this.headerLines.splice(t,1))}this.rawHeaderLines=[];for(let t=this.headerLines.length-1;t>=0;t--){let o=this.headerLines[t],i=o.indexOf(":"),r=i<0?o.trim():o.substr(0,i).trim();this.rawHeaderLines.push({key:r.toLowerCase(),line:o});let n=o.replace(/\s+/g," ");i=n.indexOf(":");let s=i<0?n.trim():n.substr(0,i).trim(),a=i<0?"":n.substr(i+1).trim();switch(this.headers.push({key:s.toLowerCase(),originalKey:s,value:a}),s.toLowerCase()){case"content-type":this.contentType.default&&(this.contentType={value:a,parsed:{}});break;case"content-transfer-encoding":this.contentTransferEncoding={value:a,parsed:{}};break;case"content-disposition":this.contentDisposition={value:a,parsed:{}};break;case"content-id":this.contentId=a;break;case"content-description":this.contentDescription=a;break}}this.contentType.parsed=this.parseStructuredHeader(this.contentType.value),this.contentType.multipart=/^multipart\//i.test(this.contentType.parsed.value)?this.contentType.parsed.value.substr(this.contentType.parsed.value.indexOf("/")+1):!1,this.contentType.multipart&&this.contentType.parsed.params.boundary&&this.postalMime.boundaries.push({value:ut.encode(this.contentType.parsed.params.boundary),node:this}),this.contentDisposition.parsed=this.parseStructuredHeader(this.contentDisposition.value),this.contentTransferEncoding.encoding=this.contentTransferEncoding.value.toLowerCase().split(/[^\w-]/).shift(),this.setupContentDecoder(this.contentTransferEncoding.encoding)}feed(t){switch(this.state){case"header":if(!t.length)return this.state="body",this.processHeaders();if(this.headerSize+=t.length,this.headerSize>this.options.maxHeadersSize)throw new Error(`Maximum header size of ${this.options.maxHeadersSize} bytes exceeded`);this.headerLines.push(of.decode(t));break;case"body":this.contentDecoder.update(t)}}};var rf={"&AElig":"\xC6","&AElig;":"\xC6","&AMP":"&","&AMP;":"&","&Aacute":"\xC1","&Aacute;":"\xC1","&Abreve;":"\u0102","&Acirc":"\xC2","&Acirc;":"\xC2","&Acy;":"\u0410","&Afr;":"\u{1D504}","&Agrave":"\xC0","&Agrave;":"\xC0","&Alpha;":"\u0391","&Amacr;":"\u0100","&And;":"\u2A53","&Aogon;":"\u0104","&Aopf;":"\u{1D538}","&ApplyFunction;":"\u2061","&Aring":"\xC5","&Aring;":"\xC5","&Ascr;":"\u{1D49C}","&Assign;":"\u2254","&Atilde":"\xC3","&Atilde;":"\xC3","&Auml":"\xC4","&Auml;":"\xC4","&Backslash;":"\u2216","&Barv;":"\u2AE7","&Barwed;":"\u2306","&Bcy;":"\u0411","&Because;":"\u2235","&Bernoullis;":"\u212C","&Beta;":"\u0392","&Bfr;":"\u{1D505}","&Bopf;":"\u{1D539}","&Breve;":"\u02D8","&Bscr;":"\u212C","&Bumpeq;":"\u224E","&CHcy;":"\u0427","&COPY":"\xA9","&COPY;":"\xA9","&Cacute;":"\u0106","&Cap;":"\u22D2","&CapitalDifferentialD;":"\u2145","&Cayleys;":"\u212D","&Ccaron;":"\u010C","&Ccedil":"\xC7","&Ccedil;":"\xC7","&Ccirc;":"\u0108","&Cconint;":"\u2230","&Cdot;":"\u010A","&Cedilla;":"\xB8","&CenterDot;":"\xB7","&Cfr;":"\u212D","&Chi;":"\u03A7","&CircleDot;":"\u2299","&CircleMinus;":"\u2296","&CirclePlus;":"\u2295","&CircleTimes;":"\u2297","&ClockwiseContourIntegral;":"\u2232","&CloseCurlyDoubleQuote;":"\u201D","&CloseCurlyQuote;":"\u2019","&Colon;":"\u2237","&Colone;":"\u2A74","&Congruent;":"\u2261","&Conint;":"\u222F","&ContourIntegral;":"\u222E","&Copf;":"\u2102","&Coproduct;":"\u2210","&CounterClockwiseContourIntegral;":"\u2233","&Cross;":"\u2A2F","&Cscr;":"\u{1D49E}","&Cup;":"\u22D3","&CupCap;":"\u224D","&DD;":"\u2145","&DDotrahd;":"\u2911","&DJcy;":"\u0402","&DScy;":"\u0405","&DZcy;":"\u040F","&Dagger;":"\u2021","&Darr;":"\u21A1","&Dashv;":"\u2AE4","&Dcaron;":"\u010E","&Dcy;":"\u0414","&Del;":"\u2207","&Delta;":"\u0394","&Dfr;":"\u{1D507}","&DiacriticalAcute;":"\xB4","&DiacriticalDot;":"\u02D9","&DiacriticalDoubleAcute;":"\u02DD","&DiacriticalGrave;":"`","&DiacriticalTilde;":"\u02DC","&Diamond;":"\u22C4","&DifferentialD;":"\u2146","&Dopf;":"\u{1D53B}","&Dot;":"\xA8","&DotDot;":"\u20DC","&DotEqual;":"\u2250","&DoubleContourIntegral;":"\u222F","&DoubleDot;":"\xA8","&DoubleDownArrow;":"\u21D3","&DoubleLeftArrow;":"\u21D0","&DoubleLeftRightArrow;":"\u21D4","&DoubleLeftTee;":"\u2AE4","&DoubleLongLeftArrow;":"\u27F8","&DoubleLongLeftRightArrow;":"\u27FA","&DoubleLongRightArrow;":"\u27F9","&DoubleRightArrow;":"\u21D2","&DoubleRightTee;":"\u22A8","&DoubleUpArrow;":"\u21D1","&DoubleUpDownArrow;":"\u21D5","&DoubleVerticalBar;":"\u2225","&DownArrow;":"\u2193","&DownArrowBar;":"\u2913","&DownArrowUpArrow;":"\u21F5","&DownBreve;":"\u0311","&DownLeftRightVector;":"\u2950","&DownLeftTeeVector;":"\u295E","&DownLeftVector;":"\u21BD","&DownLeftVectorBar;":"\u2956","&DownRightTeeVector;":"\u295F","&DownRightVector;":"\u21C1","&DownRightVectorBar;":"\u2957","&DownTee;":"\u22A4","&DownTeeArrow;":"\u21A7","&Downarrow;":"\u21D3","&Dscr;":"\u{1D49F}","&Dstrok;":"\u0110","&ENG;":"\u014A","&ETH":"\xD0","&ETH;":"\xD0","&Eacute":"\xC9","&Eacute;":"\xC9","&Ecaron;":"\u011A","&Ecirc":"\xCA","&Ecirc;":"\xCA","&Ecy;":"\u042D","&Edot;":"\u0116","&Efr;":"\u{1D508}","&Egrave":"\xC8","&Egrave;":"\xC8","&Element;":"\u2208","&Emacr;":"\u0112","&EmptySmallSquare;":"\u25FB","&EmptyVerySmallSquare;":"\u25AB","&Eogon;":"\u0118","&Eopf;":"\u{1D53C}","&Epsilon;":"\u0395","&Equal;":"\u2A75","&EqualTilde;":"\u2242","&Equilibrium;":"\u21CC","&Escr;":"\u2130","&Esim;":"\u2A73","&Eta;":"\u0397","&Euml":"\xCB","&Euml;":"\xCB","&Exists;":"\u2203","&ExponentialE;":"\u2147","&Fcy;":"\u0424","&Ffr;":"\u{1D509}","&FilledSmallSquare;":"\u25FC","&FilledVerySmallSquare;":"\u25AA","&Fopf;":"\u{1D53D}","&ForAll;":"\u2200","&Fouriertrf;":"\u2131","&Fscr;":"\u2131","&GJcy;":"\u0403","&GT":">","&GT;":">","&Gamma;":"\u0393","&Gammad;":"\u03DC","&Gbreve;":"\u011E","&Gcedil;":"\u0122","&Gcirc;":"\u011C","&Gcy;":"\u0413","&Gdot;":"\u0120","&Gfr;":"\u{1D50A}","&Gg;":"\u22D9","&Gopf;":"\u{1D53E}","&GreaterEqual;":"\u2265","&GreaterEqualLess;":"\u22DB","&GreaterFullEqual;":"\u2267","&GreaterGreater;":"\u2AA2","&GreaterLess;":"\u2277","&GreaterSlantEqual;":"\u2A7E","&GreaterTilde;":"\u2273","&Gscr;":"\u{1D4A2}","&Gt;":"\u226B","&HARDcy;":"\u042A","&Hacek;":"\u02C7","&Hat;":"^","&Hcirc;":"\u0124","&Hfr;":"\u210C","&HilbertSpace;":"\u210B","&Hopf;":"\u210D","&HorizontalLine;":"\u2500","&Hscr;":"\u210B","&Hstrok;":"\u0126","&HumpDownHump;":"\u224E","&HumpEqual;":"\u224F","&IEcy;":"\u0415","&IJlig;":"\u0132","&IOcy;":"\u0401","&Iacute":"\xCD","&Iacute;":"\xCD","&Icirc":"\xCE","&Icirc;":"\xCE","&Icy;":"\u0418","&Idot;":"\u0130","&Ifr;":"\u2111","&Igrave":"\xCC","&Igrave;":"\xCC","&Im;":"\u2111","&Imacr;":"\u012A","&ImaginaryI;":"\u2148","&Implies;":"\u21D2","&Int;":"\u222C","&Integral;":"\u222B","&Intersection;":"\u22C2","&InvisibleComma;":"\u2063","&InvisibleTimes;":"\u2062","&Iogon;":"\u012E","&Iopf;":"\u{1D540}","&Iota;":"\u0399","&Iscr;":"\u2110","&Itilde;":"\u0128","&Iukcy;":"\u0406","&Iuml":"\xCF","&Iuml;":"\xCF","&Jcirc;":"\u0134","&Jcy;":"\u0419","&Jfr;":"\u{1D50D}","&Jopf;":"\u{1D541}","&Jscr;":"\u{1D4A5}","&Jsercy;":"\u0408","&Jukcy;":"\u0404","&KHcy;":"\u0425","&KJcy;":"\u040C","&Kappa;":"\u039A","&Kcedil;":"\u0136","&Kcy;":"\u041A","&Kfr;":"\u{1D50E}","&Kopf;":"\u{1D542}","&Kscr;":"\u{1D4A6}","&LJcy;":"\u0409","&LT":"<","&LT;":"<","&Lacute;":"\u0139","&Lambda;":"\u039B","&Lang;":"\u27EA","&Laplacetrf;":"\u2112","&Larr;":"\u219E","&Lcaron;":"\u013D","&Lcedil;":"\u013B","&Lcy;":"\u041B","&LeftAngleBracket;":"\u27E8","&LeftArrow;":"\u2190","&LeftArrowBar;":"\u21E4","&LeftArrowRightArrow;":"\u21C6","&LeftCeiling;":"\u2308","&LeftDoubleBracket;":"\u27E6","&LeftDownTeeVector;":"\u2961","&LeftDownVector;":"\u21C3","&LeftDownVectorBar;":"\u2959","&LeftFloor;":"\u230A","&LeftRightArrow;":"\u2194","&LeftRightVector;":"\u294E","&LeftTee;":"\u22A3","&LeftTeeArrow;":"\u21A4","&LeftTeeVector;":"\u295A","&LeftTriangle;":"\u22B2","&LeftTriangleBar;":"\u29CF","&LeftTriangleEqual;":"\u22B4","&LeftUpDownVector;":"\u2951","&LeftUpTeeVector;":"\u2960","&LeftUpVector;":"\u21BF","&LeftUpVectorBar;":"\u2958","&LeftVector;":"\u21BC","&LeftVectorBar;":"\u2952","&Leftarrow;":"\u21D0","&Leftrightarrow;":"\u21D4","&LessEqualGreater;":"\u22DA","&LessFullEqual;":"\u2266","&LessGreater;":"\u2276","&LessLess;":"\u2AA1","&LessSlantEqual;":"\u2A7D","&LessTilde;":"\u2272","&Lfr;":"\u{1D50F}","&Ll;":"\u22D8","&Lleftarrow;":"\u21DA","&Lmidot;":"\u013F","&LongLeftArrow;":"\u27F5","&LongLeftRightArrow;":"\u27F7","&LongRightArrow;":"\u27F6","&Longleftarrow;":"\u27F8","&Longleftrightarrow;":"\u27FA","&Longrightarrow;":"\u27F9","&Lopf;":"\u{1D543}","&LowerLeftArrow;":"\u2199","&LowerRightArrow;":"\u2198","&Lscr;":"\u2112","&Lsh;":"\u21B0","&Lstrok;":"\u0141","&Lt;":"\u226A","&Map;":"\u2905","&Mcy;":"\u041C","&MediumSpace;":"\u205F","&Mellintrf;":"\u2133","&Mfr;":"\u{1D510}","&MinusPlus;":"\u2213","&Mopf;":"\u{1D544}","&Mscr;":"\u2133","&Mu;":"\u039C","&NJcy;":"\u040A","&Nacute;":"\u0143","&Ncaron;":"\u0147","&Ncedil;":"\u0145","&Ncy;":"\u041D","&NegativeMediumSpace;":"\u200B","&NegativeThickSpace;":"\u200B","&NegativeThinSpace;":"\u200B","&NegativeVeryThinSpace;":"\u200B","&NestedGreaterGreater;":"\u226B","&NestedLessLess;":"\u226A","&NewLine;":`
258
+ `,"&Nfr;":"\u{1D511}","&NoBreak;":"\u2060","&NonBreakingSpace;":"\xA0","&Nopf;":"\u2115","&Not;":"\u2AEC","&NotCongruent;":"\u2262","&NotCupCap;":"\u226D","&NotDoubleVerticalBar;":"\u2226","&NotElement;":"\u2209","&NotEqual;":"\u2260","&NotEqualTilde;":"\u2242\u0338","&NotExists;":"\u2204","&NotGreater;":"\u226F","&NotGreaterEqual;":"\u2271","&NotGreaterFullEqual;":"\u2267\u0338","&NotGreaterGreater;":"\u226B\u0338","&NotGreaterLess;":"\u2279","&NotGreaterSlantEqual;":"\u2A7E\u0338","&NotGreaterTilde;":"\u2275","&NotHumpDownHump;":"\u224E\u0338","&NotHumpEqual;":"\u224F\u0338","&NotLeftTriangle;":"\u22EA","&NotLeftTriangleBar;":"\u29CF\u0338","&NotLeftTriangleEqual;":"\u22EC","&NotLess;":"\u226E","&NotLessEqual;":"\u2270","&NotLessGreater;":"\u2278","&NotLessLess;":"\u226A\u0338","&NotLessSlantEqual;":"\u2A7D\u0338","&NotLessTilde;":"\u2274","&NotNestedGreaterGreater;":"\u2AA2\u0338","&NotNestedLessLess;":"\u2AA1\u0338","&NotPrecedes;":"\u2280","&NotPrecedesEqual;":"\u2AAF\u0338","&NotPrecedesSlantEqual;":"\u22E0","&NotReverseElement;":"\u220C","&NotRightTriangle;":"\u22EB","&NotRightTriangleBar;":"\u29D0\u0338","&NotRightTriangleEqual;":"\u22ED","&NotSquareSubset;":"\u228F\u0338","&NotSquareSubsetEqual;":"\u22E2","&NotSquareSuperset;":"\u2290\u0338","&NotSquareSupersetEqual;":"\u22E3","&NotSubset;":"\u2282\u20D2","&NotSubsetEqual;":"\u2288","&NotSucceeds;":"\u2281","&NotSucceedsEqual;":"\u2AB0\u0338","&NotSucceedsSlantEqual;":"\u22E1","&NotSucceedsTilde;":"\u227F\u0338","&NotSuperset;":"\u2283\u20D2","&NotSupersetEqual;":"\u2289","&NotTilde;":"\u2241","&NotTildeEqual;":"\u2244","&NotTildeFullEqual;":"\u2247","&NotTildeTilde;":"\u2249","&NotVerticalBar;":"\u2224","&Nscr;":"\u{1D4A9}","&Ntilde":"\xD1","&Ntilde;":"\xD1","&Nu;":"\u039D","&OElig;":"\u0152","&Oacute":"\xD3","&Oacute;":"\xD3","&Ocirc":"\xD4","&Ocirc;":"\xD4","&Ocy;":"\u041E","&Odblac;":"\u0150","&Ofr;":"\u{1D512}","&Ograve":"\xD2","&Ograve;":"\xD2","&Omacr;":"\u014C","&Omega;":"\u03A9","&Omicron;":"\u039F","&Oopf;":"\u{1D546}","&OpenCurlyDoubleQuote;":"\u201C","&OpenCurlyQuote;":"\u2018","&Or;":"\u2A54","&Oscr;":"\u{1D4AA}","&Oslash":"\xD8","&Oslash;":"\xD8","&Otilde":"\xD5","&Otilde;":"\xD5","&Otimes;":"\u2A37","&Ouml":"\xD6","&Ouml;":"\xD6","&OverBar;":"\u203E","&OverBrace;":"\u23DE","&OverBracket;":"\u23B4","&OverParenthesis;":"\u23DC","&PartialD;":"\u2202","&Pcy;":"\u041F","&Pfr;":"\u{1D513}","&Phi;":"\u03A6","&Pi;":"\u03A0","&PlusMinus;":"\xB1","&Poincareplane;":"\u210C","&Popf;":"\u2119","&Pr;":"\u2ABB","&Precedes;":"\u227A","&PrecedesEqual;":"\u2AAF","&PrecedesSlantEqual;":"\u227C","&PrecedesTilde;":"\u227E","&Prime;":"\u2033","&Product;":"\u220F","&Proportion;":"\u2237","&Proportional;":"\u221D","&Pscr;":"\u{1D4AB}","&Psi;":"\u03A8","&QUOT":'"',"&QUOT;":'"',"&Qfr;":"\u{1D514}","&Qopf;":"\u211A","&Qscr;":"\u{1D4AC}","&RBarr;":"\u2910","&REG":"\xAE","&REG;":"\xAE","&Racute;":"\u0154","&Rang;":"\u27EB","&Rarr;":"\u21A0","&Rarrtl;":"\u2916","&Rcaron;":"\u0158","&Rcedil;":"\u0156","&Rcy;":"\u0420","&Re;":"\u211C","&ReverseElement;":"\u220B","&ReverseEquilibrium;":"\u21CB","&ReverseUpEquilibrium;":"\u296F","&Rfr;":"\u211C","&Rho;":"\u03A1","&RightAngleBracket;":"\u27E9","&RightArrow;":"\u2192","&RightArrowBar;":"\u21E5","&RightArrowLeftArrow;":"\u21C4","&RightCeiling;":"\u2309","&RightDoubleBracket;":"\u27E7","&RightDownTeeVector;":"\u295D","&RightDownVector;":"\u21C2","&RightDownVectorBar;":"\u2955","&RightFloor;":"\u230B","&RightTee;":"\u22A2","&RightTeeArrow;":"\u21A6","&RightTeeVector;":"\u295B","&RightTriangle;":"\u22B3","&RightTriangleBar;":"\u29D0","&RightTriangleEqual;":"\u22B5","&RightUpDownVector;":"\u294F","&RightUpTeeVector;":"\u295C","&RightUpVector;":"\u21BE","&RightUpVectorBar;":"\u2954","&RightVector;":"\u21C0","&RightVectorBar;":"\u2953","&Rightarrow;":"\u21D2","&Ropf;":"\u211D","&RoundImplies;":"\u2970","&Rrightarrow;":"\u21DB","&Rscr;":"\u211B","&Rsh;":"\u21B1","&RuleDelayed;":"\u29F4","&SHCHcy;":"\u0429","&SHcy;":"\u0428","&SOFTcy;":"\u042C","&Sacute;":"\u015A","&Sc;":"\u2ABC","&Scaron;":"\u0160","&Scedil;":"\u015E","&Scirc;":"\u015C","&Scy;":"\u0421","&Sfr;":"\u{1D516}","&ShortDownArrow;":"\u2193","&ShortLeftArrow;":"\u2190","&ShortRightArrow;":"\u2192","&ShortUpArrow;":"\u2191","&Sigma;":"\u03A3","&SmallCircle;":"\u2218","&Sopf;":"\u{1D54A}","&Sqrt;":"\u221A","&Square;":"\u25A1","&SquareIntersection;":"\u2293","&SquareSubset;":"\u228F","&SquareSubsetEqual;":"\u2291","&SquareSuperset;":"\u2290","&SquareSupersetEqual;":"\u2292","&SquareUnion;":"\u2294","&Sscr;":"\u{1D4AE}","&Star;":"\u22C6","&Sub;":"\u22D0","&Subset;":"\u22D0","&SubsetEqual;":"\u2286","&Succeeds;":"\u227B","&SucceedsEqual;":"\u2AB0","&SucceedsSlantEqual;":"\u227D","&SucceedsTilde;":"\u227F","&SuchThat;":"\u220B","&Sum;":"\u2211","&Sup;":"\u22D1","&Superset;":"\u2283","&SupersetEqual;":"\u2287","&Supset;":"\u22D1","&THORN":"\xDE","&THORN;":"\xDE","&TRADE;":"\u2122","&TSHcy;":"\u040B","&TScy;":"\u0426","&Tab;":" ","&Tau;":"\u03A4","&Tcaron;":"\u0164","&Tcedil;":"\u0162","&Tcy;":"\u0422","&Tfr;":"\u{1D517}","&Therefore;":"\u2234","&Theta;":"\u0398","&ThickSpace;":"\u205F\u200A","&ThinSpace;":"\u2009","&Tilde;":"\u223C","&TildeEqual;":"\u2243","&TildeFullEqual;":"\u2245","&TildeTilde;":"\u2248","&Topf;":"\u{1D54B}","&TripleDot;":"\u20DB","&Tscr;":"\u{1D4AF}","&Tstrok;":"\u0166","&Uacute":"\xDA","&Uacute;":"\xDA","&Uarr;":"\u219F","&Uarrocir;":"\u2949","&Ubrcy;":"\u040E","&Ubreve;":"\u016C","&Ucirc":"\xDB","&Ucirc;":"\xDB","&Ucy;":"\u0423","&Udblac;":"\u0170","&Ufr;":"\u{1D518}","&Ugrave":"\xD9","&Ugrave;":"\xD9","&Umacr;":"\u016A","&UnderBar;":"_","&UnderBrace;":"\u23DF","&UnderBracket;":"\u23B5","&UnderParenthesis;":"\u23DD","&Union;":"\u22C3","&UnionPlus;":"\u228E","&Uogon;":"\u0172","&Uopf;":"\u{1D54C}","&UpArrow;":"\u2191","&UpArrowBar;":"\u2912","&UpArrowDownArrow;":"\u21C5","&UpDownArrow;":"\u2195","&UpEquilibrium;":"\u296E","&UpTee;":"\u22A5","&UpTeeArrow;":"\u21A5","&Uparrow;":"\u21D1","&Updownarrow;":"\u21D5","&UpperLeftArrow;":"\u2196","&UpperRightArrow;":"\u2197","&Upsi;":"\u03D2","&Upsilon;":"\u03A5","&Uring;":"\u016E","&Uscr;":"\u{1D4B0}","&Utilde;":"\u0168","&Uuml":"\xDC","&Uuml;":"\xDC","&VDash;":"\u22AB","&Vbar;":"\u2AEB","&Vcy;":"\u0412","&Vdash;":"\u22A9","&Vdashl;":"\u2AE6","&Vee;":"\u22C1","&Verbar;":"\u2016","&Vert;":"\u2016","&VerticalBar;":"\u2223","&VerticalLine;":"|","&VerticalSeparator;":"\u2758","&VerticalTilde;":"\u2240","&VeryThinSpace;":"\u200A","&Vfr;":"\u{1D519}","&Vopf;":"\u{1D54D}","&Vscr;":"\u{1D4B1}","&Vvdash;":"\u22AA","&Wcirc;":"\u0174","&Wedge;":"\u22C0","&Wfr;":"\u{1D51A}","&Wopf;":"\u{1D54E}","&Wscr;":"\u{1D4B2}","&Xfr;":"\u{1D51B}","&Xi;":"\u039E","&Xopf;":"\u{1D54F}","&Xscr;":"\u{1D4B3}","&YAcy;":"\u042F","&YIcy;":"\u0407","&YUcy;":"\u042E","&Yacute":"\xDD","&Yacute;":"\xDD","&Ycirc;":"\u0176","&Ycy;":"\u042B","&Yfr;":"\u{1D51C}","&Yopf;":"\u{1D550}","&Yscr;":"\u{1D4B4}","&Yuml;":"\u0178","&ZHcy;":"\u0416","&Zacute;":"\u0179","&Zcaron;":"\u017D","&Zcy;":"\u0417","&Zdot;":"\u017B","&ZeroWidthSpace;":"\u200B","&Zeta;":"\u0396","&Zfr;":"\u2128","&Zopf;":"\u2124","&Zscr;":"\u{1D4B5}","&aacute":"\xE1","&aacute;":"\xE1","&abreve;":"\u0103","&ac;":"\u223E","&acE;":"\u223E\u0333","&acd;":"\u223F","&acirc":"\xE2","&acirc;":"\xE2","&acute":"\xB4","&acute;":"\xB4","&acy;":"\u0430","&aelig":"\xE6","&aelig;":"\xE6","&af;":"\u2061","&afr;":"\u{1D51E}","&agrave":"\xE0","&agrave;":"\xE0","&alefsym;":"\u2135","&aleph;":"\u2135","&alpha;":"\u03B1","&amacr;":"\u0101","&amalg;":"\u2A3F","&amp":"&","&amp;":"&","&and;":"\u2227","&andand;":"\u2A55","&andd;":"\u2A5C","&andslope;":"\u2A58","&andv;":"\u2A5A","&ang;":"\u2220","&ange;":"\u29A4","&angle;":"\u2220","&angmsd;":"\u2221","&angmsdaa;":"\u29A8","&angmsdab;":"\u29A9","&angmsdac;":"\u29AA","&angmsdad;":"\u29AB","&angmsdae;":"\u29AC","&angmsdaf;":"\u29AD","&angmsdag;":"\u29AE","&angmsdah;":"\u29AF","&angrt;":"\u221F","&angrtvb;":"\u22BE","&angrtvbd;":"\u299D","&angsph;":"\u2222","&angst;":"\xC5","&angzarr;":"\u237C","&aogon;":"\u0105","&aopf;":"\u{1D552}","&ap;":"\u2248","&apE;":"\u2A70","&apacir;":"\u2A6F","&ape;":"\u224A","&apid;":"\u224B","&apos;":"'","&approx;":"\u2248","&approxeq;":"\u224A","&aring":"\xE5","&aring;":"\xE5","&ascr;":"\u{1D4B6}","&ast;":"*","&asymp;":"\u2248","&asympeq;":"\u224D","&atilde":"\xE3","&atilde;":"\xE3","&auml":"\xE4","&auml;":"\xE4","&awconint;":"\u2233","&awint;":"\u2A11","&bNot;":"\u2AED","&backcong;":"\u224C","&backepsilon;":"\u03F6","&backprime;":"\u2035","&backsim;":"\u223D","&backsimeq;":"\u22CD","&barvee;":"\u22BD","&barwed;":"\u2305","&barwedge;":"\u2305","&bbrk;":"\u23B5","&bbrktbrk;":"\u23B6","&bcong;":"\u224C","&bcy;":"\u0431","&bdquo;":"\u201E","&becaus;":"\u2235","&because;":"\u2235","&bemptyv;":"\u29B0","&bepsi;":"\u03F6","&bernou;":"\u212C","&beta;":"\u03B2","&beth;":"\u2136","&between;":"\u226C","&bfr;":"\u{1D51F}","&bigcap;":"\u22C2","&bigcirc;":"\u25EF","&bigcup;":"\u22C3","&bigodot;":"\u2A00","&bigoplus;":"\u2A01","&bigotimes;":"\u2A02","&bigsqcup;":"\u2A06","&bigstar;":"\u2605","&bigtriangledown;":"\u25BD","&bigtriangleup;":"\u25B3","&biguplus;":"\u2A04","&bigvee;":"\u22C1","&bigwedge;":"\u22C0","&bkarow;":"\u290D","&blacklozenge;":"\u29EB","&blacksquare;":"\u25AA","&blacktriangle;":"\u25B4","&blacktriangledown;":"\u25BE","&blacktriangleleft;":"\u25C2","&blacktriangleright;":"\u25B8","&blank;":"\u2423","&blk12;":"\u2592","&blk14;":"\u2591","&blk34;":"\u2593","&block;":"\u2588","&bne;":"=\u20E5","&bnequiv;":"\u2261\u20E5","&bnot;":"\u2310","&bopf;":"\u{1D553}","&bot;":"\u22A5","&bottom;":"\u22A5","&bowtie;":"\u22C8","&boxDL;":"\u2557","&boxDR;":"\u2554","&boxDl;":"\u2556","&boxDr;":"\u2553","&boxH;":"\u2550","&boxHD;":"\u2566","&boxHU;":"\u2569","&boxHd;":"\u2564","&boxHu;":"\u2567","&boxUL;":"\u255D","&boxUR;":"\u255A","&boxUl;":"\u255C","&boxUr;":"\u2559","&boxV;":"\u2551","&boxVH;":"\u256C","&boxVL;":"\u2563","&boxVR;":"\u2560","&boxVh;":"\u256B","&boxVl;":"\u2562","&boxVr;":"\u255F","&boxbox;":"\u29C9","&boxdL;":"\u2555","&boxdR;":"\u2552","&boxdl;":"\u2510","&boxdr;":"\u250C","&boxh;":"\u2500","&boxhD;":"\u2565","&boxhU;":"\u2568","&boxhd;":"\u252C","&boxhu;":"\u2534","&boxminus;":"\u229F","&boxplus;":"\u229E","&boxtimes;":"\u22A0","&boxuL;":"\u255B","&boxuR;":"\u2558","&boxul;":"\u2518","&boxur;":"\u2514","&boxv;":"\u2502","&boxvH;":"\u256A","&boxvL;":"\u2561","&boxvR;":"\u255E","&boxvh;":"\u253C","&boxvl;":"\u2524","&boxvr;":"\u251C","&bprime;":"\u2035","&breve;":"\u02D8","&brvbar":"\xA6","&brvbar;":"\xA6","&bscr;":"\u{1D4B7}","&bsemi;":"\u204F","&bsim;":"\u223D","&bsime;":"\u22CD","&bsol;":"\\","&bsolb;":"\u29C5","&bsolhsub;":"\u27C8","&bull;":"\u2022","&bullet;":"\u2022","&bump;":"\u224E","&bumpE;":"\u2AAE","&bumpe;":"\u224F","&bumpeq;":"\u224F","&cacute;":"\u0107","&cap;":"\u2229","&capand;":"\u2A44","&capbrcup;":"\u2A49","&capcap;":"\u2A4B","&capcup;":"\u2A47","&capdot;":"\u2A40","&caps;":"\u2229\uFE00","&caret;":"\u2041","&caron;":"\u02C7","&ccaps;":"\u2A4D","&ccaron;":"\u010D","&ccedil":"\xE7","&ccedil;":"\xE7","&ccirc;":"\u0109","&ccups;":"\u2A4C","&ccupssm;":"\u2A50","&cdot;":"\u010B","&cedil":"\xB8","&cedil;":"\xB8","&cemptyv;":"\u29B2","&cent":"\xA2","&cent;":"\xA2","&centerdot;":"\xB7","&cfr;":"\u{1D520}","&chcy;":"\u0447","&check;":"\u2713","&checkmark;":"\u2713","&chi;":"\u03C7","&cir;":"\u25CB","&cirE;":"\u29C3","&circ;":"\u02C6","&circeq;":"\u2257","&circlearrowleft;":"\u21BA","&circlearrowright;":"\u21BB","&circledR;":"\xAE","&circledS;":"\u24C8","&circledast;":"\u229B","&circledcirc;":"\u229A","&circleddash;":"\u229D","&cire;":"\u2257","&cirfnint;":"\u2A10","&cirmid;":"\u2AEF","&cirscir;":"\u29C2","&clubs;":"\u2663","&clubsuit;":"\u2663","&colon;":":","&colone;":"\u2254","&coloneq;":"\u2254","&comma;":",","&commat;":"@","&comp;":"\u2201","&compfn;":"\u2218","&complement;":"\u2201","&complexes;":"\u2102","&cong;":"\u2245","&congdot;":"\u2A6D","&conint;":"\u222E","&copf;":"\u{1D554}","&coprod;":"\u2210","&copy":"\xA9","&copy;":"\xA9","&copysr;":"\u2117","&crarr;":"\u21B5","&cross;":"\u2717","&cscr;":"\u{1D4B8}","&csub;":"\u2ACF","&csube;":"\u2AD1","&csup;":"\u2AD0","&csupe;":"\u2AD2","&ctdot;":"\u22EF","&cudarrl;":"\u2938","&cudarrr;":"\u2935","&cuepr;":"\u22DE","&cuesc;":"\u22DF","&cularr;":"\u21B6","&cularrp;":"\u293D","&cup;":"\u222A","&cupbrcap;":"\u2A48","&cupcap;":"\u2A46","&cupcup;":"\u2A4A","&cupdot;":"\u228D","&cupor;":"\u2A45","&cups;":"\u222A\uFE00","&curarr;":"\u21B7","&curarrm;":"\u293C","&curlyeqprec;":"\u22DE","&curlyeqsucc;":"\u22DF","&curlyvee;":"\u22CE","&curlywedge;":"\u22CF","&curren":"\xA4","&curren;":"\xA4","&curvearrowleft;":"\u21B6","&curvearrowright;":"\u21B7","&cuvee;":"\u22CE","&cuwed;":"\u22CF","&cwconint;":"\u2232","&cwint;":"\u2231","&cylcty;":"\u232D","&dArr;":"\u21D3","&dHar;":"\u2965","&dagger;":"\u2020","&daleth;":"\u2138","&darr;":"\u2193","&dash;":"\u2010","&dashv;":"\u22A3","&dbkarow;":"\u290F","&dblac;":"\u02DD","&dcaron;":"\u010F","&dcy;":"\u0434","&dd;":"\u2146","&ddagger;":"\u2021","&ddarr;":"\u21CA","&ddotseq;":"\u2A77","&deg":"\xB0","&deg;":"\xB0","&delta;":"\u03B4","&demptyv;":"\u29B1","&dfisht;":"\u297F","&dfr;":"\u{1D521}","&dharl;":"\u21C3","&dharr;":"\u21C2","&diam;":"\u22C4","&diamond;":"\u22C4","&diamondsuit;":"\u2666","&diams;":"\u2666","&die;":"\xA8","&digamma;":"\u03DD","&disin;":"\u22F2","&div;":"\xF7","&divide":"\xF7","&divide;":"\xF7","&divideontimes;":"\u22C7","&divonx;":"\u22C7","&djcy;":"\u0452","&dlcorn;":"\u231E","&dlcrop;":"\u230D","&dollar;":"$","&dopf;":"\u{1D555}","&dot;":"\u02D9","&doteq;":"\u2250","&doteqdot;":"\u2251","&dotminus;":"\u2238","&dotplus;":"\u2214","&dotsquare;":"\u22A1","&doublebarwedge;":"\u2306","&downarrow;":"\u2193","&downdownarrows;":"\u21CA","&downharpoonleft;":"\u21C3","&downharpoonright;":"\u21C2","&drbkarow;":"\u2910","&drcorn;":"\u231F","&drcrop;":"\u230C","&dscr;":"\u{1D4B9}","&dscy;":"\u0455","&dsol;":"\u29F6","&dstrok;":"\u0111","&dtdot;":"\u22F1","&dtri;":"\u25BF","&dtrif;":"\u25BE","&duarr;":"\u21F5","&duhar;":"\u296F","&dwangle;":"\u29A6","&dzcy;":"\u045F","&dzigrarr;":"\u27FF","&eDDot;":"\u2A77","&eDot;":"\u2251","&eacute":"\xE9","&eacute;":"\xE9","&easter;":"\u2A6E","&ecaron;":"\u011B","&ecir;":"\u2256","&ecirc":"\xEA","&ecirc;":"\xEA","&ecolon;":"\u2255","&ecy;":"\u044D","&edot;":"\u0117","&ee;":"\u2147","&efDot;":"\u2252","&efr;":"\u{1D522}","&eg;":"\u2A9A","&egrave":"\xE8","&egrave;":"\xE8","&egs;":"\u2A96","&egsdot;":"\u2A98","&el;":"\u2A99","&elinters;":"\u23E7","&ell;":"\u2113","&els;":"\u2A95","&elsdot;":"\u2A97","&emacr;":"\u0113","&empty;":"\u2205","&emptyset;":"\u2205","&emptyv;":"\u2205","&emsp13;":"\u2004","&emsp14;":"\u2005","&emsp;":"\u2003","&eng;":"\u014B","&ensp;":"\u2002","&eogon;":"\u0119","&eopf;":"\u{1D556}","&epar;":"\u22D5","&eparsl;":"\u29E3","&eplus;":"\u2A71","&epsi;":"\u03B5","&epsilon;":"\u03B5","&epsiv;":"\u03F5","&eqcirc;":"\u2256","&eqcolon;":"\u2255","&eqsim;":"\u2242","&eqslantgtr;":"\u2A96","&eqslantless;":"\u2A95","&equals;":"=","&equest;":"\u225F","&equiv;":"\u2261","&equivDD;":"\u2A78","&eqvparsl;":"\u29E5","&erDot;":"\u2253","&erarr;":"\u2971","&escr;":"\u212F","&esdot;":"\u2250","&esim;":"\u2242","&eta;":"\u03B7","&eth":"\xF0","&eth;":"\xF0","&euml":"\xEB","&euml;":"\xEB","&euro;":"\u20AC","&excl;":"!","&exist;":"\u2203","&expectation;":"\u2130","&exponentiale;":"\u2147","&fallingdotseq;":"\u2252","&fcy;":"\u0444","&female;":"\u2640","&ffilig;":"\uFB03","&fflig;":"\uFB00","&ffllig;":"\uFB04","&ffr;":"\u{1D523}","&filig;":"\uFB01","&fjlig;":"fj","&flat;":"\u266D","&fllig;":"\uFB02","&fltns;":"\u25B1","&fnof;":"\u0192","&fopf;":"\u{1D557}","&forall;":"\u2200","&fork;":"\u22D4","&forkv;":"\u2AD9","&fpartint;":"\u2A0D","&frac12":"\xBD","&frac12;":"\xBD","&frac13;":"\u2153","&frac14":"\xBC","&frac14;":"\xBC","&frac15;":"\u2155","&frac16;":"\u2159","&frac18;":"\u215B","&frac23;":"\u2154","&frac25;":"\u2156","&frac34":"\xBE","&frac34;":"\xBE","&frac35;":"\u2157","&frac38;":"\u215C","&frac45;":"\u2158","&frac56;":"\u215A","&frac58;":"\u215D","&frac78;":"\u215E","&frasl;":"\u2044","&frown;":"\u2322","&fscr;":"\u{1D4BB}","&gE;":"\u2267","&gEl;":"\u2A8C","&gacute;":"\u01F5","&gamma;":"\u03B3","&gammad;":"\u03DD","&gap;":"\u2A86","&gbreve;":"\u011F","&gcirc;":"\u011D","&gcy;":"\u0433","&gdot;":"\u0121","&ge;":"\u2265","&gel;":"\u22DB","&geq;":"\u2265","&geqq;":"\u2267","&geqslant;":"\u2A7E","&ges;":"\u2A7E","&gescc;":"\u2AA9","&gesdot;":"\u2A80","&gesdoto;":"\u2A82","&gesdotol;":"\u2A84","&gesl;":"\u22DB\uFE00","&gesles;":"\u2A94","&gfr;":"\u{1D524}","&gg;":"\u226B","&ggg;":"\u22D9","&gimel;":"\u2137","&gjcy;":"\u0453","&gl;":"\u2277","&glE;":"\u2A92","&gla;":"\u2AA5","&glj;":"\u2AA4","&gnE;":"\u2269","&gnap;":"\u2A8A","&gnapprox;":"\u2A8A","&gne;":"\u2A88","&gneq;":"\u2A88","&gneqq;":"\u2269","&gnsim;":"\u22E7","&gopf;":"\u{1D558}","&grave;":"`","&gscr;":"\u210A","&gsim;":"\u2273","&gsime;":"\u2A8E","&gsiml;":"\u2A90","&gt":">","&gt;":">","&gtcc;":"\u2AA7","&gtcir;":"\u2A7A","&gtdot;":"\u22D7","&gtlPar;":"\u2995","&gtquest;":"\u2A7C","&gtrapprox;":"\u2A86","&gtrarr;":"\u2978","&gtrdot;":"\u22D7","&gtreqless;":"\u22DB","&gtreqqless;":"\u2A8C","&gtrless;":"\u2277","&gtrsim;":"\u2273","&gvertneqq;":"\u2269\uFE00","&gvnE;":"\u2269\uFE00","&hArr;":"\u21D4","&hairsp;":"\u200A","&half;":"\xBD","&hamilt;":"\u210B","&hardcy;":"\u044A","&harr;":"\u2194","&harrcir;":"\u2948","&harrw;":"\u21AD","&hbar;":"\u210F","&hcirc;":"\u0125","&hearts;":"\u2665","&heartsuit;":"\u2665","&hellip;":"\u2026","&hercon;":"\u22B9","&hfr;":"\u{1D525}","&hksearow;":"\u2925","&hkswarow;":"\u2926","&hoarr;":"\u21FF","&homtht;":"\u223B","&hookleftarrow;":"\u21A9","&hookrightarrow;":"\u21AA","&hopf;":"\u{1D559}","&horbar;":"\u2015","&hscr;":"\u{1D4BD}","&hslash;":"\u210F","&hstrok;":"\u0127","&hybull;":"\u2043","&hyphen;":"\u2010","&iacute":"\xED","&iacute;":"\xED","&ic;":"\u2063","&icirc":"\xEE","&icirc;":"\xEE","&icy;":"\u0438","&iecy;":"\u0435","&iexcl":"\xA1","&iexcl;":"\xA1","&iff;":"\u21D4","&ifr;":"\u{1D526}","&igrave":"\xEC","&igrave;":"\xEC","&ii;":"\u2148","&iiiint;":"\u2A0C","&iiint;":"\u222D","&iinfin;":"\u29DC","&iiota;":"\u2129","&ijlig;":"\u0133","&imacr;":"\u012B","&image;":"\u2111","&imagline;":"\u2110","&imagpart;":"\u2111","&imath;":"\u0131","&imof;":"\u22B7","&imped;":"\u01B5","&in;":"\u2208","&incare;":"\u2105","&infin;":"\u221E","&infintie;":"\u29DD","&inodot;":"\u0131","&int;":"\u222B","&intcal;":"\u22BA","&integers;":"\u2124","&intercal;":"\u22BA","&intlarhk;":"\u2A17","&intprod;":"\u2A3C","&iocy;":"\u0451","&iogon;":"\u012F","&iopf;":"\u{1D55A}","&iota;":"\u03B9","&iprod;":"\u2A3C","&iquest":"\xBF","&iquest;":"\xBF","&iscr;":"\u{1D4BE}","&isin;":"\u2208","&isinE;":"\u22F9","&isindot;":"\u22F5","&isins;":"\u22F4","&isinsv;":"\u22F3","&isinv;":"\u2208","&it;":"\u2062","&itilde;":"\u0129","&iukcy;":"\u0456","&iuml":"\xEF","&iuml;":"\xEF","&jcirc;":"\u0135","&jcy;":"\u0439","&jfr;":"\u{1D527}","&jmath;":"\u0237","&jopf;":"\u{1D55B}","&jscr;":"\u{1D4BF}","&jsercy;":"\u0458","&jukcy;":"\u0454","&kappa;":"\u03BA","&kappav;":"\u03F0","&kcedil;":"\u0137","&kcy;":"\u043A","&kfr;":"\u{1D528}","&kgreen;":"\u0138","&khcy;":"\u0445","&kjcy;":"\u045C","&kopf;":"\u{1D55C}","&kscr;":"\u{1D4C0}","&lAarr;":"\u21DA","&lArr;":"\u21D0","&lAtail;":"\u291B","&lBarr;":"\u290E","&lE;":"\u2266","&lEg;":"\u2A8B","&lHar;":"\u2962","&lacute;":"\u013A","&laemptyv;":"\u29B4","&lagran;":"\u2112","&lambda;":"\u03BB","&lang;":"\u27E8","&langd;":"\u2991","&langle;":"\u27E8","&lap;":"\u2A85","&laquo":"\xAB","&laquo;":"\xAB","&larr;":"\u2190","&larrb;":"\u21E4","&larrbfs;":"\u291F","&larrfs;":"\u291D","&larrhk;":"\u21A9","&larrlp;":"\u21AB","&larrpl;":"\u2939","&larrsim;":"\u2973","&larrtl;":"\u21A2","&lat;":"\u2AAB","&latail;":"\u2919","&late;":"\u2AAD","&lates;":"\u2AAD\uFE00","&lbarr;":"\u290C","&lbbrk;":"\u2772","&lbrace;":"{","&lbrack;":"[","&lbrke;":"\u298B","&lbrksld;":"\u298F","&lbrkslu;":"\u298D","&lcaron;":"\u013E","&lcedil;":"\u013C","&lceil;":"\u2308","&lcub;":"{","&lcy;":"\u043B","&ldca;":"\u2936","&ldquo;":"\u201C","&ldquor;":"\u201E","&ldrdhar;":"\u2967","&ldrushar;":"\u294B","&ldsh;":"\u21B2","&le;":"\u2264","&leftarrow;":"\u2190","&leftarrowtail;":"\u21A2","&leftharpoondown;":"\u21BD","&leftharpoonup;":"\u21BC","&leftleftarrows;":"\u21C7","&leftrightarrow;":"\u2194","&leftrightarrows;":"\u21C6","&leftrightharpoons;":"\u21CB","&leftrightsquigarrow;":"\u21AD","&leftthreetimes;":"\u22CB","&leg;":"\u22DA","&leq;":"\u2264","&leqq;":"\u2266","&leqslant;":"\u2A7D","&les;":"\u2A7D","&lescc;":"\u2AA8","&lesdot;":"\u2A7F","&lesdoto;":"\u2A81","&lesdotor;":"\u2A83","&lesg;":"\u22DA\uFE00","&lesges;":"\u2A93","&lessapprox;":"\u2A85","&lessdot;":"\u22D6","&lesseqgtr;":"\u22DA","&lesseqqgtr;":"\u2A8B","&lessgtr;":"\u2276","&lesssim;":"\u2272","&lfisht;":"\u297C","&lfloor;":"\u230A","&lfr;":"\u{1D529}","&lg;":"\u2276","&lgE;":"\u2A91","&lhard;":"\u21BD","&lharu;":"\u21BC","&lharul;":"\u296A","&lhblk;":"\u2584","&ljcy;":"\u0459","&ll;":"\u226A","&llarr;":"\u21C7","&llcorner;":"\u231E","&llhard;":"\u296B","&lltri;":"\u25FA","&lmidot;":"\u0140","&lmoust;":"\u23B0","&lmoustache;":"\u23B0","&lnE;":"\u2268","&lnap;":"\u2A89","&lnapprox;":"\u2A89","&lne;":"\u2A87","&lneq;":"\u2A87","&lneqq;":"\u2268","&lnsim;":"\u22E6","&loang;":"\u27EC","&loarr;":"\u21FD","&lobrk;":"\u27E6","&longleftarrow;":"\u27F5","&longleftrightarrow;":"\u27F7","&longmapsto;":"\u27FC","&longrightarrow;":"\u27F6","&looparrowleft;":"\u21AB","&looparrowright;":"\u21AC","&lopar;":"\u2985","&lopf;":"\u{1D55D}","&loplus;":"\u2A2D","&lotimes;":"\u2A34","&lowast;":"\u2217","&lowbar;":"_","&loz;":"\u25CA","&lozenge;":"\u25CA","&lozf;":"\u29EB","&lpar;":"(","&lparlt;":"\u2993","&lrarr;":"\u21C6","&lrcorner;":"\u231F","&lrhar;":"\u21CB","&lrhard;":"\u296D","&lrm;":"\u200E","&lrtri;":"\u22BF","&lsaquo;":"\u2039","&lscr;":"\u{1D4C1}","&lsh;":"\u21B0","&lsim;":"\u2272","&lsime;":"\u2A8D","&lsimg;":"\u2A8F","&lsqb;":"[","&lsquo;":"\u2018","&lsquor;":"\u201A","&lstrok;":"\u0142","&lt":"<","&lt;":"<","&ltcc;":"\u2AA6","&ltcir;":"\u2A79","&ltdot;":"\u22D6","&lthree;":"\u22CB","&ltimes;":"\u22C9","&ltlarr;":"\u2976","&ltquest;":"\u2A7B","&ltrPar;":"\u2996","&ltri;":"\u25C3","&ltrie;":"\u22B4","&ltrif;":"\u25C2","&lurdshar;":"\u294A","&luruhar;":"\u2966","&lvertneqq;":"\u2268\uFE00","&lvnE;":"\u2268\uFE00","&mDDot;":"\u223A","&macr":"\xAF","&macr;":"\xAF","&male;":"\u2642","&malt;":"\u2720","&maltese;":"\u2720","&map;":"\u21A6","&mapsto;":"\u21A6","&mapstodown;":"\u21A7","&mapstoleft;":"\u21A4","&mapstoup;":"\u21A5","&marker;":"\u25AE","&mcomma;":"\u2A29","&mcy;":"\u043C","&mdash;":"\u2014","&measuredangle;":"\u2221","&mfr;":"\u{1D52A}","&mho;":"\u2127","&micro":"\xB5","&micro;":"\xB5","&mid;":"\u2223","&midast;":"*","&midcir;":"\u2AF0","&middot":"\xB7","&middot;":"\xB7","&minus;":"\u2212","&minusb;":"\u229F","&minusd;":"\u2238","&minusdu;":"\u2A2A","&mlcp;":"\u2ADB","&mldr;":"\u2026","&mnplus;":"\u2213","&models;":"\u22A7","&mopf;":"\u{1D55E}","&mp;":"\u2213","&mscr;":"\u{1D4C2}","&mstpos;":"\u223E","&mu;":"\u03BC","&multimap;":"\u22B8","&mumap;":"\u22B8","&nGg;":"\u22D9\u0338","&nGt;":"\u226B\u20D2","&nGtv;":"\u226B\u0338","&nLeftarrow;":"\u21CD","&nLeftrightarrow;":"\u21CE","&nLl;":"\u22D8\u0338","&nLt;":"\u226A\u20D2","&nLtv;":"\u226A\u0338","&nRightarrow;":"\u21CF","&nVDash;":"\u22AF","&nVdash;":"\u22AE","&nabla;":"\u2207","&nacute;":"\u0144","&nang;":"\u2220\u20D2","&nap;":"\u2249","&napE;":"\u2A70\u0338","&napid;":"\u224B\u0338","&napos;":"\u0149","&napprox;":"\u2249","&natur;":"\u266E","&natural;":"\u266E","&naturals;":"\u2115","&nbsp":"\xA0","&nbsp;":"\xA0","&nbump;":"\u224E\u0338","&nbumpe;":"\u224F\u0338","&ncap;":"\u2A43","&ncaron;":"\u0148","&ncedil;":"\u0146","&ncong;":"\u2247","&ncongdot;":"\u2A6D\u0338","&ncup;":"\u2A42","&ncy;":"\u043D","&ndash;":"\u2013","&ne;":"\u2260","&neArr;":"\u21D7","&nearhk;":"\u2924","&nearr;":"\u2197","&nearrow;":"\u2197","&nedot;":"\u2250\u0338","&nequiv;":"\u2262","&nesear;":"\u2928","&nesim;":"\u2242\u0338","&nexist;":"\u2204","&nexists;":"\u2204","&nfr;":"\u{1D52B}","&ngE;":"\u2267\u0338","&nge;":"\u2271","&ngeq;":"\u2271","&ngeqq;":"\u2267\u0338","&ngeqslant;":"\u2A7E\u0338","&nges;":"\u2A7E\u0338","&ngsim;":"\u2275","&ngt;":"\u226F","&ngtr;":"\u226F","&nhArr;":"\u21CE","&nharr;":"\u21AE","&nhpar;":"\u2AF2","&ni;":"\u220B","&nis;":"\u22FC","&nisd;":"\u22FA","&niv;":"\u220B","&njcy;":"\u045A","&nlArr;":"\u21CD","&nlE;":"\u2266\u0338","&nlarr;":"\u219A","&nldr;":"\u2025","&nle;":"\u2270","&nleftarrow;":"\u219A","&nleftrightarrow;":"\u21AE","&nleq;":"\u2270","&nleqq;":"\u2266\u0338","&nleqslant;":"\u2A7D\u0338","&nles;":"\u2A7D\u0338","&nless;":"\u226E","&nlsim;":"\u2274","&nlt;":"\u226E","&nltri;":"\u22EA","&nltrie;":"\u22EC","&nmid;":"\u2224","&nopf;":"\u{1D55F}","&not":"\xAC","&not;":"\xAC","&notin;":"\u2209","&notinE;":"\u22F9\u0338","&notindot;":"\u22F5\u0338","&notinva;":"\u2209","&notinvb;":"\u22F7","&notinvc;":"\u22F6","&notni;":"\u220C","&notniva;":"\u220C","&notnivb;":"\u22FE","&notnivc;":"\u22FD","&npar;":"\u2226","&nparallel;":"\u2226","&nparsl;":"\u2AFD\u20E5","&npart;":"\u2202\u0338","&npolint;":"\u2A14","&npr;":"\u2280","&nprcue;":"\u22E0","&npre;":"\u2AAF\u0338","&nprec;":"\u2280","&npreceq;":"\u2AAF\u0338","&nrArr;":"\u21CF","&nrarr;":"\u219B","&nrarrc;":"\u2933\u0338","&nrarrw;":"\u219D\u0338","&nrightarrow;":"\u219B","&nrtri;":"\u22EB","&nrtrie;":"\u22ED","&nsc;":"\u2281","&nsccue;":"\u22E1","&nsce;":"\u2AB0\u0338","&nscr;":"\u{1D4C3}","&nshortmid;":"\u2224","&nshortparallel;":"\u2226","&nsim;":"\u2241","&nsime;":"\u2244","&nsimeq;":"\u2244","&nsmid;":"\u2224","&nspar;":"\u2226","&nsqsube;":"\u22E2","&nsqsupe;":"\u22E3","&nsub;":"\u2284","&nsubE;":"\u2AC5\u0338","&nsube;":"\u2288","&nsubset;":"\u2282\u20D2","&nsubseteq;":"\u2288","&nsubseteqq;":"\u2AC5\u0338","&nsucc;":"\u2281","&nsucceq;":"\u2AB0\u0338","&nsup;":"\u2285","&nsupE;":"\u2AC6\u0338","&nsupe;":"\u2289","&nsupset;":"\u2283\u20D2","&nsupseteq;":"\u2289","&nsupseteqq;":"\u2AC6\u0338","&ntgl;":"\u2279","&ntilde":"\xF1","&ntilde;":"\xF1","&ntlg;":"\u2278","&ntriangleleft;":"\u22EA","&ntrianglelefteq;":"\u22EC","&ntriangleright;":"\u22EB","&ntrianglerighteq;":"\u22ED","&nu;":"\u03BD","&num;":"#","&numero;":"\u2116","&numsp;":"\u2007","&nvDash;":"\u22AD","&nvHarr;":"\u2904","&nvap;":"\u224D\u20D2","&nvdash;":"\u22AC","&nvge;":"\u2265\u20D2","&nvgt;":">\u20D2","&nvinfin;":"\u29DE","&nvlArr;":"\u2902","&nvle;":"\u2264\u20D2","&nvlt;":"<\u20D2","&nvltrie;":"\u22B4\u20D2","&nvrArr;":"\u2903","&nvrtrie;":"\u22B5\u20D2","&nvsim;":"\u223C\u20D2","&nwArr;":"\u21D6","&nwarhk;":"\u2923","&nwarr;":"\u2196","&nwarrow;":"\u2196","&nwnear;":"\u2927","&oS;":"\u24C8","&oacute":"\xF3","&oacute;":"\xF3","&oast;":"\u229B","&ocir;":"\u229A","&ocirc":"\xF4","&ocirc;":"\xF4","&ocy;":"\u043E","&odash;":"\u229D","&odblac;":"\u0151","&odiv;":"\u2A38","&odot;":"\u2299","&odsold;":"\u29BC","&oelig;":"\u0153","&ofcir;":"\u29BF","&ofr;":"\u{1D52C}","&ogon;":"\u02DB","&ograve":"\xF2","&ograve;":"\xF2","&ogt;":"\u29C1","&ohbar;":"\u29B5","&ohm;":"\u03A9","&oint;":"\u222E","&olarr;":"\u21BA","&olcir;":"\u29BE","&olcross;":"\u29BB","&oline;":"\u203E","&olt;":"\u29C0","&omacr;":"\u014D","&omega;":"\u03C9","&omicron;":"\u03BF","&omid;":"\u29B6","&ominus;":"\u2296","&oopf;":"\u{1D560}","&opar;":"\u29B7","&operp;":"\u29B9","&oplus;":"\u2295","&or;":"\u2228","&orarr;":"\u21BB","&ord;":"\u2A5D","&order;":"\u2134","&orderof;":"\u2134","&ordf":"\xAA","&ordf;":"\xAA","&ordm":"\xBA","&ordm;":"\xBA","&origof;":"\u22B6","&oror;":"\u2A56","&orslope;":"\u2A57","&orv;":"\u2A5B","&oscr;":"\u2134","&oslash":"\xF8","&oslash;":"\xF8","&osol;":"\u2298","&otilde":"\xF5","&otilde;":"\xF5","&otimes;":"\u2297","&otimesas;":"\u2A36","&ouml":"\xF6","&ouml;":"\xF6","&ovbar;":"\u233D","&par;":"\u2225","&para":"\xB6","&para;":"\xB6","&parallel;":"\u2225","&parsim;":"\u2AF3","&parsl;":"\u2AFD","&part;":"\u2202","&pcy;":"\u043F","&percnt;":"%","&period;":".","&permil;":"\u2030","&perp;":"\u22A5","&pertenk;":"\u2031","&pfr;":"\u{1D52D}","&phi;":"\u03C6","&phiv;":"\u03D5","&phmmat;":"\u2133","&phone;":"\u260E","&pi;":"\u03C0","&pitchfork;":"\u22D4","&piv;":"\u03D6","&planck;":"\u210F","&planckh;":"\u210E","&plankv;":"\u210F","&plus;":"+","&plusacir;":"\u2A23","&plusb;":"\u229E","&pluscir;":"\u2A22","&plusdo;":"\u2214","&plusdu;":"\u2A25","&pluse;":"\u2A72","&plusmn":"\xB1","&plusmn;":"\xB1","&plussim;":"\u2A26","&plustwo;":"\u2A27","&pm;":"\xB1","&pointint;":"\u2A15","&popf;":"\u{1D561}","&pound":"\xA3","&pound;":"\xA3","&pr;":"\u227A","&prE;":"\u2AB3","&prap;":"\u2AB7","&prcue;":"\u227C","&pre;":"\u2AAF","&prec;":"\u227A","&precapprox;":"\u2AB7","&preccurlyeq;":"\u227C","&preceq;":"\u2AAF","&precnapprox;":"\u2AB9","&precneqq;":"\u2AB5","&precnsim;":"\u22E8","&precsim;":"\u227E","&prime;":"\u2032","&primes;":"\u2119","&prnE;":"\u2AB5","&prnap;":"\u2AB9","&prnsim;":"\u22E8","&prod;":"\u220F","&profalar;":"\u232E","&profline;":"\u2312","&profsurf;":"\u2313","&prop;":"\u221D","&propto;":"\u221D","&prsim;":"\u227E","&prurel;":"\u22B0","&pscr;":"\u{1D4C5}","&psi;":"\u03C8","&puncsp;":"\u2008","&qfr;":"\u{1D52E}","&qint;":"\u2A0C","&qopf;":"\u{1D562}","&qprime;":"\u2057","&qscr;":"\u{1D4C6}","&quaternions;":"\u210D","&quatint;":"\u2A16","&quest;":"?","&questeq;":"\u225F","&quot":'"',"&quot;":'"',"&rAarr;":"\u21DB","&rArr;":"\u21D2","&rAtail;":"\u291C","&rBarr;":"\u290F","&rHar;":"\u2964","&race;":"\u223D\u0331","&racute;":"\u0155","&radic;":"\u221A","&raemptyv;":"\u29B3","&rang;":"\u27E9","&rangd;":"\u2992","&range;":"\u29A5","&rangle;":"\u27E9","&raquo":"\xBB","&raquo;":"\xBB","&rarr;":"\u2192","&rarrap;":"\u2975","&rarrb;":"\u21E5","&rarrbfs;":"\u2920","&rarrc;":"\u2933","&rarrfs;":"\u291E","&rarrhk;":"\u21AA","&rarrlp;":"\u21AC","&rarrpl;":"\u2945","&rarrsim;":"\u2974","&rarrtl;":"\u21A3","&rarrw;":"\u219D","&ratail;":"\u291A","&ratio;":"\u2236","&rationals;":"\u211A","&rbarr;":"\u290D","&rbbrk;":"\u2773","&rbrace;":"}","&rbrack;":"]","&rbrke;":"\u298C","&rbrksld;":"\u298E","&rbrkslu;":"\u2990","&rcaron;":"\u0159","&rcedil;":"\u0157","&rceil;":"\u2309","&rcub;":"}","&rcy;":"\u0440","&rdca;":"\u2937","&rdldhar;":"\u2969","&rdquo;":"\u201D","&rdquor;":"\u201D","&rdsh;":"\u21B3","&real;":"\u211C","&realine;":"\u211B","&realpart;":"\u211C","&reals;":"\u211D","&rect;":"\u25AD","&reg":"\xAE","&reg;":"\xAE","&rfisht;":"\u297D","&rfloor;":"\u230B","&rfr;":"\u{1D52F}","&rhard;":"\u21C1","&rharu;":"\u21C0","&rharul;":"\u296C","&rho;":"\u03C1","&rhov;":"\u03F1","&rightarrow;":"\u2192","&rightarrowtail;":"\u21A3","&rightharpoondown;":"\u21C1","&rightharpoonup;":"\u21C0","&rightleftarrows;":"\u21C4","&rightleftharpoons;":"\u21CC","&rightrightarrows;":"\u21C9","&rightsquigarrow;":"\u219D","&rightthreetimes;":"\u22CC","&ring;":"\u02DA","&risingdotseq;":"\u2253","&rlarr;":"\u21C4","&rlhar;":"\u21CC","&rlm;":"\u200F","&rmoust;":"\u23B1","&rmoustache;":"\u23B1","&rnmid;":"\u2AEE","&roang;":"\u27ED","&roarr;":"\u21FE","&robrk;":"\u27E7","&ropar;":"\u2986","&ropf;":"\u{1D563}","&roplus;":"\u2A2E","&rotimes;":"\u2A35","&rpar;":")","&rpargt;":"\u2994","&rppolint;":"\u2A12","&rrarr;":"\u21C9","&rsaquo;":"\u203A","&rscr;":"\u{1D4C7}","&rsh;":"\u21B1","&rsqb;":"]","&rsquo;":"\u2019","&rsquor;":"\u2019","&rthree;":"\u22CC","&rtimes;":"\u22CA","&rtri;":"\u25B9","&rtrie;":"\u22B5","&rtrif;":"\u25B8","&rtriltri;":"\u29CE","&ruluhar;":"\u2968","&rx;":"\u211E","&sacute;":"\u015B","&sbquo;":"\u201A","&sc;":"\u227B","&scE;":"\u2AB4","&scap;":"\u2AB8","&scaron;":"\u0161","&sccue;":"\u227D","&sce;":"\u2AB0","&scedil;":"\u015F","&scirc;":"\u015D","&scnE;":"\u2AB6","&scnap;":"\u2ABA","&scnsim;":"\u22E9","&scpolint;":"\u2A13","&scsim;":"\u227F","&scy;":"\u0441","&sdot;":"\u22C5","&sdotb;":"\u22A1","&sdote;":"\u2A66","&seArr;":"\u21D8","&searhk;":"\u2925","&searr;":"\u2198","&searrow;":"\u2198","&sect":"\xA7","&sect;":"\xA7","&semi;":";","&seswar;":"\u2929","&setminus;":"\u2216","&setmn;":"\u2216","&sext;":"\u2736","&sfr;":"\u{1D530}","&sfrown;":"\u2322","&sharp;":"\u266F","&shchcy;":"\u0449","&shcy;":"\u0448","&shortmid;":"\u2223","&shortparallel;":"\u2225","&shy":"\xAD","&shy;":"\xAD","&sigma;":"\u03C3","&sigmaf;":"\u03C2","&sigmav;":"\u03C2","&sim;":"\u223C","&simdot;":"\u2A6A","&sime;":"\u2243","&simeq;":"\u2243","&simg;":"\u2A9E","&simgE;":"\u2AA0","&siml;":"\u2A9D","&simlE;":"\u2A9F","&simne;":"\u2246","&simplus;":"\u2A24","&simrarr;":"\u2972","&slarr;":"\u2190","&smallsetminus;":"\u2216","&smashp;":"\u2A33","&smeparsl;":"\u29E4","&smid;":"\u2223","&smile;":"\u2323","&smt;":"\u2AAA","&smte;":"\u2AAC","&smtes;":"\u2AAC\uFE00","&softcy;":"\u044C","&sol;":"/","&solb;":"\u29C4","&solbar;":"\u233F","&sopf;":"\u{1D564}","&spades;":"\u2660","&spadesuit;":"\u2660","&spar;":"\u2225","&sqcap;":"\u2293","&sqcaps;":"\u2293\uFE00","&sqcup;":"\u2294","&sqcups;":"\u2294\uFE00","&sqsub;":"\u228F","&sqsube;":"\u2291","&sqsubset;":"\u228F","&sqsubseteq;":"\u2291","&sqsup;":"\u2290","&sqsupe;":"\u2292","&sqsupset;":"\u2290","&sqsupseteq;":"\u2292","&squ;":"\u25A1","&square;":"\u25A1","&squarf;":"\u25AA","&squf;":"\u25AA","&srarr;":"\u2192","&sscr;":"\u{1D4C8}","&ssetmn;":"\u2216","&ssmile;":"\u2323","&sstarf;":"\u22C6","&star;":"\u2606","&starf;":"\u2605","&straightepsilon;":"\u03F5","&straightphi;":"\u03D5","&strns;":"\xAF","&sub;":"\u2282","&subE;":"\u2AC5","&subdot;":"\u2ABD","&sube;":"\u2286","&subedot;":"\u2AC3","&submult;":"\u2AC1","&subnE;":"\u2ACB","&subne;":"\u228A","&subplus;":"\u2ABF","&subrarr;":"\u2979","&subset;":"\u2282","&subseteq;":"\u2286","&subseteqq;":"\u2AC5","&subsetneq;":"\u228A","&subsetneqq;":"\u2ACB","&subsim;":"\u2AC7","&subsub;":"\u2AD5","&subsup;":"\u2AD3","&succ;":"\u227B","&succapprox;":"\u2AB8","&succcurlyeq;":"\u227D","&succeq;":"\u2AB0","&succnapprox;":"\u2ABA","&succneqq;":"\u2AB6","&succnsim;":"\u22E9","&succsim;":"\u227F","&sum;":"\u2211","&sung;":"\u266A","&sup1":"\xB9","&sup1;":"\xB9","&sup2":"\xB2","&sup2;":"\xB2","&sup3":"\xB3","&sup3;":"\xB3","&sup;":"\u2283","&supE;":"\u2AC6","&supdot;":"\u2ABE","&supdsub;":"\u2AD8","&supe;":"\u2287","&supedot;":"\u2AC4","&suphsol;":"\u27C9","&suphsub;":"\u2AD7","&suplarr;":"\u297B","&supmult;":"\u2AC2","&supnE;":"\u2ACC","&supne;":"\u228B","&supplus;":"\u2AC0","&supset;":"\u2283","&supseteq;":"\u2287","&supseteqq;":"\u2AC6","&supsetneq;":"\u228B","&supsetneqq;":"\u2ACC","&supsim;":"\u2AC8","&supsub;":"\u2AD4","&supsup;":"\u2AD6","&swArr;":"\u21D9","&swarhk;":"\u2926","&swarr;":"\u2199","&swarrow;":"\u2199","&swnwar;":"\u292A","&szlig":"\xDF","&szlig;":"\xDF","&target;":"\u2316","&tau;":"\u03C4","&tbrk;":"\u23B4","&tcaron;":"\u0165","&tcedil;":"\u0163","&tcy;":"\u0442","&tdot;":"\u20DB","&telrec;":"\u2315","&tfr;":"\u{1D531}","&there4;":"\u2234","&therefore;":"\u2234","&theta;":"\u03B8","&thetasym;":"\u03D1","&thetav;":"\u03D1","&thickapprox;":"\u2248","&thicksim;":"\u223C","&thinsp;":"\u2009","&thkap;":"\u2248","&thksim;":"\u223C","&thorn":"\xFE","&thorn;":"\xFE","&tilde;":"\u02DC","&times":"\xD7","&times;":"\xD7","&timesb;":"\u22A0","&timesbar;":"\u2A31","&timesd;":"\u2A30","&tint;":"\u222D","&toea;":"\u2928","&top;":"\u22A4","&topbot;":"\u2336","&topcir;":"\u2AF1","&topf;":"\u{1D565}","&topfork;":"\u2ADA","&tosa;":"\u2929","&tprime;":"\u2034","&trade;":"\u2122","&triangle;":"\u25B5","&triangledown;":"\u25BF","&triangleleft;":"\u25C3","&trianglelefteq;":"\u22B4","&triangleq;":"\u225C","&triangleright;":"\u25B9","&trianglerighteq;":"\u22B5","&tridot;":"\u25EC","&trie;":"\u225C","&triminus;":"\u2A3A","&triplus;":"\u2A39","&trisb;":"\u29CD","&tritime;":"\u2A3B","&trpezium;":"\u23E2","&tscr;":"\u{1D4C9}","&tscy;":"\u0446","&tshcy;":"\u045B","&tstrok;":"\u0167","&twixt;":"\u226C","&twoheadleftarrow;":"\u219E","&twoheadrightarrow;":"\u21A0","&uArr;":"\u21D1","&uHar;":"\u2963","&uacute":"\xFA","&uacute;":"\xFA","&uarr;":"\u2191","&ubrcy;":"\u045E","&ubreve;":"\u016D","&ucirc":"\xFB","&ucirc;":"\xFB","&ucy;":"\u0443","&udarr;":"\u21C5","&udblac;":"\u0171","&udhar;":"\u296E","&ufisht;":"\u297E","&ufr;":"\u{1D532}","&ugrave":"\xF9","&ugrave;":"\xF9","&uharl;":"\u21BF","&uharr;":"\u21BE","&uhblk;":"\u2580","&ulcorn;":"\u231C","&ulcorner;":"\u231C","&ulcrop;":"\u230F","&ultri;":"\u25F8","&umacr;":"\u016B","&uml":"\xA8","&uml;":"\xA8","&uogon;":"\u0173","&uopf;":"\u{1D566}","&uparrow;":"\u2191","&updownarrow;":"\u2195","&upharpoonleft;":"\u21BF","&upharpoonright;":"\u21BE","&uplus;":"\u228E","&upsi;":"\u03C5","&upsih;":"\u03D2","&upsilon;":"\u03C5","&upuparrows;":"\u21C8","&urcorn;":"\u231D","&urcorner;":"\u231D","&urcrop;":"\u230E","&uring;":"\u016F","&urtri;":"\u25F9","&uscr;":"\u{1D4CA}","&utdot;":"\u22F0","&utilde;":"\u0169","&utri;":"\u25B5","&utrif;":"\u25B4","&uuarr;":"\u21C8","&uuml":"\xFC","&uuml;":"\xFC","&uwangle;":"\u29A7","&vArr;":"\u21D5","&vBar;":"\u2AE8","&vBarv;":"\u2AE9","&vDash;":"\u22A8","&vangrt;":"\u299C","&varepsilon;":"\u03F5","&varkappa;":"\u03F0","&varnothing;":"\u2205","&varphi;":"\u03D5","&varpi;":"\u03D6","&varpropto;":"\u221D","&varr;":"\u2195","&varrho;":"\u03F1","&varsigma;":"\u03C2","&varsubsetneq;":"\u228A\uFE00","&varsubsetneqq;":"\u2ACB\uFE00","&varsupsetneq;":"\u228B\uFE00","&varsupsetneqq;":"\u2ACC\uFE00","&vartheta;":"\u03D1","&vartriangleleft;":"\u22B2","&vartriangleright;":"\u22B3","&vcy;":"\u0432","&vdash;":"\u22A2","&vee;":"\u2228","&veebar;":"\u22BB","&veeeq;":"\u225A","&vellip;":"\u22EE","&verbar;":"|","&vert;":"|","&vfr;":"\u{1D533}","&vltri;":"\u22B2","&vnsub;":"\u2282\u20D2","&vnsup;":"\u2283\u20D2","&vopf;":"\u{1D567}","&vprop;":"\u221D","&vrtri;":"\u22B3","&vscr;":"\u{1D4CB}","&vsubnE;":"\u2ACB\uFE00","&vsubne;":"\u228A\uFE00","&vsupnE;":"\u2ACC\uFE00","&vsupne;":"\u228B\uFE00","&vzigzag;":"\u299A","&wcirc;":"\u0175","&wedbar;":"\u2A5F","&wedge;":"\u2227","&wedgeq;":"\u2259","&weierp;":"\u2118","&wfr;":"\u{1D534}","&wopf;":"\u{1D568}","&wp;":"\u2118","&wr;":"\u2240","&wreath;":"\u2240","&wscr;":"\u{1D4CC}","&xcap;":"\u22C2","&xcirc;":"\u25EF","&xcup;":"\u22C3","&xdtri;":"\u25BD","&xfr;":"\u{1D535}","&xhArr;":"\u27FA","&xharr;":"\u27F7","&xi;":"\u03BE","&xlArr;":"\u27F8","&xlarr;":"\u27F5","&xmap;":"\u27FC","&xnis;":"\u22FB","&xodot;":"\u2A00","&xopf;":"\u{1D569}","&xoplus;":"\u2A01","&xotime;":"\u2A02","&xrArr;":"\u27F9","&xrarr;":"\u27F6","&xscr;":"\u{1D4CD}","&xsqcup;":"\u2A06","&xuplus;":"\u2A04","&xutri;":"\u25B3","&xvee;":"\u22C1","&xwedge;":"\u22C0","&yacute":"\xFD","&yacute;":"\xFD","&yacy;":"\u044F","&ycirc;":"\u0177","&ycy;":"\u044B","&yen":"\xA5","&yen;":"\xA5","&yfr;":"\u{1D536}","&yicy;":"\u0457","&yopf;":"\u{1D56A}","&yscr;":"\u{1D4CE}","&yucy;":"\u044E","&yuml":"\xFF","&yuml;":"\xFF","&zacute;":"\u017A","&zcaron;":"\u017E","&zcy;":"\u0437","&zdot;":"\u017C","&zeetrf;":"\u2128","&zeta;":"\u03B6","&zfr;":"\u{1D537}","&zhcy;":"\u0436","&zigrarr;":"\u21DD","&zopf;":"\u{1D56B}","&zscr;":"\u{1D4CF}","&zwj;":"\u200D","&zwnj;":"\u200C"},nr=rf;function nf(e){return e.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi,(t,o)=>{if(typeof nr[t]=="string")return nr[t];if(o.charAt(0)!=="#"||t.charAt(t.length-1)!==";")return t;let i;o.charAt(1)==="x"?i=parseInt(o.substr(2),16):i=parseInt(o.substr(1),10);let r="";return i>=55296&&i<=57343||i>1114111?"\uFFFD":(i>65535&&(i-=65536,r+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),r+=String.fromCharCode(i),r)})}function _t(e){return e.trim().replace(/[<>"'?&]/g,t=>{let o=t.charCodeAt(0).toString(16);return o.length<2&&(o="0"+o),"&#x"+o.toUpperCase()+";"})}function ns(e){return"<div>"+_t(e).replace(/\n/g,"<br />")+"</div>"}function ss(e){return e=e.replace(/\r?\n/g,"").replace(/<\!\-\-.*?\-\->/gi," ").replace(/<br\b[^>]*>/gi,`
259
259
  `).replace(/<\/?(p|div|table|tr|td|th)\b[^>]*>/gi,`
260
260
 
261
261
  `).replace(/<script\b[^>]*>.*?<\/script\b[^>]*>/gi," ").replace(/^.*<body\b[^>]*>/i,"").replace(/^.*<\/head\b[^>]*>/i,"").replace(/^.*<\!doctype\b[^>]*>/i,"").replace(/<\/body\b[^>]*>.*$/i,"").replace(/<\/html\b[^>]*>.*$/i,"").replace(/<a\b[^>]*href\s*=\s*["']?([^\s"']+)[^>]*>/gi," ($1) ").replace(/<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi,"").replace(/<li\b[^>]*>[\n\u0001\s]*/gi,"* ").replace(/<hr\b[^>]*>/g,`
@@ -265,60 +265,60 @@ ${a}
265
265
 
266
266
  `).replace(/^\n+/,`
267
267
  `).replace(/\n+$/,`
268
- `),e=ef(e),e}function ss(e){return[].concat(e.name||[]).concat(e.name?`<${e.address}>`:e.address).join(" ")}function nr(e){let t=[],o=(i,r)=>{if(r&&t.push(", "),i.group){let n=`${i.name}:`,s=";";t.push(n),i.group.forEach(o),t.push(s)}else t.push(ss(i))};return e.forEach(o),t.join("")}function as(e){return`<a href="mailto:${_t(e.address)}" class="postal-email-address">${_t(e.name||`<${e.address}>`)}</a>`}function sr(e){let t=[],o=(i,r)=>{if(r&&t.push('<span class="postal-email-address-separator">, </span>'),i.group){let n=`<span class="postal-email-address-group">${_t(i.name)}:</span>`,s='<span class="postal-email-address-group">;</span>';t.push(n),i.group.forEach(o),t.push(s)}else t.push(as(i))};return e.forEach(o),t.join(" ")}function tf(e,t,o){e=(e||"").toString(),t=t||76;let i=0,r=e.length,n="",s,a;for(;i<r;){if(s=e.substr(i,t),s.length<t){n+=s;break}if(a=s.match(/^[^\n\r]*(\r?\n|\r)/)){s=a[0],n+=s,i+=s.length;continue}else(a=s.match(/(\s+)[^\s]*$/))&&a[0].length-(o?(a[1]||"").length:0)<s.length?s=s.substr(0,s.length-(a[0].length-(o?(a[1]||"").length:0))):(a=e.substr(i+s.length).match(/^[^\s]+(\s*)/))&&(s=s+a[0].substr(0,a[0].length-(o?0:(a[1]||"").length)));n+=s,i+=s.length,i<r&&(n+=`\r
269
- `)}return n}function ar(e){let t=[];if(e.from&&t.push({key:"From",val:ss(e.from)}),e.subject&&t.push({key:"Subject",val:e.subject}),e.date){let s={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},a=typeof Intl>"u"?e.date:new Intl.DateTimeFormat("default",s).format(new Date(e.date));t.push({key:"Date",val:a})}e.to&&e.to.length&&t.push({key:"To",val:nr(e.to)}),e.cc&&e.cc.length&&t.push({key:"Cc",val:nr(e.cc)}),e.bcc&&e.bcc.length&&t.push({key:"Bcc",val:nr(e.bcc)});let o=t.map(s=>s.key.length).reduce((s,a)=>a>s?a:s,0);t=t.flatMap(s=>{let a=o-s.key.length,l=`${s.key}: ${" ".repeat(a)}`,u=`${" ".repeat(s.key.length+1)} ${" ".repeat(a)}`;return tf(s.val,80,!0).split(/\r?\n/).map(p=>p.trim()).map((p,f)=>`${f?u:l}${p}`)});let i=t.map(s=>s.length).reduce((s,a)=>a>s?a:s,0),r="-".repeat(i);return`
268
+ `),e=nf(e),e}function as(e){return[].concat(e.name||[]).concat(e.name?`<${e.address}>`:e.address).join(" ")}function sr(e){let t=[],o=(i,r)=>{if(r&&t.push(", "),i.group){let n=`${i.name}:`,s=";";t.push(n),i.group.forEach(o),t.push(s)}else t.push(as(i))};return e.forEach(o),t.join("")}function ls(e){return`<a href="mailto:${_t(e.address)}" class="postal-email-address">${_t(e.name||`<${e.address}>`)}</a>`}function ar(e){let t=[],o=(i,r)=>{if(r&&t.push('<span class="postal-email-address-separator">, </span>'),i.group){let n=`<span class="postal-email-address-group">${_t(i.name)}:</span>`,s='<span class="postal-email-address-group">;</span>';t.push(n),i.group.forEach(o),t.push(s)}else t.push(ls(i))};return e.forEach(o),t.join(" ")}function sf(e,t,o){e=(e||"").toString(),t=t||76;let i=0,r=e.length,n="",s,a;for(;i<r;){if(s=e.substr(i,t),s.length<t){n+=s;break}if(a=s.match(/^[^\n\r]*(\r?\n|\r)/)){s=a[0],n+=s,i+=s.length;continue}else(a=s.match(/(\s+)[^\s]*$/))&&a[0].length-(o?(a[1]||"").length:0)<s.length?s=s.substr(0,s.length-(a[0].length-(o?(a[1]||"").length:0))):(a=e.substr(i+s.length).match(/^[^\s]+(\s*)/))&&(s=s+a[0].substr(0,a[0].length-(o?0:(a[1]||"").length)));n+=s,i+=s.length,i<r&&(n+=`\r
269
+ `)}return n}function lr(e){let t=[];if(e.from&&t.push({key:"From",val:as(e.from)}),e.subject&&t.push({key:"Subject",val:e.subject}),e.date){let s={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},a=typeof Intl>"u"?e.date:new Intl.DateTimeFormat("default",s).format(new Date(e.date));t.push({key:"Date",val:a})}e.to&&e.to.length&&t.push({key:"To",val:sr(e.to)}),e.cc&&e.cc.length&&t.push({key:"Cc",val:sr(e.cc)}),e.bcc&&e.bcc.length&&t.push({key:"Bcc",val:sr(e.bcc)});let o=t.map(s=>s.key.length).reduce((s,a)=>a>s?a:s,0);t=t.flatMap(s=>{let a=o-s.key.length,l=`${s.key}: ${" ".repeat(a)}`,u=`${" ".repeat(s.key.length+1)} ${" ".repeat(a)}`;return sf(s.val,80,!0).split(/\r?\n/).map(p=>p.trim()).map((p,f)=>`${f?u:l}${p}`)});let i=t.map(s=>s.length).reduce((s,a)=>a>s?a:s,0),r="-".repeat(i);return`
270
270
  ${r}
271
271
  ${t.join(`
272
272
  `)}
273
273
  ${r}
274
- `}function lr(e){let t=[];if(e.from&&t.push(`<div class="postal-email-header-key">From</div><div class="postal-email-header-value">${as(e.from)}</div>`),e.subject&&t.push(`<div class="postal-email-header-key">Subject</div><div class="postal-email-header-value postal-email-header-subject">${_t(e.subject)}</div>`),e.date){let i={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},r=typeof Intl>"u"?e.date:new Intl.DateTimeFormat("default",i).format(new Date(e.date));t.push(`<div class="postal-email-header-key">Date</div><div class="postal-email-header-value postal-email-header-date" data-date="${_t(e.date)}">${_t(r)}</div>`)}return e.to&&e.to.length&&t.push(`<div class="postal-email-header-key">To</div><div class="postal-email-header-value">${sr(e.to)}</div>`),e.cc&&e.cc.length&&t.push(`<div class="postal-email-header-key">Cc</div><div class="postal-email-header-value">${sr(e.cc)}</div>`),e.bcc&&e.bcc.length&&t.push(`<div class="postal-email-header-key">Bcc</div><div class="postal-email-header-value">${sr(e.bcc)}</div>`),`<div class="postal-email-header">${t.length?'<div class="postal-email-header-row">':""}${t.join(`</div>
275
- <div class="postal-email-header-row">`)}${t.length?"</div>":""}</div>`}function of(e,t){let o=!1,i="text",r,n=[],s={address:[],comment:[],group:[],text:[],textWasQuoted:[]},a,l,u=!1;for(a=0,l=e.length;a<l;a++){let m=e[a],p=a?e[a-1]:null;if(m.type==="operator")switch(m.value){case"<":i="address",u=!1;break;case"(":i="comment",u=!1;break;case":":i="group",o=!0,u=!1;break;case'"':u=!u,i="text";break;default:i="text",u=!1;break}else m.value&&(i==="address"&&(m.value=m.value.replace(/^[^<]*<\s*/,"")),p&&p.noBreak&&s[i].length?(s[i][s[i].length-1]+=m.value,i==="text"&&u&&(s.textWasQuoted[s.textWasQuoted.length-1]=!0)):(s[i].push(m.value),i==="text"&&s.textWasQuoted.push(u)))}if(!s.text.length&&s.comment.length&&(s.text=s.comment,s.comment=[]),o){s.text=s.text.join(" ");let m=[];s.group.length&&dr(s.group.join(","),{_depth:t+1}).forEach(f=>{f.group?m=m.concat(f.group):m.push(f)}),n.push({name:kt(s.text||r&&r.name),group:m})}else{if(!s.address.length&&s.text.length){for(a=s.text.length-1;a>=0;a--)if(!s.textWasQuoted[a]&&s.text[a].match(/^[^@\s]+@[^@\s]+$/)){s.address=s.text.splice(a,1),s.textWasQuoted.splice(a,1);break}let m=function(p){return s.address.length?p:(s.address=[p.trim()]," ")};if(!s.address.length)for(a=s.text.length-1;a>=0&&!(!s.textWasQuoted[a]&&(s.text[a]=s.text[a].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,m).trim(),s.address.length));a--);}if(!s.text.length&&s.comment.length&&(s.text=s.comment,s.comment=[]),s.address.length>1&&(s.text=s.text.concat(s.address.splice(1))),s.text=s.text.join(" "),s.address=s.address.join(" "),!s.address&&/^=\?[^=]+?=$/.test(s.text.trim())){let m=kt(s.text);if(/<[^<>]+@[^<>]+>/.test(m)){let p=dr(m);if(p&&p.length)return p}return[{address:"",name:m}]}r={address:s.address||s.text||"",name:kt(s.text||s.address||"")},r.address===r.name&&((r.address||"").match(/@/)?r.name="":r.address=""),n.push(r)}return n}var cr=class{constructor(t){this.str=(t||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let t=[];for(let o=0,i=this.str.length;o<i;o++){let r=this.str.charAt(o),n=o<i-1?this.str.charAt(o+1):null;this.checkChar(r,n)}return this.list.forEach(o=>{o.value=(o.value||"").toString().trim(),o.value&&t.push(o)}),t}checkChar(t,o){if(!this.escaped){if(t===this.operatorExpecting){this.node={type:"operator",value:t},o&&![" "," ","\r",`
274
+ `}function dr(e){let t=[];if(e.from&&t.push(`<div class="postal-email-header-key">From</div><div class="postal-email-header-value">${ls(e.from)}</div>`),e.subject&&t.push(`<div class="postal-email-header-key">Subject</div><div class="postal-email-header-value postal-email-header-subject">${_t(e.subject)}</div>`),e.date){let i={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},r=typeof Intl>"u"?e.date:new Intl.DateTimeFormat("default",i).format(new Date(e.date));t.push(`<div class="postal-email-header-key">Date</div><div class="postal-email-header-value postal-email-header-date" data-date="${_t(e.date)}">${_t(r)}</div>`)}return e.to&&e.to.length&&t.push(`<div class="postal-email-header-key">To</div><div class="postal-email-header-value">${ar(e.to)}</div>`),e.cc&&e.cc.length&&t.push(`<div class="postal-email-header-key">Cc</div><div class="postal-email-header-value">${ar(e.cc)}</div>`),e.bcc&&e.bcc.length&&t.push(`<div class="postal-email-header-key">Bcc</div><div class="postal-email-header-value">${ar(e.bcc)}</div>`),`<div class="postal-email-header">${t.length?'<div class="postal-email-header-row">':""}${t.join(`</div>
275
+ <div class="postal-email-header-row">`)}${t.length?"</div>":""}</div>`}function af(e,t){let o=!1,i="text",r,n=[],s={address:[],comment:[],group:[],text:[],textWasQuoted:[]},a,l,u=!1;for(a=0,l=e.length;a<l;a++){let m=e[a],p=a?e[a-1]:null;if(m.type==="operator")switch(m.value){case"<":i="address",u=!1;break;case"(":i="comment",u=!1;break;case":":i="group",o=!0,u=!1;break;case'"':u=!u,i="text";break;default:i="text",u=!1;break}else m.value&&(i==="address"&&(m.value=m.value.replace(/^[^<]*<\s*/,"")),p&&p.noBreak&&s[i].length?(s[i][s[i].length-1]+=m.value,i==="text"&&u&&(s.textWasQuoted[s.textWasQuoted.length-1]=!0)):(s[i].push(m.value),i==="text"&&s.textWasQuoted.push(u)))}if(!s.text.length&&s.comment.length&&(s.text=s.comment,s.comment=[]),o){s.text=s.text.join(" ");let m=[];s.group.length&&ur(s.group.join(","),{_depth:t+1}).forEach(f=>{f.group?m=m.concat(f.group):m.push(f)}),n.push({name:kt(s.text||r&&r.name),group:m})}else{if(!s.address.length&&s.text.length){for(a=s.text.length-1;a>=0;a--)if(!s.textWasQuoted[a]&&s.text[a].match(/^[^@\s]+@[^@\s]+$/)){s.address=s.text.splice(a,1),s.textWasQuoted.splice(a,1);break}let m=function(p){return s.address.length?p:(s.address=[p.trim()]," ")};if(!s.address.length)for(a=s.text.length-1;a>=0&&!(!s.textWasQuoted[a]&&(s.text[a]=s.text[a].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,m).trim(),s.address.length));a--);}if(!s.text.length&&s.comment.length&&(s.text=s.comment,s.comment=[]),s.address.length>1&&(s.text=s.text.concat(s.address.splice(1))),s.text=s.text.join(" "),s.address=s.address.join(" "),!s.address&&/^=\?[^=]+?=$/.test(s.text.trim())){let m=kt(s.text);if(/<[^<>]+@[^<>]+>/.test(m)){let p=ur(m);if(p&&p.length)return p}return[{address:"",name:m}]}r={address:s.address||s.text||"",name:kt(s.text||s.address||"")},r.address===r.name&&((r.address||"").match(/@/)?r.name="":r.address=""),n.push(r)}return n}var cr=class{constructor(t){this.str=(t||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let t=[];for(let o=0,i=this.str.length;o<i;o++){let r=this.str.charAt(o),n=o<i-1?this.str.charAt(o+1):null;this.checkChar(r,n)}return this.list.forEach(o=>{o.value=(o.value||"").toString().trim(),o.value&&t.push(o)}),t}checkChar(t,o){if(!this.escaped){if(t===this.operatorExpecting){this.node={type:"operator",value:t},o&&![" "," ","\r",`
276
276
  `,",",";"].includes(o)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",this.escaped=!1;return}else if(!this.operatorExpecting&&t in this.operators){this.node={type:"operator",value:t},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[t],this.escaped=!1;return}else if(this.operatorExpecting==='"'&&t==="\\"){this.escaped=!0;return}}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),t===`
277
- `&&(t=" "),(t.charCodeAt(0)>=33||[" "," "].includes(t))&&(this.node.value+=t),this.escaped=!1}},rf=50;function dr(e,t){t=t||{};let o=t._depth||0;if(o>rf)return[];let r=new cr(e).tokenize(),n=[],s=[],a=[];if(r.forEach(l=>{l.type==="operator"&&(l.value===","||l.value===";")?(s.length&&n.push(s),s=[]):s.push(l)}),s.length&&n.push(s),n.forEach(l=>{l=of(l,o),l.length&&(a=a.concat(l))}),t.flatten){let l=[],u=m=>{m.forEach(p=>{if(p.group)return u(p.group);l.push(p)})};return u(a),l}return a}var No=dr;function ls(e){for(var t="",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(e),r=i.byteLength,n=r%3,s=r-n,a,l,u,m,p,f=0;f<s;f=f+3)p=i[f]<<16|i[f+1]<<8|i[f+2],a=(p&16515072)>>18,l=(p&258048)>>12,u=(p&4032)>>6,m=p&63,t+=o[a]+o[l]+o[u]+o[m];return n==1?(p=i[s],a=(p&252)>>2,l=(p&3)<<4,t+=o[a]+o[l]+"=="):n==2&&(p=i[s]<<8|i[s+1],a=(p&64512)>>10,l=(p&1008)>>4,u=(p&15)<<2,t+=o[a]+o[l]+o[u]+"="),t}var nf=256,sf=2*1024*1024,af=10;function ur(e){return e.replace(/-(.)/g,(t,o)=>o.toUpperCase())}function mr(e,t,o){if(e==null)return t;if(typeof e!="number"||!Number.isInteger(e)||e<0)throw new TypeError(`${o} must be a non-negative integer`);return e}var mo=class e{static async parse(t,o){return new e(o).parse(t)}constructor(t,o=0){this.options=t||{},this.mimeOptions={maxNestingDepth:mr(this.options.maxNestingDepth,nf,"maxNestingDepth"),maxHeadersSize:mr(this.options.maxHeadersSize,sf,"maxHeadersSize")},this.maxRfc822NestingDepth=mr(this.options.maxRfc822NestingDepth,af,"maxRfc822NestingDepth"),this.rfc822NestingDepth=o,this.root=this.currentNode=new jt({postalMime:this,...this.mimeOptions}),this.boundaries=[],this.textContent={},this.attachments=[],this.attachmentEncoding=(this.options.attachmentEncoding||"").toString().replace(/[-_\s]/g,"").trim().toLowerCase()||"arraybuffer",this.started=!1}async finalize(){await this.root.finalize()}async processLine(t,o){let i=this.boundaries;if(i.length&&t.length>2&&t[0]===45&&t[1]===45)for(let r=i.length-1;r>=0;r--){let n=i[r];if(t.length<n.value.length+2)continue;let s=!0;for(let m=0;m<n.value.length;m++)if(t[m+2]!==n.value[m]){s=!1;break}if(!s)continue;let a=n.value.length+2,l=!1;t.length>=n.value.length+4&&t[n.value.length+2]===45&&t[n.value.length+3]===45&&(l=!0,a=n.value.length+4);let u=!0;for(let m=a;m<t.length;m++)if(t[m]!==32&&t[m]!==9){u=!1;break}if(u)return l?(await n.node.finalize(),this.currentNode=n.node.parentNode||this.root):(await n.node.finalizeChildNodes(),this.currentNode=new jt({postalMime:this,parentNode:n.node,parentMultipartType:n.node.contentType.multipart,...this.mimeOptions})),o?this.finalize():void 0}if(this.currentNode.feed(t),o)return this.finalize()}readLine(){let t=this.readPos,o=this.readPos;for(;this.readPos<this.av.length;){let i=this.av[this.readPos++];if(i!==13&&i!==10&&(o=this.readPos),i===10)return{bytes:new Uint8Array(this.buf,t,o-t),done:this.readPos>=this.av.length}}return{bytes:new Uint8Array(this.buf,t,o-t),done:this.readPos>=this.av.length}}async processNodeTree(){let t={},o=new Set,i=this.textMap=new Map,r=this.forceRfc822Attachments(),n=async(s,a,l)=>{if(a=a||!1,l=l||!1,s.contentType.multipart)s.contentType.multipart==="alternative"?a=s:s.contentType.multipart==="related"&&(l=s);else{let u=this.isInlineMessageRfc822(s)&&!r,m=u&&this.rfc822NestingDepth>=this.maxRfc822NestingDepth;if(u&&!m){let p=new e({...this.mimeOptions,maxRfc822NestingDepth:this.maxRfc822NestingDepth,attachmentEncoding:"arraybuffer"},this.rfc822NestingDepth+1);s.subMessage=await p.parse(s.content),i.has(s)||i.set(s,{});let f=i.get(s);(s.subMessage.text||!s.subMessage.html)&&(f.plain=f.plain||[],f.plain.push({type:"subMessage",value:s.subMessage}),o.add("plain")),s.subMessage.html&&(f.html=f.html||[],f.html.push({type:"subMessage",value:s.subMessage}),o.add("html")),p.textMap&&p.textMap.forEach((y,A)=>{i.set(A,y)});for(let y of s.subMessage.attachments||[])this.attachments.push(y)}else if(this.isInlineTextNode(s)){let p=s.contentType.parsed.value.substr(s.contentType.parsed.value.indexOf("/")+1),f=a||s;i.has(f)||i.set(f,{});let y=i.get(f);y[p]=y[p]||[],y[p].push({type:"text",value:s.getTextContent()}),o.add(p)}else if(s.content){let p=s.contentDisposition?.parsed?.params?.filename||s.contentType.parsed.params.name||null,f={filename:p?kt(p):null,mimeType:s.contentType.parsed.value,disposition:s.contentDisposition?.parsed?.value||null};switch(l&&s.contentId&&!m&&(f.related=!0),m&&(f.rfc822DepthExceeded=!0),s.contentDescription&&(f.description=s.contentDescription),s.contentId&&(f.contentId=s.contentId),s.contentType.parsed.value){case"text/calendar":case"application/ics":{s.contentType.parsed.params.method&&(f.method=s.contentType.parsed.params.method.toString().toUpperCase().trim());let y=s.getTextContent().replace(/\r?\n/g,`
277
+ `&&(t=" "),(t.charCodeAt(0)>=33||[" "," "].includes(t))&&(this.node.value+=t),this.escaped=!1}},lf=50;function ur(e,t){t=t||{};let o=t._depth||0;if(o>lf)return[];let r=new cr(e).tokenize(),n=[],s=[],a=[];if(r.forEach(l=>{l.type==="operator"&&(l.value===","||l.value===";")?(s.length&&n.push(s),s=[]):s.push(l)}),s.length&&n.push(s),n.forEach(l=>{l=af(l,o),l.length&&(a=a.concat(l))}),t.flatten){let l=[],u=m=>{m.forEach(p=>{if(p.group)return u(p.group);l.push(p)})};return u(a),l}return a}var No=ur;function ds(e){for(var t="",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(e),r=i.byteLength,n=r%3,s=r-n,a,l,u,m,p,f=0;f<s;f=f+3)p=i[f]<<16|i[f+1]<<8|i[f+2],a=(p&16515072)>>18,l=(p&258048)>>12,u=(p&4032)>>6,m=p&63,t+=o[a]+o[l]+o[u]+o[m];return n==1?(p=i[s],a=(p&252)>>2,l=(p&3)<<4,t+=o[a]+o[l]+"=="):n==2&&(p=i[s]<<8|i[s+1],a=(p&64512)>>10,l=(p&1008)>>4,u=(p&15)<<2,t+=o[a]+o[l]+o[u]+"="),t}var df=256,cf=2*1024*1024,uf=10;function mr(e){return e.replace(/-(.)/g,(t,o)=>o.toUpperCase())}function pr(e,t,o){if(e==null)return t;if(typeof e!="number"||!Number.isInteger(e)||e<0)throw new TypeError(`${o} must be a non-negative integer`);return e}var mo=class e{static async parse(t,o){return new e(o).parse(t)}constructor(t,o=0){this.options=t||{},this.mimeOptions={maxNestingDepth:pr(this.options.maxNestingDepth,df,"maxNestingDepth"),maxHeadersSize:pr(this.options.maxHeadersSize,cf,"maxHeadersSize")},this.maxRfc822NestingDepth=pr(this.options.maxRfc822NestingDepth,uf,"maxRfc822NestingDepth"),this.rfc822NestingDepth=o,this.root=this.currentNode=new jt({postalMime:this,...this.mimeOptions}),this.boundaries=[],this.textContent={},this.attachments=[],this.attachmentEncoding=(this.options.attachmentEncoding||"").toString().replace(/[-_\s]/g,"").trim().toLowerCase()||"arraybuffer",this.started=!1}async finalize(){await this.root.finalize()}async processLine(t,o){let i=this.boundaries;if(i.length&&t.length>2&&t[0]===45&&t[1]===45)for(let r=i.length-1;r>=0;r--){let n=i[r];if(t.length<n.value.length+2)continue;let s=!0;for(let m=0;m<n.value.length;m++)if(t[m+2]!==n.value[m]){s=!1;break}if(!s)continue;let a=n.value.length+2,l=!1;t.length>=n.value.length+4&&t[n.value.length+2]===45&&t[n.value.length+3]===45&&(l=!0,a=n.value.length+4);let u=!0;for(let m=a;m<t.length;m++)if(t[m]!==32&&t[m]!==9){u=!1;break}if(u)return l?(await n.node.finalize(),this.currentNode=n.node.parentNode||this.root):(await n.node.finalizeChildNodes(),this.currentNode=new jt({postalMime:this,parentNode:n.node,parentMultipartType:n.node.contentType.multipart,...this.mimeOptions})),o?this.finalize():void 0}if(this.currentNode.feed(t),o)return this.finalize()}readLine(){let t=this.readPos,o=this.readPos;for(;this.readPos<this.av.length;){let i=this.av[this.readPos++];if(i!==13&&i!==10&&(o=this.readPos),i===10)return{bytes:new Uint8Array(this.buf,t,o-t),done:this.readPos>=this.av.length}}return{bytes:new Uint8Array(this.buf,t,o-t),done:this.readPos>=this.av.length}}async processNodeTree(){let t={},o=new Set,i=this.textMap=new Map,r=this.forceRfc822Attachments(),n=async(s,a,l)=>{if(a=a||!1,l=l||!1,s.contentType.multipart)s.contentType.multipart==="alternative"?a=s:s.contentType.multipart==="related"&&(l=s);else{let u=this.isInlineMessageRfc822(s)&&!r,m=u&&this.rfc822NestingDepth>=this.maxRfc822NestingDepth;if(u&&!m){let p=new e({...this.mimeOptions,maxRfc822NestingDepth:this.maxRfc822NestingDepth,attachmentEncoding:"arraybuffer"},this.rfc822NestingDepth+1);s.subMessage=await p.parse(s.content),i.has(s)||i.set(s,{});let f=i.get(s);(s.subMessage.text||!s.subMessage.html)&&(f.plain=f.plain||[],f.plain.push({type:"subMessage",value:s.subMessage}),o.add("plain")),s.subMessage.html&&(f.html=f.html||[],f.html.push({type:"subMessage",value:s.subMessage}),o.add("html")),p.textMap&&p.textMap.forEach((y,A)=>{i.set(A,y)});for(let y of s.subMessage.attachments||[])this.attachments.push(y)}else if(this.isInlineTextNode(s)){let p=s.contentType.parsed.value.substr(s.contentType.parsed.value.indexOf("/")+1),f=a||s;i.has(f)||i.set(f,{});let y=i.get(f);y[p]=y[p]||[],y[p].push({type:"text",value:s.getTextContent()}),o.add(p)}else if(s.content){let p=s.contentDisposition?.parsed?.params?.filename||s.contentType.parsed.params.name||null,f={filename:p?kt(p):null,mimeType:s.contentType.parsed.value,disposition:s.contentDisposition?.parsed?.value||null};switch(l&&s.contentId&&!m&&(f.related=!0),m&&(f.rfc822DepthExceeded=!0),s.contentDescription&&(f.description=s.contentDescription),s.contentId&&(f.contentId=s.contentId),s.contentType.parsed.value){case"text/calendar":case"application/ics":{s.contentType.parsed.params.method&&(f.method=s.contentType.parsed.params.method.toString().toUpperCase().trim());let y=s.getTextContent().replace(/\r?\n/g,`
278
278
  `).replace(/\n*$/,`
279
- `);f.content=ut.encode(y);break}default:f.content=s.content}this.attachments.push(f)}}for(let u of s.childNodes)await n(u,a,l)};await n(this.root,!1,!1),i.forEach(s=>{o.forEach(a=>{if(t[a]||(t[a]=[]),s[a])s[a].forEach(l=>{switch(l.type){case"text":t[a].push(l.value);break;case"subMessage":switch(a){case"html":t[a].push(lr(l.value));break;case"plain":t[a].push(ar(l.value));break}break}});else{let l;switch(a){case"html":l="plain";break;case"plain":l="html";break}(s[l]||[]).forEach(u=>{switch(u.type){case"text":switch(a){case"html":t[a].push(rs(u.value));break;case"plain":t[a].push(ns(u.value));break}break;case"subMessage":switch(a){case"html":t[a].push(lr(u.value));break;case"plain":t[a].push(ar(u.value));break}break}})}})}),Object.keys(t).forEach(s=>{t[s]=t[s].join(`
280
- `)}),this.textContent=t}isInlineTextNode(t){if(t.contentDisposition?.parsed?.value==="attachment")return!1;switch(t.contentType.parsed?.value){case"text/html":case"text/plain":return!0;default:return!1}}isInlineMessageRfc822(t){return t.contentType.parsed?.value!=="message/rfc822"?!1:(t.contentDisposition?.parsed?.value||(this.options.rfc822Attachments?"attachment":"inline"))==="inline"}forceRfc822Attachments(){if(this.options.forceRfc822Attachments)return!0;let t=!1,o=i=>{i.contentType.multipart||i.contentType.parsed&&["message/delivery-status","message/feedback-report"].includes(i.contentType.parsed.value)&&(t=!0);for(let r of i.childNodes)o(r)};return o(this.root),t}async resolveStream(t){let o=0,i=[],r=t.getReader();for(;;){let{done:a,value:l}=await r.read();if(a)break;i.push(l),o+=l.length}let n=new Uint8Array(o),s=0;for(let a of i)n.set(a,s),s+=a.length;return n}async parse(t){if(this.started)throw new Error("Can not reuse parser, create a new PostalMime object");for(this.started=!0,t&&typeof t.getReader=="function"&&(t=await this.resolveStream(t)),t=t||new ArrayBuffer(0),typeof t=="string"&&(t=ut.encode(t)),(t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]")&&(t=await mt(t)),t.buffer instanceof ArrayBuffer&&(t=new Uint8Array(t).buffer),this.buf=t,this.av=new Uint8Array(t),this.readPos=0;this.readPos<this.av.length;){let r=this.readLine();await this.processLine(r.bytes,r.done)}await this.processNodeTree();let o={headers:this.root.headers.map(r=>({key:r.key,originalKey:r.originalKey,value:r.value})).reverse()};for(let r of["from","sender"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=No(n.value);s&&s.length&&(o[r]=s[0])}}for(let r of["delivered-to","return-path"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=No(n.value);if(s&&s.length&&s[0].address){let a=ur(r);o[a]=s[0].address}}}for(let r of["to","cc","bcc","reply-to"]){let n=this.root.headers.filter(a=>a.key===r),s=[];if(n.filter(a=>a&&a.value).map(a=>No(a.value)).forEach(a=>s=s.concat(a||[])),s&&s.length){let a=ur(r);o[a]=s}}for(let r of["subject","message-id","in-reply-to","references"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=ur(r);o[s]=kt(n.value)}}let i=this.root.headers.find(r=>r.key==="date");if(i){let r=new Date(i.value);r.toString()==="Invalid Date"?r=i.value:r=r.toISOString(),o.date=r}switch(this.textContent?.html&&(o.html=this.textContent.html),this.textContent?.plain&&(o.text=this.textContent.plain),o.attachments=this.attachments,o.headerLines=(this.root.rawHeaderLines||[]).slice().reverse(),this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let n of o.attachments||[])n?.content&&(n.content=ls(n.content),n.encoding="base64");break;case"utf8":let r=new TextDecoder("utf8");for(let n of o.attachments||[])n?.content&&(n.content=r.decode(n.content),n.encoding="utf8");break;default:throw new Error("Unknown attachment encoding")}return o}};var Ks=me(bs(),1),ks=["inbox","archive","spam","sent","trash"],_s=["inbox","archive","spam","trash"],Lo=["cyan","teal","grass","lime","yellow","orange","iris","plum","crimson","bronze","mauve"],gf="6.32.1-preview-inboxes.1";function ae(e,t){let o=$t(t);return o?`${e}?${o}`:e}function $t(e){let t=new URLSearchParams;return e.limit!==void 0&&t.set("limit",e.limit.toString()),"after"in e&&e.after!==void 0&&t.set("after",e.after),"before"in e&&e.before!==void 0&&t.set("before",e.before),t.toString()}var Af=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/api-keys",e,t)}async list(e={},t={}){let o=ae("/api-keys",e);return await this.resend.get(o,t)}async update(e,t,o={}){return await this.resend.patch(`/api-keys/${e}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/api-keys/${e}`,void 0,t)}},bf=class{constructor(e){this.resend=e}async get(e,t={}){return await this.resend.get(`/automations/${e.automationId}/runs/${e.runId}`,t)}async list(e,t={}){let o=$t(e),i=new URLSearchParams(o);if(e.status){let s=Array.isArray(e.status)?e.status.join(","):e.status;i.set("status",s)}let r=i.toString(),n=r?`/automations/${e.automationId}/runs?${r}`:`/automations/${e.automationId}/runs`;return await this.resend.get(n,t)}};function Fs(e){switch(e.type){case"trigger":return{key:e.key,type:e.type,config:{event_name:e.config.eventName}};case"delay":return{key:e.key,type:e.type,config:e.config};case"send_email":return{key:e.key,type:e.type,config:{template:e.config.template,subject:e.config.subject,from:e.config.from,reply_to:e.config.replyTo}};case"wait_for_event":return{key:e.key,type:e.type,config:{event_name:e.config.eventName,timeout:e.config.timeout,filter_rule:e.config.filterRule}};case"condition":return{key:e.key,type:e.type,config:e.config};case"contact_update":return{key:e.key,type:e.type,config:{first_name:e.config.firstName,last_name:e.config.lastName,unsubscribed:e.config.unsubscribed,properties:e.config.properties}};case"contact_delete":return{key:e.key,type:e.type,config:e.config};case"add_to_segment":return{key:e.key,type:e.type,config:{segment_id:e.config.segmentId}}}}function Rs(e){return{from:e.from,to:e.to,type:e.type}}function yf(e){return{name:e.name,status:e.status,steps:e.steps.map(Fs),connections:e.connections.map(Rs)}}function Cf(e){return{event:e.event,contact_id:e.contactId,email:e.email,payload:e.payload}}var xf=class{constructor(e){this.resend=e,this.runs=new bf(this.resend)}async create(e,t={}){return await this.resend.post("/automations",yf(e),t)}async list(e={},t={}){let o=[$t(e)];e.status&&o.push(`status=${encodeURIComponent(e.status)}`);let i=o.filter(Boolean).join("&"),r=i?`/automations?${i}`:"/automations";return await this.resend.get(r,t)}async get(e,t={}){return await this.resend.get(`/automations/${e}`,t)}async remove(e,t={}){return await this.resend.delete(`/automations/${e}`,void 0,t)}async update(e,t,o={}){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.steps!==void 0&&(i.steps=t.steps.map(Fs)),t.connections!==void 0&&(i.connections=t.connections.map(Rs)),await this.resend.patch(`/automations/${e}`,i,o)}async duplicate(e,t={}){return await this.resend.post(`/automations/${e}/duplicate`,void 0,t)}async stop(e,t={}){return await this.resend.post(`/automations/${e}/stop`,void 0,t)}};function wf(e){return e?.map(t=>({content:t.content,filename:t.filename,path:t.path,content_type:t.contentType,content_id:t.contentId}))}function Ds(e){return{attachments:wf(e.attachments),bcc:e.bcc,cc:e.cc,from:e.from,headers:e.headers,html:e.html,reply_to:e.replyTo,scheduled_at:e.scheduledAt,subject:e.subject,tags:e.tags,text:e.text,to:e.to,template:e.template?{id:e.template.id,variables:e.template.variables}:void 0,topic_id:e.topicId}}async function fo(e){let t;try{({render:t}=await import("@react-email/render"))}catch{throw new Error("Failed to render React component. Make sure to install `@react-email/render` or `@react-email/components`.")}return t(e)}var vf=class{constructor(e){this.resend=e}async send(e,t){return this.create(e,t)}async create(e,t){let o=[];for(let r of e)r.react&&(r.html=await fo(r.react),r.react=void 0),o.push(Ds(r));let i=new Headers({"x-batch-validation":t?.batchValidation??"strict"});for(let[r,n]of new Headers(t?.headers||void 0))i.set(r,n);return await this.resend.post("/emails/batch",o,{...t,headers:i})}},Uf=class{constructor(e){this.resend=e}async create(e,t={}){let o=e.react?await fo(e.react):e.html;return await this.resend.post("/broadcasts",{name:e.name,segment_id:e.segmentId,audience_id:e.audienceId,preview_text:e.previewText,from:e.from,html:o,reply_to:e.replyTo,subject:e.subject,text:e.text,topic_id:e.topicId,send:e.send,scheduled_at:e.scheduledAt},t)}async send(e,t,o={}){return await this.resend.post(`/broadcasts/${e}/send`,{scheduled_at:t?.scheduledAt},o)}async list(e={},t={}){let o=ae("/broadcasts",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/broadcasts/${e}`,t)}async recipients(e,t,o={}){let i=`/broadcasts/${e}/recipients?${Sf(t)}`;return await this.resend.get(i,o)}async clickedLinks(e,t={},o={}){let i=ae(`/broadcasts/${e}/clicked-links`,t);return await this.resend.get(i,o)}async remove(e,t={}){return await this.resend.delete(`/broadcasts/${e}`,void 0,t)}async cancel(e,t={}){return await this.resend.post(`/broadcasts/${e}/cancel`,void 0,t)}async duplicate(e,t={}){return await this.resend.post(`/broadcasts/${e}/duplicate`,void 0,t)}async update(e,t,o={}){let i=t.react?await fo(t.react):t.html;return await this.resend.patch(`/broadcasts/${e}`,{name:t.name,segment_id:t.segmentId,audience_id:t.audienceId,from:t.from,html:i,text:t.text,subject:t.subject,reply_to:t.replyTo,preview_text:t.previewText,topic_id:t.topicId},o)}};function Sf(e){let{type:t,email:o,bounceType:i,...r}=e,n=new URLSearchParams($t(r));return n.set("type",t),o!==void 0&&n.set("email",o),i!==void 0&&n.set("bounce_type",i),n.toString()}function ys(e){return{id:e.id,key:e.key,createdAt:e.created_at,type:e.type,fallbackValue:e.fallback_value}}function Cs(e){return"key"in e?{key:e.key,type:e.type,fallback_value:e.fallbackValue}:{fallback_value:e.fallbackValue}}var Kf=class{constructor(e){this.resend=e}async create(e,t={}){let o=Cs(e);return await this.resend.post("/contact-properties",o,t)}async list(e={},t={}){let o=ae("/contact-properties",e),i=await this.resend.get(o,t);return i.data?{data:{...i.data,data:i.data.data.map(r=>ys(r))},headers:i.headers,error:null}:i}async get(e,t={}){if(!e)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let o=await this.resend.get(`/contact-properties/${e}`,t);return o.data?{data:{object:"contact_property",...ys(o.data)},headers:o.headers,error:null}:o}async update(e,t={}){if(!e.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let o=Cs(e);return await this.resend.patch(`/contact-properties/${e.id}`,o,t)}async remove(e,t={}){return e?await this.resend.delete(`/contact-properties/${e}`,void 0,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},kf=class{constructor(e){this.resend=e}async create(e,t={}){let o=this.buildCreateFormData(e);return this.resend.post("/contacts/imports",o,t)}async list(e={},t={}){let o=new URLSearchParams($t(e));e.status!==void 0&&o.set("status",e.status);let i=o.toString(),r=i?`/contacts/imports?${i}`:"/contacts/imports";return this.resend.get(r,t)}async get(e,t={}){return this.resend.get(`/contacts/imports/${e}`,t)}buildCreateFormData(e){let t=new FormData;return t.append("file",e.file),this.appendField(t,"column_map",this.buildColumnMap(e.columnMap??null)),this.appendField(t,"on_conflict",e.onConflict??null),this.appendField(t,"segments",e.segments??null),this.appendField(t,"topics",e.topics??null),t}buildColumnMap(e){return e===null?null:{email:e.email,first_name:e.firstName,last_name:e.lastName,unsubscribed:e.unsubscribed,properties:e.properties}}appendField(e,t,o){o!==null&&e.append(t,typeof o=="string"?o:JSON.stringify(o))}},_f=class{constructor(e){this.resend=e}async list(e,t={}){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=ae(`/contacts/${e.email?e.email:e.contactId}/segments`,e);return await this.resend.get(o,t)}async add(e,t={}){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=e.email?e.email:e.contactId;return this.resend.post(`/contacts/${o}/segments/${e.segmentId}`,void 0,t)}async remove(e,t={}){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=e.email?e.email:e.contactId;return this.resend.delete(`/contacts/${o}/segments/${e.segmentId}`,void 0,t)}},Ff=class{constructor(e){this.resend=e}async update(e,t={}){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=e.email?e.email:e.id;return this.resend.patch(`/contacts/${o}/topics`,e.topics,t)}async list(e,t={}){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=ae(`/contacts/${e.email?e.email:e.id}/topics`,e);return this.resend.get(o,t)}},Rf=class{constructor(e){this.resend=e,this.imports=new kf(this.resend),this.topics=new Ff(this.resend),this.segments=new _f(this.resend)}async create(e,t={}){return"audienceId"in e?"segments"in e||"topics"in e?{data:null,headers:null,error:{message:"`audienceId` is deprecated, and cannot be used together with `segments` or `topics`. Use `segments` instead to add one or more segments to the new contact.",statusCode:null,name:"invalid_parameter"}}:await this.resend.post(`/audiences/${e.audienceId}/contacts`,{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t):await this.resend.post("/contacts",{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties,segments:e.segments,topics:e.topics},t)}async list(e={},t={}){let o=e.segmentId??e.audienceId;if(!o){let r=ae("/contacts",e);return await this.resend.get(r,t)}let i=ae(`/segments/${o}/contacts`,e);return await this.resend.get(i,t)}async get(e,t={}){return typeof e=="string"?this.resend.get(`/contacts/${e}`,t):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.get(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,t):this.resend.get(`/contacts/${e?.email?e?.email:e?.id}`,t)}async update(e,t={}){return!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?await this.resend.patch(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t):await this.resend.patch(`/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t)}async remove(e,t={}){return typeof e=="string"?this.resend.delete(`/contacts/${e}`,void 0,t):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.delete(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,void 0,t):this.resend.delete(`/contacts/${e?.email?e?.email:e?.id}`,void 0,t)}};function Df(e){return{name:e.name,region:e.region,custom_return_path:e.customReturnPath,capabilities:e.capabilities,open_tracking:e.openTracking,click_tracking:e.clickTracking,tls:e.tls,tracking_subdomain:e.trackingSubdomain}}var Tf=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/domains/claim",{name:e.name,region:e.region,custom_return_path:e.customReturnPath,open_tracking:e.openTracking,click_tracking:e.clickTracking,tracking_subdomain:e.trackingSubdomain},t)}async get(e,t={}){return await this.resend.get(`/domains/${e}/claim`,t)}async verify(e,t={}){return await this.resend.post(`/domains/${e}/claim/verify`,void 0,t)}},Of=class{constructor(e){this.resend=e,this.claims=new Tf(this.resend)}async create(e,t={}){return await this.resend.post("/domains",Df(e),t)}async list(e={},t={}){let o=ae("/domains",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/domains/${e}`,t)}async update(e,t={}){return await this.resend.patch(`/domains/${e.id}`,{click_tracking:e.clickTracking,open_tracking:e.openTracking,tls:e.tls,capabilities:e.capabilities,tracking_subdomain:e.trackingSubdomain},t)}async remove(e,t={}){return await this.resend.delete(`/domains/${e}`,void 0,t)}async verify(e,t={}){return await this.resend.post(`/domains/${e}/verify`,void 0,t)}},Ef=class{constructor(e){this.resend=e}async get(e,t={}){let{emailId:o,id:i}=e;return await this.resend.get(`/emails/${o}/attachments/${i}`,t)}async list(e,t={}){let{emailId:o}=e,i=ae(`/emails/${o}/attachments`,e);return await this.resend.get(i,t)}},Bf=class{constructor(e){this.resend=e}async get(e,t={}){let{emailId:o,id:i}=e;return await this.resend.get(`/emails/receiving/${o}/attachments/${i}`,t)}async list(e,t={}){let{emailId:o}=e,i=ae(`/emails/receiving/${o}/attachments`,e);return await this.resend.get(i,t)}},If=class{constructor(e){this.resend=e,this.attachments=new Bf(e)}async get(e,t={},o={}){let i=new URLSearchParams;t.html_format!==void 0&&i.set("html_format",t.html_format);let r=i.toString(),n=r?`/emails/receiving/${e}?${r}`:`/emails/receiving/${e}`;return await this.resend.get(n,o)}async list(e={},t={}){let o=ae("/emails/receiving",e);return await this.resend.get(o,t)}async forward(e,t={}){let{emailId:o,to:i,from:r}=e,n=e.passthrough!==!1,s=await this.get(o,{},{signal:t.signal});if(s.error)return{data:null,error:s.error,headers:s.headers};let a=s.data,l=a.subject||"(no subject)";if(n)return this.forwardPassthrough(a,{to:i,from:r,subject:l},t);let u=l.startsWith("Fwd:")?l:`Fwd: ${l}`;return this.forwardWrapped(a,{to:i,from:r,subject:u,text:"text"in e?e.text:void 0,html:"html"in e?e.html:void 0},t)}async forwardPassthrough(e,t,o){let{to:i,from:r,subject:n}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let s=await this.downloadRaw(e.raw.download_url,o.signal);if(s.error)return{data:null,error:s.error,headers:null};let a=await mo.parse(s.content,{attachmentEncoding:"base64"}),l=a.attachments.map(u=>{let m=u.contentId?u.contentId.replace(/^<|>$/g,""):void 0;return{filename:u.filename,content:u.content.toString(),content_type:u.mimeType,content_id:m||void 0}});return await this.resend.post("/emails",{from:r,to:i,subject:n,text:a.text||void 0,html:a.html||void 0,attachments:l.length>0?l:void 0},o)}async forwardWrapped(e,t,o){let{to:i,from:r,subject:n,text:s,html:a}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let l=await this.downloadRaw(e.raw.download_url,o.signal);return l.error?{data:null,error:l.error,headers:null}:await this.resend.post("/emails",{from:r,to:i,subject:n,text:s,html:a,attachments:[{filename:"forwarded_message.eml",content:Buffer.from(l.content).toString("base64"),content_type:"message/rfc822"}]},o)}async downloadRaw(e,t){try{let o=await fetch(e,{signal:t});return o.ok?{content:await o.text(),error:null}:{content:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:o.status}}}catch{return{content:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:null}}}}},jf=class{constructor(e){this.resend=e,this.attachments=new Ef(e),this.receiving=new If(e)}async send(e,t={}){return this.create(e,t)}async create(e,t={}){let o={...e};return e.react&&(o.html=await fo(e.react)),await this.resend.post("/emails",Ds(o),t)}async get(e,t={}){return await this.resend.get(`/emails/${e}`,t)}async list(e={},t={}){let o=ae("/emails",e);return await this.resend.get(o,t)}async update(e,t={}){return await this.resend.patch(`/emails/${e.id}`,{scheduled_at:e.scheduledAt},t)}async cancel(e,t={}){return await this.resend.post(`/emails/${e}/cancel`,void 0,t)}async share(e,t,o={}){return await this.resend.post(`/emails/${e}/share`,{expires_in:t?.expiresIn},o)}async metrics(e={},t={}){let o=Pf(e),i=o?`/emails/metrics?${o}`:"/emails/metrics";return await this.resend.get(i,t)}};function Pf(e){let t={start_date:e.startDate,end_date:e.endDate,timezone:e.timezone,granularity:e.granularity,metrics:e.metrics?.join(","),dimensions:e.dimensions?.join(","),domain_id:e.domainId?.join(","),email_id:e.emailId?.join(","),broadcast_id:e.broadcastId?.join(",")},o=new URLSearchParams;for(let[i,r]of Object.entries(t))r!==void 0&&r!==""&&o.set(i,r);return o.toString()}var $f=class{constructor(e){this.resend=e}async send(e,t={}){return await this.resend.post("/events/send",Cf(e),t)}async create(e,t={}){return await this.resend.post("/events",e,t)}async get(e,t={}){return await this.resend.get(`/events/${encodeURIComponent(e)}`,t)}async list(e={},t={}){let o=ae("/events",e);return await this.resend.get(o,t)}async update(e,t,o={}){return await this.resend.patch(`/events/${encodeURIComponent(e)}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/events/${encodeURIComponent(e)}`,void 0,t)}};function Ts(e,t={}){let o=new URLSearchParams;t.folder!==void 0&&o.set("folder",t.folder),t.query!==void 0&&o.set("query",t.query),t.from!==void 0&&o.set("from",t.from),t.limit!==void 0&&o.set("limit",String(t.limit)),t.after!==void 0&&o.set("after",t.after),t.before!==void 0&&o.set("before",t.before);let i=t.label===void 0?[]:Array.isArray(t.label)?t.label:[t.label];for(let n of i)o.append("label",n);let r=o.toString();return r?`${e}?${r}`:e}var Gf=class{constructor(e){this.resend=e}async list(e,t={}){let{inboxId:o,limit:i,after:r,before:n}=e,s=Ts(`/inboxes/${o}/drafts`,{limit:i,after:r,before:n});return this.resend.get(s,t)}async create(e,t={}){let{inboxId:o,threadId:i,replyToEmailId:r,...n}=e;return this.resend.post(`/inboxes/${o}/drafts`,{...n,thread_id:i,reply_to_email_id:r},t)}async get(e,t={}){let{inboxId:o,draftId:i}=e;return this.resend.get(`/inboxes/${o}/drafts/${i}`,t)}async update(e,t={}){let{inboxId:o,draftId:i,...r}=e;return this.resend.patch(`/inboxes/${o}/drafts/${i}`,r,t)}async remove(e,t={}){let{inboxId:o,draftId:i}=e;return this.resend.delete(`/inboxes/${o}/drafts/${i}`,void 0,t)}async send(e,t={}){let{inboxId:o,draftId:i}=e;return this.resend.post(`/inboxes/${o}/drafts/${i}/send`,void 0,t)}},Hf=class{constructor(e){this.resend=e}async list(e,t={}){return this.resend.get(`/inboxes/${e.inboxId}/labels`,t)}async create(e,t={}){let{inboxId:o,name:i,color:r}=e;return this.resend.post(`/inboxes/${o}/labels`,{name:i,color:r},t)}async update(e,t={}){let{inboxId:o,labelId:i,name:r,color:n}=e;return this.resend.patch(`/inboxes/${o}/labels/${i}`,{name:r,color:n},t)}async remove(e,t={}){let{inboxId:o,labelId:i}=e;return this.resend.delete(`/inboxes/${o}/labels/${i}`,void 0,t)}},Qf=class{constructor(e){this.resend=e}async list(e,t={}){let{inboxId:o,threadId:i,...r}=e,n=ae(`/inboxes/${o}/threads/${i}/emails`,r);return this.resend.get(n,t)}async get(e,t={}){let{inboxId:o,threadId:i,emailId:r}=e;return this.resend.get(`/inboxes/${o}/threads/${i}/emails/${r}`,t)}async reply(e,t={}){let{inboxId:o,threadId:i,emailId:r,cc:n,bcc:s,html:a,text:l,subject:u}=e;return this.resend.post(`/inboxes/${o}/threads/${i}/emails/${r}/reply`,{cc:n,bcc:s,html:a,text:l,subject:u},t)}async forward(e,t={}){let{inboxId:o,threadId:i,emailId:r,to:n,cc:s,bcc:a,html:l,text:u,subject:m}=e;return this.resend.post(`/inboxes/${o}/threads/${i}/emails/${r}/forward`,{to:n,cc:s,bcc:a,html:l,text:u,subject:m},t)}},Nf=class{constructor(e){this.resend=e,this.emails=new Qf(e)}async list(e,t={}){let{inboxId:o,...i}=e,r=Ts(`/inboxes/${o}/threads`,i);return this.resend.get(r,t)}async get(e,t={}){let{inboxId:o,threadId:i}=e;return this.resend.get(`/inboxes/${o}/threads/${i}`,t)}async update(e,t={}){let{inboxId:o,threadId:i,read:r,folder:n,labelId:s}=e;return this.resend.patch(`/inboxes/${o}/threads/${i}`,{read:r,folder:n,label_id:s},t)}async remove(e,t={}){let{inboxId:o,threadId:i}=e;return this.resend.delete(`/inboxes/${o}/threads/${i}`,void 0,t)}},Mf=class{constructor(e){this.resend=e,this.threads=new Nf(e),this.labels=new Hf(e),this.drafts=new Gf(e)}async create(e,t={}){return this.resend.post("/inboxes",{email_address:e.emailAddress,name:e.name,forwarding:e.forwarding,from_name:e.fromName},t)}async list(e={},t={}){let o=ae("/inboxes",e);return this.resend.get(o,t)}async get(e,t={}){return this.resend.get(`/inboxes/${encodeURIComponent(e)}`,t)}async update(e,t,o={}){return this.resend.patch(`/inboxes/${e}`,{name:t.name,from_name:t.fromName},o)}async remove(e,t={}){return this.resend.delete(`/inboxes/${e}`,void 0,t)}},qf=class{constructor(e){this.resend=e}async list(e={},t={}){let o=ae("/logs",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/logs/${e}`,t)}},Lf=class{constructor(e){this.resend=e}async list(e={},t={}){let o=ae("/oauth/grants",e);return await this.resend.get(o,t)}async revoke(e,t={}){return await this.resend.delete(`/oauth/grants/${e}`,void 0,t)}},Wf=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/segments",e,t)}async list(e={},t={}){let o=ae("/segments",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/segments/${e}`,t)}async update(e,t,o={}){return await this.resend.patch(`/segments/${e}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/segments/${e}`,void 0,t)}},Jf=class{constructor(e){this.resend=e}async add(e,t={}){return this.resend.post("/suppressions/batch/add",e,t)}async remove(e,t={}){return this.resend.post("/suppressions/batch/remove",e,t)}},xs=()=>({data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}),Vf=class{constructor(e){this.resend=e,this.batch=new Jf(e)}async add(e,t={}){return this.resend.post("/suppressions",e,t)}async list(e={},t={}){let o=zf(e),i=o?`/suppressions?${o}`:"/suppressions";return this.resend.get(i,t)}async get(e,t={}){return e?this.resend.get(`/suppressions/${encodeURIComponent(e)}`,t):xs()}async remove(e,t={}){return e?this.resend.delete(`/suppressions/${encodeURIComponent(e)}`,void 0,t):xs()}};function zf(e){let{origin:t,...o}=e,i=new URLSearchParams($t(o));return t&&i.set("origin",t),i.toString()}function Yf(e={}){let t=new URLSearchParams;return e.before&&t.set("before",e.before),e.after&&t.set("after",e.after),e.limit&&t.set("limit",e.limit.toString()),t.size>0?`?${t.toString()}`:""}function Xf(e){return e?.map(t=>({key:t.key,type:t.type,fallback_value:t.fallbackValue}))}function ws(e){return{name:"name"in e?e.name:void 0,subject:e.subject,html:e.html,text:e.text,alias:e.alias,from:e.from,reply_to:e.replyTo,variables:Xf(e.variables)}}var vs=class{constructor(e,t){this.promise=e,this.publishFn=t}then(e,t){return this.promise.then(e,t)}async publish(e={}){let{data:t,error:o}=await this.promise;return o?{data:null,headers:null,error:o}:this.publishFn(t.id,e)}},Zf=class{constructor(e){this.resend=e}create(e,t={}){return new vs(this.performCreate(e,t),this.publish.bind(this))}async performCreate(e,t){let o={...e};return e.react&&(o.html=await fo(e.react)),this.resend.post("/templates",ws(o),t)}async remove(e,t={}){return await this.resend.delete(`/templates/${e}`,void 0,t)}async get(e,t={}){return await this.resend.get(`/templates/${e}`,t)}async list(e={},t={}){return this.resend.get(`/templates${Yf(e)}`,t)}duplicate(e,t={}){return new vs(this.resend.post(`/templates/${e}/duplicate`,void 0,t),this.publish.bind(this))}async publish(e,t={}){return await this.resend.post(`/templates/${e}/publish`,void 0,t)}async update(e,t,o={}){return await this.resend.patch(`/templates/${e}`,ws(t),o)}},eh=class{constructor(e){this.resend=e}async create(e,t={}){let{defaultSubscription:o,...i}=e;return await this.resend.post("/topics",{...i,default_subscription:o},t)}async list(e={}){return await this.resend.get("/topics",e)}async get(e,t={}){return e?await this.resend.get(`/topics/${e}`,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async update(e,t={}){return e.id?await this.resend.patch(`/topics/${e.id}`,e,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async remove(e,t={}){return e?await this.resend.delete(`/topics/${e}`,void 0,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},th=class{constructor(e){this.resend=e}async get(e={}){return await this.resend.get("/usage",e)}},oh=class{constructor(e){this.resend=e}async list(e,t={}){let{webhookId:o,eventId:i}=e,r=ae(`/webhooks/${o}/events/${i}/attempts`,e);return await this.resend.get(r,t)}},ih=class{constructor(e){this.resend=e,this.attempts=new oh(e)}async list(e,t={}){let{webhookId:o}=e,i=ae(`/webhooks/${o}/events`,e);return await this.resend.get(i,t)}async get(e,t={}){let{webhookId:o,eventId:i}=e;return await this.resend.get(`/webhooks/${o}/events/${i}`,t)}async replay(e,t={}){let{webhookId:o,eventId:i}=e;return await this.resend.post(`/webhooks/${o}/events/${i}/replay`,void 0,t)}},rh=class{constructor(e){this.resend=e,this.events=new ih(e)}async create(e,t={}){return await this.resend.post("/webhooks",e,t)}async get(e,t={}){return await this.resend.get(`/webhooks/${e}`,t)}async list(e={},t={}){let o=ae("/webhooks",e);return await this.resend.get(o,t)}async update(e,t,o={}){return await this.resend.patch(`/webhooks/${e}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/webhooks/${e}`,void 0,t)}async rotateSigningSecret(e,t={}){return await this.resend.post(`/webhooks/${e}/signing-secret/rotate`,void 0,t)}verify(e){return new Ks.Webhook(e.webhookSecret).verify(e.payload,{"webhook-id":e.headers.id,"webhook-timestamp":e.headers.timestamp,"webhook-signature":e.headers.signature})}},Us="https://api.resend.com",Ss=`resend-node:${gf}`;function nh(){return typeof process<"u"&&process.env&&process.env.RESEND_BASE_URL||Us}function sh(){return typeof process<"u"&&process.env&&process.env.RESEND_USER_AGENT||Ss}var Gt=class{constructor(e,t){if(this.key=e,this.segments=new Wf(this),this.apiKeys=new Af(this),this.audiences=this.segments,this.automations=new xf(this),this.batch=new vf(this),this.broadcasts=new Uf(this),this.contactProperties=new Kf(this),this.contacts=new Rf(this),this.domains=new Of(this),this.emails=new jf(this),this.events=new $f(this),this.inboxes=new Mf(this),this.logs=new qf(this),this.oauthGrants=new Lf(this),this.suppressions=new Vf(this),this.templates=new Zf(this),this.topics=new eh(this),this.usage=new th(this),this.webhooks=new rh(this),!e&&(typeof process<"u"&&process.env&&(this.key=process.env.RESEND_API_KEY),!this.key))throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`');this.baseUrl=t?.baseUrl??nh(),this.userAgent=t?.userAgent??sh(),this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":this.userAgent,"Content-Type":"application/json"})}logError(e,t,o){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&console.error("[Resend API Error]:",{...o!==void 0&&{status:o},error:e,path:t})}async fetchRequest(e,t={}){let{signal:o}=t;try{let i=await fetch(`${this.baseUrl}${e}`,t);if(!i.ok)try{let r=await i.text(),n=JSON.parse(r);return this.logError(n,e,i.status),{data:null,error:n,headers:Object.fromEntries(i.headers.entries())}}catch(r){if(o?.aborted&&r===o.reason)throw r;if(r instanceof SyntaxError){let s={name:"application_error",statusCode:i.status,message:"Internal server error. We are unable to process your request right now, please try again later."};return this.logError(s,e,i.status),{data:null,error:s,headers:Object.fromEntries(i.headers.entries())}}let n={message:i.statusText,statusCode:i.status,name:"application_error"};if(r instanceof Error){let s={...n,message:r.message};return this.logError(s,e,i.status),{data:null,error:s,headers:Object.fromEntries(i.headers.entries())}}return this.logError(n,e,i.status),{data:null,error:n,headers:Object.fromEntries(i.headers.entries())}}return{data:await i.json(),error:null,headers:Object.fromEntries(i.headers.entries())}}catch{let i={name:"application_error",statusCode:null,message:"Unable to fetch data. The request could not be resolved."};return this.logError(i,e),{data:null,error:i,headers:null}}}async post(e,t,o={}){let i=new Headers(this.headers),r=typeof FormData<"u"&&t instanceof FormData;if(r&&i.delete("Content-Type"),o.headers)for(let[s,a]of new Headers(o.headers).entries())i.set(s,a);o.idempotencyKey&&i.set("Idempotency-Key",o.idempotencyKey);let n={method:"POST",body:r?t:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,n)}async get(e,t={}){let o=new Headers(this.headers);if(t.headers)for(let[r,n]of new Headers(t.headers).entries())o.set(r,n);let i={method:"GET",...t,headers:o};return this.fetchRequest(e,i)}async put(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"PUT",body:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}async patch(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"PATCH",body:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}async delete(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"DELETE",body:t===void 0?void 0:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}};ye();var Tr=me(Je(),1);function W(e,t){return e instanceof Error?e.message:t}function ma(e){return!!(e||!process.stdout.isTTY)}function N(e,t={}){ma(t.json)?console.log(JSON.stringify(e,null,2)):console.log(typeof e=="string"?e:JSON.stringify(e,null,2)),t.exitCode!==void 0&&process.exit(t.exitCode)}var Ch=new Set(["content-type","retry-after"]);function xh(e){let t={};for(let[o,i]of Object.entries(e)){let r=o.toLowerCase();(Ch.has(r)||r.startsWith("x-"))&&(t[r]=i)}return t}function h(e,t={}){let o=t.exitCode??1,i=e.headers&&Object.keys(e.headers).length>0?xh(e.headers):void 0,r=i!==void 0&&Object.keys(i).length>0;if(ma(t.json)){let n={message:e.message,code:e.code??"unknown"};typeof e.statusCode=="number"&&(n.statusCode=e.statusCode),r&&(n.headers=i),typeof e.body=="string"&&e.body.length>0&&(n.body=e.body),console.error(JSON.stringify({error:n},null,2))}else{console.error(`${Tr.default.red("Error:")} ${e.message}`);let n=[];if(typeof e.statusCode=="number"&&n.push(`HTTP ${e.statusCode}`),r)for(let[s,a]of Object.entries(i))n.push(`${s}: ${a}`);n.length>0&&console.error(Tr.default.dim(`[${n.join("; ")}]`))}process.exit(o)}var pa={sending_access:0,full_access:1};function wh(e,t){return pa[e]>=pa[t]}async function ee(e,t){let o=e.profile;try{let i=await Rt(e.apiKey,o);if(!i){if(o){let s=Fe();if(!s.some(l=>l.name===o))throw new Error(`Profile "${o}" not found. Available profiles: ${s.map(l=>l.name).join(", ")||"(none)"}`)}throw new Error("No API key found. Set RESEND_API_KEY, use --api-key, or run: resend login")}let r;if(i.type==="api_key")r=i.permission;else{let s=i.scope.split(" ").filter(Boolean);s.includes("full_access")?r="full_access":s.includes("emails:send")?r="sending_access":h({message:`Unrecognized credential scope${i.scope?` "${i.scope}"`:""}. Run \`resend login\` to re-authenticate.`,code:"unrecognized_scope"},{json:e.json})}if(r){let s=t?.permission??"full_access";wh(r,s)||h({message:`This command requires full access. Your current credential has sending access only.
281
- ${Qt}`,code:"insufficient_permissions"},{json:e.json})}let n=i.type==="api_key"?i.key:i.access_token;return new Gt(n)}catch(i){h({message:W(i,"Failed to create client"),code:"auth_error"},{json:e.json})}}var fa=130;function vh(){process.stderr.isTTY&&process.stderr.write("\r\x1B[2K"),console.error("Cancelled."),process.exit(fa)}var Nt;function ha(){Nt=vh,process.on("SIGINT",Nt),process.on("uncaughtException",e=>{h({message:W(e,"An unexpected error occurred"),code:"unexpected_error"},{}),process.exit(1)})}function ri(e){Nt&&process.removeListener("SIGINT",Nt),Nt=e,process.on("SIGINT",Nt)}function Mt(){return fa}ye();var ni=me(Je(),1);X();var ga=[1,2,4],Uh=ga.length,Sh=new Set(["internal_server_error","service_unavailable","gateway_timeout"]),Kh=(e,t)=>!!(e==="rate_limit_exceeded"||t&&e!==void 0&&Sh.has(e)),kh=e=>{let t=e?.["retry-after"];if(!t)return;let o=Number(t);if(Number.isFinite(o)&&o>=0)return o;let i=Date.parse(t);if(!Number.isNaN(i)){let r=(i-Date.now())/1e3;return r>0?r:0}},_h=e=>new Promise(t=>setTimeout(t,e)),bo=async(e,t,o=0)=>{let i=await e(),r=t?.retryTransient??!1;if(i.error&&o<Uh&&Kh(i.error.name,r)){let n=kh(i.headers)??ga[o];return t?.onRetry?.(o,n,i.error.name??""),await _h(n*1e3),bo(e,t,o+1)}return i};var Aa=(e,t)=>new Promise((o,i)=>{let r=setTimeout(()=>{i(new Error(`Request timed out after ${t/1e3}s`))},t);r.unref(),e.then(n=>{clearTimeout(r),o(n)},n=>{clearTimeout(r),i(n)})});var Rh=st?String.fromCodePoint(10004):"v",Dh=st?String.fromCodePoint(9888):"!",Th=st?String.fromCodePoint(10007):"x",Oh=["\u2839","\u2838","\u2834","\u2826","\u2807","\u280F","\u2819","\u2839"],Eh=80;async function ce(e,t,o,i,r={}){let n=le(e,i.quiet);try{let{data:s,error:a,headers:l}=await bo(()=>Aa(t(),3e4),{retryTransient:r.retryTransient,onRetry:(u,m,p)=>{n.update(p==="rate_limit_exceeded"?`Rate limited, retrying in ${m}s...`:`Server error, retrying in ${m}s...`)}});return a&&(n.stop(),h({message:a.message,code:o,statusCode:a.statusCode,headers:l},{json:i.json})),s===null&&(n.stop(),h({message:"Unexpected empty response",code:o,headers:l},{json:i.json})),n.stop(),s}catch(s){return n.stop(),h({message:W(s,"Unknown error"),code:o},{json:i.json})}}function le(e,t){if(t||!w())return{update(a){},stop(a){},clear(){},warn(a){},fail(a){}};let o=st?Oh:["-","\\","|","/"],i=Eh,r=0,n=e,s=setInterval(()=>{process.stderr.write(`\r\x1B[2K ${o[r++%o.length]} ${n}`)},i);return{update(a){n=a},stop(a){clearInterval(s),a?process.stderr.write(`\r\x1B[2K ${ni.default.green(Rh)} ${a}
282
- `):process.stderr.write("\r\x1B[2K")},clear(){clearInterval(s),process.stderr.write("\r\x1B[2K")},warn(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${ni.default.yellow(Dh)} ${a}
283
- `)},fail(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${ni.default.red(Th)} ${a}
284
- `)}}}X();function O(e){Jn(e),process.exit(Mt())}async function si(e,t,o){(!w()||o.json)&&h({message:"Use --yes to confirm deletion in non-interactive mode.",code:"confirmation_required"},{json:o.json});let i=await Ze({message:t});(F(i)||!i)&&O("Deletion cancelled.")}async function ai(e,t){let o=ue(e);if(!o)return e;if(!w()||t.json)return h({message:`Profile "${e}" has an invalid name: ${o}`,code:"invalid_profile_name"},{json:t.json}),null;te.warn(`Profile "${e}" has an invalid name: ${o}`);let i=await Z({message:"Enter a new name for this profile:",placeholder:e.replace(/[^a-zA-Z0-9._-]/g,"-"),validate:r=>ue(r)});F(i)&&O("Rename cancelled.");try{await ii(e,i)}catch(r){return h({message:W(r,"Failed to rename profile"),code:"rename_failed"},{json:t.json}),null}return te.success(`Profile renamed to '${i}'.`),i}async function E(e,t,o,i){if(e!==void 0)return e;(!w()||i.json)&&h(o,{json:i.json});let r=await Z({message:t.message,placeholder:t.placeholder,defaultValue:t.defaultValue,validate:t.validate??(n=>!t.defaultValue&&(!n||n.length===0)?`${t.message} is required`:void 0)});return F(r)&&O("Cancelled."),r}async function bt(e,t,o,i){if(e!==void 0)return e;(!w()||i.json)&&h(o,{json:i.json});let r=await ne({message:t.message,options:t.options});return F(r)&&O("Cancelled."),r}async function Ca(e,t,o){let i=t.filter(s=>s.required!==!1&&e[s.flag]==="");if(i.length>0){let s=i.map(a=>`--${a.flag}`).join(", ");h({message:`Empty value for required flags: ${s}`,code:"invalid_options"},{json:o.json})}let r=t.filter(s=>s.required!==!1&&!e[s.flag]);if(r.length===0)return e;if(!w()||o.json){let s=r.map(a=>`--${a.flag}`).join(", ");h({message:`Missing required flags: ${s}`,code:"missing_flags"},{json:o.json})}let n=await Wn(Object.fromEntries(r.map(s=>[s.flag,()=>Z({message:s.message,placeholder:s.placeholder,defaultValue:s.defaultValue,validate:s.validate??(a=>!s.defaultValue&&(!a||a.length===0)?`${s.message} is required`:void 0)})])),{onCancel:()=>O("Operation cancelled.")});return{...e,...n}}var Bh=20,ba="__fetch_more__",ya="__none__";async function J(e,t,o,i){if(e)return{id:e,label:e};let r=i?.optional??!1;if(!w()||o.json){if(r)return;h({message:"Missing required argument: id",code:"missing_id"},{json:o.json})}let n=await ee(o,t.permission?{permission:t.permission}:void 0),s=[];for(;;){let a=s.at(-1)?.id,l=le(s.length===0?`Fetching ${t.resourcePlural}...`:`Fetching more ${t.resourcePlural}...`,o.quiet),u=await t.fetchItems(n,{limit:Bh,...a&&{after:a}});if(u.error||!u.data){if(r){l.clear();return}l.fail(`Failed to fetch ${t.resourcePlural}`),h({message:u.error?.message??"Unexpected empty response",code:"list_error"},{json:o.json})}s.push(...u.data.data);let m=u.data.has_more??!1,p=t.filter?s.filter(t.filter):s;if(p.length===0&&!m&&r){l.clear();return}if(l.stop(s.length===p.length?`${t.resourcePlural} fetched`:`More ${t.resourcePlural} fetched`),p.length===0&&!m&&(te.warn(`No ${t.resourcePlural} found.`),h({message:`No ${t.resourcePlural} found.`,code:"no_items"},{json:o.json})),p.length===0&&m&&!r)continue;let f=p.map(b=>({item:b,...t.display(b)})),y=f.map(({item:b,label:x,hint:v})=>({value:b.id,label:x,hint:v}));r&&y.unshift({value:ya,label:"None"}),m&&y.push({value:ba,label:"Fetch more..."});let A=await ne({message:`Select a ${t.resource}`,options:y});if(F(A)&&O("Cancelled."),A===ya)return;if(A!==ba){let b=f.find(({item:x})=>x.id===A);return{id:A,label:b?.label??A}}}}async function g(e,t,o,i){return(await J(e,t,o,i))?.id}var xa=require("node:util"),Ih=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]|\r(?!\n)/g,pe=e=>(0,xa.stripVTControlCharacters)(String(e)).replace(Ih,"");function qt(e){return typeof e=="string"?pe(e):Array.isArray(e)?e.map(qt):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([t,o])=>[t,qt(o)])):e}X();async function j(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await ce(e.loading,()=>e.sdkCall(i),"fetch_error",t,{retryTransient:!0});!t.json&&w()?e.onInteractive(qt(r)):N(r,{json:t.json})}async function z(e,t,o,i){let r=o.permission?{permission:o.permission}:void 0,n=await ee(i,r);t||await si(e,o.confirmMessage,i),await ce(o.loading,()=>o.sdkCall(n),"delete_error",i),!i.json&&w()?console.log(o.successMsg):N({object:o.object,id:e,deleted:!0},{json:i.json})}async function P(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await ce(e.loading,()=>e.sdkCall(i),"create_error",t);!t.json&&w()?e.onInteractive(qt(r)):N(r,{json:t.json})}async function R(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await ce(e.loading,()=>e.sdkCall(i),e.errorCode,t,{retryTransient:e.retryTransient});!t.json&&w()?console.log(e.successMsg):N(r,{json:t.json})}async function S(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await ce(e.loading,()=>e.sdkCall(i),"list_error",t,{retryTransient:!0});!t.json&&w()?e.onInteractive(qt(r)):N(r,{json:t.json})}X();X();var fe=st?{h:String.fromCodePoint(9472),v:String.fromCodePoint(9474),tl:String.fromCodePoint(9484),tr:String.fromCodePoint(9488),bl:String.fromCodePoint(9492),br:String.fromCodePoint(9496),lm:String.fromCodePoint(9500),rm:String.fromCodePoint(9508),tm:String.fromCodePoint(9516),bm:String.fromCodePoint(9524),mm:String.fromCodePoint(9532)}:{h:"-",v:"|",tl:"+",tr:"+",bl:"+",br:"+",lm:"+",rm:"+",tm:"+",bm:"+",mm:"+"};function jh(){return process.stdout.columns}function Ph(e,t,o){let i=Math.max(...e.map(n=>n.length)),r=Math.max(20,Math.min(o,60));return t.map((n,s)=>{let a=String(s+1),l=`${fe.h}${fe.h} ${a} ${fe.h.repeat(Math.max(0,r-a.length-4))}`,u=e.map((m,p)=>` ${m.padEnd(i)} ${n[p]}`);return[l,...u].join(`
279
+ `);f.content=ut.encode(y);break}default:f.content=s.content}this.attachments.push(f)}}for(let u of s.childNodes)await n(u,a,l)};await n(this.root,!1,!1),i.forEach(s=>{o.forEach(a=>{if(t[a]||(t[a]=[]),s[a])s[a].forEach(l=>{switch(l.type){case"text":t[a].push(l.value);break;case"subMessage":switch(a){case"html":t[a].push(dr(l.value));break;case"plain":t[a].push(lr(l.value));break}break}});else{let l;switch(a){case"html":l="plain";break;case"plain":l="html";break}(s[l]||[]).forEach(u=>{switch(u.type){case"text":switch(a){case"html":t[a].push(ns(u.value));break;case"plain":t[a].push(ss(u.value));break}break;case"subMessage":switch(a){case"html":t[a].push(dr(u.value));break;case"plain":t[a].push(lr(u.value));break}break}})}})}),Object.keys(t).forEach(s=>{t[s]=t[s].join(`
280
+ `)}),this.textContent=t}isInlineTextNode(t){if(t.contentDisposition?.parsed?.value==="attachment")return!1;switch(t.contentType.parsed?.value){case"text/html":case"text/plain":return!0;default:return!1}}isInlineMessageRfc822(t){return t.contentType.parsed?.value!=="message/rfc822"?!1:(t.contentDisposition?.parsed?.value||(this.options.rfc822Attachments?"attachment":"inline"))==="inline"}forceRfc822Attachments(){if(this.options.forceRfc822Attachments)return!0;let t=!1,o=i=>{i.contentType.multipart||i.contentType.parsed&&["message/delivery-status","message/feedback-report"].includes(i.contentType.parsed.value)&&(t=!0);for(let r of i.childNodes)o(r)};return o(this.root),t}async resolveStream(t){let o=0,i=[],r=t.getReader();for(;;){let{done:a,value:l}=await r.read();if(a)break;i.push(l),o+=l.length}let n=new Uint8Array(o),s=0;for(let a of i)n.set(a,s),s+=a.length;return n}async parse(t){if(this.started)throw new Error("Can not reuse parser, create a new PostalMime object");for(this.started=!0,t&&typeof t.getReader=="function"&&(t=await this.resolveStream(t)),t=t||new ArrayBuffer(0),typeof t=="string"&&(t=ut.encode(t)),(t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]")&&(t=await mt(t)),t.buffer instanceof ArrayBuffer&&(t=new Uint8Array(t).buffer),this.buf=t,this.av=new Uint8Array(t),this.readPos=0;this.readPos<this.av.length;){let r=this.readLine();await this.processLine(r.bytes,r.done)}await this.processNodeTree();let o={headers:this.root.headers.map(r=>({key:r.key,originalKey:r.originalKey,value:r.value})).reverse()};for(let r of["from","sender"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=No(n.value);s&&s.length&&(o[r]=s[0])}}for(let r of["delivered-to","return-path"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=No(n.value);if(s&&s.length&&s[0].address){let a=mr(r);o[a]=s[0].address}}}for(let r of["to","cc","bcc","reply-to"]){let n=this.root.headers.filter(a=>a.key===r),s=[];if(n.filter(a=>a&&a.value).map(a=>No(a.value)).forEach(a=>s=s.concat(a||[])),s&&s.length){let a=mr(r);o[a]=s}}for(let r of["subject","message-id","in-reply-to","references"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=mr(r);o[s]=kt(n.value)}}let i=this.root.headers.find(r=>r.key==="date");if(i){let r=new Date(i.value);r.toString()==="Invalid Date"?r=i.value:r=r.toISOString(),o.date=r}switch(this.textContent?.html&&(o.html=this.textContent.html),this.textContent?.plain&&(o.text=this.textContent.plain),o.attachments=this.attachments,o.headerLines=(this.root.rawHeaderLines||[]).slice().reverse(),this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let n of o.attachments||[])n?.content&&(n.content=ds(n.content),n.encoding="base64");break;case"utf8":let r=new TextDecoder("utf8");for(let n of o.attachments||[])n?.content&&(n.content=r.decode(n.content),n.encoding="utf8");break;default:throw new Error("Unknown attachment encoding")}return o}};var ks=me(ys(),1),Lo=["draft_reply","forward_thread","add_labels","assign_thread","mark_as_spam","archive_thread","delete_thread"],_s=["inbox","archive","spam","sent","trash"],Fs=["inbox","archive","spam","trash"],Wo=["cyan","teal","grass","lime","yellow","orange","iris","plum","crimson","bronze","mauve"],Cf="6.32.1-preview-inboxes.3";function ae(e,t){let o=$t(t);return o?`${e}?${o}`:e}function $t(e){let t=new URLSearchParams;return e.limit!==void 0&&t.set("limit",e.limit.toString()),"after"in e&&e.after!==void 0&&t.set("after",e.after),"before"in e&&e.before!==void 0&&t.set("before",e.before),t.toString()}var xf=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/api-keys",e,t)}async list(e={},t={}){let o=ae("/api-keys",e);return await this.resend.get(o,t)}async update(e,t,o={}){return await this.resend.patch(`/api-keys/${e}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/api-keys/${e}`,void 0,t)}},wf=class{constructor(e){this.resend=e}async get(e,t={}){return await this.resend.get(`/automations/${e.automationId}/runs/${e.runId}`,t)}async list(e,t={}){let o=$t(e),i=new URLSearchParams(o);if(e.status){let s=Array.isArray(e.status)?e.status.join(","):e.status;i.set("status",s)}let r=i.toString(),n=r?`/automations/${e.automationId}/runs?${r}`:`/automations/${e.automationId}/runs`;return await this.resend.get(n,t)}};function Rs(e){switch(e.type){case"trigger":return{key:e.key,type:e.type,config:{event_name:e.config.eventName}};case"delay":return{key:e.key,type:e.type,config:e.config};case"send_email":return{key:e.key,type:e.type,config:{template:e.config.template,subject:e.config.subject,from:e.config.from,reply_to:e.config.replyTo}};case"wait_for_event":return{key:e.key,type:e.type,config:{event_name:e.config.eventName,timeout:e.config.timeout,filter_rule:e.config.filterRule}};case"condition":return{key:e.key,type:e.type,config:e.config};case"contact_update":return{key:e.key,type:e.type,config:{first_name:e.config.firstName,last_name:e.config.lastName,unsubscribed:e.config.unsubscribed,properties:e.config.properties}};case"contact_delete":return{key:e.key,type:e.type,config:e.config};case"add_to_segment":return{key:e.key,type:e.type,config:{segment_id:e.config.segmentId}}}}function Ds(e){return{from:e.from,to:e.to,type:e.type}}function vf(e){return{name:e.name,status:e.status,steps:e.steps.map(Rs),connections:e.connections.map(Ds)}}function Uf(e){return{event:e.event,contact_id:e.contactId,email:e.email,payload:e.payload}}var Sf=class{constructor(e){this.resend=e,this.runs=new wf(this.resend)}async create(e,t={}){return await this.resend.post("/automations",vf(e),t)}async list(e={},t={}){let o=[$t(e)];e.status&&o.push(`status=${encodeURIComponent(e.status)}`);let i=o.filter(Boolean).join("&"),r=i?`/automations?${i}`:"/automations";return await this.resend.get(r,t)}async get(e,t={}){return await this.resend.get(`/automations/${e}`,t)}async remove(e,t={}){return await this.resend.delete(`/automations/${e}`,void 0,t)}async update(e,t,o={}){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.steps!==void 0&&(i.steps=t.steps.map(Rs)),t.connections!==void 0&&(i.connections=t.connections.map(Ds)),await this.resend.patch(`/automations/${e}`,i,o)}async duplicate(e,t={}){return await this.resend.post(`/automations/${e}/duplicate`,void 0,t)}async stop(e,t={}){return await this.resend.post(`/automations/${e}/stop`,void 0,t)}};function Kf(e){return e?.map(t=>({content:t.content,filename:t.filename,path:t.path,content_type:t.contentType,content_id:t.contentId}))}function Ts(e){return{attachments:Kf(e.attachments),bcc:e.bcc,cc:e.cc,from:e.from,headers:e.headers,html:e.html,reply_to:e.replyTo,scheduled_at:e.scheduledAt,subject:e.subject,tags:e.tags,text:e.text,to:e.to,template:e.template?{id:e.template.id,variables:e.template.variables}:void 0,topic_id:e.topicId}}async function fo(e){let t;try{({render:t}=await import("@react-email/render"))}catch{throw new Error("Failed to render React component. Make sure to install `@react-email/render` or `@react-email/components`.")}return t(e)}var kf=class{constructor(e){this.resend=e}async send(e,t){return this.create(e,t)}async create(e,t){let o=[];for(let r of e)r.react&&(r.html=await fo(r.react),r.react=void 0),o.push(Ts(r));let i=new Headers({"x-batch-validation":t?.batchValidation??"strict"});for(let[r,n]of new Headers(t?.headers||void 0))i.set(r,n);return await this.resend.post("/emails/batch",o,{...t,headers:i})}},_f=class{constructor(e){this.resend=e}async create(e,t={}){let o=e.react?await fo(e.react):e.html;return await this.resend.post("/broadcasts",{name:e.name,segment_id:e.segmentId,audience_id:e.audienceId,preview_text:e.previewText,from:e.from,html:o,reply_to:e.replyTo,subject:e.subject,text:e.text,topic_id:e.topicId,send:e.send,scheduled_at:e.scheduledAt},t)}async send(e,t,o={}){return await this.resend.post(`/broadcasts/${e}/send`,{scheduled_at:t?.scheduledAt},o)}async list(e={},t={}){let o=ae("/broadcasts",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/broadcasts/${e}`,t)}async recipients(e,t,o={}){let i=`/broadcasts/${e}/recipients?${Ff(t)}`;return await this.resend.get(i,o)}async clickedLinks(e,t={},o={}){let i=ae(`/broadcasts/${e}/clicked-links`,t);return await this.resend.get(i,o)}async remove(e,t={}){return await this.resend.delete(`/broadcasts/${e}`,void 0,t)}async cancel(e,t={}){return await this.resend.post(`/broadcasts/${e}/cancel`,void 0,t)}async duplicate(e,t={}){return await this.resend.post(`/broadcasts/${e}/duplicate`,void 0,t)}async update(e,t,o={}){let i=t.react?await fo(t.react):t.html;return await this.resend.patch(`/broadcasts/${e}`,{name:t.name,segment_id:t.segmentId,audience_id:t.audienceId,from:t.from,html:i,text:t.text,subject:t.subject,reply_to:t.replyTo,preview_text:t.previewText,topic_id:t.topicId},o)}};function Ff(e){let{type:t,email:o,bounceType:i,...r}=e,n=new URLSearchParams($t(r));return n.set("type",t),o!==void 0&&n.set("email",o),i!==void 0&&n.set("bounce_type",i),n.toString()}function Cs(e){return{id:e.id,key:e.key,createdAt:e.created_at,type:e.type,fallbackValue:e.fallback_value}}function xs(e){return"key"in e?{key:e.key,type:e.type,fallback_value:e.fallbackValue}:{fallback_value:e.fallbackValue}}var Rf=class{constructor(e){this.resend=e}async create(e,t={}){let o=xs(e);return await this.resend.post("/contact-properties",o,t)}async list(e={},t={}){let o=ae("/contact-properties",e),i=await this.resend.get(o,t);return i.data?{data:{...i.data,data:i.data.data.map(r=>Cs(r))},headers:i.headers,error:null}:i}async get(e,t={}){if(!e)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let o=await this.resend.get(`/contact-properties/${e}`,t);return o.data?{data:{object:"contact_property",...Cs(o.data)},headers:o.headers,error:null}:o}async update(e,t={}){if(!e.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let o=xs(e);return await this.resend.patch(`/contact-properties/${e.id}`,o,t)}async remove(e,t={}){return e?await this.resend.delete(`/contact-properties/${e}`,void 0,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},Df=class{constructor(e){this.resend=e}async create(e,t={}){let o=this.buildCreateFormData(e);return this.resend.post("/contacts/imports",o,t)}async list(e={},t={}){let o=new URLSearchParams($t(e));e.status!==void 0&&o.set("status",e.status);let i=o.toString(),r=i?`/contacts/imports?${i}`:"/contacts/imports";return this.resend.get(r,t)}async get(e,t={}){return this.resend.get(`/contacts/imports/${e}`,t)}buildCreateFormData(e){let t=new FormData;return t.append("file",e.file),this.appendField(t,"column_map",this.buildColumnMap(e.columnMap??null)),this.appendField(t,"on_conflict",e.onConflict??null),this.appendField(t,"segments",e.segments??null),this.appendField(t,"topics",e.topics??null),t}buildColumnMap(e){return e===null?null:{email:e.email,first_name:e.firstName,last_name:e.lastName,unsubscribed:e.unsubscribed,properties:e.properties}}appendField(e,t,o){o!==null&&e.append(t,typeof o=="string"?o:JSON.stringify(o))}},Tf=class{constructor(e){this.resend=e}async list(e,t={}){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=ae(`/contacts/${e.email?e.email:e.contactId}/segments`,e);return await this.resend.get(o,t)}async add(e,t={}){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=e.email?e.email:e.contactId;return this.resend.post(`/contacts/${o}/segments/${e.segmentId}`,void 0,t)}async remove(e,t={}){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=e.email?e.email:e.contactId;return this.resend.delete(`/contacts/${o}/segments/${e.segmentId}`,void 0,t)}},Of=class{constructor(e){this.resend=e}async update(e,t={}){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=e.email?e.email:e.id;return this.resend.patch(`/contacts/${o}/topics`,e.topics,t)}async list(e,t={}){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let o=ae(`/contacts/${e.email?e.email:e.id}/topics`,e);return this.resend.get(o,t)}},Ef=class{constructor(e){this.resend=e,this.imports=new Df(this.resend),this.topics=new Of(this.resend),this.segments=new Tf(this.resend)}async create(e,t={}){return"audienceId"in e?"segments"in e||"topics"in e?{data:null,headers:null,error:{message:"`audienceId` is deprecated, and cannot be used together with `segments` or `topics`. Use `segments` instead to add one or more segments to the new contact.",statusCode:null,name:"invalid_parameter"}}:await this.resend.post(`/audiences/${e.audienceId}/contacts`,{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t):await this.resend.post("/contacts",{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties,segments:e.segments,topics:e.topics},t)}async list(e={},t={}){let o=e.segmentId??e.audienceId;if(!o){let r=ae("/contacts",e);return await this.resend.get(r,t)}let i=ae(`/segments/${o}/contacts`,e);return await this.resend.get(i,t)}async get(e,t={}){return typeof e=="string"?this.resend.get(`/contacts/${e}`,t):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.get(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,t):this.resend.get(`/contacts/${e?.email?e?.email:e?.id}`,t)}async update(e,t={}){return!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?await this.resend.patch(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t):await this.resend.patch(`/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t)}async remove(e,t={}){return typeof e=="string"?this.resend.delete(`/contacts/${e}`,void 0,t):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.delete(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,void 0,t):this.resend.delete(`/contacts/${e?.email?e?.email:e?.id}`,void 0,t)}};function Bf(e){return{name:e.name,region:e.region,custom_return_path:e.customReturnPath,capabilities:e.capabilities,open_tracking:e.openTracking,click_tracking:e.clickTracking,tls:e.tls,tracking_subdomain:e.trackingSubdomain}}var If=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/domains/claim",{name:e.name,region:e.region,custom_return_path:e.customReturnPath,open_tracking:e.openTracking,click_tracking:e.clickTracking,tracking_subdomain:e.trackingSubdomain},t)}async get(e,t={}){return await this.resend.get(`/domains/${e}/claim`,t)}async verify(e,t={}){return await this.resend.post(`/domains/${e}/claim/verify`,void 0,t)}},jf=class{constructor(e){this.resend=e,this.claims=new If(this.resend)}async create(e,t={}){return await this.resend.post("/domains",Bf(e),t)}async list(e={},t={}){let o=ae("/domains",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/domains/${e}`,t)}async update(e,t={}){return await this.resend.patch(`/domains/${e.id}`,{click_tracking:e.clickTracking,open_tracking:e.openTracking,tls:e.tls,capabilities:e.capabilities,tracking_subdomain:e.trackingSubdomain},t)}async remove(e,t={}){return await this.resend.delete(`/domains/${e}`,void 0,t)}async verify(e,t={}){return await this.resend.post(`/domains/${e}/verify`,void 0,t)}},Pf=class{constructor(e){this.resend=e}async get(e,t={}){let{emailId:o,id:i}=e;return await this.resend.get(`/emails/${o}/attachments/${i}`,t)}async list(e,t={}){let{emailId:o}=e,i=ae(`/emails/${o}/attachments`,e);return await this.resend.get(i,t)}},$f=class{constructor(e){this.resend=e}async get(e,t={}){let{emailId:o,id:i}=e;return await this.resend.get(`/emails/receiving/${o}/attachments/${i}`,t)}async list(e,t={}){let{emailId:o}=e,i=ae(`/emails/receiving/${o}/attachments`,e);return await this.resend.get(i,t)}},Gf=class{constructor(e){this.resend=e,this.attachments=new $f(e)}async get(e,t={},o={}){let i=new URLSearchParams;t.html_format!==void 0&&i.set("html_format",t.html_format);let r=i.toString(),n=r?`/emails/receiving/${e}?${r}`:`/emails/receiving/${e}`;return await this.resend.get(n,o)}async list(e={},t={}){let o=ae("/emails/receiving",e);return await this.resend.get(o,t)}async forward(e,t={}){let{emailId:o,to:i,from:r}=e,n=e.passthrough!==!1,s=await this.get(o,{},{signal:t.signal});if(s.error)return{data:null,error:s.error,headers:s.headers};let a=s.data,l=a.subject||"(no subject)";if(n)return this.forwardPassthrough(a,{to:i,from:r,subject:l},t);let u=l.startsWith("Fwd:")?l:`Fwd: ${l}`;return this.forwardWrapped(a,{to:i,from:r,subject:u,text:"text"in e?e.text:void 0,html:"html"in e?e.html:void 0},t)}async forwardPassthrough(e,t,o){let{to:i,from:r,subject:n}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let s=await this.downloadRaw(e.raw.download_url,o.signal);if(s.error)return{data:null,error:s.error,headers:null};let a=await mo.parse(s.content,{attachmentEncoding:"base64"}),l=a.attachments.map(u=>{let m=u.contentId?u.contentId.replace(/^<|>$/g,""):void 0;return{filename:u.filename,content:u.content.toString(),content_type:u.mimeType,content_id:m||void 0}});return await this.resend.post("/emails",{from:r,to:i,subject:n,text:a.text||void 0,html:a.html||void 0,attachments:l.length>0?l:void 0},o)}async forwardWrapped(e,t,o){let{to:i,from:r,subject:n,text:s,html:a}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let l=await this.downloadRaw(e.raw.download_url,o.signal);return l.error?{data:null,error:l.error,headers:null}:await this.resend.post("/emails",{from:r,to:i,subject:n,text:s,html:a,attachments:[{filename:"forwarded_message.eml",content:Buffer.from(l.content).toString("base64"),content_type:"message/rfc822"}]},o)}async downloadRaw(e,t){try{let o=await fetch(e,{signal:t});return o.ok?{content:await o.text(),error:null}:{content:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:o.status}}}catch{return{content:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:null}}}}},Hf=class{constructor(e){this.resend=e,this.attachments=new Pf(e),this.receiving=new Gf(e)}async send(e,t={}){return this.create(e,t)}async create(e,t={}){let o={...e};return e.react&&(o.html=await fo(e.react)),await this.resend.post("/emails",Ts(o),t)}async get(e,t={}){return await this.resend.get(`/emails/${e}`,t)}async list(e={},t={}){let o=ae("/emails",e);return await this.resend.get(o,t)}async update(e,t={}){return await this.resend.patch(`/emails/${e.id}`,{scheduled_at:e.scheduledAt},t)}async cancel(e,t={}){return await this.resend.post(`/emails/${e}/cancel`,void 0,t)}async share(e,t,o={}){return await this.resend.post(`/emails/${e}/share`,{expires_in:t?.expiresIn},o)}async metrics(e={},t={}){let o=Qf(e),i=o?`/emails/metrics?${o}`:"/emails/metrics";return await this.resend.get(i,t)}};function Qf(e){let t={start_date:e.startDate,end_date:e.endDate,timezone:e.timezone,granularity:e.granularity,metrics:e.metrics?.join(","),dimensions:e.dimensions?.join(","),domain_id:e.domainId?.join(","),email_id:e.emailId?.join(","),broadcast_id:e.broadcastId?.join(",")},o=new URLSearchParams;for(let[i,r]of Object.entries(t))r!==void 0&&r!==""&&o.set(i,r);return o.toString()}var Nf=class{constructor(e){this.resend=e}async send(e,t={}){return await this.resend.post("/events/send",Uf(e),t)}async create(e,t={}){return await this.resend.post("/events",e,t)}async get(e,t={}){return await this.resend.get(`/events/${encodeURIComponent(e)}`,t)}async list(e={},t={}){let o=ae("/events",e);return await this.resend.get(o,t)}async update(e,t,o={}){return await this.resend.patch(`/events/${encodeURIComponent(e)}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/events/${encodeURIComponent(e)}`,void 0,t)}},Mf=class{constructor(e){this.resend=e}async get(e,t={}){return this.resend.get(`/inboxes/${e.inboxId}/agent`,t)}async update(e,t={}){let{inboxId:o,instructions:i,tone:r,enabledActions:n}=e;return this.resend.patch(`/inboxes/${o}/agent`,{instructions:i,tone:r,enabled_actions:n},t)}};function Os(e,t={}){let o=new URLSearchParams;t.folder!==void 0&&o.set("folder",t.folder),t.query!==void 0&&o.set("query",t.query),t.from!==void 0&&o.set("from",t.from),t.limit!==void 0&&o.set("limit",String(t.limit)),t.after!==void 0&&o.set("after",t.after),t.before!==void 0&&o.set("before",t.before);let i=t.label===void 0?[]:Array.isArray(t.label)?t.label:[t.label];for(let n of i)o.append("label",n);let r=o.toString();return r?`${e}?${r}`:e}var qf=class{constructor(e){this.resend=e}async list(e,t={}){let{inboxId:o,limit:i,after:r,before:n}=e,s=Os(`/inboxes/${o}/drafts`,{limit:i,after:r,before:n});return this.resend.get(s,t)}async create(e,t={}){let{inboxId:o,threadId:i,replyToEmailId:r,...n}=e;return this.resend.post(`/inboxes/${o}/drafts`,{...n,thread_id:i,reply_to_email_id:r},t)}async get(e,t={}){let{inboxId:o,draftId:i}=e;return this.resend.get(`/inboxes/${o}/drafts/${i}`,t)}async update(e,t={}){let{inboxId:o,draftId:i,...r}=e;return this.resend.patch(`/inboxes/${o}/drafts/${i}`,r,t)}async remove(e,t={}){let{inboxId:o,draftId:i}=e;return this.resend.delete(`/inboxes/${o}/drafts/${i}`,void 0,t)}async send(e,t={}){let{inboxId:o,draftId:i}=e;return this.resend.post(`/inboxes/${o}/drafts/${i}/send`,void 0,t)}},Lf=class{constructor(e){this.resend=e}async list(e,t={}){return this.resend.get(`/inboxes/${e.inboxId}/labels`,t)}async create(e,t={}){let{inboxId:o,name:i,color:r}=e;return this.resend.post(`/inboxes/${o}/labels`,{name:i,color:r},t)}async update(e,t={}){let{inboxId:o,labelId:i,name:r,color:n}=e;return this.resend.patch(`/inboxes/${o}/labels/${i}`,{name:r,color:n},t)}async remove(e,t={}){let{inboxId:o,labelId:i}=e;return this.resend.delete(`/inboxes/${o}/labels/${i}`,void 0,t)}},Wf=class{constructor(e){this.resend=e}async list(e,t={}){let{inboxId:o,threadId:i,...r}=e,n=ae(`/inboxes/${o}/threads/${i}/emails`,r);return this.resend.get(n,t)}async get(e,t={}){let{inboxId:o,threadId:i,emailId:r}=e;return this.resend.get(`/inboxes/${o}/threads/${i}/emails/${r}`,t)}async reply(e,t={}){let{inboxId:o,threadId:i,emailId:r,cc:n,bcc:s,html:a,text:l,subject:u}=e;return this.resend.post(`/inboxes/${o}/threads/${i}/emails/${r}/reply`,{cc:n,bcc:s,html:a,text:l,subject:u},t)}async forward(e,t={}){let{inboxId:o,threadId:i,emailId:r,to:n,cc:s,bcc:a,html:l,text:u,subject:m}=e;return this.resend.post(`/inboxes/${o}/threads/${i}/emails/${r}/forward`,{to:n,cc:s,bcc:a,html:l,text:u,subject:m},t)}},Jf=class{constructor(e){this.resend=e,this.emails=new Wf(e)}async list(e,t={}){let{inboxId:o,...i}=e,r=Os(`/inboxes/${o}/threads`,i);return this.resend.get(r,t)}async get(e,t={}){let{inboxId:o,threadId:i}=e;return this.resend.get(`/inboxes/${o}/threads/${i}`,t)}async update(e,t={}){let{inboxId:o,threadId:i,read:r,folder:n,labelId:s}=e;return this.resend.patch(`/inboxes/${o}/threads/${i}`,{read:r,folder:n,label_id:s},t)}async remove(e,t={}){let{inboxId:o,threadId:i}=e;return this.resend.delete(`/inboxes/${o}/threads/${i}`,void 0,t)}},Vf=class{constructor(e){this.resend=e,this.threads=new Jf(e),this.labels=new Lf(e),this.drafts=new qf(e),this.agent=new Mf(e)}async create(e,t={}){return this.resend.post("/inboxes",{email_address:e.emailAddress,name:e.name,forwarding:e.forwarding,from_name:e.fromName},t)}async list(e={},t={}){let o=ae("/inboxes",e);return this.resend.get(o,t)}async get(e,t={}){return this.resend.get(`/inboxes/${encodeURIComponent(e)}`,t)}async update(e,t,o={}){return this.resend.patch(`/inboxes/${e}`,{name:t.name,from_name:t.fromName},o)}async remove(e,t={}){return this.resend.delete(`/inboxes/${e}`,void 0,t)}},zf=class{constructor(e){this.resend=e}async list(e={},t={}){let o=ae("/logs",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/logs/${e}`,t)}},Yf=class{constructor(e){this.resend=e}async list(e={},t={}){let o=ae("/oauth/grants",e);return await this.resend.get(o,t)}async revoke(e,t={}){return await this.resend.delete(`/oauth/grants/${e}`,void 0,t)}},Xf=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/segments",e,t)}async list(e={},t={}){let o=ae("/segments",e);return await this.resend.get(o,t)}async get(e,t={}){return await this.resend.get(`/segments/${e}`,t)}async update(e,t,o={}){return await this.resend.patch(`/segments/${e}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/segments/${e}`,void 0,t)}},Zf=class{constructor(e){this.resend=e}async add(e,t={}){return this.resend.post("/suppressions/batch/add",e,t)}async remove(e,t={}){return this.resend.post("/suppressions/batch/remove",e,t)}},ws=()=>({data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}),eh=class{constructor(e){this.resend=e,this.batch=new Zf(e)}async add(e,t={}){return this.resend.post("/suppressions",e,t)}async list(e={},t={}){let o=th(e),i=o?`/suppressions?${o}`:"/suppressions";return this.resend.get(i,t)}async get(e,t={}){return e?this.resend.get(`/suppressions/${encodeURIComponent(e)}`,t):ws()}async remove(e,t={}){return e?this.resend.delete(`/suppressions/${encodeURIComponent(e)}`,void 0,t):ws()}};function th(e){let{origin:t,...o}=e,i=new URLSearchParams($t(o));return t&&i.set("origin",t),i.toString()}function oh(e={}){let t=new URLSearchParams;return e.before&&t.set("before",e.before),e.after&&t.set("after",e.after),e.limit&&t.set("limit",e.limit.toString()),t.size>0?`?${t.toString()}`:""}function ih(e){return e?.map(t=>({key:t.key,type:t.type,fallback_value:t.fallbackValue}))}function vs(e){return{name:"name"in e?e.name:void 0,subject:e.subject,html:e.html,text:e.text,alias:e.alias,from:e.from,reply_to:e.replyTo,variables:ih(e.variables)}}var Us=class{constructor(e,t){this.promise=e,this.publishFn=t}then(e,t){return this.promise.then(e,t)}async publish(e={}){let{data:t,error:o}=await this.promise;return o?{data:null,headers:null,error:o}:this.publishFn(t.id,e)}},rh=class{constructor(e){this.resend=e}create(e,t={}){return new Us(this.performCreate(e,t),this.publish.bind(this))}async performCreate(e,t){let o={...e};return e.react&&(o.html=await fo(e.react)),this.resend.post("/templates",vs(o),t)}async remove(e,t={}){return await this.resend.delete(`/templates/${e}`,void 0,t)}async get(e,t={}){return await this.resend.get(`/templates/${e}`,t)}async list(e={},t={}){return this.resend.get(`/templates${oh(e)}`,t)}duplicate(e,t={}){return new Us(this.resend.post(`/templates/${e}/duplicate`,void 0,t),this.publish.bind(this))}async publish(e,t={}){return await this.resend.post(`/templates/${e}/publish`,void 0,t)}async update(e,t,o={}){return await this.resend.patch(`/templates/${e}`,vs(t),o)}},nh=class{constructor(e){this.resend=e}async create(e,t={}){let{defaultSubscription:o,...i}=e;return await this.resend.post("/topics",{...i,default_subscription:o},t)}async list(e={}){return await this.resend.get("/topics",e)}async get(e,t={}){return e?await this.resend.get(`/topics/${e}`,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async update(e,t={}){return e.id?await this.resend.patch(`/topics/${e.id}`,e,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async remove(e,t={}){return e?await this.resend.delete(`/topics/${e}`,void 0,t):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},sh=class{constructor(e){this.resend=e}async get(e={}){return await this.resend.get("/usage",e)}},ah=class{constructor(e){this.resend=e}async list(e,t={}){let{webhookId:o,eventId:i}=e,r=ae(`/webhooks/${o}/events/${i}/attempts`,e);return await this.resend.get(r,t)}},lh=class{constructor(e){this.resend=e,this.attempts=new ah(e)}async list(e,t={}){let{webhookId:o}=e,i=ae(`/webhooks/${o}/events`,e);return await this.resend.get(i,t)}async get(e,t={}){let{webhookId:o,eventId:i}=e;return await this.resend.get(`/webhooks/${o}/events/${i}`,t)}async replay(e,t={}){let{webhookId:o,eventId:i}=e;return await this.resend.post(`/webhooks/${o}/events/${i}/replay`,void 0,t)}},dh=class{constructor(e){this.resend=e,this.events=new lh(e)}async create(e,t={}){return await this.resend.post("/webhooks",e,t)}async get(e,t={}){return await this.resend.get(`/webhooks/${e}`,t)}async list(e={},t={}){let o=ae("/webhooks",e);return await this.resend.get(o,t)}async update(e,t,o={}){return await this.resend.patch(`/webhooks/${e}`,t,o)}async remove(e,t={}){return await this.resend.delete(`/webhooks/${e}`,void 0,t)}async rotateSigningSecret(e,t={}){return await this.resend.post(`/webhooks/${e}/signing-secret/rotate`,void 0,t)}verify(e){return new ks.Webhook(e.webhookSecret).verify(e.payload,{"webhook-id":e.headers.id,"webhook-timestamp":e.headers.timestamp,"webhook-signature":e.headers.signature})}},Ss="https://api.resend.com",Ks=`resend-node:${Cf}`;function ch(){return typeof process<"u"&&process.env&&process.env.RESEND_BASE_URL||Ss}function uh(){return typeof process<"u"&&process.env&&process.env.RESEND_USER_AGENT||Ks}var Gt=class{constructor(e,t){if(this.key=e,this.segments=new Xf(this),this.apiKeys=new xf(this),this.audiences=this.segments,this.automations=new Sf(this),this.batch=new kf(this),this.broadcasts=new _f(this),this.contactProperties=new Rf(this),this.contacts=new Ef(this),this.domains=new jf(this),this.emails=new Hf(this),this.events=new Nf(this),this.inboxes=new Vf(this),this.logs=new zf(this),this.oauthGrants=new Yf(this),this.suppressions=new eh(this),this.templates=new rh(this),this.topics=new nh(this),this.usage=new sh(this),this.webhooks=new dh(this),!e&&(typeof process<"u"&&process.env&&(this.key=process.env.RESEND_API_KEY),!this.key))throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`');this.baseUrl=t?.baseUrl??ch(),this.userAgent=t?.userAgent??uh(),this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":this.userAgent,"Content-Type":"application/json"})}logError(e,t,o){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&console.error("[Resend API Error]:",{...o!==void 0&&{status:o},error:e,path:t})}async fetchRequest(e,t={}){let{signal:o}=t;try{let i=await fetch(`${this.baseUrl}${e}`,t);if(!i.ok)try{let r=await i.text(),n=JSON.parse(r);return this.logError(n,e,i.status),{data:null,error:n,headers:Object.fromEntries(i.headers.entries())}}catch(r){if(o?.aborted&&r===o.reason)throw r;if(r instanceof SyntaxError){let s={name:"application_error",statusCode:i.status,message:"Internal server error. We are unable to process your request right now, please try again later."};return this.logError(s,e,i.status),{data:null,error:s,headers:Object.fromEntries(i.headers.entries())}}let n={message:i.statusText,statusCode:i.status,name:"application_error"};if(r instanceof Error){let s={...n,message:r.message};return this.logError(s,e,i.status),{data:null,error:s,headers:Object.fromEntries(i.headers.entries())}}return this.logError(n,e,i.status),{data:null,error:n,headers:Object.fromEntries(i.headers.entries())}}return{data:await i.json(),error:null,headers:Object.fromEntries(i.headers.entries())}}catch{let i={name:"application_error",statusCode:null,message:"Unable to fetch data. The request could not be resolved."};return this.logError(i,e),{data:null,error:i,headers:null}}}async post(e,t,o={}){let i=new Headers(this.headers),r=typeof FormData<"u"&&t instanceof FormData;if(r&&i.delete("Content-Type"),o.headers)for(let[s,a]of new Headers(o.headers).entries())i.set(s,a);o.idempotencyKey&&i.set("Idempotency-Key",o.idempotencyKey);let n={method:"POST",body:r?t:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,n)}async get(e,t={}){let o=new Headers(this.headers);if(t.headers)for(let[r,n]of new Headers(t.headers).entries())o.set(r,n);let i={method:"GET",...t,headers:o};return this.fetchRequest(e,i)}async put(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"PUT",body:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}async patch(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"PATCH",body:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}async delete(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"DELETE",body:t===void 0?void 0:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}};ye();var Or=me(Je(),1);function W(e,t){return e instanceof Error?e.message:t}function pa(e){return!!(e||!process.stdout.isTTY)}function M(e,t={}){pa(t.json)?console.log(JSON.stringify(e,null,2)):console.log(typeof e=="string"?e:JSON.stringify(e,null,2)),t.exitCode!==void 0&&process.exit(t.exitCode)}var Sh=new Set(["content-type","retry-after"]);function Kh(e){let t={};for(let[o,i]of Object.entries(e)){let r=o.toLowerCase();(Sh.has(r)||r.startsWith("x-"))&&(t[r]=i)}return t}function h(e,t={}){let o=t.exitCode??1,i=e.headers&&Object.keys(e.headers).length>0?Kh(e.headers):void 0,r=i!==void 0&&Object.keys(i).length>0;if(pa(t.json)){let n={message:e.message,code:e.code??"unknown"};typeof e.statusCode=="number"&&(n.statusCode=e.statusCode),r&&(n.headers=i),typeof e.body=="string"&&e.body.length>0&&(n.body=e.body),console.error(JSON.stringify({error:n},null,2))}else{console.error(`${Or.default.red("Error:")} ${e.message}`);let n=[];if(typeof e.statusCode=="number"&&n.push(`HTTP ${e.statusCode}`),r)for(let[s,a]of Object.entries(i))n.push(`${s}: ${a}`);n.length>0&&console.error(Or.default.dim(`[${n.join("; ")}]`))}process.exit(o)}var fa={sending_access:0,full_access:1};function kh(e,t){return fa[e]>=fa[t]}async function ee(e,t){let o=e.profile;try{let i=await Rt(e.apiKey,o);if(!i){if(o){let s=Fe();if(!s.some(l=>l.name===o))throw new Error(`Profile "${o}" not found. Available profiles: ${s.map(l=>l.name).join(", ")||"(none)"}`)}throw new Error("No API key found. Set RESEND_API_KEY, use --api-key, or run: resend login")}let r;if(i.type==="api_key")r=i.permission;else{let s=i.scope.split(" ").filter(Boolean);s.includes("full_access")?r="full_access":s.includes("emails:send")?r="sending_access":h({message:`Unrecognized credential scope${i.scope?` "${i.scope}"`:""}. Run \`resend login\` to re-authenticate.`,code:"unrecognized_scope"},{json:e.json})}if(r){let s=t?.permission??"full_access";kh(r,s)||h({message:`This command requires full access. Your current credential has sending access only.
281
+ ${Qt}`,code:"insufficient_permissions"},{json:e.json})}let n=i.type==="api_key"?i.key:i.access_token;return new Gt(n)}catch(i){h({message:W(i,"Failed to create client"),code:"auth_error"},{json:e.json})}}var ha=130;function _h(){process.stderr.isTTY&&process.stderr.write("\r\x1B[2K"),console.error("Cancelled."),process.exit(ha)}var Nt;function ga(){Nt=_h,process.on("SIGINT",Nt),process.on("uncaughtException",e=>{h({message:W(e,"An unexpected error occurred"),code:"unexpected_error"},{}),process.exit(1)})}function ni(e){Nt&&process.removeListener("SIGINT",Nt),Nt=e,process.on("SIGINT",Nt)}function Mt(){return ha}ye();var si=me(Je(),1);X();var Aa=[1,2,4],Fh=Aa.length,Rh=new Set(["internal_server_error","service_unavailable","gateway_timeout"]),Dh=(e,t)=>!!(e==="rate_limit_exceeded"||t&&e!==void 0&&Rh.has(e)),Th=e=>{let t=e?.["retry-after"];if(!t)return;let o=Number(t);if(Number.isFinite(o)&&o>=0)return o;let i=Date.parse(t);if(!Number.isNaN(i)){let r=(i-Date.now())/1e3;return r>0?r:0}},Oh=e=>new Promise(t=>setTimeout(t,e)),bo=async(e,t,o=0)=>{let i=await e(),r=t?.retryTransient??!1;if(i.error&&o<Fh&&Dh(i.error.name,r)){let n=Th(i.headers)??Aa[o];return t?.onRetry?.(o,n,i.error.name??""),await Oh(n*1e3),bo(e,t,o+1)}return i};var ba=(e,t)=>new Promise((o,i)=>{let r=setTimeout(()=>{i(new Error(`Request timed out after ${t/1e3}s`))},t);r.unref(),e.then(n=>{clearTimeout(r),o(n)},n=>{clearTimeout(r),i(n)})});var Bh=st?String.fromCodePoint(10004):"v",Ih=st?String.fromCodePoint(9888):"!",jh=st?String.fromCodePoint(10007):"x",Ph=["\u2839","\u2838","\u2834","\u2826","\u2807","\u280F","\u2819","\u2839"],$h=80;async function de(e,t,o,i,r={}){let n=le(e,i.quiet);try{let{data:s,error:a,headers:l}=await bo(()=>ba(t(),3e4),{retryTransient:r.retryTransient,onRetry:(u,m,p)=>{n.update(p==="rate_limit_exceeded"?`Rate limited, retrying in ${m}s...`:`Server error, retrying in ${m}s...`)}});return a&&(n.stop(),h({message:a.message,code:o,statusCode:a.statusCode,headers:l},{json:i.json})),s===null&&(n.stop(),h({message:"Unexpected empty response",code:o,headers:l},{json:i.json})),n.stop(),s}catch(s){return n.stop(),h({message:W(s,"Unknown error"),code:o},{json:i.json})}}function le(e,t){if(t||!w())return{update(a){},stop(a){},clear(){},warn(a){},fail(a){}};let o=st?Ph:["-","\\","|","/"],i=$h,r=0,n=e,s=setInterval(()=>{process.stderr.write(`\r\x1B[2K ${o[r++%o.length]} ${n}`)},i);return{update(a){n=a},stop(a){clearInterval(s),a?process.stderr.write(`\r\x1B[2K ${si.default.green(Bh)} ${a}
282
+ `):process.stderr.write("\r\x1B[2K")},clear(){clearInterval(s),process.stderr.write("\r\x1B[2K")},warn(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${si.default.yellow(Ih)} ${a}
283
+ `)},fail(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${si.default.red(jh)} ${a}
284
+ `)}}}X();function O(e){Vn(e),process.exit(Mt())}async function ai(e,t,o){(!w()||o.json)&&h({message:"Use --yes to confirm deletion in non-interactive mode.",code:"confirmation_required"},{json:o.json});let i=await Ze({message:t});(R(i)||!i)&&O("Deletion cancelled.")}async function li(e,t){let o=ue(e);if(!o)return e;if(!w()||t.json)return h({message:`Profile "${e}" has an invalid name: ${o}`,code:"invalid_profile_name"},{json:t.json}),null;te.warn(`Profile "${e}" has an invalid name: ${o}`);let i=await Z({message:"Enter a new name for this profile:",placeholder:e.replace(/[^a-zA-Z0-9._-]/g,"-"),validate:r=>ue(r)});R(i)&&O("Rename cancelled.");try{await ri(e,i)}catch(r){return h({message:W(r,"Failed to rename profile"),code:"rename_failed"},{json:t.json}),null}return te.success(`Profile renamed to '${i}'.`),i}async function E(e,t,o,i){if(e!==void 0)return e;(!w()||i.json)&&h(o,{json:i.json});let r=await Z({message:t.message,placeholder:t.placeholder,defaultValue:t.defaultValue,validate:t.validate??(n=>!t.defaultValue&&(!n||n.length===0)?`${t.message} is required`:void 0)});return R(r)&&O("Cancelled."),r}async function bt(e,t,o,i){if(e!==void 0)return e;(!w()||i.json)&&h(o,{json:i.json});let r=await ne({message:t.message,options:t.options});return R(r)&&O("Cancelled."),r}async function xa(e,t,o){let i=t.filter(s=>s.required!==!1&&e[s.flag]==="");if(i.length>0){let s=i.map(a=>`--${a.flag}`).join(", ");h({message:`Empty value for required flags: ${s}`,code:"invalid_options"},{json:o.json})}let r=t.filter(s=>s.required!==!1&&!e[s.flag]);if(r.length===0)return e;if(!w()||o.json){let s=r.map(a=>`--${a.flag}`).join(", ");h({message:`Missing required flags: ${s}`,code:"missing_flags"},{json:o.json})}let n=await Jn(Object.fromEntries(r.map(s=>[s.flag,()=>Z({message:s.message,placeholder:s.placeholder,defaultValue:s.defaultValue,validate:s.validate??(a=>!s.defaultValue&&(!a||a.length===0)?`${s.message} is required`:void 0)})])),{onCancel:()=>O("Operation cancelled.")});return{...e,...n}}var Gh=20,ya="__fetch_more__",Ca="__none__";async function J(e,t,o,i){if(e)return{id:e,label:e};let r=i?.optional??!1;if(!w()||o.json){if(r)return;h({message:"Missing required argument: id",code:"missing_id"},{json:o.json})}let n=await ee(o,t.permission?{permission:t.permission}:void 0),s=[];for(;;){let a=s.at(-1)?.id,l=le(s.length===0?`Fetching ${t.resourcePlural}...`:`Fetching more ${t.resourcePlural}...`,o.quiet),u=await t.fetchItems(n,{limit:Gh,...a&&{after:a}});if(u.error||!u.data){if(r){l.clear();return}l.fail(`Failed to fetch ${t.resourcePlural}`),h({message:u.error?.message??"Unexpected empty response",code:"list_error"},{json:o.json})}s.push(...u.data.data);let m=u.data.has_more??!1,p=t.filter?s.filter(t.filter):s;if(p.length===0&&!m&&r){l.clear();return}if(l.stop(s.length===p.length?`${t.resourcePlural} fetched`:`More ${t.resourcePlural} fetched`),p.length===0&&!m&&(te.warn(`No ${t.resourcePlural} found.`),h({message:`No ${t.resourcePlural} found.`,code:"no_items"},{json:o.json})),p.length===0&&m&&!r)continue;let f=p.map(b=>({item:b,...t.display(b)})),y=f.map(({item:b,label:x,hint:v})=>({value:b.id,label:x,hint:v}));r&&y.unshift({value:Ca,label:"None"}),m&&y.push({value:ya,label:"Fetch more..."});let A=await ne({message:`Select a ${t.resource}`,options:y});if(R(A)&&O("Cancelled."),A===Ca)return;if(A!==ya){let b=f.find(({item:x})=>x.id===A);return{id:A,label:b?.label??A}}}}async function g(e,t,o,i){return(await J(e,t,o,i))?.id}var wa=require("node:util"),Hh=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]|\r(?!\n)/g,pe=e=>(0,wa.stripVTControlCharacters)(String(e)).replace(Hh,"");function qt(e){return typeof e=="string"?pe(e):Array.isArray(e)?e.map(qt):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([t,o])=>[t,qt(o)])):e}X();async function B(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await de(e.loading,()=>e.sdkCall(i),"fetch_error",t,{retryTransient:!0});!t.json&&w()?e.onInteractive(qt(r)):M(r,{json:t.json})}async function z(e,t,o,i){let r=o.permission?{permission:o.permission}:void 0,n=await ee(i,r);t||await ai(e,o.confirmMessage,i),await de(o.loading,()=>o.sdkCall(n),"delete_error",i),!i.json&&w()?console.log(o.successMsg):M({object:o.object,id:e,deleted:!0},{json:i.json})}async function P(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await de(e.loading,()=>e.sdkCall(i),"create_error",t);!t.json&&w()?e.onInteractive(qt(r)):M(r,{json:t.json})}async function F(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await de(e.loading,()=>e.sdkCall(i),e.errorCode,t,{retryTransient:e.retryTransient});!t.json&&w()?console.log(e.successMsg):M(r,{json:t.json})}async function S(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await ee(t,o),r=await de(e.loading,()=>e.sdkCall(i),"list_error",t,{retryTransient:!0});!t.json&&w()?e.onInteractive(qt(r)):M(r,{json:t.json})}X();X();var fe=st?{h:String.fromCodePoint(9472),v:String.fromCodePoint(9474),tl:String.fromCodePoint(9484),tr:String.fromCodePoint(9488),bl:String.fromCodePoint(9492),br:String.fromCodePoint(9496),lm:String.fromCodePoint(9500),rm:String.fromCodePoint(9508),tm:String.fromCodePoint(9516),bm:String.fromCodePoint(9524),mm:String.fromCodePoint(9532)}:{h:"-",v:"|",tl:"+",tr:"+",bl:"+",br:"+",lm:"+",rm:"+",tm:"+",bm:"+",mm:"+"};function Qh(){return process.stdout.columns}function Nh(e,t,o){let i=Math.max(...e.map(n=>n.length)),r=Math.max(20,Math.min(o,60));return t.map((n,s)=>{let a=String(s+1),l=`${fe.h}${fe.h} ${a} ${fe.h.repeat(Math.max(0,r-a.length-4))}`,u=e.map((m,p)=>` ${m.padEnd(i)} ${n[p]}`);return[l,...u].join(`
285
285
  `)}).join(`
286
286
 
287
- `)}function _(e,t,o="(no results)"){if(t.length===0)return o;let i=t.map(m=>m.map(pe)),r=e.map((m,p)=>Math.max(m.length,...i.map(f=>f[p].length))),n=jh();if(n!==void 0&&r.reduce((p,f)=>p+f,0)+3*r.length+1>n)return Ph(e,i,n);let s=fe.tl+r.map(m=>fe.h.repeat(m+2)).join(fe.tm)+fe.tr,a=fe.lm+r.map(m=>fe.h.repeat(m+2)).join(fe.mm)+fe.rm,l=fe.bl+r.map(m=>fe.h.repeat(m+2)).join(fe.bm)+fe.br,u=m=>fe.v+" "+m.map((p,f)=>p.padEnd(r[f])).join(` ${fe.v} `)+" "+fe.v;return[s,u(e),a,...i.map(u),l].join(`
288
- `)}X();var Or=st?String.fromCodePoint(9472):"-";function li(e,t){return e.length===0?"(no DNS records)":e.map(i=>{let r=i.name?i.name.includes(".")?i.name:`${i.name}.${t}`:t;return[`${Or}${Or} ${i.type} ${Or.repeat(40)}`,` Name ${r}`,` TTL ${i.ttl}`,` Value ${i.value}`].join(`
287
+ `)}function _(e,t,o="(no results)"){if(t.length===0)return o;let i=t.map(m=>m.map(pe)),r=e.map((m,p)=>Math.max(m.length,...i.map(f=>f[p].length))),n=Qh();if(n!==void 0&&r.reduce((p,f)=>p+f,0)+3*r.length+1>n)return Nh(e,i,n);let s=fe.tl+r.map(m=>fe.h.repeat(m+2)).join(fe.tm)+fe.tr,a=fe.lm+r.map(m=>fe.h.repeat(m+2)).join(fe.mm)+fe.rm,l=fe.bl+r.map(m=>fe.h.repeat(m+2)).join(fe.bm)+fe.br,u=m=>fe.v+" "+m.map((p,f)=>p.padEnd(r[f])).join(` ${fe.v} `)+" "+fe.v;return[s,u(e),a,...i.map(u),l].join(`
288
+ `)}X();var Er=st?String.fromCodePoint(9472):"-";function di(e,t){return e.length===0?"(no DNS records)":e.map(i=>{let r=i.name?i.name.includes(".")?i.name:`${i.name}.${t}`:t;return[`${Er}${Er} ${i.type} ${Er.repeat(40)}`,` Name ${r}`,` TTL ${i.ttl}`,` Value ${i.value}`].join(`
289
289
  `)}).join(`
290
290
 
291
- `)}function wa(e){let t=e.map(o=>[o.name,o.status,o.region,o.id]);return _(["Name","Status","Region","ID"],t,"(no domains)")}function va(e){switch(e){case"verified":return"\u2713 Verified";case"pending":return"\u23F3 Pending";case"not_started":return"\u25CB Not started";case"partially_verified":return"\u25D0 Partially verified";case"partially_failed":return"\u25D0 Partially failed";case"failed":case"temporary_failure":return"\u2717 Failed";default:return e}}var De={resource:"domain",resourcePlural:"domains",fetchItems:(e,{limit:t,after:o})=>e.domains.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var Ua=new c("create").description("Create a new API key and display the token (shown once \u2014 store it immediately)").option("--name <name>","API key name").addOption(new q("--permission <permission>","Permission level").choices(["full_access","sending_access"])).option("--domain-id <id>","Restrict a sending_access key to a single domain ID").addHelpText("after",d({context:`Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY).
291
+ `)}function va(e){let t=e.map(o=>[o.name,o.status,o.region,o.id]);return _(["Name","Status","Region","ID"],t,"(no domains)")}function Ua(e){switch(e){case"verified":return"\u2713 Verified";case"pending":return"\u23F3 Pending";case"not_started":return"\u25CB Not started";case"partially_verified":return"\u25D0 Partially verified";case"partially_failed":return"\u25D0 Partially failed";case"failed":case"temporary_failure":return"\u2717 Failed";default:return e}}var De={resource:"domain",resourcePlural:"domains",fetchItems:(e,{limit:t,after:o})=>e.domains.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var Sa=new d("create").description("Create a new API key and display the token (shown once \u2014 store it immediately)").option("--name <name>","API key name").addOption(new q("--permission <permission>","Permission level").choices(["full_access","sending_access"])).option("--domain-id <id>","Restrict a sending_access key to a single domain ID").addHelpText("after",c({context:`Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY).
292
292
 
293
293
  Permissions:
294
294
  full_access Full API access (default)
295
295
  sending_access Send-only access; optionally scope to a domain with --domain-id`,output:` {"id":"<id>","token":"<token>"}
296
- The token is only returned at creation time and cannot be retrieved again.`,errorCodes:["auth_error","missing_name","invalid_flags","create_error"],examples:['resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access','resend api-keys create --name "Domain Token" --permission sending_access --domain-id <domain-id>','resend api-keys create --name "Production" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=e.name,r=e.permission;if(!i){(!w()||o.json)&&h({message:"Missing --name flag.",code:"missing_name"},{json:o.json});let s=await Z({message:"Key name",placeholder:"e.g. My API Key",validate:l=>{if(!l)return"Name is required"}});F(s)&&O("Cancelled."),i=s;let a=await ne({message:"Permission level",options:[{value:"full_access",label:"Full access"},{value:"sending_access",label:"Sending access only"}]});F(a)&&O("Cancelled."),r=a}let n=e.domainId;n!==void 0&&r!=="sending_access"&&h({message:"--domain-id requires --permission sending_access",code:"invalid_flags"},{json:o.json}),!n&&r==="sending_access"&&(n=await g(void 0,De,o,{optional:!0})),await P({loading:"Creating API key...",sdkCall:s=>s.apiKeys.create({name:i,...r&&{permission:r},...n&&{domain_id:n}}),onInteractive:s=>{console.log(` ${yo.default.gray("Name:")} ${i}`),console.log(` ${yo.default.gray("ID:")} ${s.id}`),console.log(` ${yo.default.gray("Token:")} ${s.token}`),console.log(`
297
- ${yo.default.yellow("\u26A0")} Store this token now \u2014 it cannot be retrieved again.`)}},o)});var ci={resource:"API key",resourcePlural:"API keys",fetchItems:(e,{limit:t,after:o})=>e.apiKeys.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function Sa(e){let t=e.map(o=>[o.name,o.id,o.created_at,o.last_used_at??""]);return _(["Name","ID","Created","Last used"],t,"(no API keys)")}var Ka=new c("delete").alias("rm").description("Delete an API key \u2014 any services using it will immediately lose access").argument("[id]","API key ID").option("--yes","Skip confirmation prompt").addHelpText("after",d({context:`Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.
296
+ The token is only returned at creation time and cannot be retrieved again.`,errorCodes:["auth_error","missing_name","invalid_flags","create_error"],examples:['resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access','resend api-keys create --name "Domain Token" --permission sending_access --domain-id <domain-id>','resend api-keys create --name "Production" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=e.name,r=e.permission;if(!i){(!w()||o.json)&&h({message:"Missing --name flag.",code:"missing_name"},{json:o.json});let s=await Z({message:"Key name",placeholder:"e.g. My API Key",validate:l=>{if(!l)return"Name is required"}});R(s)&&O("Cancelled."),i=s;let a=await ne({message:"Permission level",options:[{value:"full_access",label:"Full access"},{value:"sending_access",label:"Sending access only"}]});R(a)&&O("Cancelled."),r=a}let n=e.domainId;n!==void 0&&r!=="sending_access"&&h({message:"--domain-id requires --permission sending_access",code:"invalid_flags"},{json:o.json}),!n&&r==="sending_access"&&(n=await g(void 0,De,o,{optional:!0})),await P({loading:"Creating API key...",sdkCall:s=>s.apiKeys.create({name:i,...r&&{permission:r},...n&&{domain_id:n}}),onInteractive:s=>{console.log(` ${yo.default.gray("Name:")} ${i}`),console.log(` ${yo.default.gray("ID:")} ${s.id}`),console.log(` ${yo.default.gray("Token:")} ${s.token}`),console.log(`
297
+ ${yo.default.yellow("\u26A0")} Store this token now \u2014 it cannot be retrieved again.`)}},o)});var ci={resource:"API key",resourcePlural:"API keys",fetchItems:(e,{limit:t,after:o})=>e.apiKeys.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function Ka(e){let t=e.map(o=>[o.name,o.id,o.created_at,o.last_used_at??""]);return _(["Name","ID","Created","Last used"],t,"(no API keys)")}var ka=new d("delete").alias("rm").description("Delete an API key \u2014 any services using it will immediately lose access").argument("[id]","API key ID").option("--yes","Skip confirmation prompt").addHelpText("after",c({context:`Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.
298
298
 
299
299
  Warning: Deleting a key is immediate and irreversible. Any service using this key
300
300
  will stop authenticating instantly. The current key (used to call this command)
301
301
  can delete itself \u2014 the API does not prevent self-deletion.`,output:' {"object":"api-key","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend api-keys delete dacf4072-aa82-4ff3-97de-514ae3000ee0 --yes","resend api-keys delete dacf4072-aa82-4ff3-97de-514ae3000ee0 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,ci,i);await z(r.id,!!t.yes,{confirmMessage:`Delete API key "${r.label}"?
302
302
  ID: ${r.id}
303
- Any services using this key will stop working.`,loading:"Deleting API key...",object:"api-key",successMsg:"API key deleted",sdkCall:n=>n.apiKeys.remove(r.id)},i)});ye();function D(e,t){let o=parseInt(e,10);return(Number.isNaN(o)||o<1||o>100)&&h({message:"--limit must be an integer between 1 and 100",code:"invalid_limit"},{json:t.json}),o}function B(e,t,o,i){return t!==void 0&&o!==void 0&&h({message:"Cannot use --after and --before together. Pass only one cursor.",code:"invalid_pagination"},{json:i.json}),t!==void 0?{limit:e,after:t}:o!==void 0?{limit:e,before:o}:{limit:e}}function T(e,t,o){if(!e.has_more||e.data.length===0)return;let i=!!o.before,r=i?e.data[0].id:e.data[e.data.length-1].id,n=i?"--before":"--after",s=o.limit?` --limit ${o.limit}`:"",a=o.apiKey?` --api-key ${At(o.apiKey)}`:"",l=o.profile?` --profile ${o.profile}`:"",u=o.extraFlags?` ${o.extraFlags}`:"";console.log(`
303
+ Any services using this key will stop working.`,loading:"Deleting API key...",object:"api-key",successMsg:"API key deleted",sdkCall:n=>n.apiKeys.remove(r.id)},i)});ye();function D(e,t){let o=parseInt(e,10);return(Number.isNaN(o)||o<1||o>100)&&h({message:"--limit must be an integer between 1 and 100",code:"invalid_limit"},{json:t.json}),o}function I(e,t,o,i){return t!==void 0&&o!==void 0&&h({message:"Cannot use --after and --before together. Pass only one cursor.",code:"invalid_pagination"},{json:i.json}),t!==void 0?{limit:e,after:t}:o!==void 0?{limit:e,before:o}:{limit:e}}function T(e,t,o){if(!e.has_more||e.data.length===0)return;let i=!!o.before,r=i?e.data[0].id:e.data[e.data.length-1].id,n=i?"--before":"--after",s=o.limit?` --limit ${o.limit}`:"",a=o.apiKey?` --api-key ${At(o.apiKey)}`:"",l=o.profile?` --profile ${o.profile}`:"",u=o.extraFlags?` ${o.extraFlags}`:"";console.log(`
304
304
  Fetch the next page:
305
- $ resend ${t} ${n} ${r}${s}${u}${a}${l}`)}var ka=new c("list").alias("ls").description("List all API keys (IDs and names \u2014 tokens are never returned by this endpoint)").option("--limit <n>","Maximum number of API keys to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({output:` {"object":"list","has_more":false,"data":[{"id":"<id>","name":"<name>","created_at":"<date>","last_used_at":"<date>|null"}]}
306
- Tokens are never included in list responses.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend api-keys list","resend api-keys list --limit 25 --json","resend api-keys list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching API keys...",sdkCall:n=>n.apiKeys.list(r),onInteractive:n=>{console.log(Sa(n.data)),T(n,"api-keys list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var _a=new c("update").description("Rename an API key").argument("[id]","API key ID").option("--name <name>","New API key name").addHelpText("after",d({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY).",output:' {"object":"api_key","id":"<id>"}',errorCodes:["auth_error","missing_name","update_error"],examples:['resend api-keys update dacf4072-aa82-4ff3-97de-514ae3000ee0 --name "Production v2"','resend api-keys update dacf4072-aa82-4ff3-97de-514ae3000ee0 --name "Production v2" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,ci,i),n=await E(t.name,{message:"New key name",placeholder:"e.g. Production v2",validate:s=>{if(!s)return"Name is required"}},{message:"Missing --name flag.",code:"missing_name"},i);n||h({message:"Name is required.",code:"missing_name"},{json:i.json}),await R({loading:"Updating API key...",sdkCall:s=>s.apiKeys.update(r,{name:n}),errorCode:"update_error",successMsg:`API key updated: ${r}`},i)});var Fa=new c("api-keys").description("Manage API keys for authentication").addHelpText("after",d({context:`Security notes:
305
+ $ resend ${t} ${n} ${r}${s}${u}${a}${l}`)}var _a=new d("list").alias("ls").description("List all API keys (IDs and names \u2014 tokens are never returned by this endpoint)").option("--limit <n>","Maximum number of API keys to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({output:` {"object":"list","has_more":false,"data":[{"id":"<id>","name":"<name>","created_at":"<date>","last_used_at":"<date>|null"}]}
306
+ Tokens are never included in list responses.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend api-keys list","resend api-keys list --limit 25 --json","resend api-keys list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching API keys...",sdkCall:n=>n.apiKeys.list(r),onInteractive:n=>{console.log(Ka(n.data)),T(n,"api-keys list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Fa=new d("update").description("Rename an API key").argument("[id]","API key ID").option("--name <name>","New API key name").addHelpText("after",c({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY).",output:' {"object":"api_key","id":"<id>"}',errorCodes:["auth_error","missing_name","update_error"],examples:['resend api-keys update dacf4072-aa82-4ff3-97de-514ae3000ee0 --name "Production v2"','resend api-keys update dacf4072-aa82-4ff3-97de-514ae3000ee0 --name "Production v2" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,ci,i),n=await E(t.name,{message:"New key name",placeholder:"e.g. Production v2",validate:s=>{if(!s)return"Name is required"}},{message:"Missing --name flag.",code:"missing_name"},i);n||h({message:"Name is required.",code:"missing_name"},{json:i.json}),await F({loading:"Updating API key...",sdkCall:s=>s.apiKeys.update(r,{name:n}),errorCode:"update_error",successMsg:`API key updated: ${r}`},i)});var Ra=new d("api-keys").description("Manage API keys for authentication").addHelpText("after",c({context:`Security notes:
307
307
  - Tokens are only shown at creation time and cannot be retrieved again.
308
308
  - Use sending_access keys with --domain-id for per-domain CI tokens.
309
- - Deleting a key is immediate \u2014 any service using it loses access instantly.`,examples:["resend api-keys list",'resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access --domain-id <domain-id>','resend api-keys update <id> --name "Production v2"',"resend api-keys delete <id> --yes"]})).addCommand(Ua).addCommand(ka,{isDefault:!0}).addCommand(_a).addCommand(Ka);ye();X();function $h(e){let t=Fe();if(e.json){N({profiles:t},{json:!0});return}if(t.length===0){console.log("No profiles configured. Run: resend login");return}w()&&console.log(`
309
+ - Deleting a key is immediate \u2014 any service using it loses access instantly.`,examples:["resend api-keys list",'resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access --domain-id <domain-id>','resend api-keys update <id> --name "Production v2"',"resend api-keys delete <id> --yes"]})).addCommand(Sa).addCommand(_a,{isDefault:!0}).addCommand(Fa).addCommand(ka);ye();X();function Mh(e){let t=Fe();if(e.json){M({profiles:t},{json:!0});return}if(t.length===0){console.log("No profiles configured. Run: resend login");return}w()&&console.log(`
310
310
  Profiles
311
- `);let o=!1;for(let i of t){let r=i.active?" (active)":"",n=ue(i.name)!==void 0;n&&(o=!0),console.log(` ${i.active?"\u25B8":" "} ${i.name}${r}${n?" (invalid name)":""}`)}o&&w()&&console.log("\n Profiles with invalid names can be renamed via `resend auth rename`."),w()&&console.log("")}var Ra=new c("list").description("List all profiles").action((e,t)=>{$h(t.optsWithGlobals())});var Da=require("node:child_process"),Co=me(Je(),1),Ye="https://resend.com";function di(e){return new Promise(t=>{let o=process.platform==="win32"?"cmd.exe":process.platform==="darwin"?"open":"xdg-open",i=e.replaceAll('"',""),r=process.platform==="win32"?["/c","start",'""',`"${i}"`]:[e];(0,Da.execFile)(o,r,{timeout:5e3,windowsVerbatimArguments:!0},n=>t(!n))})}async function Te(e,t){let o=await di(e);t?.json||t?.quiet||(o?console.log(Co.default.dim("Opened"),Co.default.blue(e)):console.warn(Co.default.yellow("Could not open browser. Visit this link:"),Co.default.blue(e)))}var he={emails:`${Ye}/emails`,logs:`${Ye}/logs`,log:e=>`${Ye}/logs/${e}`,templates:`${Ye}/templates`,template:e=>`${Ye}/templates/${e}`,broadcasts:`${Ye}/broadcasts`,broadcast:e=>`${Ye}/broadcasts/${e}`,documentation:`${Ye}/docs`,automations:`${Ye}/automations`,automation:e=>`${Ye}/automations/${e}/editor`,events:`${Ye}/automations/events`};ye();Zo();X();var Er="https://resend.com/api-keys?new=true";async function Ta(e,t){let o=e.profile!==void 0?e.profile.trim():void 0;if(o!==void 0){let r=ue(o);return r&&h({message:r,code:"invalid_profile_name"},{json:e.json}),o}if(!w()||e.json)return o;let i=Fe();if(i.length>0){let r=[...i.map(s=>({value:s.name,label:`${s.name} (overwrite)`,hint:ue(s.name)?"invalid name":void 0})),{value:"__new__",label:"+ Create new profile"}],n=await ne({message:t,options:r});if(F(n)&&O("Login cancelled."),n==="__new__"){let s=await Z({message:"Enter a name for the new profile:",validate:l=>ue((l??"").trim())});if(F(s)&&O("Login cancelled."),o=(s??"").trim()||"default",i.some(l=>l.name===o)){let l=await Ze({message:`Profile '${o}' already exists. Overwrite?`});(F(l)||!l)&&O("Login cancelled.")}}else if(ue(n)){let s=await ai(n,e);if(!s)return;o=s}else o=n}else o="default";return o}function Oa(e){let{noun:t,profileLabel:o,configPath:i,backend:r}=e,n=r.isSecure?`in ${r.name}`:`at ${i}`,s=`${t} stored for profile '${o}' ${n}`;if(w()?Bt(s):console.log(s),!r.isSecure&&process.platform==="linux"){let a="Tip: Install libsecret-tools and a Secret Service provider (e.g. gnome-keyring) to store credentials in secure storage instead of a plaintext file.";w()?te.info(a):console.log(a)}}async function Gh(e){let{codeVerifier:t,codeChallenge:o,state:i}=ea(),r=le("Starting local callback server...",e.quiet),n,s;try{({port:n,waitForCallback:s}=await ta()),r.stop("")}catch(K){r.fail("Failed to start callback server"),h({message:W(K,"Failed to start callback server"),code:"oauth_error"},{json:e.json})}let a=`http://127.0.0.1:${n}/oauth/callback`,l=process.env.RESEND_BASE_URL??"https://api.resend.com",u=new URL(`${l}/oauth/authorize`);u.search=new URLSearchParams({client_id:Xo,response_type:"code",redirect_uri:a,scope:"full_access",state:i,code_challenge:o,code_challenge_method:"S256"}).toString(),await di(u.toString())?te.info("Browser opened. Complete authentication to continue."):te.warn(`Could not open browser. Visit this URL to authenticate:
312
- ${u.toString()}`);let p=le("Waiting for browser authentication...",e.quiet),f;try{f=await s}catch(K){p.fail("Authentication failed"),h({message:W(K,"Authentication failed"),code:"oauth_error"},{json:e.json})}f.state!==i&&(p.fail("Authentication failed"),h({message:"State mismatch in OAuth callback. Possible CSRF attack.",code:"oauth_state_mismatch"},{json:e.json})),p.stop("Browser authentication complete");let y=le("Exchanging authorization code...",e.quiet),A;try{A=await oa({code:f.code,codeVerifier:t,redirectUri:a,clientId:Xo,baseUrl:l})}catch(K){y.fail("Token exchange failed"),h({message:W(K,"Token exchange failed"),code:"oauth_error"},{json:e.json})}y.stop("Authenticated successfully");let b=await Ta(e,"Save credentials to which profile?"),x=b||"default",{configPath:v,backend:U}=await ei({access_token:A.access_token,access_token_expires_at:_r(A.access_token),refresh_token:A.refresh_token,scope:A.scope},b);if(b)try{Ao(x)}catch(K){h({message:W(K,"Failed to switch profile"),code:"switch_failed"},{json:e.json})}e.json?N({success:!0,config_path:v,profile:x,storage:U.name,scope:A.scope},{json:!0}):Oa({noun:"Credentials",profileLabel:x,configPath:v,backend:U})}var ui=new c("login").description("Save a Resend API key").option("--key <key>","API key to store (required in non-interactive mode)").addHelpText("after",d({setup:!0,context:"Non-interactive: --key is required (no prompts will appear when stdin/stdout is not a TTY).",output:' {"success":true,"config_path":"<path>","profile":"<name>"}',errorCodes:["missing_key","invalid_key_format","validation_failed","invalid_profile_name","switch_failed","write_failed","oauth_error","oauth_state_mismatch"],examples:["resend login --key re_123456789","resend login (interactive \u2014 prompts and opens browser)","RESEND_API_KEY=re_123 resend emails send ... (skip login; use env var directly)"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=typeof e.key=="string"?e.key.trim():e.key;if(!i){(!w()||o.json)&&h({message:"Missing --key flag. Provide your API key in non-interactive mode.",code:"missing_key"},{json:o.json}),Ho("Resend Authentication");let m=await ne({message:"How would you like to authenticate?",options:[{value:"oauth",label:"Login with Resend (opens browser)"},{value:"browser",label:"Get API key from resend.com (opens browser)"},{value:"manual",label:"Enter API key manually"}]});if(F(m)&&O("Login cancelled."),m==="oauth"){await Gh(o);return}te.info(`Use a full access API key for complete CLI access.
313
- ${Qt}`),m==="browser"&&(await di(Er)?te.info(`Opened ${Er}`):te.warn(`Could not open browser. Visit ${Er} manually.`));let p=await Yn({message:"Enter your Resend API key:",validate:f=>{if(!f)return"API key is required";if(!f.startsWith("re_"))return"API key must start with re_"}});F(p)&&O("Login cancelled."),i=p.trim()}i?.startsWith("re_")||h({message:"Invalid API key format. Key must start with re_",code:"invalid_key_format"},{json:o.json});let r=le("Validating API key...",o.quiet),n="full_access";try{let m=new Gt(i),{error:p}=await m.domains.list();if(p){let f=p;f.name==="restricted_api_key"?(n="sending_access",r.warn("API key is valid (sending access only)")):(r.fail("API key validation failed"),h({message:f.message||"Failed to validate API key",code:"validation_failed"},{json:o.json}))}else r.stop("API key is valid (full access)")}catch(m){r.fail("API key validation failed"),h({message:W(m,"Failed to validate API key"),code:"validation_failed"},{json:o.json})}let s=await Ta(o,"Save API key to which profile?"),{configPath:a,backend:l}=await da(i,s,n),u=s||"default";if(s)try{Ao(u)}catch(m){h({message:W(m,"Failed to switch profile"),code:"switch_failed"},{json:o.json})}o.json?N({success:!0,config_path:a,profile:u,storage:l.name,permission:n},{json:!0}):Oa({noun:"API key",profileLabel:u,configPath:a,backend:l})});var Ea=require("node:fs");ye();X();var mi=new c("logout").description("Remove your saved Resend API key").addHelpText("after",d({setup:!0,context:`Removes the saved API key from secure storage and the credentials file.
311
+ `);let o=!1;for(let i of t){let r=i.active?" (active)":"",n=ue(i.name)!==void 0;n&&(o=!0),console.log(` ${i.active?"\u25B8":" "} ${i.name}${r}${n?" (invalid name)":""}`)}o&&w()&&console.log("\n Profiles with invalid names can be renamed via `resend auth rename`."),w()&&console.log("")}var Da=new d("list").description("List all profiles").action((e,t)=>{Mh(t.optsWithGlobals())});var Ta=require("node:child_process"),Co=me(Je(),1),Ye="https://resend.com";function ui(e){return new Promise(t=>{let o=process.platform==="win32"?"cmd.exe":process.platform==="darwin"?"open":"xdg-open",i=e.replaceAll('"',""),r=process.platform==="win32"?["/c","start",'""',`"${i}"`]:[e];(0,Ta.execFile)(o,r,{timeout:5e3,windowsVerbatimArguments:!0},n=>t(!n))})}async function Te(e,t){let o=await ui(e);t?.json||t?.quiet||(o?console.log(Co.default.dim("Opened"),Co.default.blue(e)):console.warn(Co.default.yellow("Could not open browser. Visit this link:"),Co.default.blue(e)))}var he={emails:`${Ye}/emails`,logs:`${Ye}/logs`,log:e=>`${Ye}/logs/${e}`,templates:`${Ye}/templates`,template:e=>`${Ye}/templates/${e}`,broadcasts:`${Ye}/broadcasts`,broadcast:e=>`${Ye}/broadcasts/${e}`,documentation:`${Ye}/docs`,automations:`${Ye}/automations`,automation:e=>`${Ye}/automations/${e}/editor`,events:`${Ye}/automations/events`};ye();ei();X();var Br="https://resend.com/api-keys?new=true";async function Oa(e,t){let o=e.profile!==void 0?e.profile.trim():void 0;if(o!==void 0){let r=ue(o);return r&&h({message:r,code:"invalid_profile_name"},{json:e.json}),o}if(!w()||e.json)return o;let i=Fe();if(i.length>0){let r=[...i.map(s=>({value:s.name,label:`${s.name} (overwrite)`,hint:ue(s.name)?"invalid name":void 0})),{value:"__new__",label:"+ Create new profile"}],n=await ne({message:t,options:r});if(R(n)&&O("Login cancelled."),n==="__new__"){let s=await Z({message:"Enter a name for the new profile:",validate:l=>ue((l??"").trim())});if(R(s)&&O("Login cancelled."),o=(s??"").trim()||"default",i.some(l=>l.name===o)){let l=await Ze({message:`Profile '${o}' already exists. Overwrite?`});(R(l)||!l)&&O("Login cancelled.")}}else if(ue(n)){let s=await li(n,e);if(!s)return;o=s}else o=n}else o="default";return o}function Ea(e){let{noun:t,profileLabel:o,configPath:i,backend:r}=e,n=r.isSecure?`in ${r.name}`:`at ${i}`,s=`${t} stored for profile '${o}' ${n}`;if(w()?Bt(s):console.log(s),!r.isSecure&&process.platform==="linux"){let a="Tip: Install libsecret-tools and a Secret Service provider (e.g. gnome-keyring) to store credentials in secure storage instead of a plaintext file.";w()?te.info(a):console.log(a)}}async function qh(e){let{codeVerifier:t,codeChallenge:o,state:i}=ta(),r=le("Starting local callback server...",e.quiet),n,s;try{({port:n,waitForCallback:s}=await oa()),r.stop("")}catch(K){r.fail("Failed to start callback server"),h({message:W(K,"Failed to start callback server"),code:"oauth_error"},{json:e.json})}let a=`http://127.0.0.1:${n}/oauth/callback`,l=process.env.RESEND_BASE_URL??"https://api.resend.com",u=new URL(`${l}/oauth/authorize`);u.search=new URLSearchParams({client_id:Zo,response_type:"code",redirect_uri:a,scope:"full_access",state:i,code_challenge:o,code_challenge_method:"S256"}).toString(),await ui(u.toString())?te.info("Browser opened. Complete authentication to continue."):te.warn(`Could not open browser. Visit this URL to authenticate:
312
+ ${u.toString()}`);let p=le("Waiting for browser authentication...",e.quiet),f;try{f=await s}catch(K){p.fail("Authentication failed"),h({message:W(K,"Authentication failed"),code:"oauth_error"},{json:e.json})}f.state!==i&&(p.fail("Authentication failed"),h({message:"State mismatch in OAuth callback. Possible CSRF attack.",code:"oauth_state_mismatch"},{json:e.json})),p.stop("Browser authentication complete");let y=le("Exchanging authorization code...",e.quiet),A;try{A=await ia({code:f.code,codeVerifier:t,redirectUri:a,clientId:Zo,baseUrl:l})}catch(K){y.fail("Token exchange failed"),h({message:W(K,"Token exchange failed"),code:"oauth_error"},{json:e.json})}y.stop("Authenticated successfully");let b=await Oa(e,"Save credentials to which profile?"),x=b||"default",{configPath:v,backend:U}=await ti({access_token:A.access_token,access_token_expires_at:Fr(A.access_token),refresh_token:A.refresh_token,scope:A.scope},b);if(b)try{Ao(x)}catch(K){h({message:W(K,"Failed to switch profile"),code:"switch_failed"},{json:e.json})}e.json?M({success:!0,config_path:v,profile:x,storage:U.name,scope:A.scope},{json:!0}):Ea({noun:"Credentials",profileLabel:x,configPath:v,backend:U})}var mi=new d("login").description("Save a Resend API key").option("--key <key>","API key to store (required in non-interactive mode)").addHelpText("after",c({setup:!0,context:"Non-interactive: --key is required (no prompts will appear when stdin/stdout is not a TTY).",output:' {"success":true,"config_path":"<path>","profile":"<name>"}',errorCodes:["missing_key","invalid_key_format","validation_failed","invalid_profile_name","switch_failed","write_failed","oauth_error","oauth_state_mismatch"],examples:["resend login --key re_123456789","resend login (interactive \u2014 prompts and opens browser)","RESEND_API_KEY=re_123 resend emails send ... (skip login; use env var directly)"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=typeof e.key=="string"?e.key.trim():e.key;if(!i){(!w()||o.json)&&h({message:"Missing --key flag. Provide your API key in non-interactive mode.",code:"missing_key"},{json:o.json}),Ho("Resend Authentication");let m=await ne({message:"How would you like to authenticate?",options:[{value:"oauth",label:"Login with Resend (opens browser)"},{value:"browser",label:"Get API key from resend.com (opens browser)"},{value:"manual",label:"Enter API key manually"}]});if(R(m)&&O("Login cancelled."),m==="oauth"){await qh(o);return}te.info(`Use a full access API key for complete CLI access.
313
+ ${Qt}`),m==="browser"&&(await ui(Br)?te.info(`Opened ${Br}`):te.warn(`Could not open browser. Visit ${Br} manually.`));let p=await Xn({message:"Enter your Resend API key:",validate:f=>{if(!f)return"API key is required";if(!f.startsWith("re_"))return"API key must start with re_"}});R(p)&&O("Login cancelled."),i=p.trim()}i?.startsWith("re_")||h({message:"Invalid API key format. Key must start with re_",code:"invalid_key_format"},{json:o.json});let r=le("Validating API key...",o.quiet),n="full_access";try{let m=new Gt(i),{error:p}=await m.domains.list();if(p){let f=p;f.name==="restricted_api_key"?(n="sending_access",r.warn("API key is valid (sending access only)")):(r.fail("API key validation failed"),h({message:f.message||"Failed to validate API key",code:"validation_failed"},{json:o.json}))}else r.stop("API key is valid (full access)")}catch(m){r.fail("API key validation failed"),h({message:W(m,"Failed to validate API key"),code:"validation_failed"},{json:o.json})}let s=await Oa(o,"Save API key to which profile?"),{configPath:a,backend:l}=await ua(i,s,n),u=s||"default";if(s)try{Ao(u)}catch(m){h({message:W(m,"Failed to switch profile"),code:"switch_failed"},{json:o.json})}o.json?M({success:!0,config_path:a,profile:u,storage:l.name,permission:n},{json:!0}):Ea({noun:"API key",profileLabel:u,configPath:a,backend:l})});var Ba=require("node:fs");ye();X();var pi=new d("logout").description("Remove your saved Resend API key").addHelpText("after",c({setup:!0,context:`Removes the saved API key from secure storage and the credentials file.
314
314
 
315
315
  When --profile is specified, only that profile's entry is removed.
316
316
  When no profile is specified, all profiles are removed.
317
317
 
318
- If no credentials file exists, exits cleanly with no error.`,output:' {"success":true,"config_path":"<path>"}',errorCodes:["remove_failed"],examples:["resend logout","resend logout --profile staging","resend logout --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=Ft(),r=Rr();if(!r&&!(0,Ea.existsSync)(i)){!o.json&&w()?console.log("No saved credentials found. Nothing to remove."):N({success:!0,already_logged_out:!0},{json:o.json});return}let n=o.profile,s=!n,a=n??"all";if(!s&&r&&!r.profiles[a]&&h({message:`Profile "${a}" not found. Available profiles: ${Object.keys(r.profiles).join(", ")}`,code:"remove_failed"},{json:o.json}),!o.json&&w()){let l=s?"Remove all saved API keys?":`Remove saved API key for profile '${a}'?`,u=await Ze({message:l});(F(u)||!u)&&O("Logout cancelled.")}try{s?await ua():await oi(a)}catch(l){h({message:W(l,"Failed to remove credentials"),code:"remove_failed"},{json:o.json})}if(!o.json&&w()){let l=s?"Logged out. All API keys removed.":`Logged out. API key removed for profile '${a}'.`;Bt(l)}else N({success:!0,config_path:i,profile:s?"all":a},{json:o.json})});ye();X();async function Hh(e,t){let o=e;if(!o){if(!w()||t.json){h({message:"Missing profile name. Provide a profile name in non-interactive mode.",code:"missing_name"},{json:t.json});return}let i=Fe();if(i.length===0){h({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:t.json});return}let r=await ne({message:"Remove which profile?",options:i.map(n=>({value:n.name,label:n.name,hint:n.active?"active":void 0}))});F(r)&&O("Remove cancelled."),o=r}if(!t.json&&w()){let i=await Ze({message:`Remove profile '${o}' and its API key?`});(F(i)||!i)&&O("Remove cancelled.")}try{await oi(o)}catch(i){h({message:W(i,"Failed to remove profile"),code:"remove_failed"},{json:t.json});return}t.json?N({success:!0,removed_profile:o},{json:!0}):console.log(`Profile '${o}' removed.`)}var Ba=new c("remove").description("Remove a profile").argument("[name]","Profile name to remove").action(async(e,t,o)=>{await Hh(e,o.optsWithGlobals())});ye();X();async function Qh(e,t,o){let i=e,r=t;if(!i){if(!w()||o.json){h({message:"Missing profile name. Provide old and new names in non-interactive mode.",code:"missing_name"},{json:o.json});return}let n=Fe();if(n.length===0){h({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:o.json});return}let s=await ne({message:"Rename which profile?",options:n.map(a=>({value:a.name,label:a.name,hint:a.active?"active":ue(a.name)?"invalid name":void 0}))});F(s)&&O("Rename cancelled."),i=s}if(!r){if(!w()||o.json){h({message:"Missing new name. Provide old and new names in non-interactive mode.",code:"missing_name"},{json:o.json});return}let n=await Z({message:`Enter new name for '${i}':`,placeholder:i.replace(/[^a-zA-Z0-9._-]/g,"-"),validate:s=>ue(s)});F(n)&&O("Rename cancelled."),r=n}try{await ii(i,r)}catch(n){h({message:W(n,"Failed to rename profile"),code:"rename_failed"},{json:o.json});return}o.json?N({success:!0,old_name:i,new_name:r},{json:!0}):console.log(`Profile '${i}' renamed to '${r}'.`)}var Ia=new c("rename").description("Rename a profile").argument("[old-name]","Current profile name").argument("[new-name]","New profile name").action(async(e,t,o,i)=>{await Qh(e,t,i.optsWithGlobals())});ye();X();async function Nh(e,t){let o=e;if(!o){if(!w()||t.json){h({message:"Missing profile name. Provide a profile name in non-interactive mode.",code:"missing_name"},{json:t.json});return}let n=Fe();if(n.length===0){h({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:t.json});return}let s=await ne({message:"Switch to which profile?",options:n.map(a=>({value:a.name,label:a.name,hint:a.active?"active":ue(a.name)?"invalid name":void 0}))});F(s)&&O("Switch cancelled."),o=s}if(Fe().some(n=>n.name===o)){let n=await ai(o,t);if(!n)return;o=n}try{Ao(o)}catch(n){h({message:W(n,"Failed to switch profile"),code:"switch_failed"},{json:t.json});return}t.json?N({success:!0,active_profile:o},{json:!0}):console.log(`Switched to profile '${o}'.`)}var ja=new c("switch").description("Switch the active profile").argument("[name]","Profile name to switch to").action(async(e,t,o)=>{await Nh(e,o.optsWithGlobals())});var Pa=new c("auth").description("Manage authentication and profiles").addHelpText("after",d({setup:!0,context:`Environment variables:
318
+ If no credentials file exists, exits cleanly with no error.`,output:' {"success":true,"config_path":"<path>"}',errorCodes:["remove_failed"],examples:["resend logout","resend logout --profile staging","resend logout --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=Ft(),r=Dr();if(!r&&!(0,Ba.existsSync)(i)){!o.json&&w()?console.log("No saved credentials found. Nothing to remove."):M({success:!0,already_logged_out:!0},{json:o.json});return}let n=o.profile,s=!n,a=n??"all";if(!s&&r&&!r.profiles[a]&&h({message:`Profile "${a}" not found. Available profiles: ${Object.keys(r.profiles).join(", ")}`,code:"remove_failed"},{json:o.json}),!o.json&&w()){let l=s?"Remove all saved API keys?":`Remove saved API key for profile '${a}'?`,u=await Ze({message:l});(R(u)||!u)&&O("Logout cancelled.")}try{s?await ma():await ii(a)}catch(l){h({message:W(l,"Failed to remove credentials"),code:"remove_failed"},{json:o.json})}if(!o.json&&w()){let l=s?"Logged out. All API keys removed.":`Logged out. API key removed for profile '${a}'.`;Bt(l)}else M({success:!0,config_path:i,profile:s?"all":a},{json:o.json})});ye();X();async function Lh(e,t){let o=e;if(!o){if(!w()||t.json){h({message:"Missing profile name. Provide a profile name in non-interactive mode.",code:"missing_name"},{json:t.json});return}let i=Fe();if(i.length===0){h({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:t.json});return}let r=await ne({message:"Remove which profile?",options:i.map(n=>({value:n.name,label:n.name,hint:n.active?"active":void 0}))});R(r)&&O("Remove cancelled."),o=r}if(!t.json&&w()){let i=await Ze({message:`Remove profile '${o}' and its API key?`});(R(i)||!i)&&O("Remove cancelled.")}try{await ii(o)}catch(i){h({message:W(i,"Failed to remove profile"),code:"remove_failed"},{json:t.json});return}t.json?M({success:!0,removed_profile:o},{json:!0}):console.log(`Profile '${o}' removed.`)}var Ia=new d("remove").description("Remove a profile").argument("[name]","Profile name to remove").action(async(e,t,o)=>{await Lh(e,o.optsWithGlobals())});ye();X();async function Wh(e,t,o){let i=e,r=t;if(!i){if(!w()||o.json){h({message:"Missing profile name. Provide old and new names in non-interactive mode.",code:"missing_name"},{json:o.json});return}let n=Fe();if(n.length===0){h({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:o.json});return}let s=await ne({message:"Rename which profile?",options:n.map(a=>({value:a.name,label:a.name,hint:a.active?"active":ue(a.name)?"invalid name":void 0}))});R(s)&&O("Rename cancelled."),i=s}if(!r){if(!w()||o.json){h({message:"Missing new name. Provide old and new names in non-interactive mode.",code:"missing_name"},{json:o.json});return}let n=await Z({message:`Enter new name for '${i}':`,placeholder:i.replace(/[^a-zA-Z0-9._-]/g,"-"),validate:s=>ue(s)});R(n)&&O("Rename cancelled."),r=n}try{await ri(i,r)}catch(n){h({message:W(n,"Failed to rename profile"),code:"rename_failed"},{json:o.json});return}o.json?M({success:!0,old_name:i,new_name:r},{json:!0}):console.log(`Profile '${i}' renamed to '${r}'.`)}var ja=new d("rename").description("Rename a profile").argument("[old-name]","Current profile name").argument("[new-name]","New profile name").action(async(e,t,o,i)=>{await Wh(e,t,i.optsWithGlobals())});ye();X();async function Jh(e,t){let o=e;if(!o){if(!w()||t.json){h({message:"Missing profile name. Provide a profile name in non-interactive mode.",code:"missing_name"},{json:t.json});return}let n=Fe();if(n.length===0){h({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:t.json});return}let s=await ne({message:"Switch to which profile?",options:n.map(a=>({value:a.name,label:a.name,hint:a.active?"active":ue(a.name)?"invalid name":void 0}))});R(s)&&O("Switch cancelled."),o=s}if(Fe().some(n=>n.name===o)){let n=await li(o,t);if(!n)return;o=n}try{Ao(o)}catch(n){h({message:W(n,"Failed to switch profile"),code:"switch_failed"},{json:t.json});return}t.json?M({success:!0,active_profile:o},{json:!0}):console.log(`Switched to profile '${o}'.`)}var Pa=new d("switch").description("Switch the active profile").argument("[name]","Profile name to switch to").action(async(e,t,o)=>{await Jh(e,o.optsWithGlobals())});var $a=new d("auth").description("Manage authentication and profiles").addHelpText("after",c({setup:!0,context:`Environment variables:
319
319
  RESEND_API_KEY API key (overrides stored credentials)
320
320
  RESEND_PROFILE Profile name (overrides config default)
321
- RESEND_CREDENTIAL_STORE Storage method: "secure_storage" or "file"`,examples:["resend login","resend login --key re_123456789","resend logout","resend auth list","resend auth switch staging","resend auth rename staging production","resend auth remove staging"]})).addCommand(ui).addCommand(mi).addCommand(Ra,{isDefault:!0}).addCommand(ja).addCommand(Ia).addCommand(Ba);var Br=require("node:fs");function ie(e,t){if(e==="-"){process.stdin.isTTY&&h({message:"No input piped to stdin",code:"stdin_read_error"},{json:t.json});try{return(0,Br.readFileSync)(0,"utf-8")}catch{h({message:"Failed to read from stdin",code:"stdin_read_error"},{json:t.json})}}try{return(0,Br.readFileSync)(e,"utf-8")}catch{h({message:`Failed to read file: ${e}`,code:"file_read_error"},{json:t.json})}}function Dt(e,t,o){if(e!==void 0)try{return JSON.parse(e)}catch(i){h({message:`Invalid JSON for ${t}: ${i instanceof Error?i.message:"parse error"}`,code:"invalid_json"},{json:o.json})}}var $a=new c("create").description("Create a new automation").option("--name <name>","Automation name").addOption(new q("--status <status>","Initial status").choices(["enabled","disabled"])).option("--steps <json>","Steps array as JSON string").option("--connections <json>","Connections array as JSON string").option("--file <path>",'Path to a JSON file containing the full automation payload (use "-" for stdin)').addHelpText("after",d({context:`Non-interactive: --name and --steps/--connections (or --file) are required.
321
+ RESEND_CREDENTIAL_STORE Storage method: "secure_storage" or "file"`,examples:["resend login","resend login --key re_123456789","resend logout","resend auth list","resend auth switch staging","resend auth rename staging production","resend auth remove staging"]})).addCommand(mi).addCommand(pi).addCommand(Da,{isDefault:!0}).addCommand(Pa).addCommand(ja).addCommand(Ia);var Ir=require("node:fs");function ie(e,t){if(e==="-"){process.stdin.isTTY&&h({message:"No input piped to stdin",code:"stdin_read_error"},{json:t.json});try{return(0,Ir.readFileSync)(0,"utf-8")}catch{h({message:"Failed to read from stdin",code:"stdin_read_error"},{json:t.json})}}try{return(0,Ir.readFileSync)(e,"utf-8")}catch{h({message:`Failed to read file: ${e}`,code:"file_read_error"},{json:t.json})}}function Dt(e,t,o){if(e!==void 0)try{return JSON.parse(e)}catch(i){h({message:`Invalid JSON for ${t}: ${i instanceof Error?i.message:"parse error"}`,code:"invalid_json"},{json:o.json})}}var Ga=new d("create").description("Create a new automation").option("--name <name>","Automation name").addOption(new q("--status <status>","Initial status").choices(["enabled","disabled"])).option("--steps <json>","Steps array as JSON string").option("--connections <json>","Connections array as JSON string").option("--file <path>",'Path to a JSON file containing the full automation payload (use "-" for stdin)').addHelpText("after",c({context:`Non-interactive: --name and --steps/--connections (or --file) are required.
322
322
 
323
323
  Payload format:
324
324
  --file accepts a JSON object with { name, status?, steps, connections }.
@@ -326,18 +326,18 @@ Payload format:
326
326
  When using --file, --name/--status/--steps/--connections flags override file values.
327
327
 
328
328
  Step types: trigger, delay, send_email, wait_for_event, condition
329
- Connection types: default, condition_met, condition_not_met, timeout, event_received`,output:' {"object":"automation","id":"<id>"}',errorCodes:["auth_error","missing_name","missing_steps","missing_connections","invalid_json","file_read_error","create_error"],examples:["resend automations create --file automation.json","cat automation.json | resend automations create --file -","resend automations create --file automation.json --status disabled",`resend automations create --name "Welcome Flow" --steps '[...]' --connections '[...]'`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i={};if(e.file){let l=ie(e.file,o);try{i=JSON.parse(l)}catch(u){h({message:`Invalid JSON in --file: ${u instanceof Error?u.message:"parse error"}`,code:"invalid_json"},{json:o.json})}(typeof i!="object"||i===null||Array.isArray(i))&&h({message:"--file must contain a JSON object with automation properties (name, steps, connections).",code:"invalid_json"},{json:o.json})}let r=await E(e.name??i.name,{message:"Automation name",placeholder:"e.g. Welcome Flow"},{message:"Missing --name flag.",code:"missing_name"},o),n=Dt(e.steps,"--steps",o)??i.steps;(!n||!Array.isArray(n)||n.length===0)&&h({message:"Missing or empty steps. Provide --steps as a JSON array or use --file.",code:"missing_steps"},{json:o.json});let s=Dt(e.connections,"--connections",o)??i.connections;s||h({message:"Missing connections. Provide --connections as a JSON array or use --file (empty array is valid for single-step automations).",code:"missing_connections"},{json:o.json}),Array.isArray(s)||h({message:"--connections must be a JSON array.",code:"invalid_json"},{json:o.json});let a=e.status??i.status;await P({loading:"Creating automation...",sdkCall:l=>l.automations.create({name:r,steps:n,connections:s,...a&&{status:a}}),onInteractive:l=>{console.log(`Automation created: ${l.id}`)}},o)});function Ga(e){let t=e.map(o=>[o.name,Ir(o.status),o.created_at,o.id]);return _(["Name","Status","Created","ID"],t,"(no automations)")}function Ir(e){switch(e){case"enabled":return"\u2713 Enabled";case"disabled":return"\u25CB Disabled";default:return e}}var Ne={resource:"automation",resourcePlural:"automations",fetchItems:(e,{limit:t,after:o})=>e.automations.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var Ha=new c("delete").alias("rm").description("Delete an automation").argument("[id]","Automation ID").option("--yes","Skip confirmation prompt").addHelpText("after",d({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"automation","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend automations delete <id> --yes","resend automations delete <id> --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await z(r,!!t.yes,{confirmMessage:`Delete automation ${r}?
330
- This cannot be undone.`,loading:"Deleting automation...",object:"automation",successMsg:"Automation deleted",sdkCall:n=>n.automations.remove(r)},i)});var Qa=new c("duplicate").description("Duplicate an automation").argument("[id]","Automation ID to duplicate").addHelpText("after",d({context:`Creates a copy of an existing automation and returns the new automation ID.
331
- The steps and connections are copied from the original.`,output:' {"object":"automation","id":"<new-automation-id>"}',errorCodes:["auth_error","create_error"],examples:["resend automations duplicate <id>","resend automations duplicate <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await P({loading:"Duplicating automation...",sdkCall:n=>n.automations.duplicate(r),onInteractive:n=>{console.log(`Automation duplicated: ${n.id}`)}},i)});var Na=new c("get").description("Retrieve an automation with its steps and connections").argument("[id]","Automation ID").addHelpText("after",d({output:` Full automation object including steps and connections arrays.
329
+ Connection types: default, condition_met, condition_not_met, timeout, event_received`,output:' {"object":"automation","id":"<id>"}',errorCodes:["auth_error","missing_name","missing_steps","missing_connections","invalid_json","file_read_error","create_error"],examples:["resend automations create --file automation.json","cat automation.json | resend automations create --file -","resend automations create --file automation.json --status disabled",`resend automations create --name "Welcome Flow" --steps '[...]' --connections '[...]'`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i={};if(e.file){let l=ie(e.file,o);try{i=JSON.parse(l)}catch(u){h({message:`Invalid JSON in --file: ${u instanceof Error?u.message:"parse error"}`,code:"invalid_json"},{json:o.json})}(typeof i!="object"||i===null||Array.isArray(i))&&h({message:"--file must contain a JSON object with automation properties (name, steps, connections).",code:"invalid_json"},{json:o.json})}let r=await E(e.name??i.name,{message:"Automation name",placeholder:"e.g. Welcome Flow"},{message:"Missing --name flag.",code:"missing_name"},o),n=Dt(e.steps,"--steps",o)??i.steps;(!n||!Array.isArray(n)||n.length===0)&&h({message:"Missing or empty steps. Provide --steps as a JSON array or use --file.",code:"missing_steps"},{json:o.json});let s=Dt(e.connections,"--connections",o)??i.connections;s||h({message:"Missing connections. Provide --connections as a JSON array or use --file (empty array is valid for single-step automations).",code:"missing_connections"},{json:o.json}),Array.isArray(s)||h({message:"--connections must be a JSON array.",code:"invalid_json"},{json:o.json});let a=e.status??i.status;await P({loading:"Creating automation...",sdkCall:l=>l.automations.create({name:r,steps:n,connections:s,...a&&{status:a}}),onInteractive:l=>{console.log(`Automation created: ${l.id}`)}},o)});function Ha(e){let t=e.map(o=>[o.name,jr(o.status),o.created_at,o.id]);return _(["Name","Status","Created","ID"],t,"(no automations)")}function jr(e){switch(e){case"enabled":return"\u2713 Enabled";case"disabled":return"\u25CB Disabled";default:return e}}var Ne={resource:"automation",resourcePlural:"automations",fetchItems:(e,{limit:t,after:o})=>e.automations.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var Qa=new d("delete").alias("rm").description("Delete an automation").argument("[id]","Automation ID").option("--yes","Skip confirmation prompt").addHelpText("after",c({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"automation","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend automations delete <id> --yes","resend automations delete <id> --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await z(r,!!t.yes,{confirmMessage:`Delete automation ${r}?
330
+ This cannot be undone.`,loading:"Deleting automation...",object:"automation",successMsg:"Automation deleted",sdkCall:n=>n.automations.remove(r)},i)});var Na=new d("duplicate").description("Duplicate an automation").argument("[id]","Automation ID to duplicate").addHelpText("after",c({context:`Creates a copy of an existing automation and returns the new automation ID.
331
+ The steps and connections are copied from the original.`,output:' {"object":"automation","id":"<new-automation-id>"}',errorCodes:["auth_error","create_error"],examples:["resend automations duplicate <id>","resend automations duplicate <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await P({loading:"Duplicating automation...",sdkCall:n=>n.automations.duplicate(r),onInteractive:n=>{console.log(`Automation duplicated: ${n.id}`)}},i)});var Ma=new d("get").description("Retrieve an automation with its steps and connections").argument("[id]","Automation ID").addHelpText("after",c({output:` Full automation object including steps and connections arrays.
332
332
 
333
- Automation status values: enabled | disabled`,errorCodes:["auth_error","fetch_error"],examples:["resend automations get <id>","resend automations get <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await j({loading:"Fetching automation...",sdkCall:n=>n.automations.get(r),onInteractive:n=>{if(console.log(`${n.name} \u2014 ${Ir(n.status)}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),n.updated_at&&console.log(`Updated: ${n.updated_at}`),n.steps.length>0){console.log(`
333
+ Automation status values: enabled | disabled`,errorCodes:["auth_error","fetch_error"],examples:["resend automations get <id>","resend automations get <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await B({loading:"Fetching automation...",sdkCall:n=>n.automations.get(r),onInteractive:n=>{if(console.log(`${n.name} \u2014 ${jr(n.status)}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),n.updated_at&&console.log(`Updated: ${n.updated_at}`),n.steps.length>0){console.log(`
334
334
  Steps:`);let s=n.steps.map(a=>[a.key,a.type]);console.log(_(["Key","Type"],s,"(no steps)"))}if(n.connections.length>0){console.log(`
335
- Connections:`);let s=n.connections.map(a=>[a.from,a.to,a.type]);console.log(_(["From","To","Type"],s,"(no connections)"))}}},i)});var Ma=new c("list").alias("ls").description("List all automations").option("--limit <n>","Maximum number of automations to return (1-100)","10").option("--after <cursor>","Return automations after this cursor (next page)").option("--before <cursor>","Return automations before this cursor (previous page)").addHelpText("after",d({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend automations list","resend automations list --limit 25 --json","resend automations list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching automations...",sdkCall:n=>n.automations.list(r),onInteractive:n=>{console.log(Ga(n.data)),T(n,"automations list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var qa=new c("open").description("Open an automation or the automations list in the Resend dashboard").argument("[id]","Automation ID \u2014 omit to open the automations list").addHelpText("after",d({context:`Opens the Resend dashboard in your default browser.
335
+ Connections:`);let s=n.connections.map(a=>[a.from,a.to,a.type]);console.log(_(["From","To","Type"],s,"(no connections)"))}}},i)});var qa=new d("list").alias("ls").description("List all automations").option("--limit <n>","Maximum number of automations to return (1-100)","10").option("--after <cursor>","Return automations after this cursor (next page)").option("--before <cursor>","Return automations before this cursor (previous page)").addHelpText("after",c({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend automations list","resend automations list --limit 25 --json","resend automations list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching automations...",sdkCall:n=>n.automations.list(r),onInteractive:n=>{console.log(Ha(n.data)),T(n,"automations list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var La=new d("open").description("Open an automation or the automations list in the Resend dashboard").argument("[id]","Automation ID \u2014 omit to open the automations list").addHelpText("after",c({context:`Opens the Resend dashboard in your default browser.
336
336
  With an ID: opens that automation's editor.
337
- Without an ID: opens the automations list.`,examples:["resend automations open","resend automations open 019d4ef1-8266-71d4-a1aa-60ce5d0eaea7"]})).action(async(e,t,o)=>{let i=e?he.automation(e):he.automations,r=o.optsWithGlobals();await Te(i,r)});var La=new c("get").description("Retrieve details of a specific automation run").option("--automation-id <id>","Automation ID").option("--run-id <id>","Run ID").addHelpText("after",d({output:" Full automation run object with status, trigger, and timestamps.",errorCodes:["auth_error","missing_automation_id","missing_run_id","fetch_error"],examples:["resend automations runs get --automation-id <id> --run-id <id>","resend automations runs get --automation-id <id> --run-id <id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.automationId,{message:"Automation ID"},{message:"Missing --automation-id flag.",code:"missing_automation_id"},o),r=await E(e.runId,{message:"Run ID"},{message:"Missing --run-id flag.",code:"missing_run_id"},o);await j({loading:"Fetching automation run...",sdkCall:n=>n.automations.runs.get({automationId:i,runId:r}),onInteractive:n=>{console.log(`Run: ${n.id}`),console.log(`Status: ${n.status}`),n.started_at&&console.log(`Started: ${n.started_at}`),n.completed_at&&console.log(`Completed: ${n.completed_at}`),console.log(`Created: ${n.created_at}`)}},o)});var Wa=new c("list").alias("ls").description("List runs for an automation").argument("[automation-id]","Automation ID").option("--status <status>","Filter by status (running, completed, failed, cancelled). Comma-separated.").option("--limit <n>","Maximum number of runs to return (1-100)","10").option("--after <cursor>","Return runs after this cursor (next page)").option("--before <cursor>","Return runs before this cursor (previous page)").addHelpText("after",d({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","missing_id","invalid_limit","list_error"],examples:["resend automations runs <automation-id>","resend automations runs list <automation-id>","resend automations runs list <automation-id> --status running","resend automations runs list <automation-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i),n=D(t.limit,i),s=B(n,t.after,t.before,i);await S({loading:"Fetching automation runs...",sdkCall:a=>a.automations.runs.list({automationId:r,...s,...t.status?{status:t.status}:{}}),onInteractive:a=>{let l=a.data.map(u=>[u.id,u.status,u.started_at??"-",u.completed_at??"-"]);console.log(_(["ID","Status","Started","Completed"],l,"(no runs)")),T(a,`automations runs list ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var Ja=new c("runs").description("Manage automation runs").addHelpText("after",d({context:`Runs represent individual executions of an automation.
337
+ Without an ID: opens the automations list.`,examples:["resend automations open","resend automations open 019d4ef1-8266-71d4-a1aa-60ce5d0eaea7"]})).action(async(e,t,o)=>{let i=e?he.automation(e):he.automations,r=o.optsWithGlobals();await Te(i,r)});var Wa=new d("get").description("Retrieve details of a specific automation run").option("--automation-id <id>","Automation ID").option("--run-id <id>","Run ID").addHelpText("after",c({output:" Full automation run object with status, trigger, and timestamps.",errorCodes:["auth_error","missing_automation_id","missing_run_id","fetch_error"],examples:["resend automations runs get --automation-id <id> --run-id <id>","resend automations runs get --automation-id <id> --run-id <id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.automationId,{message:"Automation ID"},{message:"Missing --automation-id flag.",code:"missing_automation_id"},o),r=await E(e.runId,{message:"Run ID"},{message:"Missing --run-id flag.",code:"missing_run_id"},o);await B({loading:"Fetching automation run...",sdkCall:n=>n.automations.runs.get({automationId:i,runId:r}),onInteractive:n=>{console.log(`Run: ${n.id}`),console.log(`Status: ${n.status}`),n.started_at&&console.log(`Started: ${n.started_at}`),n.completed_at&&console.log(`Completed: ${n.completed_at}`),console.log(`Created: ${n.created_at}`)}},o)});var Ja=new d("list").alias("ls").description("List runs for an automation").argument("[automation-id]","Automation ID").option("--status <status>","Filter by status (running, completed, failed, cancelled). Comma-separated.").option("--limit <n>","Maximum number of runs to return (1-100)","10").option("--after <cursor>","Return runs after this cursor (next page)").option("--before <cursor>","Return runs before this cursor (previous page)").addHelpText("after",c({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","missing_id","invalid_limit","list_error"],examples:["resend automations runs <automation-id>","resend automations runs list <automation-id>","resend automations runs list <automation-id> --status running","resend automations runs list <automation-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i),n=D(t.limit,i),s=I(n,t.after,t.before,i);await S({loading:"Fetching automation runs...",sdkCall:a=>a.automations.runs.list({automationId:r,...s,...t.status?{status:t.status}:{}}),onInteractive:a=>{let l=a.data.map(u=>[u.id,u.status,u.started_at??"-",u.completed_at??"-"]);console.log(_(["ID","Status","Started","Completed"],l,"(no runs)")),T(a,`automations runs list ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var Va=new d("runs").description("Manage automation runs").addHelpText("after",c({context:`Runs represent individual executions of an automation.
338
338
  Each run is triggered by an event and progresses through the automation's steps.
339
339
 
340
- Run status values: running | completed | failed | cancelled`,examples:["resend automations runs <automation-id>","resend automations runs list <automation-id> --limit 25","resend automations runs get --automation-id <id> --run-id <id>"]})).addCommand(Wa,{isDefault:!0}).addCommand(La);var Va=new c("stop").description("Stop a running automation").argument("[id]","Automation ID").addHelpText("after",d({context:"Stops a running automation by setting its status to disabled and cancelling active runs.",output:' {"object":"automation","id":"<id>","status":"disabled"}',errorCodes:["auth_error","stop_error"],examples:["resend automations stop <id>","resend automations stop <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await R({loading:"Stopping automation...",sdkCall:n=>n.automations.stop(r),errorCode:"stop_error",successMsg:"Automation stopped"},i)});var za=new c("update").description("Update an automation status (enable or disable)").argument("[id]","Automation ID").addOption(new q("--status <status>","New status").choices(["enabled","disabled"])).addHelpText("after",d({output:' {"object":"automation","id":"<id>","status":"<status>"}',errorCodes:["auth_error","missing_status","update_error"],examples:["resend automations update <id> --status enabled","resend automations update <id> --status disabled --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i),n=await bt(t.status,{message:"Status",options:[{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}]},{message:"Missing --status flag.",code:"missing_status"},i);await R({loading:"Updating automation...",sdkCall:s=>s.automations.update(r,{status:n}),errorCode:"update_error",successMsg:`Automation updated: ${r} (${n})`},i)});var Ya=new c("automations").description("Manage automations").addHelpText("after",d({context:`Automations are event-driven workflows composed of steps and connections.
340
+ Run status values: running | completed | failed | cancelled`,examples:["resend automations runs <automation-id>","resend automations runs list <automation-id> --limit 25","resend automations runs get --automation-id <id> --run-id <id>"]})).addCommand(Ja,{isDefault:!0}).addCommand(Wa);var za=new d("stop").description("Stop a running automation").argument("[id]","Automation ID").addHelpText("after",c({context:"Stops a running automation by setting its status to disabled and cancelling active runs.",output:' {"object":"automation","id":"<id>","status":"disabled"}',errorCodes:["auth_error","stop_error"],examples:["resend automations stop <id>","resend automations stop <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i);await F({loading:"Stopping automation...",sdkCall:n=>n.automations.stop(r),errorCode:"stop_error",successMsg:"Automation stopped"},i)});var Ya=new d("update").description("Update an automation status (enable or disable)").argument("[id]","Automation ID").addOption(new q("--status <status>","New status").choices(["enabled","disabled"])).addHelpText("after",c({output:' {"object":"automation","id":"<id>","status":"<status>"}',errorCodes:["auth_error","missing_status","update_error"],examples:["resend automations update <id> --status enabled","resend automations update <id> --status disabled --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ne,i),n=await bt(t.status,{message:"Status",options:[{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}]},{message:"Missing --status flag.",code:"missing_status"},i);await F({loading:"Updating automation...",sdkCall:s=>s.automations.update(r,{status:n}),errorCode:"update_error",successMsg:`Automation updated: ${r} (${n})`},i)});var Xa=new d("automations").description("Manage automations").addHelpText("after",c({context:`Automations are event-driven workflows composed of steps and connections.
341
341
 
342
342
  Steps define the actions (trigger, delay, send_email, wait_for_event, condition).
343
343
  Connections define the flow between steps (default, condition_met, condition_not_met, timeout, event_received).
@@ -348,12 +348,12 @@ Lifecycle:
348
348
  3. resend automations duplicate <id> (copy an automation)
349
349
  4. resend automations stop <id> (stop automation)
350
350
  5. resend automations runs <id> (inspect runs)
351
- 6. resend automations open <id> (view in dashboard)`,examples:["resend automations list",'resend automations create --name "Welcome Flow" --file workflow.json',"resend automations get <id>","resend automations update <id> --status enabled","resend automations duplicate <id>","resend automations stop <id>","resend automations delete <id> --yes","resend automations runs <automation-id>","resend automations runs get --automation-id <id> --run-id <id>","resend automations open <id>"]})).addCommand($a).addCommand(Na).addCommand(Ma,{isDefault:!0}).addCommand(za).addCommand(Ha).addCommand(Qa).addCommand(Va).addCommand(qa).addCommand(Ja);function jr(e){switch(e){case"draft":return"\u25CB Draft";case"queued":return"\u23F3 Queued";case"scheduled":return"\u{1F4C5} Scheduled";case"sent":return"\u2713 Sent";default:return e}}var Me={resource:"broadcast",resourcePlural:"broadcasts",fetchItems:(e,{limit:t,after:o})=>e.broadcasts.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name??"(untitled)",hint:e.id})};function Xa(e){return{resource:"broadcast",resourcePlural:"broadcasts",fetchItems:(t,{limit:o,after:i})=>t.broadcasts.list({limit:o,...i&&{after:i}}),display:t=>({label:t.name??"(untitled)",hint:`${jr(t.status)} ${t.id}`}),filter:e}}var Za=Xa(e=>e.status==="draft"),el=Xa(e=>e.status==="queued"||e.status==="scheduled");function tl(e){let t=e.map(o=>[o.name??"(untitled)",o.status,o.created_at,o.id]);return _(["Name","Status","Created","ID"],t,"(no broadcasts)")}function ol(e){let t=e.map(o=>[o.email,o.contact_id??"-",o.count!==void 0&&o.count!==null?String(o.count):"-",o.bounce_type??"-",o.clicked_links&&o.clicked_links.length>0?o.clicked_links.map(i=>`${i.url} (${i.clicks})`).join(", "):"-",o.id]);return _(["Email","Contact ID","Count","Bounce Type","Clicked Links","ID"],t,"(no recipients)")}function il(e){let t=e.map(o=>[o.url,String(o.clicks),String(o.unique_clicks)]);return _(["URL","Clicks","Unique Clicks"],t,"(no clicked links)")}var rl=new c("cancel").description("Cancel a queued or scheduled broadcast").argument("[id]","Broadcast ID").addHelpText("after",d({context:`Only queued or scheduled broadcasts can be cancelled; draft and sent broadcasts cannot.
351
+ 6. resend automations open <id> (view in dashboard)`,examples:["resend automations list",'resend automations create --name "Welcome Flow" --file workflow.json',"resend automations get <id>","resend automations update <id> --status enabled","resend automations duplicate <id>","resend automations stop <id>","resend automations delete <id> --yes","resend automations runs <automation-id>","resend automations runs get --automation-id <id> --run-id <id>","resend automations open <id>"]})).addCommand(Ga).addCommand(Ma).addCommand(qa,{isDefault:!0}).addCommand(Ya).addCommand(Qa).addCommand(Na).addCommand(za).addCommand(La).addCommand(Va);function Pr(e){switch(e){case"draft":return"\u25CB Draft";case"queued":return"\u23F3 Queued";case"scheduled":return"\u{1F4C5} Scheduled";case"sent":return"\u2713 Sent";default:return e}}var Me={resource:"broadcast",resourcePlural:"broadcasts",fetchItems:(e,{limit:t,after:o})=>e.broadcasts.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name??"(untitled)",hint:e.id})};function Za(e){return{resource:"broadcast",resourcePlural:"broadcasts",fetchItems:(t,{limit:o,after:i})=>t.broadcasts.list({limit:o,...i&&{after:i}}),display:t=>({label:t.name??"(untitled)",hint:`${Pr(t.status)} ${t.id}`}),filter:e}}var el=Za(e=>e.status==="draft"),tl=Za(e=>e.status==="queued"||e.status==="scheduled");function ol(e){let t=e.map(o=>[o.name??"(untitled)",o.status,o.created_at,o.id]);return _(["Name","Status","Created","ID"],t,"(no broadcasts)")}function il(e){let t=e.map(o=>[o.email,o.contact_id??"-",o.count!==void 0&&o.count!==null?String(o.count):"-",o.bounce_type??"-",o.clicked_links&&o.clicked_links.length>0?o.clicked_links.map(i=>`${i.url} (${i.clicks})`).join(", "):"-",o.id]);return _(["Email","Contact ID","Count","Bounce Type","Clicked Links","ID"],t,"(no recipients)")}function rl(e){let t=e.map(o=>[o.url,String(o.clicks),String(o.unique_clicks)]);return _(["URL","Clicks","Unique Clicks"],t,"(no clicked links)")}var nl=new d("cancel").description("Cancel a queued or scheduled broadcast").argument("[id]","Broadcast ID").addHelpText("after",c({context:`Only queued or scheduled broadcasts can be cancelled; draft and sent broadcasts cannot.
352
352
  Cancelling a scheduled broadcast stops the scheduled delivery. Cancelling a queued
353
- broadcast stops it mid-send \u2014 emails already sent are not affected.`,output:' {"object":"broadcast","id":"<id>"}',errorCodes:["auth_error","cancel_error"],examples:["resend broadcasts cancel d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts cancel d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,el,i);await R({loading:"Cancelling broadcast...",sdkCall:n=>n.broadcasts.cancel(r),errorCode:"cancel_error",successMsg:"Broadcast cancelled"},i)});var nl=new c("clicked-links").description("List the links clicked in a broadcast, ranked by total clicks").argument("[id]","Broadcast ID").option("--limit <n>","Maximum number of results to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({output:' {"object":"list","has_more":false,"data":[{"id":"...","url":"...","clicks":42,"unique_clicks":30}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --limit 5","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --after b2Zmc2V0OjA","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i),n=D(t.limit,i),s=B(n,t.after,t.before,i);await S({loading:"Fetching clicked links...",sdkCall:a=>a.broadcasts.clickedLinks(r,s),onInteractive:a=>{console.log(il(a.data)),T(a,`broadcasts clicked-links ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});async function pi(e){try{let{data:t,error:o}=await e.domains.list();return o||!t?[]:t.data.filter(i=>i.status==="verified"&&i.capabilities.sending==="enabled").map(i=>i.name)}catch{return[]}}var Mh=["hello","support"];async function fi(e){let t;if(e.length===1)t=e[0];else{let r=await ne({message:"Select a verified domain",options:e.map(n=>({value:n,label:n}))});F(r)&&O("Send cancelled."),t=r}let o=Mh.map(r=>({value:`${r}@${t}`,label:`${r}@${t}`}));o.push({value:null,label:"Custom address..."});let i=await ne({message:`From address (@${t})`,options:o});if(F(i)&&O("Send cancelled."),i===null){let r=await Z({message:"From address",placeholder:`e.g. you@${t}`,validate:n=>n?.includes("@")?void 0:"Enter a valid email address"});return F(r)&&O("Send cancelled."),r}return i}var Wt=require("node:fs"),hl=require("node:path");var hi=require("node:fs"),ul=require("node:os"),Lt=me(require("node:path"),1);function sl(){return"pkg"in process?require("esbuild-wasm"):require("esbuild")}var ll=require("node:fs"),cl=me(require("node:path"),1);function al(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var dl=e=>({name:"rendering-utilities-exporter",setup:t=>{t.onLoad({filter:new RegExp(e.map(o=>al(o)).join("|"))},async({path:o})=>({contents:`${await ll.promises.readFile(o,"utf8")};
353
+ broadcast stops it mid-send \u2014 emails already sent are not affected.`,output:' {"object":"broadcast","id":"<id>"}',errorCodes:["auth_error","cancel_error"],examples:["resend broadcasts cancel d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts cancel d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,tl,i);await F({loading:"Cancelling broadcast...",sdkCall:n=>n.broadcasts.cancel(r),errorCode:"cancel_error",successMsg:"Broadcast cancelled"},i)});var sl=new d("clicked-links").description("List the links clicked in a broadcast, ranked by total clicks").argument("[id]","Broadcast ID").option("--limit <n>","Maximum number of results to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({output:' {"object":"list","has_more":false,"data":[{"id":"...","url":"...","clicks":42,"unique_clicks":30}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --limit 5","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --after b2Zmc2V0OjA","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i),n=D(t.limit,i),s=I(n,t.after,t.before,i);await S({loading:"Fetching clicked links...",sdkCall:a=>a.broadcasts.clickedLinks(r,s),onInteractive:a=>{console.log(rl(a.data)),T(a,`broadcasts clicked-links ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});async function fi(e){try{let{data:t,error:o}=await e.domains.list();return o||!t?[]:t.data.filter(i=>i.status==="verified"&&i.capabilities.sending==="enabled").map(i=>i.name)}catch{return[]}}var Vh=["hello","support"];async function hi(e){let t;if(e.length===1)t=e[0];else{let r=await ne({message:"Select a verified domain",options:e.map(n=>({value:n,label:n}))});R(r)&&O("Send cancelled."),t=r}let o=Vh.map(r=>({value:`${r}@${t}`,label:`${r}@${t}`}));o.push({value:null,label:"Custom address..."});let i=await ne({message:`From address (@${t})`,options:o});if(R(i)&&O("Send cancelled."),i===null){let r=await Z({message:"From address",placeholder:`e.g. you@${t}`,validate:n=>n?.includes("@")?void 0:"Enter a valid email address"});return R(r)&&O("Send cancelled."),r}return i}var Wt=require("node:fs"),gl=require("node:path");var gi=require("node:fs"),ml=require("node:os"),Lt=me(require("node:path"),1);function al(){return"pkg"in process?require("esbuild-wasm"):require("esbuild")}var dl=require("node:fs"),cl=me(require("node:path"),1);function ll(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ul=e=>({name:"rendering-utilities-exporter",setup:t=>{t.onLoad({filter:new RegExp(e.map(o=>ll(o)).join("|"))},async({path:o})=>({contents:`${await dl.promises.readFile(o,"utf8")};
354
354
  export { render } from 'react-email-module-that-will-export-render'
355
355
  export { createElement as reactEmailCreateReactElement } from 'react';
356
- `,loader:cl.default.extname(o).slice(1)})),t.onResolve({filter:/^react-email-module-that-will-export-render$/},async o=>{let i={kind:"import-statement",importer:o.importer,resolveDir:o.resolveDir,namespace:o.namespace},r=await t.resolve("react-email",i);return r.errors.length===0||(r=await t.resolve("@react-email/components",i),r.errors.length===0)||(r=await t.resolve("@react-email/render",i),r.errors.length>0&&r.errors[0]&&(r.errors[0].text="Failed to import `render` from `react-email` (6.0+), `@react-email/components` (5.x), or `@react-email/render`. Install one of them in your project.")),r})}});async function ml(e){let t=Lt.default.resolve(e),o=(0,hi.mkdtempSync)(Lt.default.join((0,ul.tmpdir)(),"resend-react-email-"));try{let{build:n}=sl();await n({bundle:!0,entryPoints:[t],format:"cjs",jsx:"automatic",logLevel:"silent",outExtension:{".js":".cjs"},outdir:o,platform:"node",plugins:[dl([t])],write:!0})}catch(n){throw(0,hi.rmSync)(o,{recursive:!0,force:!0}),n}let i=Lt.default.basename(t,Lt.default.extname(t));return{cjsPath:Lt.default.join(o,`${i}.cjs`),tmpDir:o}}var pl=require("node:module");async function fl(e){let t=(0,pl.createRequire)(e);delete t.cache[e];let o=t(e);return o.render(o.reactEmailCreateReactElement(o.default,{}),{})}var Pr=e=>{e&&(0,Wt.rmSync)(e,{recursive:!0,force:!0})},qe=async(e,t)=>{if(e.trim()==="")return h({message:"--react-email path cannot be empty",code:"react_email_build_error"},{json:t.json});let o=(0,hl.resolve)(e);if(!(0,Wt.existsSync)(o))return h({message:`File not found: ${e}`,code:"react_email_build_error"},{json:t.json});if(!(0,Wt.statSync)(o).isFile())return h({message:`--react-email path must be a file, got a directory: ${e}`,code:"react_email_build_error"},{json:t.json});let i=le("Bundling React Email template...",t.quiet),r;try{let n=await ml(e);r=n.tmpDir,i.stop("Bundled React Email template");let s=le("Rendering React Email template...",t.quiet);try{let a=await fl(n.cjsPath);return s.stop("Rendered React Email template"),Pr(r),a}catch(a){return s.fail("Failed to render React Email template"),Pr(r),h({message:W(a,"Failed to render React Email template"),code:"react_email_render_error"},{json:t.json})}}catch(n){return i.fail("Failed to bundle React Email template"),Pr(r),h({message:W(n,"Failed to bundle React Email template"),code:"react_email_build_error"},{json:t.json})}};X();var Oe={resource:"segment",resourcePlural:"segments",fetchItems:(e,{limit:t,after:o})=>e.segments.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function gi(e){let t=e.map(o=>[o.name,o.id,o.created_at]);return _(["Name","ID","Created"],t,"(no segments)")}var yt={resource:"topic",resourcePlural:"topics",fetchItems:e=>e.topics.list().then(t=>({...t,data:t.data?{data:t.data.data,has_more:!1}:null})),display:e=>({label:e.name,hint:e.id})};function gl(e){let t=e.map(o=>[o.name,o.description??"",o.id,o.created_at]);return _(["Name","Description","ID","Created"],t,"(no topics)")}var Al=new c("create").description("Create a broadcast draft (or send immediately with --send)").option("--from <address>","Sender address \u2014 required").option("--subject <subject>","Email subject \u2014 required").option("--segment-id <id>","Target segment ID \u2014 required").option("--html <html>","HTML body (supports {{{FIRST_NAME|fallback}}} triple-brace variable interpolation)").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin, supports {{{FIRST_NAME|fallback}}} variable interpolation)').option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--name <name>","Internal label for the broadcast (optional)").option("--reply-to <address>","Reply-to address (optional)").option("--preview-text <text>","Preview text shown in inbox below the subject line (optional)").option("--topic-id <id>","Associate with a topic for subscription filtering (optional)").option("--send","Send immediately on create instead of saving as draft").option("--scheduled-at <datetime>",'Schedule delivery \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET" (only valid with --send)').option("--dry-run","Validate input and print the create request JSON without calling the API (interactive: type segment/topic IDs; lists are not fetched)").addHelpText("after",d({context:`Non-interactive: --from, --subject, and --segment-id are required.
356
+ `,loader:cl.default.extname(o).slice(1)})),t.onResolve({filter:/^react-email-module-that-will-export-render$/},async o=>{let i={kind:"import-statement",importer:o.importer,resolveDir:o.resolveDir,namespace:o.namespace},r=await t.resolve("react-email",i);return r.errors.length===0||(r=await t.resolve("@react-email/components",i),r.errors.length===0)||(r=await t.resolve("@react-email/render",i),r.errors.length>0&&r.errors[0]&&(r.errors[0].text="Failed to import `render` from `react-email` (6.0+), `@react-email/components` (5.x), or `@react-email/render`. Install one of them in your project.")),r})}});async function pl(e){let t=Lt.default.resolve(e),o=(0,gi.mkdtempSync)(Lt.default.join((0,ml.tmpdir)(),"resend-react-email-"));try{let{build:n}=al();await n({bundle:!0,entryPoints:[t],format:"cjs",jsx:"automatic",logLevel:"silent",outExtension:{".js":".cjs"},outdir:o,platform:"node",plugins:[ul([t])],write:!0})}catch(n){throw(0,gi.rmSync)(o,{recursive:!0,force:!0}),n}let i=Lt.default.basename(t,Lt.default.extname(t));return{cjsPath:Lt.default.join(o,`${i}.cjs`),tmpDir:o}}var fl=require("node:module");async function hl(e){let t=(0,fl.createRequire)(e);delete t.cache[e];let o=t(e);return o.render(o.reactEmailCreateReactElement(o.default,{}),{})}var $r=e=>{e&&(0,Wt.rmSync)(e,{recursive:!0,force:!0})},qe=async(e,t)=>{if(e.trim()==="")return h({message:"--react-email path cannot be empty",code:"react_email_build_error"},{json:t.json});let o=(0,gl.resolve)(e);if(!(0,Wt.existsSync)(o))return h({message:`File not found: ${e}`,code:"react_email_build_error"},{json:t.json});if(!(0,Wt.statSync)(o).isFile())return h({message:`--react-email path must be a file, got a directory: ${e}`,code:"react_email_build_error"},{json:t.json});let i=le("Bundling React Email template...",t.quiet),r;try{let n=await pl(e);r=n.tmpDir,i.stop("Bundled React Email template");let s=le("Rendering React Email template...",t.quiet);try{let a=await hl(n.cjsPath);return s.stop("Rendered React Email template"),$r(r),a}catch(a){return s.fail("Failed to render React Email template"),$r(r),h({message:W(a,"Failed to render React Email template"),code:"react_email_render_error"},{json:t.json})}}catch(n){return i.fail("Failed to bundle React Email template"),$r(r),h({message:W(n,"Failed to bundle React Email template"),code:"react_email_build_error"},{json:t.json})}};X();var Oe={resource:"segment",resourcePlural:"segments",fetchItems:(e,{limit:t,after:o})=>e.segments.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function Ai(e){let t=e.map(o=>[o.name,o.id,o.created_at]);return _(["Name","ID","Created"],t,"(no segments)")}var yt={resource:"topic",resourcePlural:"topics",fetchItems:e=>e.topics.list().then(t=>({...t,data:t.data?{data:t.data.data,has_more:!1}:null})),display:e=>({label:e.name,hint:e.id})};function Al(e){let t=e.map(o=>[o.name,o.description??"",o.id,o.created_at]);return _(["Name","Description","ID","Created"],t,"(no topics)")}var bl=new d("create").description("Create a broadcast draft (or send immediately with --send)").option("--from <address>","Sender address \u2014 required").option("--subject <subject>","Email subject \u2014 required").option("--segment-id <id>","Target segment ID \u2014 required").option("--html <html>","HTML body (supports {{{FIRST_NAME|fallback}}} triple-brace variable interpolation)").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin, supports {{{FIRST_NAME|fallback}}} variable interpolation)').option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--name <name>","Internal label for the broadcast (optional)").option("--reply-to <address>","Reply-to address (optional)").option("--preview-text <text>","Preview text shown in inbox below the subject line (optional)").option("--topic-id <id>","Associate with a topic for subscription filtering (optional)").option("--send","Send immediately on create instead of saving as draft").option("--scheduled-at <datetime>",'Schedule delivery \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET" (only valid with --send)').option("--dry-run","Validate input and print the create request JSON without calling the API (interactive: type segment/topic IDs; lists are not fetched)").addHelpText("after",c({context:`Non-interactive: --from, --subject, and --segment-id are required.
357
357
  Body: provide at least one of --html, --html-file, --text, --text-file, or --react-email.
358
358
 
359
359
  Use --dry-run to print the request JSON without creating a broadcast.
@@ -365,31 +365,31 @@ Variable interpolation:
365
365
  Scheduling:
366
366
  Use --scheduled-at with --send to schedule delivery.
367
367
  Accepts ISO 8601 (e.g. 2026-08-05T11:52:01Z) or natural language (e.g. "in 1 hour").
368
- --scheduled-at without --send is ignored.`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","missing_from","missing_subject","missing_segment","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend broadcasts create --from onboarding@resend.dev --subject "Weekly Update" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hello {{{FIRST_NAME|there}}}</p>"','resend broadcasts create --from onboarding@resend.dev --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html-file ./email.html --send','resend broadcasts create --from onboarding@resend.dev --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --text "Hello!" --send --scheduled-at "tomorrow at 9am ET"']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.htmlFile==="-"&&e.textFile==="-"&&h({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile)&&h({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:o.json}),e.html!==void 0&&e.htmlFile!==void 0&&h({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:o.json}),e.text!==void 0&&e.textFile!==void 0&&h({message:"--text and --text-file are mutually exclusive.",code:"invalid_options"},{json:o.json});let i=e.from,r=e.subject,n=e.segmentId;if(!i&&w()&&!o.json&&!e.dryRun){let m=await ee(o),p=await pi(m);p.length>0&&(i=await fi(p))}if(!i){(!w()||o.json)&&h({message:"Missing --from flag.",code:"missing_from"},{json:o.json});let m=await Z({message:"From address",placeholder:"e.g. onboarding@resend.dev",validate:p=>p?void 0:"Required"});F(m)&&O("Cancelled."),i=m}if(!r){(!w()||o.json)&&h({message:"Missing --subject flag.",code:"missing_subject"},{json:o.json});let m=await Z({message:"Subject",placeholder:"e.g. Weekly Newsletter",validate:p=>p?void 0:"Required"});F(m)&&O("Cancelled."),r=m}if(!n)if((!w()||o.json)&&h({message:"Missing --segment-id flag.",code:"missing_segment"},{json:o.json}),e.dryRun){let m=await Z({message:"Segment ID",placeholder:"e.g. 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d",validate:p=>p?void 0:"Required"});F(m)&&O("Cancelled."),n=m}else n=await g(void 0,Oe,o);let s=e.reactEmail?await qe(e.reactEmail,o):e.htmlFile?ie(e.htmlFile,o):e.html,a=e.textFile?ie(e.textFile,o):e.text;if(!s&&!a){(!w()||o.json)&&h({message:"Missing body. Provide --html, --html-file, --text, --text-file, or --react-email.",code:"missing_body"},{json:o.json});let m=await Z({message:"Body (plain text)",placeholder:"e.g. Hello {{{FIRST_NAME|there}}}!",validate:p=>p?void 0:"Required"});F(m)&&O("Cancelled."),a=m}let l=e.topicId;if(!l&&w()&&!o.json)if(e.dryRun){let m=await Z({message:"Topic ID (optional)",placeholder:"Press Enter to skip"});F(m)&&O("Cancelled."),l=m.trim()||void 0}else l=await g(void 0,yt,o,{optional:!0});let u={from:i,subject:r,segmentId:n,...s&&{html:s},...a&&{text:a},...e.name&&{name:e.name},...e.replyTo&&{replyTo:e.replyTo},...e.previewText&&{previewText:e.previewText},...l&&{topicId:l},...e.send&&{send:!0},...e.send&&e.scheduledAt&&{scheduledAt:e.scheduledAt}};if(e.dryRun){N({dryRun:!0,request:u},{json:o.json});return}await P({loading:"Creating broadcast...",sdkCall:m=>m.broadcasts.create(u),onInteractive:m=>{e.send?e.scheduledAt?console.log(`Broadcast scheduled: ${m.id}`):console.log(`Broadcast sent: ${m.id}`):(console.log(`Broadcast created: ${m.id}`),console.log("Status: draft"),console.log(`Send it with: resend broadcasts send ${m.id}`))}},o)});var bl=new c("delete").alias("rm").description("Delete a broadcast \u2014 draft broadcasts are removed; scheduled broadcasts are cancelled before delivery").argument("[id]","Broadcast ID").option("--yes","Skip confirmation prompt").addHelpText("after",d({context:`Warning: Deleting a scheduled broadcast cancels its delivery immediately.
368
+ --scheduled-at without --send is ignored.`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","missing_from","missing_subject","missing_segment","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend broadcasts create --from onboarding@resend.dev --subject "Weekly Update" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hello {{{FIRST_NAME|there}}}</p>"','resend broadcasts create --from onboarding@resend.dev --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html-file ./email.html --send','resend broadcasts create --from onboarding@resend.dev --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --text "Hello!" --send --scheduled-at "tomorrow at 9am ET"']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.htmlFile==="-"&&e.textFile==="-"&&h({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile)&&h({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:o.json}),e.html!==void 0&&e.htmlFile!==void 0&&h({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:o.json}),e.text!==void 0&&e.textFile!==void 0&&h({message:"--text and --text-file are mutually exclusive.",code:"invalid_options"},{json:o.json});let i=e.from,r=e.subject,n=e.segmentId;if(!i&&w()&&!o.json&&!e.dryRun){let m=await ee(o),p=await fi(m);p.length>0&&(i=await hi(p))}if(!i){(!w()||o.json)&&h({message:"Missing --from flag.",code:"missing_from"},{json:o.json});let m=await Z({message:"From address",placeholder:"e.g. onboarding@resend.dev",validate:p=>p?void 0:"Required"});R(m)&&O("Cancelled."),i=m}if(!r){(!w()||o.json)&&h({message:"Missing --subject flag.",code:"missing_subject"},{json:o.json});let m=await Z({message:"Subject",placeholder:"e.g. Weekly Newsletter",validate:p=>p?void 0:"Required"});R(m)&&O("Cancelled."),r=m}if(!n)if((!w()||o.json)&&h({message:"Missing --segment-id flag.",code:"missing_segment"},{json:o.json}),e.dryRun){let m=await Z({message:"Segment ID",placeholder:"e.g. 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d",validate:p=>p?void 0:"Required"});R(m)&&O("Cancelled."),n=m}else n=await g(void 0,Oe,o);let s=e.reactEmail?await qe(e.reactEmail,o):e.htmlFile?ie(e.htmlFile,o):e.html,a=e.textFile?ie(e.textFile,o):e.text;if(!s&&!a){(!w()||o.json)&&h({message:"Missing body. Provide --html, --html-file, --text, --text-file, or --react-email.",code:"missing_body"},{json:o.json});let m=await Z({message:"Body (plain text)",placeholder:"e.g. Hello {{{FIRST_NAME|there}}}!",validate:p=>p?void 0:"Required"});R(m)&&O("Cancelled."),a=m}let l=e.topicId;if(!l&&w()&&!o.json)if(e.dryRun){let m=await Z({message:"Topic ID (optional)",placeholder:"Press Enter to skip"});R(m)&&O("Cancelled."),l=m.trim()||void 0}else l=await g(void 0,yt,o,{optional:!0});let u={from:i,subject:r,segmentId:n,...s&&{html:s},...a&&{text:a},...e.name&&{name:e.name},...e.replyTo&&{replyTo:e.replyTo},...e.previewText&&{previewText:e.previewText},...l&&{topicId:l},...e.send&&{send:!0},...e.send&&e.scheduledAt&&{scheduledAt:e.scheduledAt}};if(e.dryRun){M({dryRun:!0,request:u},{json:o.json});return}await P({loading:"Creating broadcast...",sdkCall:m=>m.broadcasts.create(u),onInteractive:m=>{e.send?e.scheduledAt?console.log(`Broadcast scheduled: ${m.id}`):console.log(`Broadcast sent: ${m.id}`):(console.log(`Broadcast created: ${m.id}`),console.log("Status: draft"),console.log(`Send it with: resend broadcasts send ${m.id}`))}},o)});var yl=new d("delete").alias("rm").description("Delete a broadcast \u2014 draft broadcasts are removed; scheduled broadcasts are cancelled before delivery").argument("[id]","Broadcast ID").option("--yes","Skip confirmation prompt").addHelpText("after",c({context:`Warning: Deleting a scheduled broadcast cancels its delivery immediately.
369
369
  Only draft and scheduled broadcasts can be deleted; sent broadcasts cannot.
370
370
 
371
371
  Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"broadcast","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes","resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,Me,i);await z(r.id,!!t.yes,{confirmMessage:`Delete broadcast "${r.label}"?
372
372
  ID: ${r.id}
373
- If scheduled, delivery will be cancelled.`,loading:"Deleting broadcast...",object:"broadcast",successMsg:"Broadcast deleted",sdkCall:n=>n.broadcasts.remove(r.id)},i)});var yl=new c("duplicate").description("Duplicate a broadcast").argument("[id]","Broadcast ID").addHelpText("after",d({context:`Creates a copy of an existing broadcast and returns the new broadcast ID.
373
+ If scheduled, delivery will be cancelled.`,loading:"Deleting broadcast...",object:"broadcast",successMsg:"Broadcast deleted",sdkCall:n=>n.broadcasts.remove(r.id)},i)});var Cl=new d("duplicate").description("Duplicate a broadcast").argument("[id]","Broadcast ID").addHelpText("after",c({context:`Creates a copy of an existing broadcast and returns the new broadcast ID.
374
374
  The copy is a draft named after the original with " (copy)" appended, truncated to 70 characters.
375
- Segment, topic, from, subject, reply-to, preview text, and content are copied. Any broadcast can be duplicated, including sent ones.`,output:' {"object":"broadcast","id":"<new-broadcast-id>"}',errorCodes:["auth_error","create_error"],examples:["resend broadcasts duplicate d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts duplicate d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i);await P({loading:"Duplicating broadcast...",sdkCall:n=>n.broadcasts.duplicate(r),onInteractive:n=>{console.log(`Broadcast duplicated: ${n.id}`)}},i)});var Cl=new c("get").description("Retrieve full details for a broadcast including HTML body, status, and delivery times").argument("[id]","Broadcast ID").addHelpText("after",d({context:`Note: The list command returns summary objects without html/text/from/subject.
376
- Use this command to retrieve the full broadcast payload.`,output:' {"id":"...","object":"broadcast","name":"...","segment_id":"...","from":"...","subject":"...","status":"draft|queued|sent","created_at":"...","scheduled_at":null,"sent_at":null}',errorCodes:["auth_error","fetch_error"],examples:["resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i);await j({loading:"Fetching broadcast...",sdkCall:n=>n.broadcasts.get(r),onInteractive:n=>{console.log(`Broadcast: ${n.id}`),console.log(` Status: ${jr(n.status)}`),console.log(` Name: ${n.name??"(untitled)"}`),console.log(` From: ${n.from??"\u2014"}`),console.log(` Subject: ${n.subject??"\u2014"}`),console.log(` Segment: ${n.segment_id??"\u2014"}`),n.preview_text&&console.log(` Preview: ${n.preview_text}`),n.topic_id&&console.log(` Topic: ${n.topic_id}`),console.log(` Created: ${n.created_at}`),n.scheduled_at&&console.log(` Scheduled: ${n.scheduled_at}`),n.sent_at&&console.log(` Sent: ${n.sent_at}`)}},i)});var xl=new c("list").alias("ls").description('List broadcasts \u2014 returns summary objects (use "get <id>" for full details including html/text)').option("--limit <n>","Maximum number of results to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({context:`Note: List results include name, status, created_at, and id only.
377
- To retrieve full details (html, from, subject), use: resend broadcasts get <id>`,output:' {"object":"list","has_more":false,"data":[{"id":"...","name":"...","status":"draft|queued|sent","created_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend broadcasts list","resend broadcasts list --limit 5","resend broadcasts list --after d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --limit 10","resend broadcasts list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching broadcasts...",sdkCall:n=>n.broadcasts.list(r),onInteractive:n=>{console.log(tl(n.data)),T(n,"broadcasts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var wl=new c("open").description("Open a broadcast or the broadcasts list in the Resend dashboard").argument("[id]","Broadcast ID \u2014 omit to open the broadcasts list").addHelpText("after",d({context:`Opens the Resend dashboard in your default browser.
375
+ Segment, topic, from, subject, reply-to, preview text, and content are copied. Any broadcast can be duplicated, including sent ones.`,output:' {"object":"broadcast","id":"<new-broadcast-id>"}',errorCodes:["auth_error","create_error"],examples:["resend broadcasts duplicate d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts duplicate d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i);await P({loading:"Duplicating broadcast...",sdkCall:n=>n.broadcasts.duplicate(r),onInteractive:n=>{console.log(`Broadcast duplicated: ${n.id}`)}},i)});var xl=new d("get").description("Retrieve full details for a broadcast including HTML body, status, and delivery times").argument("[id]","Broadcast ID").addHelpText("after",c({context:`Note: The list command returns summary objects without html/text/from/subject.
376
+ Use this command to retrieve the full broadcast payload.`,output:' {"id":"...","object":"broadcast","name":"...","segment_id":"...","from":"...","subject":"...","status":"draft|queued|sent","created_at":"...","scheduled_at":null,"sent_at":null}',errorCodes:["auth_error","fetch_error"],examples:["resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i);await B({loading:"Fetching broadcast...",sdkCall:n=>n.broadcasts.get(r),onInteractive:n=>{console.log(`Broadcast: ${n.id}`),console.log(` Status: ${Pr(n.status)}`),console.log(` Name: ${n.name??"(untitled)"}`),console.log(` From: ${n.from??"\u2014"}`),console.log(` Subject: ${n.subject??"\u2014"}`),console.log(` Segment: ${n.segment_id??"\u2014"}`),n.preview_text&&console.log(` Preview: ${n.preview_text}`),n.topic_id&&console.log(` Topic: ${n.topic_id}`),console.log(` Created: ${n.created_at}`),n.scheduled_at&&console.log(` Scheduled: ${n.scheduled_at}`),n.sent_at&&console.log(` Sent: ${n.sent_at}`)}},i)});var wl=new d("list").alias("ls").description('List broadcasts \u2014 returns summary objects (use "get <id>" for full details including html/text)').option("--limit <n>","Maximum number of results to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({context:`Note: List results include name, status, created_at, and id only.
377
+ To retrieve full details (html, from, subject), use: resend broadcasts get <id>`,output:' {"object":"list","has_more":false,"data":[{"id":"...","name":"...","status":"draft|queued|sent","created_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend broadcasts list","resend broadcasts list --limit 5","resend broadcasts list --after d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --limit 10","resend broadcasts list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching broadcasts...",sdkCall:n=>n.broadcasts.list(r),onInteractive:n=>{console.log(ol(n.data)),T(n,"broadcasts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var vl=new d("open").description("Open a broadcast or the broadcasts list in the Resend dashboard").argument("[id]","Broadcast ID \u2014 omit to open the broadcasts list").addHelpText("after",c({context:`Opens the Resend dashboard in your default browser.
378
378
  With an ID: opens that broadcast's page for viewing or editing.
379
- Without an ID: opens the broadcasts list.`,examples:["resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).action(async(e,t,o)=>{let i=e?he.broadcast(e):he.broadcasts,r=o.optsWithGlobals();await Te(i,r)});var vl=["sent","delivered","opened","clicked","bounced","complained","unsubscribed","suppressed"],Ul=new c("recipients").description("List a broadcast's recipients for a given event type").argument("[id]","Broadcast ID").addOption(new q("--type <type>","Event type to filter recipients by").choices(vl)).option("--email <email>","Filter recipients whose email contains this value").addOption(new q("--bounce-type <type>","Filter by bounce classification \u2014 only meaningful when --type is bounced").choices(["permanent","transient","undetermined"])).option("--limit <n>","Maximum number of recipients to return (1-100)","20").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({context:`Non-interactive: --type is required.
379
+ Without an ID: opens the broadcasts list.`,examples:["resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).action(async(e,t,o)=>{let i=e?he.broadcast(e):he.broadcasts,r=o.optsWithGlobals();await Te(i,r)});var Ul=["sent","delivered","opened","clicked","bounced","complained","unsubscribed","suppressed"],Sl=new d("recipients").description("List a broadcast's recipients for a given event type").argument("[id]","Broadcast ID").addOption(new q("--type <type>","Event type to filter recipients by").choices(Ul)).option("--email <email>","Filter recipients whose email contains this value").addOption(new q("--bounce-type <type>","Filter by bounce classification \u2014 only meaningful when --type is bounced").choices(["permanent","transient","undetermined"])).option("--limit <n>","Maximum number of recipients to return (1-100)","20").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({context:`Non-interactive: --type is required.
380
380
  Note: responses are cached for up to 15 minutes, so requesting the same page
381
381
  again may return slightly stale data within that window.
382
- --bounce-type only has an effect when --type is bounced.`,output:' {"object":"list","has_more":false,"data":[{"id":"<cursor>","contact_id":"<id>|null","email":"...","count":3,"clicked_links":[{"url":"...","clicks":2}]}]}',errorCodes:["auth_error","missing_type","invalid_limit","invalid_pagination","list_error"],examples:["resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type opened","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type clicked --limit 50","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type bounced --bounce-type permanent","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type sent --email @example.com --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i),n=await bt(t.type,{message:"Event type",options:vl.map(l=>({value:l,label:l}))},{message:"Missing --type flag.",code:"missing_type"},i),s=D(t.limit,i),a=B(s,t.after,t.before,i);await S({loading:"Fetching recipients...",sdkCall:l=>l.broadcasts.recipients(r,{type:n,...a,...t.email&&{email:t.email},...t.bounceType&&{bounceType:t.bounceType}}),onInteractive:l=>{console.log(ol(l.data)),T(l,`broadcasts recipients ${r}`,{limit:s,before:t.before,apiKey:i.apiKey,profile:i.profile,extraFlags:[`--type ${n}`,t.email&&`--email ${t.email}`,t.bounceType&&`--bounce-type ${t.bounceType}`].filter(Boolean).join(" ")})}},i)});var Sl=new c("send").description("Send a draft broadcast (API-created drafts only \u2014 dashboard broadcasts cannot be sent via API)").argument("[id]","Broadcast ID").option("--scheduled-at <datetime>",'Schedule delivery \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET"').addHelpText("after",d({context:`Note: Only broadcasts created via the API can be sent via this command.
382
+ --bounce-type only has an effect when --type is bounced.`,output:' {"object":"list","has_more":false,"data":[{"id":"<cursor>","contact_id":"<id>|null","email":"...","count":3,"clicked_links":[{"url":"...","clicks":2}]}]}',errorCodes:["auth_error","missing_type","invalid_limit","invalid_pagination","list_error"],examples:["resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type opened","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type clicked --limit 50","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type bounced --bounce-type permanent","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type sent --email @example.com --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Me,i),n=await bt(t.type,{message:"Event type",options:Ul.map(l=>({value:l,label:l}))},{message:"Missing --type flag.",code:"missing_type"},i),s=D(t.limit,i),a=I(s,t.after,t.before,i);await S({loading:"Fetching recipients...",sdkCall:l=>l.broadcasts.recipients(r,{type:n,...a,...t.email&&{email:t.email},...t.bounceType&&{bounceType:t.bounceType}}),onInteractive:l=>{console.log(il(l.data)),T(l,`broadcasts recipients ${r}`,{limit:s,before:t.before,apiKey:i.apiKey,profile:i.profile,extraFlags:[`--type ${n}`,t.email&&`--email ${t.email}`,t.bounceType&&`--bounce-type ${t.bounceType}`].filter(Boolean).join(" ")})}},i)});var Kl=new d("send").description("Send a draft broadcast (API-created drafts only \u2014 dashboard broadcasts cannot be sent via API)").argument("[id]","Broadcast ID").option("--scheduled-at <datetime>",'Schedule delivery \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET"').addHelpText("after",c({context:`Note: Only broadcasts created via the API can be sent via this command.
383
383
  Broadcasts created in the Resend dashboard cannot be sent programmatically.
384
384
 
385
385
  Scheduling:
386
386
  --scheduled-at accepts ISO 8601 (e.g. 2026-08-05T11:52:01Z) or
387
- natural language (e.g. "in 1 hour", "tomorrow at 9am ET").`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","send_error"],examples:["resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"','resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "2026-08-05T11:52:01Z" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Za,i);await R({loading:t.scheduledAt?"Scheduling broadcast...":"Sending broadcast...",sdkCall:n=>n.broadcasts.send(r,{...t.scheduledAt&&{scheduledAt:t.scheduledAt}}),errorCode:"send_error",successMsg:t.scheduledAt?"Broadcast scheduled":"Broadcast sent",permission:"sending_access"},i)});var Kl=new c("update").description("Update a draft broadcast \u2014 only drafts can be updated; sent broadcasts are immutable").argument("[id]","Broadcast ID").option("--from <address>","Update sender address").option("--subject <subject>","Update subject").option("--html <html>","Update HTML body (supports {{{FIRST_NAME|fallback}}} variable interpolation)").option("--html-file <path>",'Path to an HTML file to replace the body (use "-" for stdin, supports {{{FIRST_NAME|fallback}}} variable interpolation)').option("--text <text>","Update plain-text body").option("--text-file <path>",'Path to a plain-text file to replace the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--name <name>","Update internal label").addHelpText("after",d({context:`Note: Only draft broadcasts can be updated.
387
+ natural language (e.g. "in 1 hour", "tomorrow at 9am ET").`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","send_error"],examples:["resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"','resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "2026-08-05T11:52:01Z" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,el,i);await F({loading:t.scheduledAt?"Scheduling broadcast...":"Sending broadcast...",sdkCall:n=>n.broadcasts.send(r,{...t.scheduledAt&&{scheduledAt:t.scheduledAt}}),errorCode:"send_error",successMsg:t.scheduledAt?"Broadcast scheduled":"Broadcast sent",permission:"sending_access"},i)});var kl=new d("update").description("Update a draft broadcast \u2014 only drafts can be updated; sent broadcasts are immutable").argument("[id]","Broadcast ID").option("--from <address>","Update sender address").option("--subject <subject>","Update subject").option("--html <html>","Update HTML body (supports {{{FIRST_NAME|fallback}}} variable interpolation)").option("--html-file <path>",'Path to an HTML file to replace the body (use "-" for stdin, supports {{{FIRST_NAME|fallback}}} variable interpolation)').option("--text <text>","Update plain-text body").option("--text-file <path>",'Path to a plain-text file to replace the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--name <name>","Update internal label").addHelpText("after",c({context:`Note: Only draft broadcasts can be updated.
388
388
  If the broadcast is already sent or sending, the API will return an error.
389
389
 
390
390
  Variable interpolation:
391
391
  HTML bodies support triple-brace syntax for contact properties.
392
- Example: {{{FIRST_NAME|Friend}}} \u2014 uses FIRST_NAME or falls back to "Friend".`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","no_changes","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","update_error"],examples:['resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file ./new-email.html",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --name "Q1 Newsletter" --from "onboarding@resend.dev" --json','echo "<p>New content</p>" | resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file -']})).action(async(e,t,o)=>{let i=o.optsWithGlobals();t.from==null&&t.subject==null&&t.html==null&&t.htmlFile==null&&t.text==null&&t.textFile==null&&t.reactEmail==null&&t.name==null&&h({message:"Provide at least one option to update: --from, --subject, --html, --html-file, --text, --text-file, --react-email, or --name.",code:"no_changes"},{json:i.json}),t.htmlFile==="-"&&t.textFile==="-"&&h({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:i.json}),t.reactEmail!=null&&(t.html!=null||t.htmlFile!=null)&&h({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:i.json}),t.html!=null&&t.htmlFile!=null&&h({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:i.json}),t.text!=null&&t.textFile!=null&&h({message:"--text and --text-file are mutually exclusive.",code:"invalid_options"},{json:i.json});let r=await g(e,Me,i),n=t.reactEmail!=null?await qe(t.reactEmail,i):t.htmlFile!=null?ie(t.htmlFile,i):t.html,s=t.textFile!=null?ie(t.textFile,i):t.text;await R({loading:"Updating broadcast...",sdkCall:a=>a.broadcasts.update(r,{...t.from!=null&&{from:t.from},...t.subject!=null&&{subject:t.subject},...n!=null&&{html:n},...s!=null&&{text:s},...t.name!=null&&{name:t.name}}),errorCode:"update_error",successMsg:`Broadcast updated: ${r}`},i)});var kl=new c("broadcasts").description("Manage broadcasts").addHelpText("after",d({context:`Lifecycle:
392
+ Example: {{{FIRST_NAME|Friend}}} \u2014 uses FIRST_NAME or falls back to "Friend".`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","no_changes","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","update_error"],examples:['resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file ./new-email.html",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --name "Q1 Newsletter" --from "onboarding@resend.dev" --json','echo "<p>New content</p>" | resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file -']})).action(async(e,t,o)=>{let i=o.optsWithGlobals();t.from==null&&t.subject==null&&t.html==null&&t.htmlFile==null&&t.text==null&&t.textFile==null&&t.reactEmail==null&&t.name==null&&h({message:"Provide at least one option to update: --from, --subject, --html, --html-file, --text, --text-file, --react-email, or --name.",code:"no_changes"},{json:i.json}),t.htmlFile==="-"&&t.textFile==="-"&&h({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:i.json}),t.reactEmail!=null&&(t.html!=null||t.htmlFile!=null)&&h({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:i.json}),t.html!=null&&t.htmlFile!=null&&h({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:i.json}),t.text!=null&&t.textFile!=null&&h({message:"--text and --text-file are mutually exclusive.",code:"invalid_options"},{json:i.json});let r=await g(e,Me,i),n=t.reactEmail!=null?await qe(t.reactEmail,i):t.htmlFile!=null?ie(t.htmlFile,i):t.html,s=t.textFile!=null?ie(t.textFile,i):t.text;await F({loading:"Updating broadcast...",sdkCall:a=>a.broadcasts.update(r,{...t.from!=null&&{from:t.from},...t.subject!=null&&{subject:t.subject},...n!=null&&{html:n},...s!=null&&{text:s},...t.name!=null&&{name:t.name}}),errorCode:"update_error",successMsg:`Broadcast updated: ${r}`},i)});var _l=new d("broadcasts").description("Manage broadcasts").addHelpText("after",c({context:`Lifecycle:
393
393
  Broadcasts follow a draft \u2192 send flow:
394
394
  1. create \u2014 creates a draft (or sends immediately with --send)
395
395
  2. send \u2014 sends an API-created draft (dashboard broadcasts cannot be sent via API)
@@ -403,7 +403,7 @@ Template variables:
403
403
  Example: {{{FIRST_NAME|Friend}}} \u2014 uses FIRST_NAME or falls back to "Friend".
404
404
 
405
405
  Scheduling:
406
- --scheduled-at accepts ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET".`,examples:["resend broadcasts list",'resend broadcasts create --from onboarding@resend.dev --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hi {{{FIRST_NAME|there}}}</p>"',"resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"',"resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type opened",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts cancel d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts duplicate d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes","resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).addCommand(Al).addCommand(wl).addCommand(Sl).addCommand(Cl).addCommand(xl,{isDefault:!0}).addCommand(Ul).addCommand(Kl).addCommand(rl).addCommand(yl).addCommand(bl).addCommand(nl);var Ol=require("node:fs"),xo=require("node:path");X();var _l=["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos Islands","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Cura\xE7ao","Cyprus","Czech Republic","Democratic Republic of the Congo","Denmark","Djibouti","Dominica","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Ivory Coast","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Republic of the Congo","R\xE9union","Romania","Russia","Rwanda","Saint Barth\xE9lemy","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","S\xE3o Tom\xE9 and Pr\xEDncipe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"];var Fl={resource:"job posting",resourcePlural:"job postings",permission:"sending_access",fetchItems:async e=>{let{data:t,error:o}=await e.get("/careers");return{data:t?{data:t.data,has_more:!1}:null,error:o}},display:e=>({label:e.title,hint:e.location??e.id})};function Rl(e){let t=e.map(o=>[o.title,o.location??"",o.department??"",o.id]);return _(["Title","Location","Department","ID"],t,"(no open positions)")}var qh=10*1024*1024,Lh={".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".txt":"text/plain"},Jt="__skip__",El=new c("apply").description("Apply to an open position at Resend").argument("[id]","Job posting ID (from `resend careers list`)").option("--name <name>","Your full name").option("--email <email>","Your email address").option("--resume <path>","Path to your resume file (PDF, max 10MB)").option("--field <path=value...>","Answer a job-specific question by field path (repeatable: --field <path>=<answer>). Field paths are shown on the job posting page at resend.com/careers").option("--yes","Skip the confirmation prompt in interactive mode").addHelpText("after",d({context:`Interactive: run without flags to pick a position and answer each application
406
+ --scheduled-at accepts ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET".`,examples:["resend broadcasts list",'resend broadcasts create --from onboarding@resend.dev --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hi {{{FIRST_NAME|there}}}</p>"',"resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"',"resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts recipients d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --type opened",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts cancel d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts duplicate d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes","resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts clicked-links d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).addCommand(bl).addCommand(vl).addCommand(Kl).addCommand(xl).addCommand(wl,{isDefault:!0}).addCommand(Sl).addCommand(kl).addCommand(nl).addCommand(Cl).addCommand(yl).addCommand(sl);var El=require("node:fs"),xo=require("node:path");X();var Fl=["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos Islands","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Cura\xE7ao","Cyprus","Czech Republic","Democratic Republic of the Congo","Denmark","Djibouti","Dominica","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Ivory Coast","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Republic of the Congo","R\xE9union","Romania","Russia","Rwanda","Saint Barth\xE9lemy","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","S\xE3o Tom\xE9 and Pr\xEDncipe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"];var Rl={resource:"job posting",resourcePlural:"job postings",permission:"sending_access",fetchItems:async e=>{let{data:t,error:o}=await e.get("/careers");return{data:t?{data:t.data,has_more:!1}:null,error:o}},display:e=>({label:e.title,hint:e.location??e.id})};function Dl(e){let t=e.map(o=>[o.title,o.location??"",o.department??"",o.id]);return _(["Title","Location","Department","ID"],t,"(no open positions)")}var zh=10*1024*1024,Yh={".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".txt":"text/plain"},Jt="__skip__",Bl=new d("apply").description("Apply to an open position at Resend").argument("[id]","Job posting ID (from `resend careers list`)").option("--name <name>","Your full name").option("--email <email>","Your email address").option("--resume <path>","Path to your resume file (PDF, max 10MB)").option("--field <path=value...>","Answer a job-specific question by field path (repeatable: --field <path>=<answer>). Field paths are shown on the job posting page at resend.com/careers").option("--yes","Skip the confirmation prompt in interactive mode").addHelpText("after",c({context:`Interactive: run without flags to pick a position and answer each application
407
407
  question in a guided form. Flags pre-fill their matching questions.
408
408
 
409
409
  Non-interactive: --name, --email, and --resume are required, plus the job posting
@@ -411,27 +411,27 @@ ID argument. Answer job-specific questions with --field <path>=<value>, where
411
411
  <path> is shown on the job posting page at resend.com/careers (custom questions
412
412
  use UUID paths).
413
413
 
414
- The resume is uploaded as multipart form data (max 10MB, PDF recommended).`,output:' {"success":true}',errorCodes:["auth_error","missing_id","list_error","missing_name","missing_email","missing_resume","invalid_field","file_read_error","invalid_resume","fetch_error","apply_error"],examples:["resend careers apply",`resend careers apply 053bde8f-294e-4cce-9d62-2301282120a2 --name "Ada Lovelace" --email ada@example.com --resume ./resume.pdf --field 'd5cef330-d154-4f3a-8c5a-092986c61fe3=I love email infrastructure.'`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=new Map;for(let[A,b]of Wh(t.field,i))r.set(A,b);t.name!==void 0&&r.set("name",t.name),t.email!==void 0&&r.set("email",t.email);let n=w()&&!i.json,s=await J(e,Fl,i),a=s.id,l=t.resume,u=s.label;if(n){let A=await ee(i,{permission:"sending_access"}),b=await ce("Fetching the application form...",()=>A.get(`/careers/${a}`),"fetch_error",i,{retryTransient:!0});u=b.title,Ho(b.location?`Apply to ${b.title} - ${b.location}`:`Apply to ${b.title}`);for(let x of b.fields){if(x.path==="resume"){l=l??await Tl(x.title);continue}if(x.type==="File"){te.warn(`Skipping "${x.title}": only the resume file can be uploaded here. Apply on the careers page to include it.`);continue}if(r.has(x.path))continue;let v=await Jh(x);v!==void 0&&r.set(x.path,v)}r.has("name")||r.set("name",await Dl("Name")),r.has("email")||r.set("email",await Dl("Email")),l=l??await Tl("Resume"),t.yes||await Vh(b,r,l)}else r.get("name")||h({message:"Missing --name flag.",code:"missing_name"},{json:i.json}),r.get("email")||h({message:"Missing --email flag.",code:"missing_email"},{json:i.json}),l||h({message:"Missing --resume flag.",code:"missing_resume"},{json:i.json});let m=Yh(l,i),p=new FormData;for(let[A,b]of r)p.append(A,b);p.append("resume",m.blob,m.filename);let f=await ee(i,{permission:"sending_access"}),y=await ce("Submitting application...",()=>f.fetchRequest(`/careers/${a}`,{method:"POST",headers:{Authorization:`Bearer ${f.key}`,"User-Agent":process.env.RESEND_USER_AGENT??""},body:p}),"apply_error",i);!i.json&&w()?Bt(`Application submitted for ${u}. Thanks for applying to Resend!`):N(y,{json:i.json})});function Wh(e,t){let o=new Map;for(let i of e??[]){let r=i.indexOf("=");r<=0&&h({message:`Invalid --field value "${i}". Use --field <path>=<value>.`,code:"invalid_field"},{json:t.json}),o.set(i.slice(0,r),i.slice(r+1))}return o}async function Jh(e){let t=e.required?e.title:`${e.title} (optional)`;if(e.selectable_values&&e.selectable_values.length>0){let r=[...e.required?[]:[{value:Jt,label:"Skip"}],...e.selectable_values.map(s=>({value:s.value,label:s.label}))],n=await ne({message:t,options:r});return F(n)&&O("Application cancelled."),n===Jt?void 0:n}if(e.type==="Boolean"){let r=[...e.required?[]:[{value:Jt,label:"Skip"}],{value:"true",label:"Yes"},{value:"false",label:"No"}],n=await ne({message:t,options:r});return F(n)&&O("Application cancelled."),n===Jt?void 0:n}if(e.type==="Location"){let r=[...e.required?[]:[{value:Jt,label:"Skip"}],..._l.map(s=>({value:s,label:s}))],n=await Ln({message:t,options:r,maxItems:8,placeholder:"Start typing a country..."});return F(n)&&O("Application cancelled."),n===Jt?void 0:n}let o=await Z({message:t,...e.description?{placeholder:e.description}:{},validate:r=>{let n=r?.trim()??"";if(e.required&&n.length===0)return`${e.title} is required`;if(n&&e.type==="Email"&&!n.includes("@"))return"Enter a valid email address";if(n&&e.type==="Number"&&Number.isNaN(Number(n)))return"Enter a number"}});F(o)&&O("Application cancelled.");let i=o?.trim()??"";return i.length>0?i:void 0}async function Dl(e){let t=await Z({message:e,validate:o=>!o||o.trim().length===0?`${e} is required`:void 0});return F(t)&&O("Application cancelled."),t.trim()}async function Tl(e){let t=await Z({message:`${e} (path to a local file, PDF recommended)`,placeholder:"./resume.pdf",validate:o=>!o||o.trim().length===0?"A resume file is required":void 0});return F(t)&&O("Application cancelled."),t.trim()}async function Vh(e,t,o){let i=new Map(e.fields.map(s=>[s.path,s])),r=[...t.entries()].map(([s,a])=>{let l=i.get(s),u=l?.title??s,m=l?.type==="Boolean"?a==="true"?"Yes":a==="false"?"No":a:a;return`${u}: ${zh(m,80)}`});r.push(`Resume: ${(0,xo.basename)(o)}`),zn(r.join(`
415
- `),"Application summary");let n=await Ze({message:"Submit this application?"});(F(n)||!n)&&O("Application not submitted.")}function zh(e,t){let o=e.replace(/\s+/g," ").trim();return o.length>t?`${o.slice(0,t-3)}...`:o}function Yh(e,t){let o;try{o=(0,Ol.readFileSync)(e)}catch{h({message:`Failed to read file: ${e}`,code:"file_read_error"},{json:t.json})}o.length>qh&&h({message:"Resume file is too large. Maximum size is 10MB.",code:"invalid_resume"},{json:t.json});let i=Lh[(0,xo.extname)(e).toLowerCase()]??"application/octet-stream";return{blob:new Blob([new Uint8Array(o)],{type:i}),filename:(0,xo.basename)(e)}}var Bl=new c("list").description("List open positions at Resend").addHelpText("after",d({context:"Lists open positions, fetched live from our applicant tracking system.",output:' {"object":"list","data":[{"id":"<id>","title":"<title>","department":"<department>","team":"<team>","location":"<location>","employment_type":"<type>","workplace_type":"<type>","published_at":"<date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend careers","resend careers list --json","resend careers apply <id>"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await S({loading:"Fetching open positions...",sdkCall:i=>i.get("/careers"),permission:"sending_access",onInteractive:i=>{console.log(Rl(i.data)),i.data.length>0&&console.log(`
416
- Apply with: resend careers apply <id>`)}},o)});var Il=new c("careers").description("Browse open positions at Resend and apply from your terminal").addHelpText("after",d({context:"Flow: `resend careers` lists open positions, and `resend careers apply`\nwalks you through the application (or takes flags for scripted submissions).\n\nAny Resend API key works \u2014 applications are not tied to your team.",examples:["resend careers","resend careers apply"]})).addCommand(El).addCommand(Bl,{isDefault:!0});function wo(e){let t=[];for(let i of e.commands)i._hidden||t.push(wo(i));let o=[];for(let i of e.options)i.hidden||o.push({long:i.long,short:i.short,description:i.description,takesValue:i.required||i.optional,choices:i.argChoices});return{name:e.name(),aliases:e.aliases(),description:e.description(),subcommands:t,options:o}}function vo(e,t,o){let i=t?`${t} ${e.name}`:e.name,r=[],n=[];for(let a of e.subcommands){n.push({name:a.name,description:a.description});for(let l of a.aliases)n.push({name:l,description:a.description})}let s=[...e.options,...o];r.push({path:i,subcommands:n,options:s});for(let a of e.subcommands)r.push(...vo(a,i,o));return r}function $r(e){let t=new Set;function o(i){for(let r of i.options)r.takesValue&&(r.long&&t.add(r.long),r.short&&t.add(r.short));for(let r of i.subcommands)o(r)}return o(e),[...t]}function Pl(e){let t=vo(e,"",[]),o=[],i=e.name;o.push(`# bash completion for ${i}`),o.push(`# Generated by: ${i} completion bash`),o.push(""),o.push(`_${i}_completions() {`),o.push(" local cur prev words cword"),o.push(" if type _init_completion &>/dev/null; then _init_completion || return; else"),o.push(' cur="${COMP_WORDS[COMP_CWORD]}"'),o.push(' prev="${COMP_WORDS[COMP_CWORD-1]}"'),o.push(' words=("${COMP_WORDS[@]}")'),o.push(" cword=$COMP_CWORD"),o.push(" fi"),o.push("");let n=$r(e).join("|");o.push(' local cmd_path=""'),o.push(" local i=1"),o.push(" while [ $i -lt $cword ]; do"),o.push(' case "${words[$i]}" in'),n&&o.push(` ${n}) i=$((i + 1)) ;;`),o.push(" -*) ;;"),o.push(' *) cmd_path="${cmd_path:+$cmd_path }${words[$i]}" ;;'),o.push(" esac"),o.push(" i=$((i + 1))"),o.push(" done"),o.push(""),o.push(' case "$cmd_path" in');for(let s of t){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(b=>b.choices&&b.long),u=s.options.map(b=>b.long).filter(Boolean).join(" "),m=s.subcommands.map(b=>b.name).join(" "),p=l.length>0,f=u.length>0,y=m.length>0;if(!p&&!f&&!y)continue;o.push(` "${a}")`);let A=s.options.filter(b=>b.takesValue&&!b.choices);if(p||A.length>0){o.push(' case "$prev" in');for(let b of l)o.push(` ${b.long}) COMPREPLY=($(compgen -W "${b.choices?.join(" ")}" -- "$cur")); return ;;`);if(A.length>0){let b=A.flatMap(x=>[x.long,x.short].filter(Boolean)).join("|");o.push(` ${b}) return ;;`)}o.push(" esac")}f&&(o.push(' if [[ "$cur" == -* ]]; then'),o.push(` COMPREPLY=($(compgen -W "${u}" -- "$cur")); return`),o.push(" fi")),y&&o.push(` COMPREPLY=($(compgen -W "${m}" -- "$cur"))`),o.push(" ;;")}return o.push(" esac"),o.push("}"),o.push(""),o.push(`complete -o default -F _${i}_completions ${i}`),o.join(`
417
- `)}function $l(e){let t=vo(e,"",[]),o=[],i=e.name;o.push(`#compdef ${i}`),o.push(`# zsh completion for ${i}`),o.push(`# Generated by: ${i} completion zsh`),o.push(""),o.push(`_${i}() {`),o.push(" local cur prev cmd_path"),o.push(' cur="${words[$CURRENT]}"'),o.push(' prev="${words[$CURRENT-1]}"'),o.push("");let n=$r(e).join("|");o.push(' cmd_path=""'),o.push(" for ((i=2; i < CURRENT; i++)); do"),o.push(' case "${words[$i]}" in'),n&&o.push(` ${n}) ((i++)) ;;`),o.push(" -*) ;;"),o.push(' *) cmd_path="${cmd_path:+$cmd_path }${words[$i]}" ;;'),o.push(" esac"),o.push(" done"),o.push(""),o.push(' case "$cmd_path" in');for(let s of t){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(f=>f.choices&&f.long),u=s.options.filter(f=>f.long),m=s.subcommands.length>0;o.push(` "${a}")`);let p=s.options.filter(f=>f.takesValue&&!f.choices);if(l.length>0||p.length>0){o.push(' case "$prev" in');for(let f of l)o.push(` ${f.long}) compadd -- ${f.choices?.join(" ")}; return ;;`);if(p.length>0){let f=p.flatMap(y=>[y.long,y.short].filter(Boolean)).join("|");o.push(` ${f}) _files; return ;;`)}o.push(" esac")}if(u.length>0){o.push(' if [[ "$cur" == -* ]]; then');let f=u.map(y=>`"${y.long}:${jl(y.description)}"`).join(" ");o.push(` local -a opts=(${f}); _describe 'option' opts; return`),o.push(" fi")}if(m){let f=s.subcommands.map(y=>`"${y.name}:${jl(y.description)}"`).join(" ");o.push(` local -a cmds=(${f}); _describe 'command' cmds`)}else o.push(" _files");o.push(" ;;")}return o.push(" esac"),o.push("}"),o.push(""),o.push(`compdef _${i} ${i}`),o.join(`
418
- `)}function Gl(e){let t=e.name,o=vo(e,"",[]),i=[];i.push(`# fish completion for ${t}`),i.push(`# Generated by: ${t} completion fish`),i.push("");let r=o[0];for(let n of r.subcommands)i.push(`complete -c ${t} -n "__fish_use_subcommand" -a "${n.name}" -d "${Ai(n.description)}"`);for(let n of e.options)if(n.long){let s=n.long.replace("--",""),a=`complete -c ${t} -l "${s}"`;n.short&&(a+=` -s "${n.short.replace("-","")}"`),n.takesValue&&(a+=" -r"),n.choices&&(a+=` -a "${n.choices.join(" ")}"`),a+=` -d "${Ai(n.description)}"`,i.push(a)}for(let n of o.slice(1)){let s=n.path.split(" ").slice(1),l=`__fish_seen_subcommand_from ${s[s.length-1]}`;for(let u of n.subcommands)i.push(`complete -c ${t} -n "${l}" -a "${u.name}" -d "${Ai(u.description)}"`);for(let u of n.options)if(u.long){let m=u.long.replace("--",""),p=`complete -c ${t} -n "${l}" -l "${m}"`;u.short&&(p+=` -s "${u.short.replace("-","")}"`),u.takesValue&&(p+=" -r"),u.choices&&(p+=` -a "${u.choices.join(" ")}"`),p+=` -d "${Ai(u.description)}"`,i.push(p)}}return i.join(`
419
- `)}function jl(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/:/g,"\\:")}function Ai(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Hl(e){let t=e.name,o=vo(e,"",[]),i=[];i.push(`# PowerShell completion for ${t}`),i.push(`# Generated by: ${t} completion powershell`),i.push(""),i.push(`Register-ArgumentCompleter -Native -CommandName ${t} -ScriptBlock {`),i.push(" param($wordToComplete, $commandAst, $cursorPosition)"),i.push(""),i.push(' $words = $commandAst.ToString().Substring(0, $cursorPosition) -split "\\s+"');let n=$r(e).map(s=>`"${s}"`).join(", ");i.push(" $cmdPath = @()"),i.push(` $valueFlags = @(${n})`),i.push(" for ($i = 1; $i -lt $words.Count - 1; $i++) {"),i.push(" if ($valueFlags -contains $words[$i]) { $i++; continue }"),i.push(' if ($words[$i] -notlike "-*") { $cmdPath += $words[$i] }'),i.push(" }"),i.push(' $joined = $cmdPath -join " "'),i.push(" $cur = $words[-1]"),i.push(' if ($words.Count -eq 1) { $cur = "" }'),i.push(""),i.push(' $prev = if ($words.Count -ge 2) { $words[-2] } else { "" }'),i.push(""),i.push(" switch ($joined) {");for(let s of o){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(b=>b.choices&&b.long),u=s.options.map(b=>b.long).filter(Boolean).map(b=>`"${b}"`).join(", "),m=s.subcommands.map(b=>`"${b.name}"`).join(", "),p=l.length>0,f=u.length>0,y=m.length>0;if(!p&&!f&&!y)continue;i.push(` "${a}" {`);let A=s.options.filter(b=>b.takesValue&&!b.choices);if(p||A.length>0){i.push(" switch ($prev) {");for(let b of l){let x=b.choices?.map(v=>`"${v}"`).join(", ");i.push(` "${b.long}" { @(${x}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }; return }`)}if(A.length>0){let b=A.flatMap(x=>[x.long,x.short].filter(Boolean)).map(x=>`"${x}"`).join(", ");i.push(` { $_ -in @(${b}) } { return }`)}i.push(" }")}f&&(i.push(' if ($cur -like "-*") {'),i.push(` @(${u}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }; return`),i.push(" }")),y&&i.push(` @(${m}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }`),i.push(" }")}return i.push(" }"),i.push("}"),i.join(`
420
- `)}var Ql=new c("commands").description("Print the full command tree as JSON (for agents and tooling)").addHelpText("after",d({context:`Outputs every subcommand, option, and description from the CLI definition.
421
- In machine mode (piped, CI, or --json), the tree is JSON you can feed to agents or scripts.`,examples:["resend commands","resend commands --json",'resend commands | jq ".subcommands[].name"']})).action((e,t)=>{let o=t.parent;if(!o)throw new Error("commands must be registered on the root program");let i=t.optsWithGlobals(),r=wo(o);N(r,{json:i.json})});var ge=require("node:fs"),Ct=require("node:os"),Ge=require("node:path");X();var ql=["bash","zsh","fish","powershell"],bi="# resend shell completion";function Xh(){let e=process.env.SHELL;if(e){let t=(0,Ge.basename)(e);if(t==="bash")return"bash";if(t==="zsh")return"zsh";if(t==="fish")return"fish"}if(process.env.PSModulePath)return"powershell"}async function Zh(e){if(e)return e;let t=Xh();if(t)return t;w()||(process.stderr.write(`error: could not detect shell. Pass the shell name explicitly.
422
- `),process.exit(1));let o=await ne({message:"Which shell do you use?",options:ql.map(i=>({value:i,label:i}))});return F(o)&&O("Cancelled."),o}function Nl(e){switch(e){case"bash":return process.platform==="darwin"?(0,Ge.join)((0,Ct.homedir)(),".bash_profile"):(0,Ge.join)((0,Ct.homedir)(),".bashrc");case"zsh":return(0,Ge.join)((0,Ct.homedir)(),".zshrc");case"powershell":return process.platform==="win32"?(0,Ge.join)((0,Ct.homedir)(),"Documents","PowerShell","Microsoft.PowerShell_profile.ps1"):(0,Ge.join)((0,Ct.homedir)(),".config","powershell","Microsoft.PowerShell_profile.ps1")}}function eg(e,t){switch(e){case"bash":return Pl(t);case"zsh":return $l(t);case"fish":return Gl(t);case"powershell":return Hl(t)}}function Ml(e,t,o){(0,ge.existsSync)(e)||(0,ge.mkdirSync)(e,{recursive:!0});let i=(0,Ge.join)(e,t);return(0,ge.writeFileSync)(i,`${o}
423
- `),i}function tg(e,t){switch(e){case"zsh":{let o=(0,Ge.join)((0,Ct.homedir)(),".zsh","completions"),i=Ml(o,"_resend",t);te.success(`Completions written to ${i}`);let r=Nl(e),n=!0;if((0,ge.existsSync)(r)&&(0,ge.readFileSync)(r,"utf8").includes(o)&&(n=!1),n){let s=`${bi}
414
+ The resume is uploaded as multipart form data (max 10MB, PDF recommended).`,output:' {"success":true}',errorCodes:["auth_error","missing_id","list_error","missing_name","missing_email","missing_resume","invalid_field","file_read_error","invalid_resume","fetch_error","apply_error"],examples:["resend careers apply",`resend careers apply 053bde8f-294e-4cce-9d62-2301282120a2 --name "Ada Lovelace" --email ada@example.com --resume ./resume.pdf --field 'd5cef330-d154-4f3a-8c5a-092986c61fe3=I love email infrastructure.'`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=new Map;for(let[A,b]of Xh(t.field,i))r.set(A,b);t.name!==void 0&&r.set("name",t.name),t.email!==void 0&&r.set("email",t.email);let n=w()&&!i.json,s=await J(e,Rl,i),a=s.id,l=t.resume,u=s.label;if(n){let A=await ee(i,{permission:"sending_access"}),b=await de("Fetching the application form...",()=>A.get(`/careers/${a}`),"fetch_error",i,{retryTransient:!0});u=b.title,Ho(b.location?`Apply to ${b.title} - ${b.location}`:`Apply to ${b.title}`);for(let x of b.fields){if(x.path==="resume"){l=l??await Ol(x.title);continue}if(x.type==="File"){te.warn(`Skipping "${x.title}": only the resume file can be uploaded here. Apply on the careers page to include it.`);continue}if(r.has(x.path))continue;let v=await Zh(x);v!==void 0&&r.set(x.path,v)}r.has("name")||r.set("name",await Tl("Name")),r.has("email")||r.set("email",await Tl("Email")),l=l??await Ol("Resume"),t.yes||await eg(b,r,l)}else r.get("name")||h({message:"Missing --name flag.",code:"missing_name"},{json:i.json}),r.get("email")||h({message:"Missing --email flag.",code:"missing_email"},{json:i.json}),l||h({message:"Missing --resume flag.",code:"missing_resume"},{json:i.json});let m=og(l,i),p=new FormData;for(let[A,b]of r)p.append(A,b);p.append("resume",m.blob,m.filename);let f=await ee(i,{permission:"sending_access"}),y=await de("Submitting application...",()=>f.fetchRequest(`/careers/${a}`,{method:"POST",headers:{Authorization:`Bearer ${f.key}`,"User-Agent":process.env.RESEND_USER_AGENT??""},body:p}),"apply_error",i);!i.json&&w()?Bt(`Application submitted for ${u}. Thanks for applying to Resend!`):M(y,{json:i.json})});function Xh(e,t){let o=new Map;for(let i of e??[]){let r=i.indexOf("=");r<=0&&h({message:`Invalid --field value "${i}". Use --field <path>=<value>.`,code:"invalid_field"},{json:t.json}),o.set(i.slice(0,r),i.slice(r+1))}return o}async function Zh(e){let t=e.required?e.title:`${e.title} (optional)`;if(e.selectable_values&&e.selectable_values.length>0){let r=[...e.required?[]:[{value:Jt,label:"Skip"}],...e.selectable_values.map(s=>({value:s.value,label:s.label}))],n=await ne({message:t,options:r});return R(n)&&O("Application cancelled."),n===Jt?void 0:n}if(e.type==="Boolean"){let r=[...e.required?[]:[{value:Jt,label:"Skip"}],{value:"true",label:"Yes"},{value:"false",label:"No"}],n=await ne({message:t,options:r});return R(n)&&O("Application cancelled."),n===Jt?void 0:n}if(e.type==="Location"){let r=[...e.required?[]:[{value:Jt,label:"Skip"}],...Fl.map(s=>({value:s,label:s}))],n=await Wn({message:t,options:r,maxItems:8,placeholder:"Start typing a country..."});return R(n)&&O("Application cancelled."),n===Jt?void 0:n}let o=await Z({message:t,...e.description?{placeholder:e.description}:{},validate:r=>{let n=r?.trim()??"";if(e.required&&n.length===0)return`${e.title} is required`;if(n&&e.type==="Email"&&!n.includes("@"))return"Enter a valid email address";if(n&&e.type==="Number"&&Number.isNaN(Number(n)))return"Enter a number"}});R(o)&&O("Application cancelled.");let i=o?.trim()??"";return i.length>0?i:void 0}async function Tl(e){let t=await Z({message:e,validate:o=>!o||o.trim().length===0?`${e} is required`:void 0});return R(t)&&O("Application cancelled."),t.trim()}async function Ol(e){let t=await Z({message:`${e} (path to a local file, PDF recommended)`,placeholder:"./resume.pdf",validate:o=>!o||o.trim().length===0?"A resume file is required":void 0});return R(t)&&O("Application cancelled."),t.trim()}async function eg(e,t,o){let i=new Map(e.fields.map(s=>[s.path,s])),r=[...t.entries()].map(([s,a])=>{let l=i.get(s),u=l?.title??s,m=l?.type==="Boolean"?a==="true"?"Yes":a==="false"?"No":a:a;return`${u}: ${tg(m,80)}`});r.push(`Resume: ${(0,xo.basename)(o)}`),Yn(r.join(`
415
+ `),"Application summary");let n=await Ze({message:"Submit this application?"});(R(n)||!n)&&O("Application not submitted.")}function tg(e,t){let o=e.replace(/\s+/g," ").trim();return o.length>t?`${o.slice(0,t-3)}...`:o}function og(e,t){let o;try{o=(0,El.readFileSync)(e)}catch{h({message:`Failed to read file: ${e}`,code:"file_read_error"},{json:t.json})}o.length>zh&&h({message:"Resume file is too large. Maximum size is 10MB.",code:"invalid_resume"},{json:t.json});let i=Yh[(0,xo.extname)(e).toLowerCase()]??"application/octet-stream";return{blob:new Blob([new Uint8Array(o)],{type:i}),filename:(0,xo.basename)(e)}}var Il=new d("list").description("List open positions at Resend").addHelpText("after",c({context:"Lists open positions, fetched live from our applicant tracking system.",output:' {"object":"list","data":[{"id":"<id>","title":"<title>","department":"<department>","team":"<team>","location":"<location>","employment_type":"<type>","workplace_type":"<type>","published_at":"<date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend careers","resend careers list --json","resend careers apply <id>"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await S({loading:"Fetching open positions...",sdkCall:i=>i.get("/careers"),permission:"sending_access",onInteractive:i=>{console.log(Dl(i.data)),i.data.length>0&&console.log(`
416
+ Apply with: resend careers apply <id>`)}},o)});var jl=new d("careers").description("Browse open positions at Resend and apply from your terminal").addHelpText("after",c({context:"Flow: `resend careers` lists open positions, and `resend careers apply`\nwalks you through the application (or takes flags for scripted submissions).\n\nAny Resend API key works \u2014 applications are not tied to your team.",examples:["resend careers","resend careers apply"]})).addCommand(Bl).addCommand(Il,{isDefault:!0});function wo(e){let t=[];for(let i of e.commands)i._hidden||t.push(wo(i));let o=[];for(let i of e.options)i.hidden||o.push({long:i.long,short:i.short,description:i.description,takesValue:i.required||i.optional,choices:i.argChoices});return{name:e.name(),aliases:e.aliases(),description:e.description(),subcommands:t,options:o}}function vo(e,t,o){let i=t?`${t} ${e.name}`:e.name,r=[],n=[];for(let a of e.subcommands){n.push({name:a.name,description:a.description});for(let l of a.aliases)n.push({name:l,description:a.description})}let s=[...e.options,...o];r.push({path:i,subcommands:n,options:s});for(let a of e.subcommands)r.push(...vo(a,i,o));return r}function Gr(e){let t=new Set;function o(i){for(let r of i.options)r.takesValue&&(r.long&&t.add(r.long),r.short&&t.add(r.short));for(let r of i.subcommands)o(r)}return o(e),[...t]}function $l(e){let t=vo(e,"",[]),o=[],i=e.name;o.push(`# bash completion for ${i}`),o.push(`# Generated by: ${i} completion bash`),o.push(""),o.push(`_${i}_completions() {`),o.push(" local cur prev words cword"),o.push(" if type _init_completion &>/dev/null; then _init_completion || return; else"),o.push(' cur="${COMP_WORDS[COMP_CWORD]}"'),o.push(' prev="${COMP_WORDS[COMP_CWORD-1]}"'),o.push(' words=("${COMP_WORDS[@]}")'),o.push(" cword=$COMP_CWORD"),o.push(" fi"),o.push("");let n=Gr(e).join("|");o.push(' local cmd_path=""'),o.push(" local i=1"),o.push(" while [ $i -lt $cword ]; do"),o.push(' case "${words[$i]}" in'),n&&o.push(` ${n}) i=$((i + 1)) ;;`),o.push(" -*) ;;"),o.push(' *) cmd_path="${cmd_path:+$cmd_path }${words[$i]}" ;;'),o.push(" esac"),o.push(" i=$((i + 1))"),o.push(" done"),o.push(""),o.push(' case "$cmd_path" in');for(let s of t){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(b=>b.choices&&b.long),u=s.options.map(b=>b.long).filter(Boolean).join(" "),m=s.subcommands.map(b=>b.name).join(" "),p=l.length>0,f=u.length>0,y=m.length>0;if(!p&&!f&&!y)continue;o.push(` "${a}")`);let A=s.options.filter(b=>b.takesValue&&!b.choices);if(p||A.length>0){o.push(' case "$prev" in');for(let b of l)o.push(` ${b.long}) COMPREPLY=($(compgen -W "${b.choices?.join(" ")}" -- "$cur")); return ;;`);if(A.length>0){let b=A.flatMap(x=>[x.long,x.short].filter(Boolean)).join("|");o.push(` ${b}) return ;;`)}o.push(" esac")}f&&(o.push(' if [[ "$cur" == -* ]]; then'),o.push(` COMPREPLY=($(compgen -W "${u}" -- "$cur")); return`),o.push(" fi")),y&&o.push(` COMPREPLY=($(compgen -W "${m}" -- "$cur"))`),o.push(" ;;")}return o.push(" esac"),o.push("}"),o.push(""),o.push(`complete -o default -F _${i}_completions ${i}`),o.join(`
417
+ `)}function Gl(e){let t=vo(e,"",[]),o=[],i=e.name;o.push(`#compdef ${i}`),o.push(`# zsh completion for ${i}`),o.push(`# Generated by: ${i} completion zsh`),o.push(""),o.push(`_${i}() {`),o.push(" local cur prev cmd_path"),o.push(' cur="${words[$CURRENT]}"'),o.push(' prev="${words[$CURRENT-1]}"'),o.push("");let n=Gr(e).join("|");o.push(' cmd_path=""'),o.push(" for ((i=2; i < CURRENT; i++)); do"),o.push(' case "${words[$i]}" in'),n&&o.push(` ${n}) ((i++)) ;;`),o.push(" -*) ;;"),o.push(' *) cmd_path="${cmd_path:+$cmd_path }${words[$i]}" ;;'),o.push(" esac"),o.push(" done"),o.push(""),o.push(' case "$cmd_path" in');for(let s of t){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(f=>f.choices&&f.long),u=s.options.filter(f=>f.long),m=s.subcommands.length>0;o.push(` "${a}")`);let p=s.options.filter(f=>f.takesValue&&!f.choices);if(l.length>0||p.length>0){o.push(' case "$prev" in');for(let f of l)o.push(` ${f.long}) compadd -- ${f.choices?.join(" ")}; return ;;`);if(p.length>0){let f=p.flatMap(y=>[y.long,y.short].filter(Boolean)).join("|");o.push(` ${f}) _files; return ;;`)}o.push(" esac")}if(u.length>0){o.push(' if [[ "$cur" == -* ]]; then');let f=u.map(y=>`"${y.long}:${Pl(y.description)}"`).join(" ");o.push(` local -a opts=(${f}); _describe 'option' opts; return`),o.push(" fi")}if(m){let f=s.subcommands.map(y=>`"${y.name}:${Pl(y.description)}"`).join(" ");o.push(` local -a cmds=(${f}); _describe 'command' cmds`)}else o.push(" _files");o.push(" ;;")}return o.push(" esac"),o.push("}"),o.push(""),o.push(`compdef _${i} ${i}`),o.join(`
418
+ `)}function Hl(e){let t=e.name,o=vo(e,"",[]),i=[];i.push(`# fish completion for ${t}`),i.push(`# Generated by: ${t} completion fish`),i.push("");let r=o[0];for(let n of r.subcommands)i.push(`complete -c ${t} -n "__fish_use_subcommand" -a "${n.name}" -d "${bi(n.description)}"`);for(let n of e.options)if(n.long){let s=n.long.replace("--",""),a=`complete -c ${t} -l "${s}"`;n.short&&(a+=` -s "${n.short.replace("-","")}"`),n.takesValue&&(a+=" -r"),n.choices&&(a+=` -a "${n.choices.join(" ")}"`),a+=` -d "${bi(n.description)}"`,i.push(a)}for(let n of o.slice(1)){let s=n.path.split(" ").slice(1),l=`__fish_seen_subcommand_from ${s[s.length-1]}`;for(let u of n.subcommands)i.push(`complete -c ${t} -n "${l}" -a "${u.name}" -d "${bi(u.description)}"`);for(let u of n.options)if(u.long){let m=u.long.replace("--",""),p=`complete -c ${t} -n "${l}" -l "${m}"`;u.short&&(p+=` -s "${u.short.replace("-","")}"`),u.takesValue&&(p+=" -r"),u.choices&&(p+=` -a "${u.choices.join(" ")}"`),p+=` -d "${bi(u.description)}"`,i.push(p)}}return i.join(`
419
+ `)}function Pl(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/:/g,"\\:")}function bi(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Ql(e){let t=e.name,o=vo(e,"",[]),i=[];i.push(`# PowerShell completion for ${t}`),i.push(`# Generated by: ${t} completion powershell`),i.push(""),i.push(`Register-ArgumentCompleter -Native -CommandName ${t} -ScriptBlock {`),i.push(" param($wordToComplete, $commandAst, $cursorPosition)"),i.push(""),i.push(' $words = $commandAst.ToString().Substring(0, $cursorPosition) -split "\\s+"');let n=Gr(e).map(s=>`"${s}"`).join(", ");i.push(" $cmdPath = @()"),i.push(` $valueFlags = @(${n})`),i.push(" for ($i = 1; $i -lt $words.Count - 1; $i++) {"),i.push(" if ($valueFlags -contains $words[$i]) { $i++; continue }"),i.push(' if ($words[$i] -notlike "-*") { $cmdPath += $words[$i] }'),i.push(" }"),i.push(' $joined = $cmdPath -join " "'),i.push(" $cur = $words[-1]"),i.push(' if ($words.Count -eq 1) { $cur = "" }'),i.push(""),i.push(' $prev = if ($words.Count -ge 2) { $words[-2] } else { "" }'),i.push(""),i.push(" switch ($joined) {");for(let s of o){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(b=>b.choices&&b.long),u=s.options.map(b=>b.long).filter(Boolean).map(b=>`"${b}"`).join(", "),m=s.subcommands.map(b=>`"${b.name}"`).join(", "),p=l.length>0,f=u.length>0,y=m.length>0;if(!p&&!f&&!y)continue;i.push(` "${a}" {`);let A=s.options.filter(b=>b.takesValue&&!b.choices);if(p||A.length>0){i.push(" switch ($prev) {");for(let b of l){let x=b.choices?.map(v=>`"${v}"`).join(", ");i.push(` "${b.long}" { @(${x}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }; return }`)}if(A.length>0){let b=A.flatMap(x=>[x.long,x.short].filter(Boolean)).map(x=>`"${x}"`).join(", ");i.push(` { $_ -in @(${b}) } { return }`)}i.push(" }")}f&&(i.push(' if ($cur -like "-*") {'),i.push(` @(${u}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }; return`),i.push(" }")),y&&i.push(` @(${m}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }`),i.push(" }")}return i.push(" }"),i.push("}"),i.join(`
420
+ `)}var Nl=new d("commands").description("Print the full command tree as JSON (for agents and tooling)").addHelpText("after",c({context:`Outputs every subcommand, option, and description from the CLI definition.
421
+ In machine mode (piped, CI, or --json), the tree is JSON you can feed to agents or scripts.`,examples:["resend commands","resend commands --json",'resend commands | jq ".subcommands[].name"']})).action((e,t)=>{let o=t.parent;if(!o)throw new Error("commands must be registered on the root program");let i=t.optsWithGlobals(),r=wo(o);M(r,{json:i.json})});var ge=require("node:fs"),Ct=require("node:os"),Ge=require("node:path");X();var Ll=["bash","zsh","fish","powershell"],yi="# resend shell completion";function ig(){let e=process.env.SHELL;if(e){let t=(0,Ge.basename)(e);if(t==="bash")return"bash";if(t==="zsh")return"zsh";if(t==="fish")return"fish"}if(process.env.PSModulePath)return"powershell"}async function rg(e){if(e)return e;let t=ig();if(t)return t;w()||(process.stderr.write(`error: could not detect shell. Pass the shell name explicitly.
422
+ `),process.exit(1));let o=await ne({message:"Which shell do you use?",options:Ll.map(i=>({value:i,label:i}))});return R(o)&&O("Cancelled."),o}function Ml(e){switch(e){case"bash":return process.platform==="darwin"?(0,Ge.join)((0,Ct.homedir)(),".bash_profile"):(0,Ge.join)((0,Ct.homedir)(),".bashrc");case"zsh":return(0,Ge.join)((0,Ct.homedir)(),".zshrc");case"powershell":return process.platform==="win32"?(0,Ge.join)((0,Ct.homedir)(),"Documents","PowerShell","Microsoft.PowerShell_profile.ps1"):(0,Ge.join)((0,Ct.homedir)(),".config","powershell","Microsoft.PowerShell_profile.ps1")}}function ng(e,t){switch(e){case"bash":return $l(t);case"zsh":return Gl(t);case"fish":return Hl(t);case"powershell":return Ql(t)}}function ql(e,t,o){(0,ge.existsSync)(e)||(0,ge.mkdirSync)(e,{recursive:!0});let i=(0,Ge.join)(e,t);return(0,ge.writeFileSync)(i,`${o}
423
+ `),i}function sg(e,t){switch(e){case"zsh":{let o=(0,Ge.join)((0,Ct.homedir)(),".zsh","completions"),i=ql(o,"_resend",t);te.success(`Completions written to ${i}`);let r=Ml(e),n=!0;if((0,ge.existsSync)(r)&&(0,ge.readFileSync)(r,"utf8").includes(o)&&(n=!1),n){let s=`${yi}
424
424
  fpath=(${o} $fpath)
425
425
  `,a=(0,ge.existsSync)(r)?(0,ge.readFileSync)(r,"utf8"):"",l=a.match(/^.*compinit.*$/m);if(l){let u=a.indexOf(l[0]),m=a.slice(0,u),p=a.slice(u);(0,ge.writeFileSync)(r,`${m}${s}
426
426
  ${p}`)}else{let u=`
427
427
  ${s}autoload -Uz compinit && compinit
428
- `;(0,ge.writeFileSync)(r,u,{flag:"a"})}te.info(`Added completion path to ${r}`)}te.info("Restart your shell to activate completions.");return}case"fish":{let o=(0,Ge.join)((0,Ct.homedir)(),".config","fish","completions"),i=Ml(o,"resend.fish",t);te.success(`Completions written to ${i}`),te.info("Completions will be available in new fish sessions.");return}case"bash":case"powershell":{let o=Nl(e),i=e==="powershell"?`
429
- ${bi}
428
+ `;(0,ge.writeFileSync)(r,u,{flag:"a"})}te.info(`Added completion path to ${r}`)}te.info("Restart your shell to activate completions.");return}case"fish":{let o=(0,Ge.join)((0,Ct.homedir)(),".config","fish","completions"),i=ql(o,"resend.fish",t);te.success(`Completions written to ${i}`),te.info("Completions will be available in new fish sessions.");return}case"bash":case"powershell":{let o=Ml(e),i=e==="powershell"?`
429
+ ${yi}
430
430
  resend completion powershell | Invoke-Expression
431
431
  `:`
432
- ${bi}
432
+ ${yi}
433
433
  eval "$(resend completion ${e})"
434
- `;if((0,ge.existsSync)(o)&&(0,ge.readFileSync)(o,"utf8").includes(bi)){te.info(`Completions already installed in ${o}`);return}let r=(0,Ge.dirname)(o);(0,ge.existsSync)(r)||(0,ge.mkdirSync)(r,{recursive:!0}),(0,ge.writeFileSync)(o,i,{flag:"a"}),te.success(`Completions added to ${o}`),te.info("Restart your shell to activate completions.");return}}}var Ll=new c("completion").description("Generate shell completion script").addArgument(new An("[shell]","Shell type").choices(ql)).option("--install","Install completions into your shell profile").addHelpText("after",d({context:`Outputs a completion script for the given shell. The shell is auto-detected
434
+ `;if((0,ge.existsSync)(o)&&(0,ge.readFileSync)(o,"utf8").includes(yi)){te.info(`Completions already installed in ${o}`);return}let r=(0,Ge.dirname)(o);(0,ge.existsSync)(r)||(0,ge.mkdirSync)(r,{recursive:!0}),(0,ge.writeFileSync)(o,i,{flag:"a"}),te.success(`Completions added to ${o}`),te.info("Restart your shell to activate completions.");return}}}var Wl=new d("completion").description("Generate shell completion script").addArgument(new bn("[shell]","Shell type").choices(Ll)).option("--install","Install completions into your shell profile").addHelpText("after",c({context:`Outputs a completion script for the given shell. The shell is auto-detected
435
435
  from $SHELL when not specified.
436
436
 
437
437
  Quick setup:
@@ -451,7 +451,7 @@ Manual setup:
451
451
  PowerShell (add to $PROFILE):
452
452
  resend completion powershell >> $PROFILE
453
453
 
454
- Homebrew users: completions may be configured automatically by your formula.`,examples:["resend completion --install","resend completion bash","resend completion zsh",'eval "$(resend completion bash)"']})).action(async(e,t,o)=>{let i=await Zh(e),r=o.parent;if(!r)throw new Error("completion command must be registered under a parent");let n=wo(r),s=eg(i,n);if(t.install){tg(i,s);return}if(!e&&w()){o.help();return}console.log(s)});var Wl=new c("create").description("Create a new contact property definition").addOption(new q("--key <key>","Property key name, used in broadcast template interpolation (e.g. company_name, department)")).addOption(new q("--type <type>","Property data type: 'string' for text values, 'number' for numeric values").choices(["string","number"])).option("--fallback-value <value>","Default value used in broadcast templates when a contact has no value set for this property").addHelpText("after",d({context:`Property keys are used as identifiers in broadcast HTML template interpolation:
454
+ Homebrew users: completions may be configured automatically by your formula.`,examples:["resend completion --install","resend completion bash","resend completion zsh",'eval "$(resend completion bash)"']})).action(async(e,t,o)=>{let i=await rg(e),r=o.parent;if(!r)throw new Error("completion command must be registered under a parent");let n=wo(r),s=ng(i,n);if(t.install){sg(i,s);return}if(!e&&w()){o.help();return}console.log(s)});var Jl=new d("create").description("Create a new contact property definition").addOption(new q("--key <key>","Property key name, used in broadcast template interpolation (e.g. company_name, department)")).addOption(new q("--type <type>","Property data type: 'string' for text values, 'number' for numeric values").choices(["string","number"])).option("--fallback-value <value>","Default value used in broadcast templates when a contact has no value set for this property").addHelpText("after",c({context:`Property keys are used as identifiers in broadcast HTML template interpolation:
455
455
  {{{PROPERTY_NAME|fallback}}} \u2014 triple-brace syntax substitutes the contact's value
456
456
  {{{company_name|Unknown}}} \u2014 falls back to "Unknown" if the property is not set
457
457
 
@@ -459,20 +459,20 @@ Reserved keys (cannot be used): FIRST_NAME, LAST_NAME, EMAIL, UNSUBSCRIBE_URL
459
459
 
460
460
  Non-interactive: --key and --type are required. --fallback-value is optional.
461
461
  Warning: do not create properties with reserved key names \u2014 they will conflict with
462
- built-in contact fields and may cause unexpected behavior in broadcasts.`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","missing_key","missing_type","invalid_fallback_value","create_error"],examples:["resend contact-properties create --key company_name --type string",'resend contact-properties create --key company_name --type string --fallback-value "Unknown"',"resend contact-properties create --key employee_count --type number --fallback-value 0","resend contact-properties create --key department --type string --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.key,{message:"Property key",placeholder:"e.g. company_name"},{message:"Missing --key flag.",code:"missing_key"},o),r=await bt(e.type,{message:"Property data type",options:[{value:"string",label:"string \u2014 text values"},{value:"number",label:"number \u2014 numeric values"}]},{message:"Missing --type flag.",code:"missing_type"},o),n;if(e.fallbackValue!==void 0)if(r==="number"){let a=parseFloat(e.fallbackValue);Number.isNaN(a)&&h({message:"--fallback-value must be a valid number for number-type properties.",code:"invalid_fallback_value"},{json:o.json}),n=a}else n=e.fallbackValue;let s={key:i,type:r,...n!==void 0&&{fallbackValue:n}};await P({loading:"Creating contact property...",sdkCall:a=>a.contactProperties.create(s),onInteractive:a=>{console.log(`Contact property created: ${a.id}`)}},o)});var Vt={resource:"contact property",resourcePlural:"contact properties",fetchItems:(e,{limit:t,after:o})=>e.contactProperties.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.key} (${e.type})`,hint:e.id})};function Jl(e){let t=e.map(o=>[o.key,o.type,o.fallbackValue!=null?String(o.fallbackValue):"",o.id,o.createdAt]);return _(["Key","Type","Fallback Value","ID","Created"],t,"(no contact properties)")}var Vl=new c("delete").alias("rm").description("Delete a contact property definition").argument("[id]","Contact property UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`WARNING: Deleting a property definition removes that property value from ALL contacts
462
+ built-in contact fields and may cause unexpected behavior in broadcasts.`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","missing_key","missing_type","invalid_fallback_value","create_error"],examples:["resend contact-properties create --key company_name --type string",'resend contact-properties create --key company_name --type string --fallback-value "Unknown"',"resend contact-properties create --key employee_count --type number --fallback-value 0","resend contact-properties create --key department --type string --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.key,{message:"Property key",placeholder:"e.g. company_name"},{message:"Missing --key flag.",code:"missing_key"},o),r=await bt(e.type,{message:"Property data type",options:[{value:"string",label:"string \u2014 text values"},{value:"number",label:"number \u2014 numeric values"}]},{message:"Missing --type flag.",code:"missing_type"},o),n;if(e.fallbackValue!==void 0)if(r==="number"){let a=parseFloat(e.fallbackValue);Number.isNaN(a)&&h({message:"--fallback-value must be a valid number for number-type properties.",code:"invalid_fallback_value"},{json:o.json}),n=a}else n=e.fallbackValue;let s={key:i,type:r,...n!==void 0&&{fallbackValue:n}};await P({loading:"Creating contact property...",sdkCall:a=>a.contactProperties.create(s),onInteractive:a=>{console.log(`Contact property created: ${a.id}`)}},o)});var Vt={resource:"contact property",resourcePlural:"contact properties",fetchItems:(e,{limit:t,after:o})=>e.contactProperties.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.key} (${e.type})`,hint:e.id})};function Vl(e){let t=e.map(o=>[o.key,o.type,o.fallbackValue!=null?String(o.fallbackValue):"",o.id,o.createdAt]);return _(["Key","Type","Fallback Value","ID","Created"],t,"(no contact properties)")}var zl=new d("delete").alias("rm").description("Delete a contact property definition").argument("[id]","Contact property UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`WARNING: Deleting a property definition removes that property value from ALL contacts
463
463
  permanently. This cannot be undone, and any broadcasts that reference this property key
464
464
  via {{{PROPERTY_NAME}}} will render an empty string or their inline fallback instead.
465
465
 
466
466
  Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"contact_property","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes","resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,Vt,i);await z(r.id,!!t.yes,{confirmMessage:`Delete contact property "${r.label}"?
467
467
  ID: ${r.id}
468
- This will remove this property from ALL contacts permanently.`,loading:"Deleting contact property...",object:"contact_property",successMsg:"Contact property deleted",sdkCall:n=>n.contactProperties.remove(r.id)},i)});var zl=new c("get").description("Retrieve a contact property definition by ID").argument("[id]","Contact property UUID").addHelpText("after",d({output:` {
468
+ This will remove this property from ALL contacts permanently.`,loading:"Deleting contact property...",object:"contact_property",successMsg:"Contact property deleted",sdkCall:n=>n.contactProperties.remove(r.id)},i)});var Yl=new d("get").description("Retrieve a contact property definition by ID").argument("[id]","Contact property UUID").addHelpText("after",c({output:` {
469
469
  "object": "contact_property",
470
470
  "id": "<uuid>",
471
471
  "key": "company_name",
472
472
  "type": "string",
473
473
  "fallbackValue": null,
474
474
  "createdAt": "2026-01-01 00:00:00+00"
475
- }`,errorCodes:["auth_error","fetch_error"],examples:["resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Vt,i);await j({loading:"Fetching contact property...",sdkCall:n=>n.contactProperties.get(r),onInteractive:n=>{console.log(`${n.key} (${n.type})`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.createdAt}`),console.log(`Fallback value: ${n.fallbackValue??"(none)"}`)}},i)});var Yl=new c("list").alias("ls").description("List all contact property definitions").option("--limit <n>","Maximum number of contact properties to return (1-100)","10").option("--after <cursor>","Return contact properties after this cursor (next page)").option("--before <cursor>","Return contact properties before this cursor (previous page)").addHelpText("after",d({context:`Pagination: use --after or --before with a contact property ID as the cursor.
475
+ }`,errorCodes:["auth_error","fetch_error"],examples:["resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Vt,i);await B({loading:"Fetching contact property...",sdkCall:n=>n.contactProperties.get(r),onInteractive:n=>{console.log(`${n.key} (${n.type})`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.createdAt}`),console.log(`Fallback value: ${n.fallbackValue??"(none)"}`)}},i)});var Xl=new d("list").alias("ls").description("List all contact property definitions").option("--limit <n>","Maximum number of contact properties to return (1-100)","10").option("--after <cursor>","Return contact properties after this cursor (next page)").option("--before <cursor>","Return contact properties before this cursor (previous page)").addHelpText("after",c({context:`Pagination: use --after or --before with a contact property ID as the cursor.
476
476
  Only one of --after or --before may be used at a time.
477
477
  The response includes has_more: true when additional pages exist.`,output:` {
478
478
  "object": "list",
@@ -480,14 +480,14 @@ This will remove this property from ALL contacts permanently.`,loading:"Deleting
480
480
  "data": [
481
481
  { "id": "<uuid>", "key": "company_name", "type": "string", "fallbackValue": null, "createdAt": "..." }
482
482
  ]
483
- }`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contact-properties list","resend contact-properties list --limit 25 --json","resend contact-properties list --after b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching contact properties...",sdkCall:n=>n.contactProperties.list(r),onInteractive:n=>{console.log(Jl(n.data)),T(n,"contact-properties list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Xl=new c("update").description("Update a contact property definition").argument("[id]","Contact property UUID").option("--fallback-value <value>","New fallback value used in broadcast templates when a contact has no value set for this property").option("--clear-fallback-value","Remove the fallback value (sets it to null)").addHelpText("after",d({context:`Note: the property key and type cannot be changed after creation. Only the fallback value
483
+ }`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contact-properties list","resend contact-properties list --limit 25 --json","resend contact-properties list --after b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching contact properties...",sdkCall:n=>n.contactProperties.list(r),onInteractive:n=>{console.log(Vl(n.data)),T(n,"contact-properties list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Zl=new d("update").description("Update a contact property definition").argument("[id]","Contact property UUID").option("--fallback-value <value>","New fallback value used in broadcast templates when a contact has no value set for this property").option("--clear-fallback-value","Remove the fallback value (sets it to null)").addHelpText("after",c({context:`Note: the property key and type cannot be changed after creation. Only the fallback value
484
484
  is updatable. Renaming a property would break existing broadcasts that reference the old key.
485
485
 
486
486
  --fallback-value and --clear-fallback-value are mutually exclusive.
487
487
 
488
488
  The fallback value is used in broadcast template interpolation when a contact has no value:
489
489
  {{{company_name|Unknown}}} \u2014 inline fallback (takes precedence over the property's fallback)
490
- {{{company_name}}} \u2014 uses the property's stored fallback value if set`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","no_changes","conflicting_flags","fetch_error","invalid_fallback_value","update_error"],examples:['resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Acme Corp"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value 42","resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Vt,i);t.fallbackValue===void 0&&!t.clearFallbackValue&&h({message:"Provide at least one option to update: --fallback-value or --clear-fallback-value.",code:"no_changes"},{json:i.json}),t.fallbackValue!==void 0&&t.clearFallbackValue&&h({message:"--fallback-value and --clear-fallback-value are mutually exclusive.",code:"conflicting_flags"},{json:i.json});let n=t.clearFallbackValue?null:t.fallbackValue;if(typeof n=="string"){let s=await ee(i);if((await ce("Fetching contact property...",()=>s.contactProperties.get(r),"fetch_error",i,{retryTransient:!0})).type==="number"){let l=parseFloat(n);Number.isNaN(l)&&h({message:"--fallback-value must be a valid number for number-type properties.",code:"invalid_fallback_value"},{json:i.json}),n=l}}await R({loading:"Updating contact property...",sdkCall:s=>s.contactProperties.update({id:r,...n!==void 0&&{fallbackValue:n}}),errorCode:"update_error",successMsg:`Contact property updated: ${r}`},i)});var Zl=new c("contact-properties").description("Manage contact property definitions").addHelpText("after",d({context:`Contact properties define the schema for custom data stored on contacts.
490
+ {{{company_name}}} \u2014 uses the property's stored fallback value if set`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","no_changes","conflicting_flags","fetch_error","invalid_fallback_value","update_error"],examples:['resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Acme Corp"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value 42","resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Vt,i);t.fallbackValue===void 0&&!t.clearFallbackValue&&h({message:"Provide at least one option to update: --fallback-value or --clear-fallback-value.",code:"no_changes"},{json:i.json}),t.fallbackValue!==void 0&&t.clearFallbackValue&&h({message:"--fallback-value and --clear-fallback-value are mutually exclusive.",code:"conflicting_flags"},{json:i.json});let n=t.clearFallbackValue?null:t.fallbackValue;if(typeof n=="string"){let s=await ee(i);if((await de("Fetching contact property...",()=>s.contactProperties.get(r),"fetch_error",i,{retryTransient:!0})).type==="number"){let l=parseFloat(n);Number.isNaN(l)&&h({message:"--fallback-value must be a valid number for number-type properties.",code:"invalid_fallback_value"},{json:i.json}),n=l}}await F({loading:"Updating contact property...",sdkCall:s=>s.contactProperties.update({id:r,...n!==void 0&&{fallbackValue:n}}),errorCode:"update_error",successMsg:`Contact property updated: ${r}`},i)});var ed=new d("contact-properties").description("Manage contact property definitions").addHelpText("after",c({context:`Contact properties define the schema for custom data stored on contacts.
491
491
  Think of them as column definitions \u2014 you create a property definition (e.g. company_name)
492
492
  and then set values for that property on individual contacts via "resend contacts update --properties".
493
493
 
@@ -502,9 +502,9 @@ Supported types:
502
502
  number \u2014 numeric values (useful for counts, scores, thresholds)
503
503
 
504
504
  Note: property keys and types are immutable after creation. Only the fallback value can
505
- be updated. Deleting a property removes it from all contacts.`,examples:["resend contact-properties list","resend contact-properties create --key company_name --type string",'resend contact-properties create --key plan --type string --fallback-value "free"',"resend contact-properties create --key score --type number --fallback-value 0","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value","resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes"]})).addCommand(Wl).addCommand(zl).addCommand(Yl,{isDefault:!0}).addCommand(Xl).addCommand(Vl);function yi(e){let t=e.map(o=>[o.email,o.first_name??"",o.last_name??"",o.unsubscribed?"yes":"no",o.id]);return _(["Email","First Name","Last Name","Unsubscribed","ID"],t,"(no contacts)")}function ec(e){let t=e.map(o=>[o.name,o.subscription,o.id,o.description??""]);return _(["Name","Subscription","ID","Description"],t,"(no topic subscriptions)")}var Ce={resource:"contact",resourcePlural:"contacts",fetchItems:(e,{limit:t,after:o})=>e.contacts.list({limit:t,...o&&{after:o}}),display:e=>({label:e.email,hint:e.id})};function zt(e){return e.includes("@")?{email:e}:{id:e}}function Yt(e){return e.includes("@")?{email:e}:{contactId:e}}function Ci(e,t){let o;try{o=JSON.parse(e)}catch{h({message:"Invalid --topics JSON. Expected an array of {id, subscription} objects.",code:"invalid_topics"},{json:t.json})}return Array.isArray(o)||h({message:"Invalid --topics JSON. Expected an array of {id, subscription} objects.",code:"invalid_topics"},{json:t.json}),o}function xi(e,t){if(e)try{return JSON.parse(e)}catch{h({message:"Invalid --properties JSON.",code:"invalid_properties"},{json:t.json})}}var tc=new c("add-segment").description("Add a contact to a segment").argument("[contactId]","Contact UUID or email address").option("--segment-id <id>","Segment ID to add the contact to (required)").addHelpText("after",d({context:`The <contactId> argument accepts either a UUID or an email address.
505
+ be updated. Deleting a property removes it from all contacts.`,examples:["resend contact-properties list","resend contact-properties create --key company_name --type string",'resend contact-properties create --key plan --type string --fallback-value "free"',"resend contact-properties create --key score --type number --fallback-value 0","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value","resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes"]})).addCommand(Jl).addCommand(Yl).addCommand(Xl,{isDefault:!0}).addCommand(Zl).addCommand(zl);function Ci(e){let t=e.map(o=>[o.email,o.first_name??"",o.last_name??"",o.unsubscribed?"yes":"no",o.id]);return _(["Email","First Name","Last Name","Unsubscribed","ID"],t,"(no contacts)")}function td(e){let t=e.map(o=>[o.name,o.subscription,o.id,o.description??""]);return _(["Name","Subscription","ID","Description"],t,"(no topic subscriptions)")}var Ce={resource:"contact",resourcePlural:"contacts",fetchItems:(e,{limit:t,after:o})=>e.contacts.list({limit:t,...o&&{after:o}}),display:e=>({label:e.email,hint:e.id})};function zt(e){return e.includes("@")?{email:e}:{id:e}}function Yt(e){return e.includes("@")?{email:e}:{contactId:e}}function xi(e,t){let o;try{o=JSON.parse(e)}catch{h({message:"Invalid --topics JSON. Expected an array of {id, subscription} objects.",code:"invalid_topics"},{json:t.json})}return Array.isArray(o)||h({message:"Invalid --topics JSON. Expected an array of {id, subscription} objects.",code:"invalid_topics"},{json:t.json}),o}function wi(e,t){if(e)try{return JSON.parse(e)}catch{h({message:"Invalid --properties JSON.",code:"invalid_properties"},{json:t.json})}}var od=new d("add-segment").description("Add a contact to a segment").argument("[contactId]","Contact UUID or email address").option("--segment-id <id>","Segment ID to add the contact to (required)").addHelpText("after",c({context:`The <contactId> argument accepts either a UUID or an email address.
506
506
 
507
- Non-interactive: --segment-id is required.`,output:' {"id":"<segment-membership-id>"}',errorCodes:["auth_error","missing_segment_id","add_segment_error"],examples:["resend contacts add-segment e169aa45-1ecf-4183-9955-b1499d5701d3 --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i),n=await g(t.segmentId,Oe,i),s={...Yt(r),segmentId:n};await R({loading:"Adding contact to segment...",sdkCall:a=>a.contacts.segments.add(s),errorCode:"add_segment_error",successMsg:`Contact added to segment: ${n}`},i)});X();var oc=new c("create").description("Create a new contact").option("--email <email>","Contact email address (required)").option("--first-name <name>","First name").option("--last-name <name>","Last name").option("--unsubscribed","Globally unsubscribe the contact from all broadcasts").option("--properties <json>",`Custom properties as a JSON string (e.g. '{"company":"Acme"}')`).option("--segment-id <id...>","Segment ID to add the contact to on creation (repeatable: --segment-id abc --segment-id def)").addHelpText("after",d({context:`Non-interactive: --email is required. All other flags are optional.
507
+ Non-interactive: --segment-id is required.`,output:' {"id":"<segment-membership-id>"}',errorCodes:["auth_error","missing_segment_id","add_segment_error"],examples:["resend contacts add-segment e169aa45-1ecf-4183-9955-b1499d5701d3 --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i),n=await g(t.segmentId,Oe,i),s={...Yt(r),segmentId:n};await F({loading:"Adding contact to segment...",sdkCall:a=>a.contacts.segments.add(s),errorCode:"add_segment_error",successMsg:`Contact added to segment: ${n}`},i)});X();var id=new d("create").description("Create a new contact").option("--email <email>","Contact email address (required)").option("--first-name <name>","First name").option("--last-name <name>","Last name").option("--unsubscribed","Globally unsubscribe the contact from all broadcasts").option("--properties <json>",`Custom properties as a JSON string (e.g. '{"company":"Acme"}')`).option("--segment-id <id...>","Segment ID to add the contact to on creation (repeatable: --segment-id abc --segment-id def)").addHelpText("after",c({context:`Non-interactive: --email is required. All other flags are optional.
508
508
 
509
509
  Properties: pass a JSON object string to --properties (e.g. '{"plan":"pro","company":"Acme"}').
510
510
  Properties are stored as custom contact attributes. To clear a property, set it to null.
@@ -512,11 +512,11 @@ Properties: pass a JSON object string to --properties (e.g. '{"plan":"pro","comp
512
512
 
513
513
  Segments: use --segment-id once per segment to add the contact to one or more segments on creation.
514
514
 
515
- Unsubscribed: setting --unsubscribed is a team-wide opt-out from all broadcasts, regardless of segments/topics.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","missing_email","invalid_properties","create_error"],examples:["resend contacts create --email steve.wozniak@gmail.com","resend contacts create --email steve.wozniak@gmail.com --first-name Steve --last-name Wozniak",`resend contacts create --email steve.wozniak@gmail.com --properties '{"company":"Acme","plan":"pro"}'`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.email,{message:"Email address",placeholder:"steve.wozniak@gmail.com"},{message:"Missing --email flag.",code:"missing_email"},o),r=e.firstName,n=e.lastName;if(w()&&!o.json&&!e.firstName){let l=await Z({message:"First name (optional)"});F(l)&&O("Cancelled."),l&&(r=l)}if(w()&&!o.json&&!e.lastName){let l=await Z({message:"Last name (optional)"});F(l)&&O("Cancelled."),l&&(n=l)}let s=xi(e.properties,o),a=e.segmentId??[];await P({loading:"Creating contact...",sdkCall:l=>l.contacts.create({email:i,...r&&{firstName:r},...n&&{lastName:n},...e.unsubscribed&&{unsubscribed:!0},...s&&{properties:s},...a.length>0&&{segments:a.map(u=>({id:u}))}}),onInteractive:l=>{console.log(`Contact created: ${l.id}`)}},o)});var ic=new c("delete").alias("rm").description("Delete a contact").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`The <id> argument accepts either a UUID or an email address.
515
+ Unsubscribed: setting --unsubscribed is a team-wide opt-out from all broadcasts, regardless of segments/topics.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","missing_email","invalid_properties","create_error"],examples:["resend contacts create --email steve.wozniak@gmail.com","resend contacts create --email steve.wozniak@gmail.com --first-name Steve --last-name Wozniak",`resend contacts create --email steve.wozniak@gmail.com --properties '{"company":"Acme","plan":"pro"}'`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.email,{message:"Email address",placeholder:"steve.wozniak@gmail.com"},{message:"Missing --email flag.",code:"missing_email"},o),r=e.firstName,n=e.lastName;if(w()&&!o.json&&!e.firstName){let l=await Z({message:"First name (optional)"});R(l)&&O("Cancelled."),l&&(r=l)}if(w()&&!o.json&&!e.lastName){let l=await Z({message:"Last name (optional)"});R(l)&&O("Cancelled."),l&&(n=l)}let s=wi(e.properties,o),a=e.segmentId??[];await P({loading:"Creating contact...",sdkCall:l=>l.contacts.create({email:i,...r&&{firstName:r},...n&&{lastName:n},...e.unsubscribed&&{unsubscribed:!0},...s&&{properties:s},...a.length>0&&{segments:a.map(u=>({id:u}))}}),onInteractive:l=>{console.log(`Contact created: ${l.id}`)}},o)});var rd=new d("delete").alias("rm").description("Delete a contact").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`The <id> argument accepts either a UUID or an email address.
516
516
 
517
517
  Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"contact","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend contacts delete 520784e2-887d-4c25-b53c-4ad46ad38100 --yes","resend contacts delete acme@example.com --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,Ce,i);await z(r.id,!!t.yes,{confirmMessage:`Delete contact "${r.label}"?
518
518
  ID: ${r.id}
519
- This cannot be undone.`,loading:"Deleting contact...",object:"contact",successMsg:"Contact deleted",sdkCall:n=>n.contacts.remove(r.id)},i)});var rc=new c("get").description("Retrieve a contact by ID or email address").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").addHelpText("after",d({output:` {
519
+ This cannot be undone.`,loading:"Deleting contact...",object:"contact",successMsg:"Contact deleted",sdkCall:n=>n.contacts.remove(r.id)},i)});var nd=new d("get").description("Retrieve a contact by ID or email address").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").addHelpText("after",c({output:` {
520
520
  "object": "contact",
521
521
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
522
522
  "email": "steve.wozniak@gmail.com",
@@ -525,7 +525,7 @@ This cannot be undone.`,loading:"Deleting contact...",object:"contact",successMs
525
525
  "created_at": "2026-01-01 00:00:00+00",
526
526
  "unsubscribed": false,
527
527
  "properties": {}
528
- }`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i);await j({loading:"Fetching contact...",sdkCall:n=>n.contacts.get(r),onInteractive:n=>{let s=[n.first_name,n.last_name].filter(Boolean).join(" ");console.log(`${n.email}${s?` (${s})`:""}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),console.log(`Unsubscribed: ${n.unsubscribed?"yes":"no"}`);let a=Object.entries(n.properties??{});if(a.length>0){console.log("Properties:");for(let[l,u]of a)console.log(` ${l}: ${u.value}`)}}},i)});var lc=require("node:fs"),cc=require("node:path");function nc(e){let t=e.map(o=>[o.status,String(o.counts.total),String(o.counts.created),String(o.counts.updated),String(o.counts.skipped),String(o.counts.failed),o.created_at,o.id]);return _(["Status","Total","Created","Updated","Skipped","Failed","Created At","ID"],t,"(no contact imports)")}var sc={resource:"contact import",resourcePlural:"contact imports",fetchItems:(e,{limit:t,after:o})=>e.contacts.imports.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.status} - ${e.counts.total} contacts`,hint:e.id})};function ac(e,t){if(!e)return;let o;try{o=JSON.parse(e)}catch{h({message:"Invalid --column-map JSON.",code:"invalid_column_map"},{json:t.json})}return(typeof o!="object"||o===null||Array.isArray(o))&&h({message:"Invalid --column-map JSON. Expected an object mapping contact fields to CSV column headers.",code:"invalid_column_map"},{json:t.json}),o}var dc=new c("create").description("Import contacts in bulk from a local CSV file").option("--file <path>","Path to the CSV file to import (required)").option("--column-map <json>",`Map CSV columns to contact fields as a JSON object (e.g. '{"email":"Email","firstName":"First Name"}')`).addOption(new q("--on-conflict <strategy>","How to handle contacts that already exist").choices(["upsert","skip"])).option("--segment-id <id...>","Segment ID to add imported contacts to (repeatable: --segment-id abc --segment-id def)").option("--topics <json>","Topic subscriptions as a JSON array of {id, subscription} objects").addHelpText("after",d({context:`Non-interactive: --file is required. All other flags are optional.
528
+ }`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i);await B({loading:"Fetching contact...",sdkCall:n=>n.contacts.get(r),onInteractive:n=>{let s=[n.first_name,n.last_name].filter(Boolean).join(" ");console.log(`${n.email}${s?` (${s})`:""}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),console.log(`Unsubscribed: ${n.unsubscribed?"yes":"no"}`);let a=Object.entries(n.properties??{});if(a.length>0){console.log("Properties:");for(let[l,u]of a)console.log(` ${l}: ${u.value}`)}}},i)});var dd=require("node:fs"),cd=require("node:path");function sd(e){let t=e.map(o=>[o.status,String(o.counts.total),String(o.counts.created),String(o.counts.updated),String(o.counts.skipped),String(o.counts.failed),o.created_at,o.id]);return _(["Status","Total","Created","Updated","Skipped","Failed","Created At","ID"],t,"(no contact imports)")}var ad={resource:"contact import",resourcePlural:"contact imports",fetchItems:(e,{limit:t,after:o})=>e.contacts.imports.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.status} - ${e.counts.total} contacts`,hint:e.id})};function ld(e,t){if(!e)return;let o;try{o=JSON.parse(e)}catch{h({message:"Invalid --column-map JSON.",code:"invalid_column_map"},{json:t.json})}return(typeof o!="object"||o===null||Array.isArray(o))&&h({message:"Invalid --column-map JSON. Expected an object mapping contact fields to CSV column headers.",code:"invalid_column_map"},{json:t.json}),o}var ud=new d("create").description("Import contacts in bulk from a local CSV file").option("--file <path>","Path to the CSV file to import (required)").option("--column-map <json>",`Map CSV columns to contact fields as a JSON object (e.g. '{"email":"Email","firstName":"First Name"}')`).addOption(new q("--on-conflict <strategy>","How to handle contacts that already exist").choices(["upsert","skip"])).option("--segment-id <id...>","Segment ID to add imported contacts to (repeatable: --segment-id abc --segment-id def)").option("--topics <json>","Topic subscriptions as a JSON array of {id, subscription} objects").addHelpText("after",c({context:`Non-interactive: --file is required. All other flags are optional.
529
529
 
530
530
  The CSV file is uploaded as multipart form data (max 100MB).
531
531
 
@@ -541,32 +541,32 @@ On conflict: --on-conflict upsert (default) updates existing contacts; skip leav
541
541
 
542
542
  Segments: use --segment-id once per segment to add imported contacts to one or more segments.
543
543
 
544
- Topics: pass a JSON array of {id, subscription} objects (subscription is "opt_in" or "opt_out").`,output:' {"object":"contact_import","id":"<id>"}',errorCodes:["auth_error","missing_file","file_read_error","invalid_column_map","invalid_topics","create_error"],examples:["resend contacts imports create --file ./contacts.csv",`resend contacts imports create --file ./contacts.csv --column-map '{"email":"Email","firstName":"First Name"}'`,"resend contacts imports create --file ./contacts.csv --on-conflict skip --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.file,{message:"Path to the CSV file",placeholder:"./contacts.csv"},{message:"Missing --file flag.",code:"missing_file"},o),r;try{r=(0,lc.readFileSync)(i)}catch{h({message:`Failed to read file: ${i}`,code:"file_read_error"},{json:o.json})}let n=new File([new Uint8Array(r)],(0,cc.basename)(i),{type:"text/csv"}),s=ac(e.columnMap,o),a=(e.segmentId??[]).map(u=>({id:u})),l=e.topics!==void 0?Ci(e.topics,o):void 0;await P({loading:"Starting contact import...",sdkCall:u=>u.contacts.imports.create({file:n,...s&&{columnMap:s},...e.onConflict&&{onConflict:e.onConflict},...a.length>0&&{segments:a},...l&&{topics:l}}),onInteractive:u=>{console.log(`Contact import started: ${u.id}`)}},o)});var uc=new c("get").description("Retrieve a contact import by ID").argument("[id]","Contact import ID").addHelpText("after",d({output:` {
544
+ Topics: pass a JSON array of {id, subscription} objects (subscription is "opt_in" or "opt_out").`,output:' {"object":"contact_import","id":"<id>"}',errorCodes:["auth_error","missing_file","file_read_error","invalid_column_map","invalid_topics","create_error"],examples:["resend contacts imports create --file ./contacts.csv",`resend contacts imports create --file ./contacts.csv --column-map '{"email":"Email","firstName":"First Name"}'`,"resend contacts imports create --file ./contacts.csv --on-conflict skip --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.file,{message:"Path to the CSV file",placeholder:"./contacts.csv"},{message:"Missing --file flag.",code:"missing_file"},o),r;try{r=(0,dd.readFileSync)(i)}catch{h({message:`Failed to read file: ${i}`,code:"file_read_error"},{json:o.json})}let n=new File([new Uint8Array(r)],(0,cd.basename)(i),{type:"text/csv"}),s=ld(e.columnMap,o),a=(e.segmentId??[]).map(u=>({id:u})),l=e.topics!==void 0?xi(e.topics,o):void 0;await P({loading:"Starting contact import...",sdkCall:u=>u.contacts.imports.create({file:n,...s&&{columnMap:s},...e.onConflict&&{onConflict:e.onConflict},...a.length>0&&{segments:a},...l&&{topics:l}}),onInteractive:u=>{console.log(`Contact import started: ${u.id}`)}},o)});var md=new d("get").description("Retrieve a contact import by ID").argument("[id]","Contact import ID").addHelpText("after",c({output:` {
545
545
  "object": "contact_import",
546
546
  "id": "479e3145-dd38-476b-932c-529ceb705947",
547
547
  "status": "completed",
548
548
  "created_at": "2026-05-15 18:32:37.823+00",
549
549
  "completed_at": "2026-05-15 18:33:42.916+00",
550
550
  "counts": {"total":1200,"created":800,"updated":300,"skipped":75,"failed":25}
551
- }`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,sc,i);await j({loading:"Fetching contact import...",sdkCall:n=>n.contacts.imports.get(r),onInteractive:n=>{console.log(`${n.id} - ${n.status}`),console.log(`Created: ${n.created_at}`),n.completed_at&&console.log(`Completed: ${n.completed_at}`);let s=n.counts;console.log(`Counts: ${s.total} total, ${s.created} created, ${s.updated} updated, ${s.skipped} skipped, ${s.failed} failed`)}},i)});var mc=new c("list").alias("ls").description("List contact imports").option("--limit <n>","Maximum number of contact imports to return (1-100)","10").option("--after <cursor>","Return imports after this cursor (next page)").option("--before <cursor>","Return imports before this cursor (previous page)").addOption(new q("--status <status>","Filter by import status").choices(["queued","in_progress","completed","failed"])).addHelpText("after",d({context:`Pagination: use --after or --before with a contact import ID as the cursor.
551
+ }`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,ad,i);await B({loading:"Fetching contact import...",sdkCall:n=>n.contacts.imports.get(r),onInteractive:n=>{console.log(`${n.id} - ${n.status}`),console.log(`Created: ${n.created_at}`),n.completed_at&&console.log(`Completed: ${n.completed_at}`);let s=n.counts;console.log(`Counts: ${s.total} total, ${s.created} created, ${s.updated} updated, ${s.skipped} skipped, ${s.failed} failed`)}},i)});var pd=new d("list").alias("ls").description("List contact imports").option("--limit <n>","Maximum number of contact imports to return (1-100)","10").option("--after <cursor>","Return imports after this cursor (next page)").option("--before <cursor>","Return imports before this cursor (previous page)").addOption(new q("--status <status>","Filter by import status").choices(["queued","in_progress","completed","failed"])).addHelpText("after",c({context:`Pagination: use --after or --before with a contact import ID as the cursor.
552
552
  Only one of --after or --before may be used at a time.
553
- The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"object":"contact_import","id":"...","status":"completed","counts":{"total":1200,"created":800,"updated":300,"skipped":75,"failed":25}}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts imports list","resend contacts imports list --status completed --json","resend contacts imports list --after 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching contact imports...",sdkCall:n=>n.contacts.imports.list({...r,...e.status&&{status:e.status}}),onInteractive:n=>{console.log(nc(n.data)),T(n,"contacts imports list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var pc=new c("imports").description("Import contacts in bulk from a CSV file").addHelpText("after",d({context:`Import lifecycle:
553
+ The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"object":"contact_import","id":"...","status":"completed","counts":{"total":1200,"created":800,"updated":300,"skipped":75,"failed":25}}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts imports list","resend contacts imports list --status completed --json","resend contacts imports list --after 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching contact imports...",sdkCall:n=>n.contacts.imports.list({...r,...e.status&&{status:e.status}}),onInteractive:n=>{console.log(sd(n.data)),T(n,"contacts imports list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var fd=new d("imports").description("Import contacts in bulk from a CSV file").addHelpText("after",c({context:`Import lifecycle:
554
554
  1. resend contacts imports create --file ./contacts.csv (returns the import id)
555
555
  2. resend contacts imports get <id> (poll until "completed")
556
556
  3. resend contacts imports list (review past imports)
557
557
 
558
558
  Imports run asynchronously. The create command returns immediately with an id while
559
- the file is processed in the background.`,examples:["resend contacts imports create --file ./contacts.csv","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports list --status completed"]})).addCommand(dc).addCommand(uc).addCommand(mc,{isDefault:!0});var fc=new c("list").alias("ls").description("List all contacts").option("--limit <n>","Maximum number of contacts to return (1-100)","10").option("--after <cursor>","Return contacts after this cursor (next page)").option("--before <cursor>","Return contacts before this cursor (previous page)").addHelpText("after",d({context:`Contacts are global \u2014 they are not scoped to audiences or segments since the 2025 migration.
559
+ the file is processed in the background.`,examples:["resend contacts imports create --file ./contacts.csv","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports list --status completed"]})).addCommand(ud).addCommand(md).addCommand(pd,{isDefault:!0});var hd=new d("list").alias("ls").description("List all contacts").option("--limit <n>","Maximum number of contacts to return (1-100)","10").option("--after <cursor>","Return contacts after this cursor (next page)").option("--before <cursor>","Return contacts before this cursor (previous page)").addHelpText("after",c({context:`Contacts are global \u2014 they are not scoped to audiences or segments since the 2025 migration.
560
560
 
561
561
  Pagination: use --after or --before with a contact ID as the cursor.
562
562
  Only one of --after or --before may be used at a time.
563
- The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts list","resend contacts list --limit 25 --json","resend contacts list --after 479e3145-dd38-4932-8c0c-e58b548c9e76 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching contacts...",sdkCall:n=>n.contacts.list(r),onInteractive:n=>{console.log(yi(n.data)),T(n,"contacts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var hc=new c("remove-segment").description("Remove a contact from a segment").argument("[contactId]","Contact UUID or email address").argument("[segmentId]","Segment ID to remove the contact from").addHelpText("after",d({context:`The <contactId> argument accepts either a UUID or an email address.
564
- The <segmentId> argument must be a segment UUID (not an email).`,output:' {"id":"<segment-id>","deleted":true}',errorCodes:["auth_error","remove_segment_error"],examples:["resend contacts remove-segment e169aa45-1ecf-4183-9955-b1499d5701d3 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,Ce,r),s=await g(t,Oe,r),a={...Yt(n),segmentId:s};await R({loading:"Removing contact from segment...",sdkCall:l=>l.contacts.segments.remove(a),errorCode:"remove_segment_error",successMsg:`Contact removed from segment: ${s}`},r)});var gc=new c("segments").description("List the segments a contact belongs to").argument("[id]","Contact UUID or email address").addHelpText("after",d({context:"The <id> argument accepts either a UUID or an email address.",output:' {"object":"list","data":[{"id":"<segment-uuid>","name":"Newsletter Subscribers","created_at":"..."}],"has_more":false}',errorCodes:["auth_error","list_error"],examples:["resend contacts segments e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts segments steve.wozniak@gmail.com","resend contacts segments e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i);await S({loading:"Fetching segments...",sdkCall:n=>n.contacts.segments.list(Yt(r)),onInteractive:n=>console.log(gi(n.data))},i)});var Ac=new c("topics").description("List a contact's topic subscriptions").argument("[id]","Contact UUID or email address").addHelpText("after",d({context:`The <id> argument accepts either a UUID or an email address.
563
+ The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts list","resend contacts list --limit 25 --json","resend contacts list --after 479e3145-dd38-4932-8c0c-e58b548c9e76 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching contacts...",sdkCall:n=>n.contacts.list(r),onInteractive:n=>{console.log(Ci(n.data)),T(n,"contacts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var gd=new d("remove-segment").description("Remove a contact from a segment").argument("[contactId]","Contact UUID or email address").argument("[segmentId]","Segment ID to remove the contact from").addHelpText("after",c({context:`The <contactId> argument accepts either a UUID or an email address.
564
+ The <segmentId> argument must be a segment UUID (not an email).`,output:' {"id":"<segment-id>","deleted":true}',errorCodes:["auth_error","remove_segment_error"],examples:["resend contacts remove-segment e169aa45-1ecf-4183-9955-b1499d5701d3 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,Ce,r),s=await g(t,Oe,r),a={...Yt(n),segmentId:s};await F({loading:"Removing contact from segment...",sdkCall:l=>l.contacts.segments.remove(a),errorCode:"remove_segment_error",successMsg:`Contact removed from segment: ${s}`},r)});var Ad=new d("segments").description("List the segments a contact belongs to").argument("[id]","Contact UUID or email address").addHelpText("after",c({context:"The <id> argument accepts either a UUID or an email address.",output:' {"object":"list","data":[{"id":"<segment-uuid>","name":"Newsletter Subscribers","created_at":"..."}],"has_more":false}',errorCodes:["auth_error","list_error"],examples:["resend contacts segments e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts segments steve.wozniak@gmail.com","resend contacts segments e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i);await S({loading:"Fetching segments...",sdkCall:n=>n.contacts.segments.list(Yt(r)),onInteractive:n=>console.log(Ai(n.data))},i)});var bd=new d("topics").description("List a contact's topic subscriptions").argument("[id]","Contact UUID or email address").addHelpText("after",c({context:`The <id> argument accepts either a UUID or an email address.
565
565
 
566
566
  Topics control which broadcast email types a contact receives.
567
567
  subscription values: "opt_in" (receiving) | "opt_out" (not receiving)
568
568
 
569
- Use "resend contacts update-topics <id>" to change subscription statuses.`,output:' {"object":"list","data":[{"id":"...","name":"Product Updates","description":"...","subscription":"opt_in"}],"has_more":false}',errorCodes:["auth_error","list_error"],examples:["resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts topics steve.wozniak@gmail.com","resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i);await S({loading:"Fetching topic subscriptions...",sdkCall:n=>n.contacts.topics.list(zt(r)),onInteractive:n=>console.log(ec(n.data))},i)});var bc=new c("update").description("Update a contact's subscription status or custom properties").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").option("--unsubscribed","Globally unsubscribe the contact from all broadcasts").option("--no-unsubscribed","Re-subscribe the contact (clears the global unsubscribe flag)").option("--properties <json>",`JSON object of properties to merge (e.g. '{"company":"Acme"}'); set a key to null to clear it`).addHelpText("after",d({context:`The <id> argument accepts either a UUID or an email address.
569
+ Use "resend contacts update-topics <id>" to change subscription statuses.`,output:' {"object":"list","data":[{"id":"...","name":"Product Updates","description":"...","subscription":"opt_in"}],"has_more":false}',errorCodes:["auth_error","list_error"],examples:["resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts topics steve.wozniak@gmail.com","resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i);await S({loading:"Fetching topic subscriptions...",sdkCall:n=>n.contacts.topics.list(zt(r)),onInteractive:n=>console.log(td(n.data))},i)});var yd=new d("update").description("Update a contact's subscription status or custom properties").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").option("--unsubscribed","Globally unsubscribe the contact from all broadcasts").option("--no-unsubscribed","Re-subscribe the contact (clears the global unsubscribe flag)").option("--properties <json>",`JSON object of properties to merge (e.g. '{"company":"Acme"}'); set a key to null to clear it`).addHelpText("after",c({context:`The <id> argument accepts either a UUID or an email address.
570
570
 
571
571
  Subscription toggle:
572
572
  --unsubscribed Sets unsubscribed: true \u2014 contact will not receive any broadcasts.
@@ -574,7 +574,7 @@ Subscription toggle:
574
574
  Omitting both flags leaves the subscription status unchanged.
575
575
 
576
576
  Properties: --properties merges the given JSON object with existing properties.
577
- Set a key to null to clear it: '{"company":null}'.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","invalid_properties","update_error"],examples:["resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --unsubscribed","resend contacts update acme@example.com --no-unsubscribed",`resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --properties '{"plan":"pro"}'`,"resend contacts update acme@example.com --unsubscribed --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i),n=xi(t.properties,i),s={...zt(r),...t.unsubscribed!==void 0&&{unsubscribed:t.unsubscribed},...n&&{properties:n}};await R({loading:"Updating contact...",sdkCall:a=>a.contacts.update(s),errorCode:"update_error",successMsg:`Contact updated: ${r}`},i)});X();var yc=new c("update-topics").description("Update a contact's topic subscription statuses").argument("[id]","Contact UUID or email address").option("--topics <json>",`JSON array of topic subscriptions (required) \u2014 e.g. '[{"id":"topic-uuid","subscription":"opt_in"}]'`).addHelpText("after",d({context:`The <id> argument accepts either a UUID or an email address.
577
+ Set a key to null to clear it: '{"company":null}'.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","invalid_properties","update_error"],examples:["resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --unsubscribed","resend contacts update acme@example.com --no-unsubscribed",`resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --properties '{"plan":"pro"}'`,"resend contacts update acme@example.com --unsubscribed --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i),n=wi(t.properties,i),s={...zt(r),...t.unsubscribed!==void 0&&{unsubscribed:t.unsubscribed},...n&&{properties:n}};await F({loading:"Updating contact...",sdkCall:a=>a.contacts.update(s),errorCode:"update_error",successMsg:`Contact updated: ${r}`},i)});X();var Cd=new d("update-topics").description("Update a contact's topic subscription statuses").argument("[id]","Contact UUID or email address").option("--topics <json>",`JSON array of topic subscriptions (required) \u2014 e.g. '[{"id":"topic-uuid","subscription":"opt_in"}]'`).addHelpText("after",c({context:`The <id> argument accepts either a UUID or an email address.
578
578
 
579
579
  Non-interactive: --topics is required.
580
580
 
@@ -583,7 +583,7 @@ Topics JSON format:
583
583
  subscription values: "opt_in" | "opt_out"
584
584
 
585
585
  This operation replaces all topic subscriptions for the specified topics.
586
- Topics not included in the array are left unchanged.`,output:' {"id":"<contact-id>"}',errorCodes:["auth_error","missing_topics","invalid_topics","update_topics_error"],examples:[`resend contacts update-topics e169aa45-1ecf-4183-9955-b1499d5701d3 --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_out"},{"id":"07d84122-7224-4881-9c31-1c048e204602","subscription":"opt_in"}]' --json`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i),n=await ee(i),s=t.topics;if(!s){(!w()||i.json)&&h({message:"Missing --topics flag.",code:"missing_topics"},{json:i.json});let u=await Z({message:`Topics JSON (e.g. '[{"id":"topic-uuid","subscription":"opt_in"}]')`,placeholder:'[{"id":"topic-uuid","subscription":"opt_in"}]',validate:m=>m?void 0:"Required"});F(u)&&O("Cancelled."),s=u}let a=Ci(s,i),l=await ce("Updating topic subscriptions...",()=>n.contacts.topics.update({...zt(r),topics:a}),"update_topics_error",i);!i.json&&w()?console.log(`Topic subscriptions updated for contact: ${r}`):N(l,{json:i.json})});var Cc=new c("contacts").description("Manage contacts").addHelpText("after",d({context:`Contacts are global entities (not audience-scoped since the 2025 migration).
586
+ Topics not included in the array are left unchanged.`,output:' {"id":"<contact-id>"}',errorCodes:["auth_error","missing_topics","invalid_topics","update_topics_error"],examples:[`resend contacts update-topics e169aa45-1ecf-4183-9955-b1499d5701d3 --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_out"},{"id":"07d84122-7224-4881-9c31-1c048e204602","subscription":"opt_in"}]' --json`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Ce,i),n=await ee(i),s=t.topics;if(!s){(!w()||i.json)&&h({message:"Missing --topics flag.",code:"missing_topics"},{json:i.json});let u=await Z({message:`Topics JSON (e.g. '[{"id":"topic-uuid","subscription":"opt_in"}]')`,placeholder:'[{"id":"topic-uuid","subscription":"opt_in"}]',validate:m=>m?void 0:"Required"});R(u)&&O("Cancelled."),s=u}let a=xi(s,i),l=await de("Updating topic subscriptions...",()=>n.contacts.topics.update({...zt(r),topics:a}),"update_topics_error",i);!i.json&&w()?console.log(`Topic subscriptions updated for contact: ${r}`):M(l,{json:i.json})});var xd=new d("contacts").description("Manage contacts").addHelpText("after",c({context:`Contacts are global entities (not audience-scoped since the 2025 migration).
587
587
  Each contact is identified by a UUID or email address \u2014 both are accepted in all subcommands.
588
588
 
589
589
  Properties:
@@ -600,7 +600,7 @@ Segments:
600
600
  Manage membership with "resend contacts add-segment" and "resend contacts remove-segment".
601
601
 
602
602
  Imports:
603
- Bulk-import contacts from a CSV file with "resend contacts imports create --file <path>".`,examples:["resend contacts list","resend contacts create --email steve.wozniak@gmail.com --first-name Steve","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts update acme@example.com --unsubscribed","resend contacts delete e169aa45-1ecf-4183-9955-b1499d5701d3 --yes","resend contacts segments steve.wozniak@gmail.com","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts topics steve.wozniak@gmail.com",`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,"resend contacts imports create --file ./contacts.csv"]})).addCommand(oc).addCommand(rc).addCommand(fc,{isDefault:!0}).addCommand(bc).addCommand(ic).addCommand(gc).addCommand(tc).addCommand(hc).addCommand(Ac).addCommand(yc).addCommand(pc);var xc=new c("docs").description("Open the Resend documentation in your browser").addHelpText("after",d({context:"Opens https://resend.com/docs in your default browser.",examples:["resend docs"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Te(he.documentation,o)});ye();Ur();Zo();X();Uo();Kt();var Qr="TimeoutError",kc=(e,t)=>{let o,i=new Promise((r,n)=>{o=setTimeout(()=>{let s=new Error(`Operation timed out after ${t}ms`);s.name=Qr,n(s)},t)});return Promise.race([e,i]).finally(()=>{clearTimeout(o)})};var sg=5e3;function ag(e){return e instanceof Error&&e.name===Fr}async function lg(){try{let e=await fetch(Gr,{headers:{Accept:"application/vnd.github.v3+json"},signal:AbortSignal.timeout(5e3)});if(!e.ok)return{name:"CLI Version",status:"warn",message:`v${se} (could not check for updates)`};let t=await e.json();if(t.prerelease||t.draft)return{name:"CLI Version",status:"warn",message:`v${se} (could not check for updates)`};let o=t.tag_name?.replace(/^v/,"")??"unknown";return o===se?{name:"CLI Version",status:"pass",message:`v${se} (latest)`}:{name:"CLI Version",status:"warn",message:`v${se} (latest: v${o})`,detail:"Update available"}}catch{return{name:"CLI Version",status:"warn",message:`v${se} (could not check for updates)`}}}async function cg(e){let t;try{t=await Rt(e,void 0,{refresh:!1})}catch(n){return{name:"API Key",status:"fail",message:W(n,"Authentication failed"),detail:"Run: resend login"}}if(!t)return{name:"API Key",status:"fail",message:"No API key found",detail:"Run: resend login"};let o=t.type==="api_key"?t.key:t.access_token,i=t.profile?`, profile: ${t.profile}`:"",r=t.type==="oauth_grant"?`${t.source} (oauth)`:t.source;return{name:"API Key",status:"pass",message:`${At(o)} (source: ${r}${i})`}}async function dg(e){let t;try{t=await Rt(e)}catch(r){let n=ag(r);return{name:"API Validation",status:n?"warn":"fail",message:W(r,"Authentication failed"),...n?{}:{detail:"Run: resend login"}}}if(!t)return{name:"API Validation",status:"fail",message:"Skipped \u2014 no API key"};let o=t.type==="api_key"?t.key:t.access_token,i=t.type==="api_key"?"API key":"credential";try{let r=new Gt(o),{data:n,error:s}=await kc(r.domains.list(),sg);if(s){let m=s;return m.name==="restricted_api_key"?{name:"API Validation",status:"warn",message:`Sending-only ${i}`,detail:Qt}:m.name==="application_error"?{name:"API Validation",status:"warn",message:"Network error. Check your connection and try again"}:{name:"API Validation",status:"fail",message:`Invalid ${i}: ${s.message}`}}let a=n?.data??[],l=a.filter(m=>m.status==="verified"),u=a.filter(m=>m.status!=="verified");return a.length===0?{name:"Domains",status:"warn",message:"No domains configured",detail:"Add a domain at https://resend.com/domains"}:l.length===0?{name:"Domains",status:"warn",message:`${u.length} domain(s) pending verification`,detail:a.map(m=>`${m.name} (${m.status})`).join(", ")}:{name:"Domains",status:"pass",message:`${l.length} verified, ${u.length} pending`,detail:a.map(m=>`${m.name} (${m.status})`).join(", ")}}catch(r){return r instanceof Error&&r.name===Qr?{name:"API Validation",status:"warn",message:"Request timed out"}:{name:"API Validation",status:"fail",message:W(r,`Failed to validate ${i}`)}}}var _c=new c("doctor").description("Check CLI version, API key, and domain status").addHelpText("after",d({setup:!0,context:`Checks performed:
603
+ Bulk-import contacts from a CSV file with "resend contacts imports create --file <path>".`,examples:["resend contacts list","resend contacts create --email steve.wozniak@gmail.com --first-name Steve","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts update acme@example.com --unsubscribed","resend contacts delete e169aa45-1ecf-4183-9955-b1499d5701d3 --yes","resend contacts segments steve.wozniak@gmail.com","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts topics steve.wozniak@gmail.com",`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,"resend contacts imports create --file ./contacts.csv"]})).addCommand(id).addCommand(nd).addCommand(hd,{isDefault:!0}).addCommand(yd).addCommand(rd).addCommand(Ad).addCommand(od).addCommand(gd).addCommand(bd).addCommand(Cd).addCommand(fd);var wd=new d("docs").description("Open the Resend documentation in your browser").addHelpText("after",c({context:"Opens https://resend.com/docs in your default browser.",examples:["resend docs"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Te(he.documentation,o)});ye();Sr();ei();X();Uo();Kt();var Nr="TimeoutError",_d=(e,t)=>{let o,i=new Promise((r,n)=>{o=setTimeout(()=>{let s=new Error(`Operation timed out after ${t}ms`);s.name=Nr,n(s)},t)});return Promise.race([e,i]).finally(()=>{clearTimeout(o)})};var ug=5e3;function mg(e){return e instanceof Error&&e.name===Rr}async function pg(){try{let e=await fetch(Hr,{headers:{Accept:"application/vnd.github.v3+json"},signal:AbortSignal.timeout(5e3)});if(!e.ok)return{name:"CLI Version",status:"warn",message:`v${se} (could not check for updates)`};let t=await e.json();if(t.prerelease||t.draft)return{name:"CLI Version",status:"warn",message:`v${se} (could not check for updates)`};let o=t.tag_name?.replace(/^v/,"")??"unknown";return o===se?{name:"CLI Version",status:"pass",message:`v${se} (latest)`}:{name:"CLI Version",status:"warn",message:`v${se} (latest: v${o})`,detail:"Update available"}}catch{return{name:"CLI Version",status:"warn",message:`v${se} (could not check for updates)`}}}async function fg(e){let t;try{t=await Rt(e,void 0,{refresh:!1})}catch(n){return{name:"API Key",status:"fail",message:W(n,"Authentication failed"),detail:"Run: resend login"}}if(!t)return{name:"API Key",status:"fail",message:"No API key found",detail:"Run: resend login"};let o=t.type==="api_key"?t.key:t.access_token,i=t.profile?`, profile: ${t.profile}`:"",r=t.type==="oauth_grant"?`${t.source} (oauth)`:t.source;return{name:"API Key",status:"pass",message:`${At(o)} (source: ${r}${i})`}}async function hg(e){let t;try{t=await Rt(e)}catch(r){let n=mg(r);return{name:"API Validation",status:n?"warn":"fail",message:W(r,"Authentication failed"),...n?{}:{detail:"Run: resend login"}}}if(!t)return{name:"API Validation",status:"fail",message:"Skipped \u2014 no API key"};let o=t.type==="api_key"?t.key:t.access_token,i=t.type==="api_key"?"API key":"credential";try{let r=new Gt(o),{data:n,error:s}=await _d(r.domains.list(),ug);if(s){let m=s;return m.name==="restricted_api_key"?{name:"API Validation",status:"warn",message:`Sending-only ${i}`,detail:Qt}:m.name==="application_error"?{name:"API Validation",status:"warn",message:"Network error. Check your connection and try again"}:{name:"API Validation",status:"fail",message:`Invalid ${i}: ${s.message}`}}let a=n?.data??[],l=a.filter(m=>m.status==="verified"),u=a.filter(m=>m.status!=="verified");return a.length===0?{name:"Domains",status:"warn",message:"No domains configured",detail:"Add a domain at https://resend.com/domains"}:l.length===0?{name:"Domains",status:"warn",message:`${u.length} domain(s) pending verification`,detail:a.map(m=>`${m.name} (${m.status})`).join(", ")}:{name:"Domains",status:"pass",message:`${l.length} verified, ${u.length} pending`,detail:a.map(m=>`${m.name} (${m.status})`).join(", ")}}catch(r){return r instanceof Error&&r.name===Nr?{name:"API Validation",status:"warn",message:"Request timed out"}:{name:"API Validation",status:"fail",message:W(r,`Failed to validate ${i}`)}}}var Fd=new d("doctor").description("Check CLI version, API key, and domain status").addHelpText("after",c({setup:!0,context:`Checks performed:
604
604
  CLI Version Is the installed version up to date?
605
605
  API Key Is a key present (--api-key, RESEND_API_KEY, or credentials file)?
606
606
  Credential Storage Which backend is storing credentials (secure storage vs plaintext file)?
@@ -615,37 +615,37 @@ Imports:
615
615
  status values: "pass" | "warn" | "fail"
616
616
  Exit code 1 if any check has status "fail"`,examples:["resend doctor","resend doctor --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=[],r=w()&&!o.json;r&&console.log(`
617
617
  Resend Doctor
618
- `);let n=r?le("Checking CLI version..."):null,s=await lg();i.push(s),s.status==="warn"?n?.warn(s.message):n?.stop(s.message),n=r?le("Checking API key..."):null;let a=await cg(o.apiKey);i.push(a),a.status==="fail"?n?.fail(a.message):n?.stop(a.message),n=r?le("Checking credential storage..."):null;let l=await rt(),u=Ke(),m=l.isSecure,p={name:"Credential Storage",status:m?"pass":"warn",message:m?l.name:"plaintext file",...!m&&process.env.RESEND_CREDENTIAL_STORE!=="file"&&(u?.storage==="secure_storage"||process.env.RESEND_CREDENTIAL_STORE==="secure_storage")?{detail:"Secure backend unavailable despite secure storage preference \u2014 falling back to plaintext"}:{}};i.push(p),p.status==="warn"?n?.warn(p.message):n?.stop(p.message),n=r?le("Validating API key & domains..."):null;let f=await dg(o.apiKey);i.push(f),f.status==="fail"?n?.fail(f.message):f.status==="warn"?n?.warn(f.message):n?.stop(f.message);let y=i.some(A=>A.status==="fail");!o.json&&w()?console.log(""):N({ok:!y,checks:i},{json:o.json}),y&&process.exit(1)});var Fc=new c("create").description("Start a claim for a domain another Resend account has verified").option("--name <domain>","Domain name to claim (e.g. example.com)").addOption(new q("--region <region>","Sending region").choices(["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"])).option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").option("--custom-return-path <subdomain>","Subdomain for the Return-Path address (e.g. bounce)").option("--open-tracking","Enable open tracking").option("--no-open-tracking","Disable open tracking").option("--click-tracking","Enable click tracking").option("--no-click-tracking","Disable click tracking").addHelpText("after",d({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY)",output:" domain_claim object with the placeholder domain_id and the TXT record to add to DNS.",errorCodes:["auth_error","missing_name","create_error"],examples:["resend domains claim create --name example.com","resend domains claim create --name example.com --region eu-west-1","resend domains claim create --name example.com --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Domain name to claim",placeholder:"example.com"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Starting domain claim...",sdkCall:r=>r.domains.claims.create({name:i,...e.region&&{region:e.region},...e.customReturnPath!==void 0&&{customReturnPath:e.customReturnPath},...e.openTracking!==void 0&&{openTracking:e.openTracking},...e.clickTracking!==void 0&&{clickTracking:e.clickTracking},...e.trackingSubdomain!==void 0&&{trackingSubdomain:e.trackingSubdomain}}),onInteractive:r=>{console.log(`Claim started for ${r.name} (claim id: ${r.id}, domain id: ${r.domain_id})`),console.log(`Status: ${r.status}`),console.log(`
618
+ `);let n=r?le("Checking CLI version..."):null,s=await pg();i.push(s),s.status==="warn"?n?.warn(s.message):n?.stop(s.message),n=r?le("Checking API key..."):null;let a=await fg(o.apiKey);i.push(a),a.status==="fail"?n?.fail(a.message):n?.stop(a.message),n=r?le("Checking credential storage..."):null;let l=await rt(),u=Ke(),m=l.isSecure,p={name:"Credential Storage",status:m?"pass":"warn",message:m?l.name:"plaintext file",...!m&&process.env.RESEND_CREDENTIAL_STORE!=="file"&&(u?.storage==="secure_storage"||process.env.RESEND_CREDENTIAL_STORE==="secure_storage")?{detail:"Secure backend unavailable despite secure storage preference \u2014 falling back to plaintext"}:{}};i.push(p),p.status==="warn"?n?.warn(p.message):n?.stop(p.message),n=r?le("Validating API key & domains..."):null;let f=await hg(o.apiKey);i.push(f),f.status==="fail"?n?.fail(f.message):f.status==="warn"?n?.warn(f.message):n?.stop(f.message);let y=i.some(A=>A.status==="fail");!o.json&&w()?console.log(""):M({ok:!y,checks:i},{json:o.json}),y&&process.exit(1)});var Rd=new d("create").description("Start a claim for a domain another Resend account has verified").option("--name <domain>","Domain name to claim (e.g. example.com)").addOption(new q("--region <region>","Sending region").choices(["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"])).option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").option("--custom-return-path <subdomain>","Subdomain for the Return-Path address (e.g. bounce)").option("--open-tracking","Enable open tracking").option("--no-open-tracking","Disable open tracking").option("--click-tracking","Enable click tracking").option("--no-click-tracking","Disable click tracking").addHelpText("after",c({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY)",output:" domain_claim object with the placeholder domain_id and the TXT record to add to DNS.",errorCodes:["auth_error","missing_name","create_error"],examples:["resend domains claim create --name example.com","resend domains claim create --name example.com --region eu-west-1","resend domains claim create --name example.com --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Domain name to claim",placeholder:"example.com"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Starting domain claim...",sdkCall:r=>r.domains.claims.create({name:i,...e.region&&{region:e.region},...e.customReturnPath!==void 0&&{customReturnPath:e.customReturnPath},...e.openTracking!==void 0&&{openTracking:e.openTracking},...e.clickTracking!==void 0&&{clickTracking:e.clickTracking},...e.trackingSubdomain!==void 0&&{trackingSubdomain:e.trackingSubdomain}}),onInteractive:r=>{console.log(`Claim started for ${r.name} (claim id: ${r.id}, domain id: ${r.domain_id})`),console.log(`Status: ${r.status}`),console.log(`
619
619
  Add this TXT record at your DNS provider:`),console.log(` ${r.record.name} TXT ${r.record.value}`),console.log(`
620
- Then run \`resend domains claim verify ${r.domain_id}\`.`)}},o)});var Rc=new c("get").description("Retrieve the latest claim for a domain").argument("[id]","Domain ID (the placeholder domain created by the claim)").addHelpText("after",d({output:` domain_claim object: status, domain_id, the TXT record, blocked_reason, expires_at.
620
+ Then run \`resend domains claim verify ${r.domain_id}\`.`)}},o)});var Dd=new d("get").description("Retrieve the latest claim for a domain").argument("[id]","Domain ID (the placeholder domain created by the claim)").addHelpText("after",c({output:` domain_claim object: status, domain_id, the TXT record, blocked_reason, expires_at.
621
621
 
622
- Claim status values: pending | verified | completed | blocked | expired | superseded | canceled | failed`,errorCodes:["auth_error","fetch_error","not_found"],examples:["resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await j({loading:"Fetching domain claim...",sdkCall:n=>n.domains.claims.get(r),onInteractive:n=>{console.log(`${n.name} \u2014 ${n.status}`),console.log(`Claim ID: ${n.id}`),console.log(`Domain ID: ${n.domain_id}`),n.blocked_reason&&console.log(`Blocked: ${n.blocked_reason}`),console.log(`Expires: ${n.expires_at}`),console.log(`
623
- TXT record:`),console.log(` ${n.record.name} TXT ${n.record.value}`)}},i)});var Dc=new c("verify").description("Trigger DNS verification and transfer for a domain claim").argument("[id]","Domain ID (the placeholder domain created by the claim)").addHelpText("after",d({output:" domain_claim object (status stays pending while verification runs async).",errorCodes:["auth_error","verify_error","not_found"],examples:["resend domains claim verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await R({loading:"Verifying domain claim...",sdkCall:n=>n.domains.claims.verify(r),errorCode:"verify_error",successMsg:`Domain claim verification started. Check status with resend domains claim get ${r}.`},i)});var Tc=new c("claim").description("Claim a domain already verified by another Resend account").addHelpText("after",d({context:`Claim lifecycle:
622
+ Claim status values: pending | verified | completed | blocked | expired | superseded | canceled | failed`,errorCodes:["auth_error","fetch_error","not_found"],examples:["resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await B({loading:"Fetching domain claim...",sdkCall:n=>n.domains.claims.get(r),onInteractive:n=>{console.log(`${n.name} \u2014 ${n.status}`),console.log(`Claim ID: ${n.id}`),console.log(`Domain ID: ${n.domain_id}`),n.blocked_reason&&console.log(`Blocked: ${n.blocked_reason}`),console.log(`Expires: ${n.expires_at}`),console.log(`
623
+ TXT record:`),console.log(` ${n.record.name} TXT ${n.record.value}`)}},i)});var Td=new d("verify").description("Trigger DNS verification and transfer for a domain claim").argument("[id]","Domain ID (the placeholder domain created by the claim)").addHelpText("after",c({output:" domain_claim object (status stays pending while verification runs async).",errorCodes:["auth_error","verify_error","not_found"],examples:["resend domains claim verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await F({loading:"Verifying domain claim...",sdkCall:n=>n.domains.claims.verify(r),errorCode:"verify_error",successMsg:`Domain claim verification started. Check status with resend domains claim get ${r}.`},i)});var Od=new d("claim").description("Claim a domain already verified by another Resend account").addHelpText("after",c({context:`Claim lifecycle:
624
624
  1. resend domains claim create --name example.com (returns the TXT record)
625
625
  2. Configure the TXT record at your DNS provider
626
626
  3. resend domains claim verify <domain-id> (trigger verification + transfer)
627
627
  4. resend domains claim get <domain-id> (poll until "completed")
628
628
  5. The transferred domain has NEW DKIM records \u2014 update DNS, then run:
629
- resend domains verify <domain-id>`,examples:["resend domains claim create --name example.com","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0"]})).addCommand(Fc).addCommand(Rc).addCommand(Dc);var Oc=new c("create").description("Create a new domain and receive DNS records to configure").option("--name <domain>","Domain name (e.g. example.com)").addOption(new q("--region <region>","Sending region").choices(["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"])).addOption(new q("--tls <mode>","TLS mode (default: opportunistic)").choices(["opportunistic","enforced"])).option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").option("--custom-return-path <subdomain>","Subdomain for the Return-Path address (e.g. bounce)").option("--sending","Enable sending capability (default: enabled)").option("--receiving","Enable receiving capability (default: disabled)").addHelpText("after",d({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY)",output:" Full domain object with DNS records array to configure in your DNS provider.",errorCodes:["auth_error","missing_name","create_error"],examples:["resend domains create --name example.com","resend domains create --name example.com --region eu-west-1 --tls enforced","resend domains create --name example.com --tracking-subdomain track","resend domains create --name example.com --custom-return-path bounce","resend domains create --name example.com --receiving --json","resend domains create --name example.com --sending --receiving --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Domain name",placeholder:"example.com"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating domain...",sdkCall:r=>r.domains.create({name:i,...e.region&&{region:e.region},...e.tls&&{tls:e.tls},...e.trackingSubdomain&&{trackingSubdomain:e.trackingSubdomain},...e.customReturnPath!==void 0&&{customReturnPath:e.customReturnPath},...(e.sending||e.receiving)&&{capabilities:{...e.sending&&{sending:"enabled"},...e.receiving&&{receiving:"enabled"}}}}),onInteractive:r=>{console.log(`Domain created: ${r.name} (id: ${r.id})`),console.log(`
630
- DNS Records to configure:`),console.log(li(r.records,r.name)),console.log(`
631
- Run \`resend domains verify ${r.id}\` after configuring DNS.`)}},o)});var Ec=new c("delete").alias("rm").description("Delete a domain").argument("[id]","Domain ID").option("--yes","Skip confirmation prompt").addHelpText("after",d({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"domain","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend domains delete 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --yes","resend domains delete 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,De,i);await z(r.id,!!t.yes,{confirmMessage:`Delete domain "${r.label}"?
629
+ resend domains verify <domain-id>`,examples:["resend domains claim create --name example.com","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0"]})).addCommand(Rd).addCommand(Dd).addCommand(Td);var Ed=new d("create").description("Create a new domain and receive DNS records to configure").option("--name <domain>","Domain name (e.g. example.com)").addOption(new q("--region <region>","Sending region").choices(["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"])).addOption(new q("--tls <mode>","TLS mode (default: opportunistic)").choices(["opportunistic","enforced"])).option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").option("--custom-return-path <subdomain>","Subdomain for the Return-Path address (e.g. bounce)").option("--sending","Enable sending capability (default: enabled)").option("--receiving","Enable receiving capability (default: disabled)").addHelpText("after",c({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY)",output:" Full domain object with DNS records array to configure in your DNS provider.",errorCodes:["auth_error","missing_name","create_error"],examples:["resend domains create --name example.com","resend domains create --name example.com --region eu-west-1 --tls enforced","resend domains create --name example.com --tracking-subdomain track","resend domains create --name example.com --custom-return-path bounce","resend domains create --name example.com --receiving --json","resend domains create --name example.com --sending --receiving --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Domain name",placeholder:"example.com"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating domain...",sdkCall:r=>r.domains.create({name:i,...e.region&&{region:e.region},...e.tls&&{tls:e.tls},...e.trackingSubdomain&&{trackingSubdomain:e.trackingSubdomain},...e.customReturnPath!==void 0&&{customReturnPath:e.customReturnPath},...(e.sending||e.receiving)&&{capabilities:{...e.sending&&{sending:"enabled"},...e.receiving&&{receiving:"enabled"}}}}),onInteractive:r=>{console.log(`Domain created: ${r.name} (id: ${r.id})`),console.log(`
630
+ DNS Records to configure:`),console.log(di(r.records,r.name)),console.log(`
631
+ Run \`resend domains verify ${r.id}\` after configuring DNS.`)}},o)});var Bd=new d("delete").alias("rm").description("Delete a domain").argument("[id]","Domain ID").option("--yes","Skip confirmation prompt").addHelpText("after",c({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"domain","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend domains delete 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --yes","resend domains delete 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,De,i);await z(r.id,!!t.yes,{confirmMessage:`Delete domain "${r.label}"?
632
632
  ID: ${r.id}
633
- This cannot be undone.`,loading:"Deleting domain...",object:"domain",successMsg:"Domain deleted",sdkCall:n=>n.domains.remove(r.id)},i)});var Bc=new c("get").description("Retrieve a domain with its DNS records and current verification status").argument("[id]","Domain ID").addHelpText("after",d({output:` Full domain object including records array and current status.
633
+ This cannot be undone.`,loading:"Deleting domain...",object:"domain",successMsg:"Domain deleted",sdkCall:n=>n.domains.remove(r.id)},i)});var Id=new d("get").description("Retrieve a domain with its DNS records and current verification status").argument("[id]","Domain ID").addHelpText("after",c({output:` Full domain object including records array and current status.
634
634
 
635
- Domain status values: not_started | pending | verified | failed | partially_verified | partially_failed`,errorCodes:["auth_error","fetch_error"],examples:["resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await j({loading:"Fetching domain...",sdkCall:n=>n.domains.get(r),onInteractive:n=>{console.log(`${n.name} \u2014 ${va(n.status)}`),console.log(`ID: ${n.id}`),console.log(`Region: ${n.region}`),console.log(`Created: ${n.created_at}`),n.open_tracking!==void 0&&console.log(`Open tracking: ${n.open_tracking?"enabled":"disabled"}`),n.click_tracking!==void 0&&console.log(`Click tracking: ${n.click_tracking?"enabled":"disabled"}`),n.tracking_subdomain&&console.log(`Tracking subdomain: ${n.tracking_subdomain}`),n.records.length>0&&(console.log(`
636
- DNS Records:`),console.log(li(n.records,n.name)))}},i)});var Ic=new c("list").alias("ls").description("List all domains").option("--limit <n>","Maximum number of domains to return (1-100)","10").option("--after <cursor>","Return domains after this cursor (next page)").option("--before <cursor>","Return domains before this cursor (previous page)").addHelpText("after",d({output:` {"object":"list","data":[...],"has_more":true}
637
- The list response does not include DNS records \u2014 use "resend domains get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend domains list","resend domains list --limit 25 --json","resend domains list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching domains...",sdkCall:n=>n.domains.list(r),onInteractive:n=>{console.log(wa(n.data)),T(n,"domains list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var jc=new c("update").description("Update domain settings: TLS mode, tracking, and tracking subdomain").argument("[id]","Domain ID").addOption(new q("--tls <mode>","TLS mode").choices(["opportunistic","enforced"])).option("--open-tracking","Enable open tracking").option("--no-open-tracking","Disable open tracking").option("--click-tracking","Enable click tracking").option("--no-click-tracking","Disable click tracking").option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").addHelpText("after",d({output:' {"object":"domain","id":"<id>"}',errorCodes:["auth_error","no_changes","update_error"],examples:["resend domains update <id> --tls enforced","resend domains update <id> --open-tracking --click-tracking","resend domains update <id> --tracking-subdomain track","resend domains update <id> --no-open-tracking --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i),{tls:n,openTracking:s,clickTracking:a,trackingSubdomain:l}=t;!n&&s===void 0&&a===void 0&&!l&&h({message:"Provide at least one option to update: --tls, --open-tracking, --click-tracking, or --tracking-subdomain.",code:"no_changes"},{json:i.json});let u={id:r};n&&(u.tls=n),s!==void 0&&(u.openTracking=s),a!==void 0&&(u.clickTracking=a),l&&(u.trackingSubdomain=l),await R({loading:"Updating domain...",sdkCall:m=>m.domains.update(u),errorCode:"update_error",successMsg:`Domain updated: ${r}`},i)});var Pc=new c("verify").description("Trigger async DNS verification for a domain").argument("[id]","Domain ID").addHelpText("after",d({context:`Verification is async \u2014 the domain enters "pending" status while DNS records are checked.
638
- Poll the status with: resend domains get <id>`,output:' {"object":"domain","id":"<id>"}',errorCodes:["auth_error","verify_error"],examples:["resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await R({loading:"Verifying domain...",sdkCall:n=>n.domains.verify(r),errorCode:"verify_error",successMsg:`Domain verification started. Check status with resend domains get ${r}.`},i)});var $c=new c("domains").description("Manage verified sending and receiving domains").addHelpText("after",d({context:`Domain lifecycle:
635
+ Domain status values: not_started | pending | verified | failed | partially_verified | partially_failed`,errorCodes:["auth_error","fetch_error"],examples:["resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await B({loading:"Fetching domain...",sdkCall:n=>n.domains.get(r),onInteractive:n=>{console.log(`${n.name} \u2014 ${Ua(n.status)}`),console.log(`ID: ${n.id}`),console.log(`Region: ${n.region}`),console.log(`Created: ${n.created_at}`),n.open_tracking!==void 0&&console.log(`Open tracking: ${n.open_tracking?"enabled":"disabled"}`),n.click_tracking!==void 0&&console.log(`Click tracking: ${n.click_tracking?"enabled":"disabled"}`),n.tracking_subdomain&&console.log(`Tracking subdomain: ${n.tracking_subdomain}`),n.records.length>0&&(console.log(`
636
+ DNS Records:`),console.log(di(n.records,n.name)))}},i)});var jd=new d("list").alias("ls").description("List all domains").option("--limit <n>","Maximum number of domains to return (1-100)","10").option("--after <cursor>","Return domains after this cursor (next page)").option("--before <cursor>","Return domains before this cursor (previous page)").addHelpText("after",c({output:` {"object":"list","data":[...],"has_more":true}
637
+ The list response does not include DNS records \u2014 use "resend domains get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend domains list","resend domains list --limit 25 --json","resend domains list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching domains...",sdkCall:n=>n.domains.list(r),onInteractive:n=>{console.log(va(n.data)),T(n,"domains list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Pd=new d("update").description("Update domain settings: TLS mode, tracking, and tracking subdomain").argument("[id]","Domain ID").addOption(new q("--tls <mode>","TLS mode").choices(["opportunistic","enforced"])).option("--open-tracking","Enable open tracking").option("--no-open-tracking","Disable open tracking").option("--click-tracking","Enable click tracking").option("--no-click-tracking","Disable click tracking").option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").addHelpText("after",c({output:' {"object":"domain","id":"<id>"}',errorCodes:["auth_error","no_changes","update_error"],examples:["resend domains update <id> --tls enforced","resend domains update <id> --open-tracking --click-tracking","resend domains update <id> --tracking-subdomain track","resend domains update <id> --no-open-tracking --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i),{tls:n,openTracking:s,clickTracking:a,trackingSubdomain:l}=t;!n&&s===void 0&&a===void 0&&!l&&h({message:"Provide at least one option to update: --tls, --open-tracking, --click-tracking, or --tracking-subdomain.",code:"no_changes"},{json:i.json});let u={id:r};n&&(u.tls=n),s!==void 0&&(u.openTracking=s),a!==void 0&&(u.clickTracking=a),l&&(u.trackingSubdomain=l),await F({loading:"Updating domain...",sdkCall:m=>m.domains.update(u),errorCode:"update_error",successMsg:`Domain updated: ${r}`},i)});var $d=new d("verify").description("Trigger async DNS verification for a domain").argument("[id]","Domain ID").addHelpText("after",c({context:`Verification is async \u2014 the domain enters "pending" status while DNS records are checked.
638
+ Poll the status with: resend domains get <id>`,output:' {"object":"domain","id":"<id>"}',errorCodes:["auth_error","verify_error"],examples:["resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,De,i);await F({loading:"Verifying domain...",sdkCall:n=>n.domains.verify(r),errorCode:"verify_error",successMsg:`Domain verification started. Check status with resend domains get ${r}.`},i)});var Gd=new d("domains").description("Manage verified sending and receiving domains").addHelpText("after",c({context:`Domain lifecycle:
639
639
  1. resend domains create --name example.com (get DNS records)
640
640
  2. Configure DNS records at your DNS provider
641
641
  3. resend domains verify <id> (trigger verification)
642
- 4. resend domains get <id> (poll until "verified")`,examples:["resend domains list","resend domains create --name example.com --region us-east-1","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains update <id> --tls enforced --open-tracking","resend domains delete <id> --yes","resend domains claim create --name example.com"]})).addCommand(Oc).addCommand(Pc).addCommand(Bc).addCommand(Ic,{isDefault:!0}).addCommand(jc).addCommand(Ec).addCommand(Tc);var Le={resource:"email",resourcePlural:"emails",fetchItems:(e,{limit:t,after:o})=>e.emails.list({limit:t,...o&&{after:o}}),display:e=>({label:e.subject||"(no subject)",hint:e.id})};function Gc(e){return{resource:"attachment",resourcePlural:"attachments",fetchItems:(t,{limit:o,after:i})=>t.emails.attachments.list({emailId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.filename??"(unnamed)",hint:t.id})}}function Ui(e){let t=e.map(o=>[o.filename??"(unnamed)",o.content_type,String(o.size),o.id]);return _(["Filename","Content-Type","Size (bytes)","ID"],t,"(no attachments)")}var Hc=new c("attachment").description("Retrieve a single attachment from a sent (outbound) email").argument("[emailId]","Email UUID").argument("[attachmentId]","Attachment UUID").addHelpText("after",d({context:`The download_url is a signed URL that expires in ~1 hour. Download the file directly:
643
- resend emails attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails attachment <email-id> <attachment-id>","resend emails attachment <email-id> <attachment-id> --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,Le,r),s=await g(t,Gc(n),r);await j({loading:"Fetching attachment...",sdkCall:a=>a.emails.attachments.get({emailId:n,id:s}),onInteractive:a=>{console.log(`${a.filename??"(unnamed)"}`),console.log(`ID: ${a.id}`),console.log(`Content-Type: ${a.content_type}`),console.log(`Size: ${a.size} bytes`),console.log(`Disposition: ${a.content_disposition}`),console.log(`Download URL: ${a.download_url}`),console.log(`Expires: ${a.expires_at}`)}},r)});var Qc=new c("attachments").description("List attachments on a sent (outbound) email").argument("[emailId]","Email UUID").option("--limit <n>","Maximum number of attachments to return (1-100)","10").option("--after <cursor>","Return attachments after this cursor (next page)").option("--before <cursor>","Return attachments before this cursor (previous page)").addHelpText("after",d({context:`Each attachment has a download_url (signed, expires ~1 hour).
642
+ 4. resend domains get <id> (poll until "verified")`,examples:["resend domains list","resend domains create --name example.com --region us-east-1","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains update <id> --tls enforced --open-tracking","resend domains delete <id> --yes","resend domains claim create --name example.com"]})).addCommand(Ed).addCommand($d).addCommand(Id).addCommand(jd,{isDefault:!0}).addCommand(Pd).addCommand(Bd).addCommand(Od);var Le={resource:"email",resourcePlural:"emails",fetchItems:(e,{limit:t,after:o})=>e.emails.list({limit:t,...o&&{after:o}}),display:e=>({label:e.subject||"(no subject)",hint:e.id})};function Hd(e){return{resource:"attachment",resourcePlural:"attachments",fetchItems:(t,{limit:o,after:i})=>t.emails.attachments.list({emailId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.filename??"(unnamed)",hint:t.id})}}function Si(e){let t=e.map(o=>[o.filename??"(unnamed)",o.content_type,String(o.size),o.id]);return _(["Filename","Content-Type","Size (bytes)","ID"],t,"(no attachments)")}var Qd=new d("attachment").description("Retrieve a single attachment from a sent (outbound) email").argument("[emailId]","Email UUID").argument("[attachmentId]","Attachment UUID").addHelpText("after",c({context:`The download_url is a signed URL that expires in ~1 hour. Download the file directly:
643
+ resend emails attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails attachment <email-id> <attachment-id>","resend emails attachment <email-id> <attachment-id> --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,Le,r),s=await g(t,Hd(n),r);await B({loading:"Fetching attachment...",sdkCall:a=>a.emails.attachments.get({emailId:n,id:s}),onInteractive:a=>{console.log(`${a.filename??"(unnamed)"}`),console.log(`ID: ${a.id}`),console.log(`Content-Type: ${a.content_type}`),console.log(`Size: ${a.size} bytes`),console.log(`Disposition: ${a.content_disposition}`),console.log(`Download URL: ${a.download_url}`),console.log(`Expires: ${a.expires_at}`)}},r)});var Nd=new d("attachments").description("List attachments on a sent (outbound) email").argument("[emailId]","Email UUID").option("--limit <n>","Maximum number of attachments to return (1-100)","10").option("--after <cursor>","Return attachments after this cursor (next page)").option("--before <cursor>","Return attachments before this cursor (previous page)").addHelpText("after",c({context:`Each attachment has a download_url (signed, expires ~1 hour).
644
644
  Use the attachment sub-command to retrieve a single attachment with its download URL:
645
645
  resend emails attachment <emailId> <attachmentId>
646
646
 
647
647
  content_disposition: "inline" means the attachment is embedded in the HTML body (e.g. an image).
648
- content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails attachments <email-id>","resend emails attachments <email-id> --json","resend emails attachments <email-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i),n=D(t.limit,i),s=B(n,t.after,t.before,i);await S({loading:"Fetching attachments...",sdkCall:a=>a.emails.attachments.list({emailId:r,...s}),onInteractive:a=>{console.log(Ui(a.data)),T(a,`emails attachments ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});X();var Nc=new c("batch").description("Send up to 100 emails in a single API request from a JSON file").option("--file <path>",'Path to a JSON file containing an array of email objects (use "-" for stdin; required in non-interactive mode)').option("--react-email <path>","Path to a React Email template (.tsx) \u2014 rendered HTML is set on every email in the batch").option("--idempotency-key <key>","Deduplicate this batch request using this key").addOption(new q("--batch-validation <mode>","Validation mode: strict (default, fail all on error) or permissive (partial success)").choices(["strict","permissive"])).addHelpText("after",d({context:`Non-interactive: --file
648
+ content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails attachments <email-id>","resend emails attachments <email-id> --json","resend emails attachments <email-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i),n=D(t.limit,i),s=I(n,t.after,t.before,i);await S({loading:"Fetching attachments...",sdkCall:a=>a.emails.attachments.list({emailId:r,...s}),onInteractive:a=>{console.log(Si(a.data)),T(a,`emails attachments ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});X();var Md=new d("batch").description("Send up to 100 emails in a single API request from a JSON file").option("--file <path>",'Path to a JSON file containing an array of email objects (use "-" for stdin; required in non-interactive mode)').option("--react-email <path>","Path to a React Email template (.tsx) \u2014 rendered HTML is set on every email in the batch").option("--idempotency-key <key>","Deduplicate this batch request using this key").addOption(new q("--batch-validation <mode>","Validation mode: strict (default, fail all on error) or permissive (partial success)").choices(["strict","permissive"])).addHelpText("after",c({context:`Non-interactive: --file
649
649
  Limit: 100 emails per request (API hard limit \u2014 warned if exceeded)
650
650
  Unsupported per-email fields: attachments
651
651
 
@@ -653,55 +653,55 @@ File format (--file path):
653
653
  [
654
654
  {"from":"onboarding@resend.dev","to":["delivered@resend.dev"],"subject":"Hello","text":"Hi"},
655
655
  {"from":"onboarding@resend.dev","to":["delivered@resend.dev"],"subject":"Hello","html":"<b>Hi</b>","scheduled_at":"in 1 hour","tags":[{"name":"campaign","value":"welcome"}]}
656
- ]`,output:' [{"id":"<email-id>"},{"id":"<email-id>"}]',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","react_email_build_error","react_email_render_error","batch_error"],examples:["resend emails batch --file ./emails.json","resend emails batch --file ./emails.json --batch-validation permissive",`echo '[{"from":"onboarding@resend.dev","to":["delivered@resend.dev"],"subject":"Hi","text":"Hello"}]' | resend emails batch --file -`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await ee(o,{permission:"sending_access"}),r=await E(e.file,{message:"Path to JSON file",placeholder:"./emails.json"},{message:"Missing --file flag. Provide a JSON file with an array of email objects.",code:"missing_file"},o),n=ie(r,o),s;try{s=JSON.parse(n)}catch{h({message:"File content is not valid JSON.",code:"invalid_json"},{json:o.json})}Array.isArray(s)||h({message:"File content must be a JSON array of email objects.",code:"invalid_format"},{json:o.json});let a=s;if(a.length>100&&console.warn(`Warning: ${a.length} emails exceeds the 100-email limit. The API may reject this request.`),e.reactEmail){let f=await qe(e.reactEmail,o);for(let y of a)y.html=f}let l={reply_to:"replyTo",scheduled_at:"scheduledAt",topic_id:"topicId"};for(let f=0;f<a.length;f++){let y=a[f];(y===null||typeof y!="object"||Array.isArray(y))&&h({message:`Email at index ${f} must be a JSON object.`,code:"invalid_format"},{json:o.json}),"attachments"in y&&h({message:`Email at index ${f} contains "attachments", which is not supported in batch sends.`,code:"batch_error"},{json:o.json});let A=y;for(let[b,x]of Object.entries(l))b in A&&(A[x]??=A[b],delete A[b])}let u=await ce("Sending batch...",()=>{let f={...e.idempotencyKey&&{idempotencyKey:e.idempotencyKey},...e.batchValidation&&{batchValidation:e.batchValidation}};return i.batch.send(a,Object.keys(f).length>0?f:void 0)},"batch_error",o),m=u.data,p=u.errors;if(!o.json&&w()){console.log(`Sent ${m.length} email${m.length===1?"":"s"}`);for(let f of m)console.log(` ${f.id}`);if(p&&p.length>0){console.warn(`
657
- ${p.length} email${p.length===1?"":"s"} failed:`);for(let f of p)console.warn(` [${f.index}] ${f.message}`)}}else N(p&&p.length>0?{data:m,errors:p}:m,{json:o.json})});var Mc=new c("cancel").description("Cancel a scheduled email").argument("[id]","Email ID").addHelpText("after",d({output:' {"object":"email","id":"<email-id>"}',errorCodes:["auth_error","cancel_error"],examples:["resend emails cancel <email-id>","resend emails cancel <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await R({loading:"Cancelling email...",sdkCall:n=>n.emails.cancel(r),errorCode:"cancel_error",successMsg:`Email cancelled: ${r}`},i)});var qc=new c("get").description("Retrieve a sent email by ID").argument("[id]","Email ID").addHelpText("after",d({output:' {"object":"email","id":"<uuid>","message_id":"<111-222-333@email.example.com>","from":"onboarding@resend.dev","to":["delivered@resend.dev"],"subject":"Hello","html":"<p>Hi</p>","text":"Hi","last_event":"delivered","created_at":"<date>","scheduled_at":null,"bcc":null,"cc":null,"reply_to":null}',errorCodes:["auth_error","fetch_error"],examples:["resend emails get <email-id>","resend emails get <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await j({loading:"Fetching email...",sdkCall:n=>n.emails.get(r),onInteractive:n=>{console.log(`From: ${n.from}`),console.log(`To: ${n.to.join(", ")}`),console.log(`Subject: ${n.subject}`),console.log(`Message-ID: ${n.message_id}`),console.log(`Status: ${n.last_event}`),console.log(`Date: ${n.created_at}`),n.scheduled_at&&console.log(`Scheduled: ${n.scheduled_at}`)}},i)});function ug(e){let t=e.map(o=>{let i=o.to.join(", "),r=i.length>40?`${i.slice(0,37)}...`:i,n=o.subject.length>50?`${o.subject.slice(0,47)}...`:o.subject;return[o.from,r,n,o.last_event??"\u2014",o.created_at,o.id]});return _(["From","To","Subject","Status","Created","ID"],t,"(no sent emails)")}var Lc=new c("list").alias("ls").description('List sent emails \u2014 returns summary (use "get <id>" for full details)').option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({context:"Lists emails sent by your team. For emails received by your domain, use: resend emails receiving list",output:' {"object":"list","has_more":false,"data":[{"id":"...","message_id":"<111-222-333@email.example.com>","to":["..."],"from":"...","subject":"...","created_at":"...","last_event":"delivered|opened|...","scheduled_at":null}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails list","resend emails list --limit 5","resend emails list --after <email-id> --limit 10","resend emails list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching sent emails...",sdkCall:n=>n.emails.list(r),onInteractive:n=>{console.log(ug(n.data)),T(n,"emails list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});function So(e){if(e!==void 0)return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function mg(e){let t=Object.entries(e).map(([o,i])=>[o,String(i)]);return _(["Metric","Value"],t,"(no metrics)")}function pg(e,t){let i=[...Object.keys(e[0]??{}).filter(n=>!t.includes(n)),...t],r=e.map(n=>i.map(s=>String(n[s]??"")));return _(i,r,"(no breakdown rows)")}var Wc=new c("metrics").description("Retrieve account-level email metrics").option("--start-date <date>","ISO 8601 date/datetime, defaults to 6 days before --end-date").option("--end-date <date>","ISO 8601 date/datetime, defaults to now").option("--timezone <tz>","IANA timezone, e.g. America/New_York, defaults to UTC").addOption(new q("--granularity <granularity>",'Bucket size used when "period" is a dimension (default: daily)').choices(["hourly","daily","weekly","monthly"])).option("--metrics <list>","Comma-separated metrics to include, defaults to all").option("--dimensions <list>","Comma-separated dimensions to break down by: period, domain, email, broadcast").option("--domain-id <list>","Comma-separated sending domain IDs (max 100)").option("--email-id <list>",'Comma-separated email IDs (max 100). Cannot be combined with the "broadcast" dimension or --broadcast-id').option("--broadcast-id <list>",'Comma-separated broadcast IDs (max 100). Cannot be combined with the "email" dimension or --email-id').addHelpText("after",d({output:' {"object":"metrics","start_date":"...","end_date":"...","metrics":["sent","delivered"],"dimensions":[],"granularity":"daily","totals":{"sent":100,"delivered":95}}',errorCodes:["auth_error","invalid_options","fetch_error"],examples:["resend emails metrics","resend emails metrics --start-date 2026-07-01 --end-date 2026-07-08","resend emails metrics --dimensions period,broadcast --broadcast-id <broadcast-id>","resend emails metrics --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=So(e.dimensions),r=So(e.emailId),n=So(e.broadcastId),s=(i?.includes("email")??!1)||e.emailId!==void 0,a=(i?.includes("broadcast")??!1)||e.broadcastId!==void 0;s&&a&&h({message:'The "broadcast" dimension/--broadcast-id cannot be combined with the "email" dimension/--email-id.',code:"invalid_options"},{json:o.json});let l=So(e.metrics);await j({loading:"Fetching email metrics...",sdkCall:u=>u.emails.metrics({startDate:e.startDate,endDate:e.endDate,timezone:e.timezone,granularity:e.granularity,metrics:l,dimensions:i,domainId:So(e.domainId),emailId:r,broadcastId:n}),onInteractive:u=>{console.log(`Metrics for ${u.start_date} to ${u.end_date} (${u.granularity} granularity)`),console.log(),console.log("Totals:"),console.log(mg(u.totals)),u.data&&u.data.length>0&&(console.log(),console.log(`Breakdown by ${u.dimensions.join(", ")}:`),console.log(pg(u.data,u.metrics)))}},o)});var xt={resource:"received email",resourcePlural:"received emails",fetchItems:(e,{limit:t,after:o})=>e.emails.receiving.list({limit:t,...o&&{after:o}}),display:e=>({label:e.subject||"(no subject)",hint:e.id})};function Jc(e){return{resource:"attachment",resourcePlural:"attachments",fetchItems:(t,{limit:o,after:i})=>t.emails.receiving.attachments.list({emailId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.filename??"(unnamed)",hint:t.id})}}function Vc(e){let t=e.map(o=>{let i=o.to.join(", "),r=i.length>40?`${i.slice(0,37)}...`:i,n=o.subject.length>50?`${o.subject.slice(0,47)}...`:o.subject;return[o.from,r,n,o.created_at,o.id]});return _(["From","To","Subject","Created At","ID"],t,"(no received emails)")}var zc=new c("attachment").description("Retrieve a single attachment from a received (inbound) email").argument("[emailId]","Received email UUID").argument("[attachmentId]","Attachment UUID").addHelpText("after",d({context:`The download_url is a signed URL that expires in ~1 hour. Download the file directly:
658
- resend emails receiving attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving attachment <email-id> <attachment-id> --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xt,r),s=await g(t,Jc(n),r);await j({loading:"Fetching attachment...",sdkCall:a=>a.emails.receiving.attachments.get({emailId:n,id:s}),onInteractive:a=>{console.log(`${a.filename??"(unnamed)"}`),console.log(`ID: ${a.id}`),console.log(`Content-Type: ${a.content_type}`),console.log(`Size: ${a.size} bytes`),console.log(`Disposition: ${a.content_disposition}`),console.log(`Download URL: ${a.download_url}`),console.log(`Expires: ${a.expires_at}`)}},r)});var Yc=new c("attachments").description("List attachments on a received (inbound) email").argument("[emailId]","Received email UUID").option("--limit <n>","Maximum number of attachments to return (1-100)","10").option("--after <cursor>","Return attachments after this cursor (next page)").option("--before <cursor>","Return attachments before this cursor (previous page)").addHelpText("after",d({context:`Each attachment has a download_url (signed, expires ~1 hour).
656
+ ]`,output:' [{"id":"<email-id>"},{"id":"<email-id>"}]',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","react_email_build_error","react_email_render_error","batch_error"],examples:["resend emails batch --file ./emails.json","resend emails batch --file ./emails.json --batch-validation permissive",`echo '[{"from":"onboarding@resend.dev","to":["delivered@resend.dev"],"subject":"Hi","text":"Hello"}]' | resend emails batch --file -`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await ee(o,{permission:"sending_access"}),r=await E(e.file,{message:"Path to JSON file",placeholder:"./emails.json"},{message:"Missing --file flag. Provide a JSON file with an array of email objects.",code:"missing_file"},o),n=ie(r,o),s;try{s=JSON.parse(n)}catch{h({message:"File content is not valid JSON.",code:"invalid_json"},{json:o.json})}Array.isArray(s)||h({message:"File content must be a JSON array of email objects.",code:"invalid_format"},{json:o.json});let a=s;if(a.length>100&&console.warn(`Warning: ${a.length} emails exceeds the 100-email limit. The API may reject this request.`),e.reactEmail){let f=await qe(e.reactEmail,o);for(let y of a)y.html=f}let l={reply_to:"replyTo",scheduled_at:"scheduledAt",topic_id:"topicId"};for(let f=0;f<a.length;f++){let y=a[f];(y===null||typeof y!="object"||Array.isArray(y))&&h({message:`Email at index ${f} must be a JSON object.`,code:"invalid_format"},{json:o.json}),"attachments"in y&&h({message:`Email at index ${f} contains "attachments", which is not supported in batch sends.`,code:"batch_error"},{json:o.json});let A=y;for(let[b,x]of Object.entries(l))b in A&&(A[x]??=A[b],delete A[b])}let u=await de("Sending batch...",()=>{let f={...e.idempotencyKey&&{idempotencyKey:e.idempotencyKey},...e.batchValidation&&{batchValidation:e.batchValidation}};return i.batch.send(a,Object.keys(f).length>0?f:void 0)},"batch_error",o),m=u.data,p=u.errors;if(!o.json&&w()){console.log(`Sent ${m.length} email${m.length===1?"":"s"}`);for(let f of m)console.log(` ${f.id}`);if(p&&p.length>0){console.warn(`
657
+ ${p.length} email${p.length===1?"":"s"} failed:`);for(let f of p)console.warn(` [${f.index}] ${f.message}`)}}else M(p&&p.length>0?{data:m,errors:p}:m,{json:o.json})});var qd=new d("cancel").description("Cancel a scheduled email").argument("[id]","Email ID").addHelpText("after",c({output:' {"object":"email","id":"<email-id>"}',errorCodes:["auth_error","cancel_error"],examples:["resend emails cancel <email-id>","resend emails cancel <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await F({loading:"Cancelling email...",sdkCall:n=>n.emails.cancel(r),errorCode:"cancel_error",successMsg:`Email cancelled: ${r}`},i)});var Ld=new d("get").description("Retrieve a sent email by ID").argument("[id]","Email ID").addHelpText("after",c({output:' {"object":"email","id":"<uuid>","message_id":"<111-222-333@email.example.com>","from":"onboarding@resend.dev","to":["delivered@resend.dev"],"subject":"Hello","html":"<p>Hi</p>","text":"Hi","last_event":"delivered","created_at":"<date>","scheduled_at":null,"bcc":null,"cc":null,"reply_to":null}',errorCodes:["auth_error","fetch_error"],examples:["resend emails get <email-id>","resend emails get <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await B({loading:"Fetching email...",sdkCall:n=>n.emails.get(r),onInteractive:n=>{console.log(`From: ${n.from}`),console.log(`To: ${n.to.join(", ")}`),console.log(`Subject: ${n.subject}`),console.log(`Message-ID: ${n.message_id}`),console.log(`Status: ${n.last_event}`),console.log(`Date: ${n.created_at}`),n.scheduled_at&&console.log(`Scheduled: ${n.scheduled_at}`)}},i)});function gg(e){let t=e.map(o=>{let i=o.to.join(", "),r=i.length>40?`${i.slice(0,37)}...`:i,n=o.subject.length>50?`${o.subject.slice(0,47)}...`:o.subject;return[o.from,r,n,o.last_event??"\u2014",o.created_at,o.id]});return _(["From","To","Subject","Status","Created","ID"],t,"(no sent emails)")}var Wd=new d("list").alias("ls").description('List sent emails \u2014 returns summary (use "get <id>" for full details)').option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({context:"Lists emails sent by your team. For emails received by your domain, use: resend emails receiving list",output:' {"object":"list","has_more":false,"data":[{"id":"...","message_id":"<111-222-333@email.example.com>","to":["..."],"from":"...","subject":"...","created_at":"...","last_event":"delivered|opened|...","scheduled_at":null}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails list","resend emails list --limit 5","resend emails list --after <email-id> --limit 10","resend emails list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching sent emails...",sdkCall:n=>n.emails.list(r),onInteractive:n=>{console.log(gg(n.data)),T(n,"emails list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});function So(e){if(e!==void 0)return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function Ag(e){let t=Object.entries(e).map(([o,i])=>[o,String(i)]);return _(["Metric","Value"],t,"(no metrics)")}function bg(e,t){let i=[...Object.keys(e[0]??{}).filter(n=>!t.includes(n)),...t],r=e.map(n=>i.map(s=>String(n[s]??"")));return _(i,r,"(no breakdown rows)")}var Jd=new d("metrics").description("Retrieve account-level email metrics").option("--start-date <date>","ISO 8601 date/datetime, defaults to 6 days before --end-date").option("--end-date <date>","ISO 8601 date/datetime, defaults to now").option("--timezone <tz>","IANA timezone, e.g. America/New_York, defaults to UTC").addOption(new q("--granularity <granularity>",'Bucket size used when "period" is a dimension (default: daily)').choices(["hourly","daily","weekly","monthly"])).option("--metrics <list>","Comma-separated metrics to include, defaults to all").option("--dimensions <list>","Comma-separated dimensions to break down by: period, domain, email, broadcast").option("--domain-id <list>","Comma-separated sending domain IDs (max 100)").option("--email-id <list>",'Comma-separated email IDs (max 100). Cannot be combined with the "broadcast" dimension or --broadcast-id').option("--broadcast-id <list>",'Comma-separated broadcast IDs (max 100). Cannot be combined with the "email" dimension or --email-id').addHelpText("after",c({output:' {"object":"metrics","start_date":"...","end_date":"...","metrics":["sent","delivered"],"dimensions":[],"granularity":"daily","totals":{"sent":100,"delivered":95}}',errorCodes:["auth_error","invalid_options","fetch_error"],examples:["resend emails metrics","resend emails metrics --start-date 2026-07-01 --end-date 2026-07-08","resend emails metrics --dimensions period,broadcast --broadcast-id <broadcast-id>","resend emails metrics --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=So(e.dimensions),r=So(e.emailId),n=So(e.broadcastId),s=(i?.includes("email")??!1)||e.emailId!==void 0,a=(i?.includes("broadcast")??!1)||e.broadcastId!==void 0;s&&a&&h({message:'The "broadcast" dimension/--broadcast-id cannot be combined with the "email" dimension/--email-id.',code:"invalid_options"},{json:o.json});let l=So(e.metrics);await B({loading:"Fetching email metrics...",sdkCall:u=>u.emails.metrics({startDate:e.startDate,endDate:e.endDate,timezone:e.timezone,granularity:e.granularity,metrics:l,dimensions:i,domainId:So(e.domainId),emailId:r,broadcastId:n}),onInteractive:u=>{console.log(`Metrics for ${u.start_date} to ${u.end_date} (${u.granularity} granularity)`),console.log(),console.log("Totals:"),console.log(Ag(u.totals)),u.data&&u.data.length>0&&(console.log(),console.log(`Breakdown by ${u.dimensions.join(", ")}:`),console.log(bg(u.data,u.metrics)))}},o)});var xt={resource:"received email",resourcePlural:"received emails",fetchItems:(e,{limit:t,after:o})=>e.emails.receiving.list({limit:t,...o&&{after:o}}),display:e=>({label:e.subject||"(no subject)",hint:e.id})};function Vd(e){return{resource:"attachment",resourcePlural:"attachments",fetchItems:(t,{limit:o,after:i})=>t.emails.receiving.attachments.list({emailId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.filename??"(unnamed)",hint:t.id})}}function zd(e){let t=e.map(o=>{let i=o.to.join(", "),r=i.length>40?`${i.slice(0,37)}...`:i,n=o.subject.length>50?`${o.subject.slice(0,47)}...`:o.subject;return[o.from,r,n,o.created_at,o.id]});return _(["From","To","Subject","Created At","ID"],t,"(no received emails)")}var Yd=new d("attachment").description("Retrieve a single attachment from a received (inbound) email").argument("[emailId]","Received email UUID").argument("[attachmentId]","Attachment UUID").addHelpText("after",c({context:`The download_url is a signed URL that expires in ~1 hour. Download the file directly:
658
+ resend emails receiving attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving attachment <email-id> <attachment-id> --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xt,r),s=await g(t,Vd(n),r);await B({loading:"Fetching attachment...",sdkCall:a=>a.emails.receiving.attachments.get({emailId:n,id:s}),onInteractive:a=>{console.log(`${a.filename??"(unnamed)"}`),console.log(`ID: ${a.id}`),console.log(`Content-Type: ${a.content_type}`),console.log(`Size: ${a.size} bytes`),console.log(`Disposition: ${a.content_disposition}`),console.log(`Download URL: ${a.download_url}`),console.log(`Expires: ${a.expires_at}`)}},r)});var Xd=new d("attachments").description("List attachments on a received (inbound) email").argument("[emailId]","Received email UUID").option("--limit <n>","Maximum number of attachments to return (1-100)","10").option("--after <cursor>","Return attachments after this cursor (next page)").option("--before <cursor>","Return attachments before this cursor (previous page)").addHelpText("after",c({context:`Each attachment has a download_url (signed, expires ~1 hour).
659
659
  Use the attachment sub-command to retrieve a single attachment with its download URL:
660
660
  resend emails receiving attachment <emailId> <attachmentId>
661
661
 
662
662
  content_disposition: "inline" means the attachment is embedded in the HTML body (e.g. an image).
663
- content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving attachments <email-id>","resend emails receiving attachments <email-id> --json","resend emails receiving attachments <email-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xt,i),n=D(t.limit,i),s=B(n,t.after,t.before,i);await S({loading:"Fetching attachments...",sdkCall:a=>a.emails.receiving.attachments.list({emailId:r,...s}),onInteractive:a=>{console.log(Ui(a.data)),T(a,`emails receiving attachments ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var Xc=new c("forward").description("Forward a received email").argument("[id]","Received email ID").requiredOption("--to <addresses...>","Recipient address(es)").requiredOption("--from <address>","Sender address").addHelpText("after",d({context:`Required: --to, --from
664
- Forwards the original email content (passthrough mode).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","create_error"],examples:["resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev","resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xt,i);await P({loading:"Forwarding email...",sdkCall:n=>n.emails.receiving.forward({emailId:r,to:t.to,from:t.from}),onInteractive:n=>{console.log(`Email forwarded: ${n.id}`)}},i)});var Zc=new c("get").description("Retrieve a single received (inbound) email with full details including HTML, text, and headers").argument("[id]","Received email UUID").addHelpText("after",d({context:`The raw.download_url field is a signed URL (expires ~1 hour) containing the full RFC 2822
663
+ content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving attachments <email-id>","resend emails receiving attachments <email-id> --json","resend emails receiving attachments <email-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xt,i),n=D(t.limit,i),s=I(n,t.after,t.before,i);await S({loading:"Fetching attachments...",sdkCall:a=>a.emails.receiving.attachments.list({emailId:r,...s}),onInteractive:a=>{console.log(Si(a.data)),T(a,`emails receiving attachments ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var Zd=new d("forward").description("Forward a received email").argument("[id]","Received email ID").requiredOption("--to <addresses...>","Recipient address(es)").requiredOption("--from <address>","Sender address").addHelpText("after",c({context:`Required: --to, --from
664
+ Forwards the original email content (passthrough mode).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","create_error"],examples:["resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev","resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xt,i);await P({loading:"Forwarding email...",sdkCall:n=>n.emails.receiving.forward({emailId:r,to:t.to,from:t.from}),onInteractive:n=>{console.log(`Email forwarded: ${n.id}`)}},i)});var ec=new d("get").description("Retrieve a single received (inbound) email with full details including HTML, text, and headers").argument("[id]","Received email UUID").addHelpText("after",c({context:`The raw.download_url field is a signed URL (expires ~1 hour) containing the full RFC 2822
665
665
  MIME message. Pipe it to curl to save the original email:
666
666
  resend emails receiving get <id> --json | jq -r .raw.download_url | xargs curl > email.eml
667
667
 
668
668
  Attachments are listed in the attachments array. Use the attachments sub-command to get
669
669
  download URLs:
670
- resend emails receiving attachments <id>`,output:' {"object":"email","id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","html":"<p>Hello!</p>","text":"Hello!","headers":{"x-mailer":"..."},"message_id":"<str>","bcc":[],"cc":[],"reply_to":[],"raw":{"download_url":"<url>","expires_at":"<date>"},"attachments":[]}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving get <email-id>","resend emails receiving get <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xt,i);await j({loading:"Fetching received email...",sdkCall:n=>n.emails.receiving.get(r),onInteractive:n=>{if(console.log(`From: ${n.from}`),console.log(`To: ${n.to.join(", ")}`),console.log(`Subject: ${n.subject}`),console.log(`Date: ${n.created_at}`),n.attachments.length>0&&console.log(`Files: ${n.attachments.length} attachment(s)`),n.text){let s=n.text.length>200?`${n.text.slice(0,197)}...`:n.text;console.log(`${s}`)}else n.html&&console.log(`
671
- (HTML body only \u2014 use --json to view or pipe to a browser)`)}},i)});var ed=new c("list").alias("ls").description("List received (inbound) emails for domains with receiving enabled").option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Return emails after this cursor (next page)").option("--before <cursor>","Return emails before this cursor (previous page)").addHelpText("after",d({context:`Receiving must be enabled on the domain first:
670
+ resend emails receiving attachments <id>`,output:' {"object":"email","id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","html":"<p>Hello!</p>","text":"Hello!","headers":{"x-mailer":"..."},"message_id":"<str>","bcc":[],"cc":[],"reply_to":[],"raw":{"download_url":"<url>","expires_at":"<date>"},"attachments":[]}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving get <email-id>","resend emails receiving get <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xt,i);await B({loading:"Fetching received email...",sdkCall:n=>n.emails.receiving.get(r),onInteractive:n=>{if(console.log(`From: ${n.from}`),console.log(`To: ${n.to.join(", ")}`),console.log(`Subject: ${n.subject}`),console.log(`Date: ${n.created_at}`),n.attachments.length>0&&console.log(`Files: ${n.attachments.length} attachment(s)`),n.text){let s=n.text.length>200?`${n.text.slice(0,197)}...`:n.text;console.log(`${s}`)}else n.html&&console.log(`
671
+ (HTML body only \u2014 use --json to view or pipe to a browser)`)}},i)});var tc=new d("list").alias("ls").description("List received (inbound) emails for domains with receiving enabled").option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Return emails after this cursor (next page)").option("--before <cursor>","Return emails before this cursor (previous page)").addHelpText("after",c({context:`Receiving must be enabled on the domain first:
672
672
  resend domains update <id> --receiving enabled
673
673
 
674
674
  Pagination: use --after or --before with a received email ID as the cursor.
675
675
  Only one of --after or --before may be used at a time.
676
- The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","created_at":"<date>","message_id":"<str>","bcc":null,"cc":null,"reply_to":null,"attachments":[]}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving list","resend emails receiving list --limit 25 --json","resend emails receiving list --after <email-id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching received emails...",sdkCall:n=>n.emails.receiving.list(r),onInteractive:n=>{console.log(Vc(n.data)),T(n,"emails receiving list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var at=me(Je(),1);X();var td=(e=1e4)=>{if(!Number.isInteger(e)||e<1)throw new RangeError(`maxSize must be a positive integer, got ${e}`);let t=new Map,o=()=>{let i=t.keys().next();i.done||t.delete(i.value)};return{has:i=>t.has(i)?(t.delete(i),t.set(i,!0),!0):!1,add:i=>{if(t.has(i)){t.delete(i),t.set(i,!0);return}t.size>=e&&o(),t.set(i,!0)},size:()=>t.size}};var Nr=100,od=5,Mr=()=>new Date().toLocaleTimeString("en-GB",{hour12:!1}),fg=(e,t)=>{if(t)console.log(JSON.stringify(e));else{let o=e.to.map(pe).join(", "),i=at.default.dim(`[${Mr()}]`),r=pe(e.subject),n=r.length>50?`${r.slice(0,47)}...`:r,s=pe(e.from),a=pe(e.id);process.stderr.write(`${i} ${s} -> ${o} ${at.default.bold(`"${n}"`)} ${at.default.dim(a)}
677
- `)}},hg=(e,t)=>{let o=e.findIndex(i=>t.has(i.id));return o===-1?{newEmails:e,foundSeen:!1}:{newEmails:e.slice(0,o),foundSeen:!0}},id=new c("listen").description("Poll for new inbound emails and display them as they arrive").option("--interval <seconds>","Polling interval in seconds (minimum 2)","5").addHelpText("after",d({context:`Long-running command that polls the receiving API at a fixed
676
+ The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","created_at":"<date>","message_id":"<str>","bcc":null,"cc":null,"reply_to":null,"attachments":[]}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving list","resend emails receiving list --limit 25 --json","resend emails receiving list --after <email-id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching received emails...",sdkCall:n=>n.emails.receiving.list(r),onInteractive:n=>{console.log(zd(n.data)),T(n,"emails receiving list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var at=me(Je(),1);X();var oc=(e=1e4)=>{if(!Number.isInteger(e)||e<1)throw new RangeError(`maxSize must be a positive integer, got ${e}`);let t=new Map,o=()=>{let i=t.keys().next();i.done||t.delete(i.value)};return{has:i=>t.has(i)?(t.delete(i),t.set(i,!0),!0):!1,add:i=>{if(t.has(i)){t.delete(i),t.set(i,!0);return}t.size>=e&&o(),t.set(i,!0)},size:()=>t.size}};var Mr=100,ic=5,qr=()=>new Date().toLocaleTimeString("en-GB",{hour12:!1}),yg=(e,t)=>{if(t)console.log(JSON.stringify(e));else{let o=e.to.map(pe).join(", "),i=at.default.dim(`[${qr()}]`),r=pe(e.subject),n=r.length>50?`${r.slice(0,47)}...`:r,s=pe(e.from),a=pe(e.id);process.stderr.write(`${i} ${s} -> ${o} ${at.default.bold(`"${n}"`)} ${at.default.dim(a)}
677
+ `)}},Cg=(e,t)=>{let o=e.findIndex(i=>t.has(i.id));return o===-1?{newEmails:e,foundSeen:!1}:{newEmails:e.slice(0,o),foundSeen:!0}},rc=new d("listen").description("Poll for new inbound emails and display them as they arrive").option("--interval <seconds>","Polling interval in seconds (minimum 2)","5").addHelpText("after",c({context:`Long-running command that polls the receiving API at a fixed
678
678
  interval and prints each new email as it arrives.
679
679
 
680
680
  Interactive output shows one line per email. When piped (or with --json),
681
681
  output is NDJSON (one JSON object per line).
682
682
 
683
- Ctrl+C exits cleanly.`,examples:["resend emails receiving listen","resend emails receiving listen --interval 10","resend emails receiving listen --json | head -3"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=Number.parseInt(e.interval??"5",10);(Number.isNaN(i)||i<2)&&h({message:"Polling interval must be at least 2 seconds.",code:"invalid_interval"},{json:o.json});let r=await ee(o),n=o.json||!w(),s=le("Connecting...",o.quiet||n),a=td(),l=0;try{let{data:b,error:x}=await r.emails.receiving.list({limit:1});(x||!b)&&(s.fail("Failed to connect"),h({message:x?.message??"Unexpected empty response",code:"list_error"},{json:o.json}));for(let v of b.data)a.add(v.id);s.stop("Ready")}catch(b){s.fail("Failed to connect"),h({message:W(b,"Unknown error"),code:"list_error"},{json:o.json})}n||(process.stderr.write(`
683
+ Ctrl+C exits cleanly.`,examples:["resend emails receiving listen","resend emails receiving listen --interval 10","resend emails receiving listen --json | head -3"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=Number.parseInt(e.interval??"5",10);(Number.isNaN(i)||i<2)&&h({message:"Polling interval must be at least 2 seconds.",code:"invalid_interval"},{json:o.json});let r=await ee(o),n=o.json||!w(),s=le("Connecting...",o.quiet||n),a=oc(),l=0;try{let{data:b,error:x}=await r.emails.receiving.list({limit:1});(x||!b)&&(s.fail("Failed to connect"),h({message:x?.message??"Unexpected empty response",code:"list_error"},{json:o.json}));for(let v of b.data)a.add(v.id);s.stop("Ready")}catch(b){s.fail("Failed to connect"),h({message:W(b,"Unknown error"),code:"list_error"},{json:o.json})}n||(process.stderr.write(`
684
684
  `),process.stderr.write(` ${at.default.bold("Polling:")} every ${i}s
685
685
  `),process.stderr.write(`
686
686
  Listening for new inbound emails. Press Ctrl+C to stop.
687
687
 
688
- `));let u=b=>{l++,n||process.stderr.write(`${at.default.dim(`[${Mr()}]`)} ${at.default.yellow("Warning:")} ${b}
689
- `),l>=5&&h({message:"Exiting after 5 consecutive API failures.",code:"poll_error"},{json:o.json})},m=async(b,x,v)=>{if(v<=0)return{emails:x,hasMore:!0};let U=b?{limit:Nr,after:b}:{limit:Nr},{data:K,error:k}=await bo(()=>r.emails.receiving.list(U));if(k||!K)return{emails:x,error:k?.message??"Empty response",hasMore:!1};let{newEmails:I,foundSeen:G}=hg(K.data,a),Q=[...x,...I];if(G||!K.has_more)return{emails:Q,hasMore:!1};let $=K.data[K.data.length-1]?.id;return $?m($,Q,v-1):{emails:Q,hasMore:!0}},p,f=()=>{let b=`Hit page cap of ${od*Nr} emails this poll; remaining will be picked up next tick.`;n?console.log(JSON.stringify({warning:"page_cap_reached",message:b})):process.stderr.write(`${at.default.dim(`[${Mr()}]`)} ${at.default.yellow("Warning:")} ${b}
690
- `)},y=async()=>{try{let b=await m(void 0,[],od);b.error&&u(b.error),b.hasMore&&f();let x=b.emails.toReversed();for(let v of x)a.add(v.id);if(b.emails.length>0){l=0;for(let v of x)fg(v,n)}else b.error||(l=0)}catch(b){u(W(b,"Unknown error"))}finally{p=setTimeout(y,i*1e3)}};p=setTimeout(y,i*1e3);let A=()=>{clearTimeout(p),n||process.stderr.write(`
688
+ `));let u=b=>{l++,n||process.stderr.write(`${at.default.dim(`[${qr()}]`)} ${at.default.yellow("Warning:")} ${b}
689
+ `),l>=5&&h({message:"Exiting after 5 consecutive API failures.",code:"poll_error"},{json:o.json})},m=async(b,x,v)=>{if(v<=0)return{emails:x,hasMore:!0};let U=b?{limit:Mr,after:b}:{limit:Mr},{data:K,error:k}=await bo(()=>r.emails.receiving.list(U));if(k||!K)return{emails:x,error:k?.message??"Empty response",hasMore:!1};let{newEmails:j,foundSeen:G}=Cg(K.data,a),N=[...x,...j];if(G||!K.has_more)return{emails:N,hasMore:!1};let $=K.data[K.data.length-1]?.id;return $?m($,N,v-1):{emails:N,hasMore:!0}},p,f=()=>{let b=`Hit page cap of ${ic*Mr} emails this poll; remaining will be picked up next tick.`;n?console.log(JSON.stringify({warning:"page_cap_reached",message:b})):process.stderr.write(`${at.default.dim(`[${qr()}]`)} ${at.default.yellow("Warning:")} ${b}
690
+ `)},y=async()=>{try{let b=await m(void 0,[],ic);b.error&&u(b.error),b.hasMore&&f();let x=b.emails.toReversed();for(let v of x)a.add(v.id);if(b.emails.length>0){l=0;for(let v of x)yg(v,n)}else b.error||(l=0)}catch(b){u(W(b,"Unknown error"))}finally{p=setTimeout(y,i*1e3)}};p=setTimeout(y,i*1e3);let A=()=>{clearTimeout(p),n||process.stderr.write(`
691
691
  Stopped listening.
692
- `),process.exit(Mt())};ri(A),process.on("SIGTERM",A),await new Promise(()=>{})});var rd=new c("receiving").description("Manage received (inbound) emails \u2014 requires domain receiving to be enabled").addHelpText("after",d({context:`Receiving must be enabled on the domain first:
693
- resend domains update <id> --receiving enabled`,examples:["resend emails receiving list","resend emails receiving listen","resend emails receiving get <email-id>","resend emails receiving attachments <email-id>","resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev"]})).addCommand(ed,{isDefault:!0}).addCommand(Zc).addCommand(id).addCommand(Yc).addCommand(zc).addCommand(Xc);var ld=require("node:fs"),cd=require("node:path");var gg=/;(cid|type|filename)=/,nd=/;[\w-]+=/,Ag={cid:"contentId",type:"contentType",filename:"filename"};function sd(e){let t=e.split(gg),o=t[0];if(!o)throw new Error(`Missing file path or URL in attachment "${e}".`);if(nd.test(o))throw new Error(`Unrecognized attachment parameter in "${e}". Supported: ;cid=, ;type=, ;filename= (use --attachments-file for paths containing ";key=").`);let i={source:o,isUrl:/^https?:\/\//i.test(o)};for(let r=1;r<t.length;r+=2){let n=t[r],s=t[r+1],a=Ag[n];if(i[a]!==void 0)throw new Error(`Duplicate ";${n}=" in attachment "${e}".`);if(!s)throw new Error(`Empty ";${n}=" in attachment "${e}".`);if(a!=="contentType"&&nd.test(s))throw new Error(`Unrecognized attachment parameter in "${e}". Supported: ;cid=, ;type=, ;filename= (use --attachments-file for paths containing ";key=").`);i[a]=s}return i}var bg={content_type:"contentType",content_id:"contentId"},yg=new Set(["content","filename","path","contentType","contentId"]);function ad(e){let t;try{t=JSON.parse(e)}catch{throw new Error("Attachments file is not valid JSON.")}if(!Array.isArray(t))throw new Error("Attachments file must contain a JSON array of attachment objects.");return t.map((o,i)=>{if(o===null||typeof o!="object"||Array.isArray(o))throw new Error(`Attachment at index ${i} must be a JSON object.`);let r={};for(let[n,s]of Object.entries(o)){let a=bg[n]??n;if(!yg.has(a))throw new Error(`Attachment at index ${i} has unsupported field "${n}". Supported: content, filename, path, content_type/contentType, content_id/contentId.`);if(a in r)throw new Error(`Attachment at index ${i} sets "${a}" more than once (snake_case and camelCase are aliases).`);if(typeof s!="string")throw new Error(`Attachment at index ${i}: "${n}" must be a string.`);r[a]=s}if(!r.content&&!r.path)throw new Error(`Attachment at index ${i} must include "content" (base64) or "path" (hosted URL).`);return r})}X();function Cg(e){let{attachments:t,...o}=e;return t?.length?{...o,attachments:t.map(i=>({...i.filename!==void 0&&{filename:i.filename},...i.path&&{path:i.path},...i.contentType&&{contentType:i.contentType},...i.contentId&&{contentId:i.contentId},...i.content!==void 0&&{byteLength:Buffer.isBuffer(i.content)?i.content.byteLength:Buffer.byteLength(String(i.content),"utf8")}}))}:o}var dd=new c("send").description("Send an email").option("--from <address>","Sender address (required unless using --template)").option("--to <addresses...>","Recipient address(es) (required)").option("--subject <subject>","Email subject (required unless using --template)").option("--html <html>","HTML body").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin)').option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and send").option("--cc <addresses...>","CC recipients").option("--bcc <addresses...>","BCC recipients").option("--reply-to <address>","Reply-to address").option("--scheduled-at <datetime>",'Schedule email for later \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET"').option("--attachment <specs...>","File path or URL to attach, with optional ;cid= ;type= ;filename= params (quote the value)").option("--attachments-file <path>",'Path to a JSON array of attachment objects (use "-" for stdin)').option("--headers <key=value...>","Custom headers as key=value pairs (e.g. X-Entity-Ref-ID=123)").option("--tags <name=value...>","Email tags as name=value pairs (e.g. category=marketing)").option("--idempotency-key <key>","Deduplicate this send request using this key").option("--dry-run","Validate input and print the request JSON without calling the API (interactive: verified-domain list is not fetched)").option("--template <id>","Template ID to use").option("--var <key=value...>","Template variables as key=value pairs (repeatable, e.g. --var name=John --var count=42)").addHelpText("after",d({context:`Required: --to and either --template, --react-email, or (--from, --subject, and one of --text | --text-file | --html | --html-file).
692
+ `),process.exit(Mt())};ni(A),process.on("SIGTERM",A),await new Promise(()=>{})});var nc=new d("receiving").description("Manage received (inbound) emails \u2014 requires domain receiving to be enabled").addHelpText("after",c({context:`Receiving must be enabled on the domain first:
693
+ resend domains update <id> --receiving enabled`,examples:["resend emails receiving list","resend emails receiving listen","resend emails receiving get <email-id>","resend emails receiving attachments <email-id>","resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev"]})).addCommand(tc,{isDefault:!0}).addCommand(ec).addCommand(rc).addCommand(Xd).addCommand(Yd).addCommand(Zd);var dc=require("node:fs"),cc=require("node:path");var xg=/;(cid|type|filename)=/,sc=/;[\w-]+=/,wg={cid:"contentId",type:"contentType",filename:"filename"};function ac(e){let t=e.split(xg),o=t[0];if(!o)throw new Error(`Missing file path or URL in attachment "${e}".`);if(sc.test(o))throw new Error(`Unrecognized attachment parameter in "${e}". Supported: ;cid=, ;type=, ;filename= (use --attachments-file for paths containing ";key=").`);let i={source:o,isUrl:/^https?:\/\//i.test(o)};for(let r=1;r<t.length;r+=2){let n=t[r],s=t[r+1],a=wg[n];if(i[a]!==void 0)throw new Error(`Duplicate ";${n}=" in attachment "${e}".`);if(!s)throw new Error(`Empty ";${n}=" in attachment "${e}".`);if(a!=="contentType"&&sc.test(s))throw new Error(`Unrecognized attachment parameter in "${e}". Supported: ;cid=, ;type=, ;filename= (use --attachments-file for paths containing ";key=").`);i[a]=s}return i}var vg={content_type:"contentType",content_id:"contentId"},Ug=new Set(["content","filename","path","contentType","contentId"]);function lc(e){let t;try{t=JSON.parse(e)}catch{throw new Error("Attachments file is not valid JSON.")}if(!Array.isArray(t))throw new Error("Attachments file must contain a JSON array of attachment objects.");return t.map((o,i)=>{if(o===null||typeof o!="object"||Array.isArray(o))throw new Error(`Attachment at index ${i} must be a JSON object.`);let r={};for(let[n,s]of Object.entries(o)){let a=vg[n]??n;if(!Ug.has(a))throw new Error(`Attachment at index ${i} has unsupported field "${n}". Supported: content, filename, path, content_type/contentType, content_id/contentId.`);if(a in r)throw new Error(`Attachment at index ${i} sets "${a}" more than once (snake_case and camelCase are aliases).`);if(typeof s!="string")throw new Error(`Attachment at index ${i}: "${n}" must be a string.`);r[a]=s}if(!r.content&&!r.path)throw new Error(`Attachment at index ${i} must include "content" (base64) or "path" (hosted URL).`);return r})}X();function Sg(e){let{attachments:t,...o}=e;return t?.length?{...o,attachments:t.map(i=>({...i.filename!==void 0&&{filename:i.filename},...i.path&&{path:i.path},...i.contentType&&{contentType:i.contentType},...i.contentId&&{contentId:i.contentId},...i.content!==void 0&&{byteLength:Buffer.isBuffer(i.content)?i.content.byteLength:Buffer.byteLength(String(i.content),"utf8")}}))}:o}var uc=new d("send").description("Send an email").option("--from <address>","Sender address (required unless using --template)").option("--to <addresses...>","Recipient address(es) (required)").option("--subject <subject>","Email subject (required unless using --template)").option("--html <html>","HTML body").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin)').option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and send").option("--cc <addresses...>","CC recipients").option("--bcc <addresses...>","BCC recipients").option("--reply-to <address>","Reply-to address").option("--scheduled-at <datetime>",'Schedule email for later \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET"').option("--attachment <specs...>","File path or URL to attach, with optional ;cid= ;type= ;filename= params (quote the value)").option("--attachments-file <path>",'Path to a JSON array of attachment objects (use "-" for stdin)').option("--headers <key=value...>","Custom headers as key=value pairs (e.g. X-Entity-Ref-ID=123)").option("--tags <name=value...>","Email tags as name=value pairs (e.g. category=marketing)").option("--idempotency-key <key>","Deduplicate this send request using this key").option("--dry-run","Validate input and print the request JSON without calling the API (interactive: verified-domain list is not fetched)").option("--template <id>","Template ID to use").option("--var <key=value...>","Template variables as key=value pairs (repeatable, e.g. --var name=John --var count=42)").addHelpText("after",c({context:`Required: --to and either --template, --react-email, or (--from, --subject, and one of --text | --text-file | --html | --html-file).
694
694
  Attachments: --attachment takes a local path or https:// URL plus optional ;cid= (inline content-id), ;type= (MIME type), ;filename= params. Always double-quote values containing ";" \u2014 required on every shell (bash, PowerShell, cmd). For paths containing ";key=" or scripted use, pass a JSON array via --attachments-file.
695
695
  URL attachments are fetched by the API after send: an unreachable URL fails the email (check \`emails get <id>\`), and filename/MIME type are not derived from the URL \u2014 pass ;filename= and ;type=.
696
- Use --dry-run to print the request JSON without sending (attachment content shows byteLength only).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","missing_body","file_read_error","invalid_options","stdin_read_error","invalid_header","invalid_tag","invalid_var","invalid_attachment","template_body_conflict","template_attachment_conflict","react_email_build_error","react_email_render_error","send_error"],examples:['resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --html "<b>Hi</b>"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi" --attachment ./report.pdf','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --html "<img src=cid:logo>" --attachment "./logo.png;cid=logo"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi" --attachment "https://example.com/report.pdf;filename=report.pdf;type=application/pdf"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi" --attachments-file ./attachments.json',"resend emails send --template tmpl_123 --to delivered@resend.dev"]})).action(async(e,t)=>{let o=t.optsWithGlobals();[e.htmlFile,e.textFile,e.attachmentsFile].filter(K=>K==="-").length>1&&h({message:'Only one of --html-file, --text-file, or --attachments-file can read from stdin ("-"). Pass the others as file paths.',code:"invalid_options"},{json:o.json}),e.from===""&&h({message:"--from cannot be empty",code:"invalid_options"},{json:o.json});let r=!!e.template;e.var&&!r&&h({message:"--var can only be used with --template",code:"invalid_var"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile||r)&&h({message:"Cannot use --react-email with --html, --html-file, or --template",code:"invalid_options"},{json:o.json}),r&&(e.html||e.htmlFile||e.text||e.textFile)&&h({message:"Cannot use --template with --html, --html-file, --text, or --text-file",code:"template_body_conflict"},{json:o.json}),r&&(e.attachment||e.attachmentsFile!==void 0)&&h({message:"Cannot use --attachment or --attachments-file with --template",code:"template_attachment_conflict"},{json:o.json});let n=e.var?Object.fromEntries(e.var.map(K=>{let k=K.indexOf("=");k<1&&h({message:`Invalid var format: "${K}". Expected key=value.`,code:"invalid_var"},{json:o.json});let I=K.slice(0,k),G=K.slice(k+1);return[I,G]})):void 0,s=e.from;if(!e.dryRun&&!s&&!r&&w()&&!o.json){let K=await ee(o,{permission:"sending_access"}),k=await pi(K);k.length>0&&(s=await fi(k))}let a=[{flag:"from",message:"From address",placeholder:"onboarding@resend.dev",defaultValue:"onboarding@resend.dev",required:!r},{flag:"to",message:"To address",placeholder:"delivered@resend.dev",defaultValue:"delivered@resend.dev"},{flag:"subject",message:"Subject",placeholder:"Hello!",defaultValue:"Hello!",required:!r}],l=await Ca({from:s,to:e.to?.[0],subject:e.subject},a,o),u=e.html,m=e.text;e.htmlFile&&(e.html&&process.stderr.write(`Warning: both --html and --html-file provided; using --html-file
696
+ Use --dry-run to print the request JSON without sending (attachment content shows byteLength only).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","missing_body","file_read_error","invalid_options","stdin_read_error","invalid_header","invalid_tag","invalid_var","invalid_attachment","template_body_conflict","template_attachment_conflict","react_email_build_error","react_email_render_error","send_error"],examples:['resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --html "<b>Hi</b>"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi" --attachment ./report.pdf','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --html "<img src=cid:logo>" --attachment "./logo.png;cid=logo"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi" --attachment "https://example.com/report.pdf;filename=report.pdf;type=application/pdf"','resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi" --attachments-file ./attachments.json',"resend emails send --template tmpl_123 --to delivered@resend.dev"]})).action(async(e,t)=>{let o=t.optsWithGlobals();[e.htmlFile,e.textFile,e.attachmentsFile].filter(K=>K==="-").length>1&&h({message:'Only one of --html-file, --text-file, or --attachments-file can read from stdin ("-"). Pass the others as file paths.',code:"invalid_options"},{json:o.json}),e.from===""&&h({message:"--from cannot be empty",code:"invalid_options"},{json:o.json});let r=!!e.template;e.var&&!r&&h({message:"--var can only be used with --template",code:"invalid_var"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile||r)&&h({message:"Cannot use --react-email with --html, --html-file, or --template",code:"invalid_options"},{json:o.json}),r&&(e.html||e.htmlFile||e.text||e.textFile)&&h({message:"Cannot use --template with --html, --html-file, --text, or --text-file",code:"template_body_conflict"},{json:o.json}),r&&(e.attachment||e.attachmentsFile!==void 0)&&h({message:"Cannot use --attachment or --attachments-file with --template",code:"template_attachment_conflict"},{json:o.json});let n=e.var?Object.fromEntries(e.var.map(K=>{let k=K.indexOf("=");k<1&&h({message:`Invalid var format: "${K}". Expected key=value.`,code:"invalid_var"},{json:o.json});let j=K.slice(0,k),G=K.slice(k+1);return[j,G]})):void 0,s=e.from;if(!e.dryRun&&!s&&!r&&w()&&!o.json){let K=await ee(o,{permission:"sending_access"}),k=await fi(K);k.length>0&&(s=await hi(k))}let a=[{flag:"from",message:"From address",placeholder:"onboarding@resend.dev",defaultValue:"onboarding@resend.dev",required:!r},{flag:"to",message:"To address",placeholder:"delivered@resend.dev",defaultValue:"delivered@resend.dev"},{flag:"subject",message:"Subject",placeholder:"Hello!",defaultValue:"Hello!",required:!r}],l=await xa({from:s,to:e.to?.[0],subject:e.subject},a,o),u=e.html,m=e.text;e.htmlFile&&(e.html&&process.stderr.write(`Warning: both --html and --html-file provided; using --html-file
697
697
  `),u=ie(e.htmlFile,o)),e.textFile&&(e.text&&process.stderr.write(`Warning: both --text and --text-file provided; using --text-file
698
- `),m=ie(e.textFile,o)),e.reactEmail&&(u=await qe(e.reactEmail,o));let p=m;!r&&!e.reactEmail&&!u&&!m&&(p=await E(void 0,{message:"Email body (plain text)",placeholder:"Hello, World!",defaultValue:"Hello, World!"},{message:"Missing email body. Provide --html, --html-file, --text, --text-file, or --react-email",code:"missing_body"},o));let f=e.to??[l.to],y=e.attachment?.map(K=>{let k;try{k=sd(K)}catch(G){return h({message:G.message,code:"invalid_attachment"},{json:o.json})}let I={...k.contentType&&{contentType:k.contentType},...k.contentId&&{contentId:k.contentId}};if(k.isUrl)return{path:k.source,...k.filename&&{filename:k.filename},...I};try{let G=(0,ld.readFileSync)(k.source);return{filename:k.filename??(0,cd.basename)(k.source),content:G,...I}}catch{return h({message:`Failed to read file: ${k.source}`,code:"file_read_error"},{json:o.json})}});if(e.attachmentsFile!==void 0){let K=ie(e.attachmentsFile,o);try{y=[...y??[],...ad(K)]}catch(k){h({message:k.message,code:"invalid_attachment"},{json:o.json})}}let A=e.headers?Object.fromEntries(e.headers.map(K=>{let k=K.indexOf("=");return k<1&&h({message:`Invalid header format: "${K}". Expected key=value.`,code:"invalid_header"},{json:o.json}),[K.slice(0,k),K.slice(k+1)]})):void 0,b=e.tags?.map(K=>{let k=K.indexOf("=");return k<1&&h({message:`Invalid tag format: "${K}". Expected name=value.`,code:"invalid_tag"},{json:o.json}),{name:K.slice(0,k),value:K.slice(k+1)}}),x;if(r?x={template:{id:e.template,...n&&{variables:n}},to:f,...l.from&&{from:l.from},...l.subject&&{subject:l.subject},...e.cc&&{cc:e.cc},...e.bcc&&{bcc:e.bcc},...e.replyTo&&{replyTo:e.replyTo},...e.scheduledAt&&{scheduledAt:e.scheduledAt},...A&&{headers:A},...b&&{tags:b}}:x={from:l.from,to:f,subject:l.subject,...u&&{html:u},...p&&{text:p},...e.cc&&{cc:e.cc},...e.bcc&&{bcc:e.bcc},...e.replyTo&&{replyTo:e.replyTo},...e.scheduledAt&&{scheduledAt:e.scheduledAt},...y&&{attachments:y},...A&&{headers:A},...b&&{tags:b}},e.dryRun){N({dryRun:!0,request:Cg(x)},{json:o.json});return}let v=await ee(o,{permission:"sending_access"}),U=await ce(e.scheduledAt?"Scheduling email...":"Sending email...",()=>v.emails.send(x,e.idempotencyKey?{idempotencyKey:e.idempotencyKey}:void 0),"send_error",o);!o.json&&w()?e.scheduledAt?console.log(`Email scheduled: ${U.id}`):console.log(`Email sent: ${U.id}`):N(U,{json:o.json})});var qr=me(Je(),1);var ud=new c("share").description("Create a shareable link for a sent or received email").argument("[id]","Email ID").option("--expires-in <duration>",'Link expiration, e.g. "10m", "2 hours", "1 day" (max 48h, default 48h)').addHelpText("after",d({output:' {"object":"email","id":"<email-id>","url":"<share-link-url>"}',errorCodes:["auth_error","create_error"],examples:["resend emails share <email-id>",'resend emails share <email-id> --expires-in "1 day"',"resend emails share <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await P({loading:"Creating share link...",sdkCall:n=>n.emails.share(r,t.expiresIn!==void 0?{expiresIn:t.expiresIn}:void 0),onInteractive:n=>{console.log(` ${qr.default.gray("ID:")} ${n.id}`),console.log(` ${qr.default.gray("URL:")} ${n.url}`)}},i)});var md=new c("update").description("Update a scheduled email").argument("[id]","Email ID").requiredOption("--scheduled-at <datetime>","New scheduled date in ISO 8601 format (e.g. 2024-08-05T11:52:01.858Z)").addHelpText("after",d({context:"Required: --scheduled-at",output:' {"object":"email","id":"<email-id>"}',errorCodes:["auth_error","update_error"],examples:["resend emails update <email-id> --scheduled-at 2024-08-05T11:52:01.858Z","resend emails update <email-id> --scheduled-at 2024-08-05T11:52:01.858Z --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await R({loading:"Updating email...",sdkCall:n=>n.emails.update({id:r,scheduledAt:t.scheduledAt}),errorCode:"update_error",successMsg:`Email updated: ${r}`},i)});var pd=new c("emails").description("Send and manage emails").addHelpText("after",d({examples:['resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi"',"resend emails get <email-id>","resend emails batch --file ./emails.json","resend emails cancel <email-id>","resend emails share <email-id>","resend emails metrics","resend emails attachments <email-id>","resend emails attachment <email-id> <attachment-id>","resend emails receiving list","resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev"]})).addCommand(Lc,{isDefault:!0}).addCommand(dd).addCommand(qc).addCommand(Nc).addCommand(Mc).addCommand(md).addCommand(ud).addCommand(Wc).addCommand(Qc).addCommand(Hc).addCommand(rd);var xg=new Set(["string","number","boolean","date"]);function Lr(e){if(!e)return"(none)";let t=Object.entries(e);return t.length===0?"(empty)":t.map(([o,i])=>`${o}:${i}`).join(", ")}function fd(e){let t=e.map(o=>[o.name,Lr(o.schema),o.created_at,o.id]);return _(["Name","Schema","Created","ID"],t,"(no events)")}function Si(e,t){if(e==="null")return null;let o=Dt(e,"--schema",t);(typeof o!="object"||o===null||Array.isArray(o))&&h({message:"--schema must be a JSON object mapping field names to types (string | number | boolean | date).",code:"invalid_schema"},{json:t.json});for(let[i,r]of Object.entries(o))(typeof r!="string"||!xg.has(r))&&h({message:`Invalid schema type for "${i}": "${r}". Must be one of: string, number, boolean, date.`,code:"invalid_schema"},{json:t.json});return o}var Zt={resource:"event",resourcePlural:"events",fetchItems:(e,{limit:t,after:o})=>e.events.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var hd=new c("create").description("Create a new event definition").option("--name <name>","Event name (e.g. user.signed_up)").option("--schema <json>","Schema as JSON mapping field names to types (string | number | boolean | date)").addHelpText("after",d({context:`Non-interactive: --name is required. --schema is optional.
698
+ `),m=ie(e.textFile,o)),e.reactEmail&&(u=await qe(e.reactEmail,o));let p=m;!r&&!e.reactEmail&&!u&&!m&&(p=await E(void 0,{message:"Email body (plain text)",placeholder:"Hello, World!",defaultValue:"Hello, World!"},{message:"Missing email body. Provide --html, --html-file, --text, --text-file, or --react-email",code:"missing_body"},o));let f=e.to??[l.to],y=e.attachment?.map(K=>{let k;try{k=ac(K)}catch(G){return h({message:G.message,code:"invalid_attachment"},{json:o.json})}let j={...k.contentType&&{contentType:k.contentType},...k.contentId&&{contentId:k.contentId}};if(k.isUrl)return{path:k.source,...k.filename&&{filename:k.filename},...j};try{let G=(0,dc.readFileSync)(k.source);return{filename:k.filename??(0,cc.basename)(k.source),content:G,...j}}catch{return h({message:`Failed to read file: ${k.source}`,code:"file_read_error"},{json:o.json})}});if(e.attachmentsFile!==void 0){let K=ie(e.attachmentsFile,o);try{y=[...y??[],...lc(K)]}catch(k){h({message:k.message,code:"invalid_attachment"},{json:o.json})}}let A=e.headers?Object.fromEntries(e.headers.map(K=>{let k=K.indexOf("=");return k<1&&h({message:`Invalid header format: "${K}". Expected key=value.`,code:"invalid_header"},{json:o.json}),[K.slice(0,k),K.slice(k+1)]})):void 0,b=e.tags?.map(K=>{let k=K.indexOf("=");return k<1&&h({message:`Invalid tag format: "${K}". Expected name=value.`,code:"invalid_tag"},{json:o.json}),{name:K.slice(0,k),value:K.slice(k+1)}}),x;if(r?x={template:{id:e.template,...n&&{variables:n}},to:f,...l.from&&{from:l.from},...l.subject&&{subject:l.subject},...e.cc&&{cc:e.cc},...e.bcc&&{bcc:e.bcc},...e.replyTo&&{replyTo:e.replyTo},...e.scheduledAt&&{scheduledAt:e.scheduledAt},...A&&{headers:A},...b&&{tags:b}}:x={from:l.from,to:f,subject:l.subject,...u&&{html:u},...p&&{text:p},...e.cc&&{cc:e.cc},...e.bcc&&{bcc:e.bcc},...e.replyTo&&{replyTo:e.replyTo},...e.scheduledAt&&{scheduledAt:e.scheduledAt},...y&&{attachments:y},...A&&{headers:A},...b&&{tags:b}},e.dryRun){M({dryRun:!0,request:Sg(x)},{json:o.json});return}let v=await ee(o,{permission:"sending_access"}),U=await de(e.scheduledAt?"Scheduling email...":"Sending email...",()=>v.emails.send(x,e.idempotencyKey?{idempotencyKey:e.idempotencyKey}:void 0),"send_error",o);!o.json&&w()?e.scheduledAt?console.log(`Email scheduled: ${U.id}`):console.log(`Email sent: ${U.id}`):M(U,{json:o.json})});var Lr=me(Je(),1);var mc=new d("share").description("Create a shareable link for a sent or received email").argument("[id]","Email ID").option("--expires-in <duration>",'Link expiration, e.g. "10m", "2 hours", "1 day" (max 48h, default 48h)').addHelpText("after",c({output:' {"object":"email","id":"<email-id>","url":"<share-link-url>"}',errorCodes:["auth_error","create_error"],examples:["resend emails share <email-id>",'resend emails share <email-id> --expires-in "1 day"',"resend emails share <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await P({loading:"Creating share link...",sdkCall:n=>n.emails.share(r,t.expiresIn!==void 0?{expiresIn:t.expiresIn}:void 0),onInteractive:n=>{console.log(` ${Lr.default.gray("ID:")} ${n.id}`),console.log(` ${Lr.default.gray("URL:")} ${n.url}`)}},i)});var pc=new d("update").description("Update a scheduled email").argument("[id]","Email ID").requiredOption("--scheduled-at <datetime>","New scheduled date in ISO 8601 format (e.g. 2024-08-05T11:52:01.858Z)").addHelpText("after",c({context:"Required: --scheduled-at",output:' {"object":"email","id":"<email-id>"}',errorCodes:["auth_error","update_error"],examples:["resend emails update <email-id> --scheduled-at 2024-08-05T11:52:01.858Z","resend emails update <email-id> --scheduled-at 2024-08-05T11:52:01.858Z --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Le,i);await F({loading:"Updating email...",sdkCall:n=>n.emails.update({id:r,scheduledAt:t.scheduledAt}),errorCode:"update_error",successMsg:`Email updated: ${r}`},i)});var fc=new d("emails").description("Send and manage emails").addHelpText("after",c({examples:['resend emails send --from onboarding@resend.dev --to delivered@resend.dev --subject "Hello" --text "Hi"',"resend emails get <email-id>","resend emails batch --file ./emails.json","resend emails cancel <email-id>","resend emails share <email-id>","resend emails metrics","resend emails attachments <email-id>","resend emails attachment <email-id> <attachment-id>","resend emails receiving list","resend emails receiving forward <email-id> --to delivered@resend.dev --from onboarding@resend.dev"]})).addCommand(Wd,{isDefault:!0}).addCommand(uc).addCommand(Ld).addCommand(Md).addCommand(qd).addCommand(pc).addCommand(mc).addCommand(Jd).addCommand(Nd).addCommand(Qd).addCommand(nc);var Kg=new Set(["string","number","boolean","date"]);function Wr(e){if(!e)return"(none)";let t=Object.entries(e);return t.length===0?"(empty)":t.map(([o,i])=>`${o}:${i}`).join(", ")}function hc(e){let t=e.map(o=>[o.name,Wr(o.schema),o.created_at,o.id]);return _(["Name","Schema","Created","ID"],t,"(no events)")}function Ki(e,t){if(e==="null")return null;let o=Dt(e,"--schema",t);(typeof o!="object"||o===null||Array.isArray(o))&&h({message:"--schema must be a JSON object mapping field names to types (string | number | boolean | date).",code:"invalid_schema"},{json:t.json});for(let[i,r]of Object.entries(o))(typeof r!="string"||!Kg.has(r))&&h({message:`Invalid schema type for "${i}": "${r}". Must be one of: string, number, boolean, date.`,code:"invalid_schema"},{json:t.json});return o}var Zt={resource:"event",resourcePlural:"events",fetchItems:(e,{limit:t,after:o})=>e.events.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var gc=new d("create").description("Create a new event definition").option("--name <name>","Event name (e.g. user.signed_up)").option("--schema <json>","Schema as JSON mapping field names to types (string | number | boolean | date)").addHelpText("after",c({context:`Non-interactive: --name is required. --schema is optional.
699
699
 
700
700
  Schema format:
701
701
  A JSON object mapping field names to type strings.
702
702
  Valid types: string, number, boolean, date.
703
- Example: '{"plan":"string","age":"number","active":"boolean"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_name","invalid_schema","create_error"],examples:['resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,'resend events create --name "user.signed_up" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Event name",placeholder:"e.g. user.signed_up"},{message:"Missing --name flag.",code:"missing_name"},o),r=e.schema?Si(e.schema,o):void 0;await P({loading:"Creating event...",sdkCall:n=>n.events.create({name:i,...r!==void 0&&{schema:r}}),onInteractive:n=>{console.log(`Event created: ${n.id}`)}},o)});var gd=new c("delete").alias("rm").description("Delete an event definition").argument("[id]","Event ID").option("--yes","Skip confirmation prompt").addHelpText("after",d({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"event","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend events delete <id> --yes","resend events delete <id> --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Zt,i);await z(r,!!t.yes,{confirmMessage:`Delete event ${r}?
704
- This cannot be undone.`,loading:"Deleting event...",object:"event",successMsg:"Event deleted",sdkCall:n=>n.events.remove(r)},i)});var Ad=new c("get").description("Retrieve an event definition").argument("[id]","Event ID").addHelpText("after",d({output:" Full event object including schema.",errorCodes:["auth_error","fetch_error"],examples:["resend events get <id>","resend events get <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Zt,i);await j({loading:"Fetching event...",sdkCall:n=>n.events.get(r),onInteractive:n=>{console.log(n.name),console.log(`ID: ${n.id}`),console.log(`Schema: ${Lr(n.schema)}`),console.log(`Created: ${n.created_at}`),n.updated_at&&console.log(`Updated: ${n.updated_at}`)}},i)});var bd=new c("list").alias("ls").description("List all events").option("--limit <n>","Maximum number of events to return (1-100)","10").option("--after <cursor>","Return events after this cursor (next page)").option("--before <cursor>","Return events before this cursor (previous page)").addHelpText("after",d({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend events list","resend events list --limit 25 --json","resend events list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching events...",sdkCall:n=>n.events.list(r),onInteractive:n=>{console.log(fd(n.data)),T(n,"events list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var yd=new c("open").description("Open the events page in the Resend dashboard").addHelpText("after",d({context:"Opens the events management page in the Resend dashboard in your default browser.",examples:["resend events open"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Te(he.events,o)});var Cd=new c("send").description("Send an event to trigger automations for a contact").option("--event <name>","Event name (e.g. user.signed_up)").option("--contact-id <id>","Contact ID (mutually exclusive with --email)").option("--email <email>","Contact email (mutually exclusive with --contact-id)").option("--payload <json>","Event payload as JSON string").addHelpText("after",d({context:`Sends an event for a specific contact, triggering any automations listening for it.
703
+ Example: '{"plan":"string","age":"number","active":"boolean"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_name","invalid_schema","create_error"],examples:['resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,'resend events create --name "user.signed_up" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Event name",placeholder:"e.g. user.signed_up"},{message:"Missing --name flag.",code:"missing_name"},o),r=e.schema?Ki(e.schema,o):void 0;await P({loading:"Creating event...",sdkCall:n=>n.events.create({name:i,...r!==void 0&&{schema:r}}),onInteractive:n=>{console.log(`Event created: ${n.id}`)}},o)});var Ac=new d("delete").alias("rm").description("Delete an event definition").argument("[id]","Event ID").option("--yes","Skip confirmation prompt").addHelpText("after",c({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"event","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend events delete <id> --yes","resend events delete <id> --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Zt,i);await z(r,!!t.yes,{confirmMessage:`Delete event ${r}?
704
+ This cannot be undone.`,loading:"Deleting event...",object:"event",successMsg:"Event deleted",sdkCall:n=>n.events.remove(r)},i)});var bc=new d("get").description("Retrieve an event definition").argument("[id]","Event ID").addHelpText("after",c({output:" Full event object including schema.",errorCodes:["auth_error","fetch_error"],examples:["resend events get <id>","resend events get <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Zt,i);await B({loading:"Fetching event...",sdkCall:n=>n.events.get(r),onInteractive:n=>{console.log(n.name),console.log(`ID: ${n.id}`),console.log(`Schema: ${Wr(n.schema)}`),console.log(`Created: ${n.created_at}`),n.updated_at&&console.log(`Updated: ${n.updated_at}`)}},i)});var yc=new d("list").alias("ls").description("List all events").option("--limit <n>","Maximum number of events to return (1-100)","10").option("--after <cursor>","Return events after this cursor (next page)").option("--before <cursor>","Return events before this cursor (previous page)").addHelpText("after",c({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend events list","resend events list --limit 25 --json","resend events list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching events...",sdkCall:n=>n.events.list(r),onInteractive:n=>{console.log(hc(n.data)),T(n,"events list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Cc=new d("open").description("Open the events page in the Resend dashboard").addHelpText("after",c({context:"Opens the events management page in the Resend dashboard in your default browser.",examples:["resend events open"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Te(he.events,o)});var xc=new d("send").description("Send an event to trigger automations for a contact").option("--event <name>","Event name (e.g. user.signed_up)").option("--contact-id <id>","Contact ID (mutually exclusive with --email)").option("--email <email>","Contact email (mutually exclusive with --contact-id)").option("--payload <json>","Event payload as JSON string").addHelpText("after",c({context:`Sends an event for a specific contact, triggering any automations listening for it.
705
705
 
706
706
  Contact targeting:
707
707
  Provide exactly one of --contact-id or --email to identify the contact.
@@ -709,12 +709,12 @@ Contact targeting:
709
709
 
710
710
  Payload:
711
711
  Optional JSON object with event-specific data.
712
- Must match the event's schema if one is defined.`,output:' {"object":"event","event":"<name>"}',errorCodes:["auth_error","missing_event","missing_contact","conflicting_contact","invalid_json","send_error"],examples:['resend events send --event "user.signed_up" --contact-id <id>','resend events send --event "user.signed_up" --email user@example.com',`resend events send --event "order.completed" --contact-id <id> --payload '{"amount":99,"currency":"usd"}'`]})).action(async(e,t)=>{let o=t.optsWithGlobals();e.contactId!==void 0&&e.email!==void 0&&h({message:"Cannot use both --contact-id and --email. Provide only one.",code:"conflicting_contact"},{json:o.json});let i=await E(e.event,{message:"Event name",placeholder:"e.g. user.signed_up"},{message:"Missing --event flag.",code:"missing_event"},o),r=e.contactId,n=e.email;!r&&!n&&(await bt(void 0,{message:"Identify contact by",options:[{value:"contact-id",label:"Contact ID"},{value:"email",label:"Email address"}]},{message:"Missing --contact-id or --email flag.",code:"missing_contact"},o)==="contact-id"?r=await E(void 0,{message:"Contact ID"},{message:"Missing contact ID.",code:"missing_contact"},o):n=await E(void 0,{message:"Email address",placeholder:"user@example.com"},{message:"Missing email.",code:"missing_contact"},o));let s=Dt(e.payload,"--payload",o),a=r?{event:i,contactId:r,...s&&{payload:s}}:{event:i,email:n,...s&&{payload:s}};await R({loading:"Sending event...",sdkCall:l=>l.events.send(a),errorCode:"send_error",successMsg:`Event sent: ${i}`},o)});X();var xd=new c("update").description("Update an event schema").argument("[id]","Event ID").option("--schema <json>",'New schema as JSON (or "null" to clear the schema)').addHelpText("after",d({context:`Non-interactive: --schema is required. Pass "null" to remove the schema.
712
+ Must match the event's schema if one is defined.`,output:' {"object":"event","event":"<name>"}',errorCodes:["auth_error","missing_event","missing_contact","conflicting_contact","invalid_json","send_error"],examples:['resend events send --event "user.signed_up" --contact-id <id>','resend events send --event "user.signed_up" --email user@example.com',`resend events send --event "order.completed" --contact-id <id> --payload '{"amount":99,"currency":"usd"}'`]})).action(async(e,t)=>{let o=t.optsWithGlobals();e.contactId!==void 0&&e.email!==void 0&&h({message:"Cannot use both --contact-id and --email. Provide only one.",code:"conflicting_contact"},{json:o.json});let i=await E(e.event,{message:"Event name",placeholder:"e.g. user.signed_up"},{message:"Missing --event flag.",code:"missing_event"},o),r=e.contactId,n=e.email;!r&&!n&&(await bt(void 0,{message:"Identify contact by",options:[{value:"contact-id",label:"Contact ID"},{value:"email",label:"Email address"}]},{message:"Missing --contact-id or --email flag.",code:"missing_contact"},o)==="contact-id"?r=await E(void 0,{message:"Contact ID"},{message:"Missing contact ID.",code:"missing_contact"},o):n=await E(void 0,{message:"Email address",placeholder:"user@example.com"},{message:"Missing email.",code:"missing_contact"},o));let s=Dt(e.payload,"--payload",o),a=r?{event:i,contactId:r,...s&&{payload:s}}:{event:i,email:n,...s&&{payload:s}};await F({loading:"Sending event...",sdkCall:l=>l.events.send(a),errorCode:"send_error",successMsg:`Event sent: ${i}`},o)});X();var wc=new d("update").description("Update an event schema").argument("[id]","Event ID").option("--schema <json>",'New schema as JSON (or "null" to clear the schema)').addHelpText("after",c({context:`Non-interactive: --schema is required. Pass "null" to remove the schema.
713
713
 
714
714
  Schema format:
715
715
  A JSON object mapping field names to type strings.
716
716
  Valid types: string, number, boolean, date.
717
- Example: '{"plan":"string","age":"number"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_schema","invalid_schema","update_error"],examples:[`resend events update <id> --schema '{"plan":"string","age":"number"}'`,"resend events update <id> --schema null",`resend events update <id> --schema '{"plan":"string"}' --json`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Zt,i),n=t.schema;n===void 0&&((!w()||i.json)&&h({message:"Missing --schema flag.",code:"missing_schema"},{json:i.json}),n=await E(void 0,{message:'Schema JSON (or "null" to clear)',placeholder:'{"field":"string"}'},{message:"Missing --schema flag.",code:"missing_schema"},i));let s=Si(n,i);await R({loading:"Updating event...",sdkCall:a=>a.events.update(r,{schema:s}),errorCode:"update_error",successMsg:`Event updated: ${r}`},i)});var wd=new c("events").description("Manage events").addHelpText("after",d({context:`Events define the signals that trigger automations.
717
+ Example: '{"plan":"string","age":"number"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_schema","invalid_schema","update_error"],examples:[`resend events update <id> --schema '{"plan":"string","age":"number"}'`,"resend events update <id> --schema null",`resend events update <id> --schema '{"plan":"string"}' --json`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Zt,i),n=t.schema;n===void 0&&((!w()||i.json)&&h({message:"Missing --schema flag.",code:"missing_schema"},{json:i.json}),n=await E(void 0,{message:'Schema JSON (or "null" to clear)',placeholder:'{"field":"string"}'},{message:"Missing --schema flag.",code:"missing_schema"},i));let s=Ki(n,i);await F({loading:"Updating event...",sdkCall:a=>a.events.update(r,{schema:s}),errorCode:"update_error",successMsg:`Event updated: ${r}`},i)});var vc=new d("events").description("Manage events").addHelpText("after",c({context:`Events define the signals that trigger automations.
718
718
  Each event has a name and an optional typed schema (string | number | boolean | date fields).
719
719
 
720
720
  Lifecycle:
@@ -723,118 +723,122 @@ Lifecycle:
723
723
  3. resend events list
724
724
  4. resend events get <id>
725
725
  5. resend events update <id> --schema '{"plan":"string","trial":"boolean"}'
726
- 6. resend events delete <id> --yes`,examples:["resend events list",'resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,"resend events get <id>",`resend events update <id> --schema '{"plan":"string"}'`,"resend events update <id> --schema null","resend events delete <id> --yes",'resend events send --event "user.signed_up" --contact-id <id>',`resend events send --event "user.signed_up" --email user@example.com --payload '{"plan":"pro"}'`]})).addCommand(hd).addCommand(Ad).addCommand(bd,{isDefault:!0}).addCommand(xd).addCommand(gd).addCommand(yd).addCommand(Cd);var ou=me(Je(),1);var vd=new c("create").description("Create a new inbox at one of your verified domains").option("--email_address <address>","Email address for the inbox, e.g. support@yourdomain.com (required)").option("--name <name>","Inbox name shown in the dashboard").option("--from_name <name>",'Name used when sending from this inbox, e.g. "Ada from Support" (a plain name, not "Name <email>")').option("--forwarding","Receive mail without an MX record \u2014 Resend returns a receiving address to forward mail to").addHelpText("after",d({context:`The address must belong to one of your verified domains.
726
+ 6. resend events delete <id> --yes`,examples:["resend events list",'resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,"resend events get <id>",`resend events update <id> --schema '{"plan":"string"}'`,"resend events update <id> --schema null","resend events delete <id> --yes",'resend events send --event "user.signed_up" --contact-id <id>',`resend events send --event "user.signed_up" --email user@example.com --payload '{"plan":"pro"}'`]})).addCommand(gc).addCommand(bc).addCommand(yc,{isDefault:!0}).addCommand(wc).addCommand(Ac).addCommand(Cc).addCommand(xc);var su=me(Je(),1);var H={resource:"inbox",resourcePlural:"inboxes",fetchItems:(e,{limit:t,after:o})=>e.inboxes.list({limit:t,...o&&{after:o}}),display:e=>({label:e.email_address,hint:e.id})};function Uc(e){let t=e.map(o=>[o.email_address,o.name??"",String(o.unread),o.id]);return _(["Email","Name","Unread","ID"],t,"(no inboxes)")}var Sc=new d("get").description("Retrieve an inbox's agent settings").option("--inbox_id <id>","Inbox UUID").addHelpText("after",c({context:"An inbox without a configured agent returns empty settings.",output:' {"object":"inbox_agent","instructions":"<text>|null","tone":"<tone>|null","enabled_actions":["draft_reply"]}',errorCodes:["auth_error","fetch_error"],examples:["resend inboxes agent get --inbox_id <inbox_id>","resend inboxes agent get --inbox_id <inbox_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o);await B({loading:"Fetching agent settings...",sdkCall:r=>r.inboxes.agent.get({inboxId:i}),onInteractive:r=>{console.log(`Instructions: ${r.instructions||"(none)"}`),console.log(`Tone: ${r.tone||"(none)"}`),console.log(`Enabled actions: ${r.enabled_actions.join(", ")||"(none)"}`)}},o)});var Kc=new d("update").description("Update an inbox's agent instructions, tone, or enabled actions").option("--inbox_id <id>","Inbox UUID").option("--instructions <text>","Instructions the agent follows (max 4000 characters)").option("--tone <tone>",'Tone the agent writes in, e.g. "friendly and concise" (max 64 characters)').option("--enabled_actions <actions...>",`Replace the enabled actions (comma or space-separated): ${Lo.join(", ")}`).addHelpText("after",c({context:`At least one of --instructions, --tone, or --enabled_actions is required.
727
+ Omitted fields keep their current value.
728
+ Pass --instructions "" or --tone "" to clear the value.
729
+ --enabled_actions replaces the whole set. Pass --enabled_actions "" to disable all actions.`,output:' {"object":"inbox_agent","id":"<uuid>"}',errorCodes:["auth_error","no_changes","invalid_enabled_actions","update_error"],examples:['resend inboxes agent update --inbox_id <inbox_id> --instructions "Answer refund questions yourself."',"resend inboxes agent update --inbox_id <inbox_id> --enabled_actions draft_reply add_labels --json",'resend inboxes agent update --inbox_id <inbox_id> --tone ""']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.instructions===void 0&&e.tone===void 0&&e.enabled_actions===void 0&&h({message:"Provide at least one option to update: --instructions, --tone, or --enabled_actions.",code:"no_changes"},{json:o.json});let i=e.enabled_actions?.flatMap(a=>a.split(",")).map(a=>a.trim()).filter(Boolean),r=i?.filter(a=>!Lo.includes(a));r?.length&&h({message:`Invalid --enabled_actions value: ${r.join(", ")}. Use: ${Lo.join(", ")}.`,code:"invalid_enabled_actions"},{json:o.json});let n=await g(e.inbox_id,H,o),s={inboxId:n,...e.instructions!==void 0&&{instructions:e.instructions||null},...e.tone!==void 0&&{tone:e.tone||null},...i&&{enabledActions:i}};await F({loading:"Updating agent settings...",sdkCall:a=>a.inboxes.agent.update(s),errorCode:"update_error",successMsg:`Agent settings updated for inbox: ${n}`},o)});var kc=new d("agent").description("Manage an inbox's agent settings").addHelpText("after",c({context:`The agent settings set the instructions and the tone the inbox agent follows,
730
+ and which actions it is allowed to take.`,examples:["resend inboxes agent get --inbox_id <inbox_id>",'resend inboxes agent update --inbox_id <inbox_id> --tone "friendly and concise"']})).addCommand(Sc,{isDefault:!0}).addCommand(Kc);var _c=new d("create").description("Create a new inbox at one of your verified domains").option("--email_address <address>","Email address for the inbox, e.g. support@yourdomain.com (required)").option("--name <name>","Inbox name shown in the dashboard").option("--from_name <name>",'Name used when sending from this inbox, e.g. "Ada from Support" (a plain name, not "Name <email>")').option("--forwarding","Receive mail without an MX record \u2014 Resend returns a receiving address to forward mail to").addHelpText("after",c({context:`The address must belong to one of your verified domains.
727
731
  Receiving must be enabled on the domain, unless you pass --forwarding.
728
732
 
729
- Non-interactive: --email_address is required.`,output:' {"object":"inbox","id":"<uuid>","name":"<name>","email_address":"<address>","domain_id":"<uuid>","receiving_address":"<address>|null","from_name":"<name>|null","unread":0,"drafts":0,"last_received":"<date>|null","created_at":"<date>"}',errorCodes:["auth_error","missing_email_address","create_error"],examples:["resend inboxes create --email_address support@yourdomain.com",'resend inboxes create --email_address hello@yourdomain.com --name "Hello" --from_name "Team Hello" --forwarding',"resend inboxes create --email_address support@yourdomain.com --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.email_address,{message:"Inbox email address",placeholder:"e.g. support@yourdomain.com"},{message:"Missing --email_address flag.",code:"missing_email_address"},o);await P({loading:"Creating inbox...",sdkCall:r=>r.inboxes.create({emailAddress:i,...e.name&&{name:e.name},...e.from_name!==void 0&&{fromName:e.from_name},...e.forwarding&&{forwarding:!0}}),onInteractive:r=>{console.log(`Inbox created: ${r.id}`),console.log(`Email address: ${r.email_address}`),r.receiving_address&&console.log(`Receiving address: ${r.receiving_address}`)}},o)});var M={resource:"inbox",resourcePlural:"inboxes",fetchItems:(e,{limit:t,after:o})=>e.inboxes.list({limit:t,...o&&{after:o}}),display:e=>({label:e.email_address,hint:e.id})};function Ud(e){let t=e.map(o=>[o.email_address,o.name??"",String(o.unread),o.id]);return _(["Email","Name","Unread","ID"],t,"(no inboxes)")}var Sd=new c("delete").alias("rm").description("Delete an inbox").argument("[id]","Inbox UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`Warning: Deleting an inbox removes its threads and messages, and the address
733
+ Non-interactive: --email_address is required.`,output:' {"object":"inbox","id":"<uuid>","name":"<name>","email_address":"<address>","domain_id":"<uuid>","receiving_address":"<address>|null","from_name":"<name>|null","unread":0,"drafts":0,"last_received":"<date>|null","created_at":"<date>"}',errorCodes:["auth_error","missing_email_address","create_error"],examples:["resend inboxes create --email_address support@yourdomain.com",'resend inboxes create --email_address hello@yourdomain.com --name "Hello" --from_name "Team Hello" --forwarding',"resend inboxes create --email_address support@yourdomain.com --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.email_address,{message:"Inbox email address",placeholder:"e.g. support@yourdomain.com"},{message:"Missing --email_address flag.",code:"missing_email_address"},o);await P({loading:"Creating inbox...",sdkCall:r=>r.inboxes.create({emailAddress:i,...e.name&&{name:e.name},...e.from_name!==void 0&&{fromName:e.from_name},...e.forwarding&&{forwarding:!0}}),onInteractive:r=>{console.log(`Inbox created: ${r.id}`),console.log(`Email address: ${r.email_address}`),r.receiving_address&&console.log(`Receiving address: ${r.receiving_address}`)}},o)});var Fc=new d("delete").alias("rm").description("Delete an inbox").argument("[id]","Inbox UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`Warning: Deleting an inbox removes its threads and messages, and the address
730
734
  stops receiving email.
731
735
 
732
- Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"inbox","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend inboxes delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,M,i);await z(r.id,!!t.yes,{confirmMessage:`Delete inbox "${r.label}"?
736
+ Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"inbox","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend inboxes delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,H,i);await z(r.id,!!t.yes,{confirmMessage:`Delete inbox "${r.label}"?
733
737
  ID: ${r.id}
734
- All threads and messages in this inbox will be removed.`,loading:"Deleting inbox...",object:"inbox",successMsg:"Inbox deleted",sdkCall:n=>n.inboxes.remove(r.id)},i)});var Wr=(e,t)=>[...t,e],Kd=new c("create").description("Create a draft in an inbox").option("--inbox_id <id>","Inbox UUID").option("--to <address>","Recipient address (repeat the flag for multiple recipients)",Wr,[]).option("--cc <address>","Cc address (repeatable)",Wr,[]).option("--bcc <address>","Bcc address (repeatable)",Wr,[]).option("--subject <subject>","Draft subject").option("--text <text>","Plain text body").option("--html <html>","HTML body").option("--thread_id <thread_id>","Thread to reply to (requires --reply_to_email_id)").option("--reply_to_email_id <email_id>","Email the draft replies to (requires --thread_id)").addHelpText("after",d({context:`Creates a standalone draft, or a reply draft when --thread_id and
738
+ All threads and messages in this inbox will be removed.`,loading:"Deleting inbox...",object:"inbox",successMsg:"Inbox deleted",sdkCall:n=>n.inboxes.remove(r.id)},i)});var Jr=(e,t)=>[...t,e],Rc=new d("create").description("Create a draft in an inbox").option("--inbox_id <id>","Inbox UUID").option("--to <address>","Recipient address (repeat the flag for multiple recipients)",Jr,[]).option("--cc <address>","Cc address (repeatable)",Jr,[]).option("--bcc <address>","Bcc address (repeatable)",Jr,[]).option("--subject <subject>","Draft subject").option("--text <text>","Plain text body").option("--html <html>","HTML body").option("--thread_id <thread_id>","Thread to reply to (requires --reply_to_email_id)").option("--reply_to_email_id <email_id>","Email the draft replies to (requires --thread_id)").addHelpText("after",c({context:`Creates a standalone draft, or a reply draft when --thread_id and
735
739
  --reply_to_email_id are passed together. A reply draft does not copy
736
740
  recipients from the email it replies to, so set --to before you send it.
737
741
  At least one content field (--to, --cc, --bcc, --subject, --text, --html)
738
742
  is required. Combined recipients cannot exceed 50.
739
743
 
740
- Send the draft later with "resend inboxes drafts send".`,output:' {"object":"inbox_draft","id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","html":"<html>|null","text":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","email_id":null,"created_at":"<date>","updated_at":"<date>"}',errorCodes:["auth_error","invalid_options","missing_content","create_error"],examples:['resend inboxes drafts create --inbox_id <inbox_id> --to user@example.com --subject "Hello" --text "Draft body"','resend inboxes drafts create --inbox_id <inbox_id> --thread_id <thread_id> --reply_to_email_id <email_id> --to customer@example.com --text "Reply draft" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals();!!e.thread_id!=!!e.reply_to_email_id&&h({message:"--thread_id and --reply_to_email_id must be provided together.",code:"invalid_options"},{json:o.json}),e.to.length>0||e.cc.length>0||e.bcc.length>0||e.subject!==void 0||e.text!==void 0||e.html!==void 0||h({message:"Provide at least one of --to, --cc, --bcc, --subject, --text, or --html.",code:"missing_content"},{json:o.json});let n={inboxId:await g(e.inbox_id,M,o),...e.to.length>0&&{to:e.to},...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.subject!==void 0&&{subject:e.subject},...e.text!==void 0&&{text:e.text},...e.html!==void 0&&{html:e.html},...e.thread_id&&{threadId:e.thread_id,replyToEmailId:e.reply_to_email_id}};await P({loading:"Creating draft...",sdkCall:s=>s.inboxes.drafts.create(n),onInteractive:s=>{console.log(`Draft created: ${s.id}`),console.log(`Type: ${s.type}`)}},o)});function wt(e){return{resource:"draft",resourcePlural:"drafts",fetchItems:(t,{limit:o,after:i})=>t.inboxes.drafts.list({inboxId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.subject??t.to?.join(", ")??"(no subject)",hint:t.id})}}function kd(e){let t=e.map(o=>[o.to?.join(", ")??"",o.subject??"(no subject)",o.type,o.updated_at,o.id]);return _(["To","Subject","Type","Updated","ID"],t,"(no drafts)")}var _d=new c("delete").alias("rm").description("Delete a draft").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"inbox_draft","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes drafts delete --inbox_id <inbox_id> --draft_id <draft_id> --yes","resend inboxes drafts delete --inbox_id <inbox_id> --draft_id <draft_id> --yes --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await J(e.draft_id,wt(i),o);await z(r.id,!!e.yes,{confirmMessage:`Delete draft "${r.label}"?
741
- ID: ${r.id}`,loading:"Deleting draft...",object:"inbox_draft",successMsg:"Draft deleted",sdkCall:n=>n.inboxes.drafts.remove({inboxId:i,draftId:r.id})},o)});var Fd=new c("get").description("Retrieve a draft by ID").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").addHelpText("after",d({output:' {"object":"inbox_draft","id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","html":"<html>|null","text":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","email_id":"<uuid>|null","created_at":"<date>","updated_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend inboxes drafts get --inbox_id <inbox_id> --draft_id <draft_id>","resend inboxes drafts get --inbox_id <inbox_id> --draft_id <draft_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await g(e.draft_id,wt(i),o);await j({loading:"Fetching draft...",sdkCall:n=>n.inboxes.drafts.get({inboxId:i,draftId:r}),onInteractive:n=>{console.log(`${n.subject??"(no subject)"}`),console.log(`ID: ${n.id}`),console.log(`Type: ${n.type}`),n.to?.length&&console.log(`To: ${n.to.join(", ")}`),console.log(`Updated: ${n.updated_at}`),console.log(""),console.log(n.text??n.html??"(no body)")}},o)});var Rd=new c("list").alias("ls").description("List drafts in an inbox").option("--inbox_id <id>","Inbox UUID").option("--limit <n>","Maximum number of drafts to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list drafts after this draft ID").option("--before <cursor>","Cursor for backward pagination \u2014 list drafts before this draft ID").addHelpText("after",d({context:"Pass the last draft ID of the previous page as --after to fetch the next page.",output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","snippet":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","updated_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend inboxes drafts list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes drafts list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json","resend inboxes drafts list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --after <draft_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o),n=await g(e.inbox_id,M,o);await S({loading:"Fetching drafts...",sdkCall:s=>s.inboxes.drafts.list({inboxId:n,...r}),onInteractive:s=>{console.log(kd(s.data)),T(s,"inboxes drafts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,extraFlags:`--inbox_id ${n}`})}},o)});var Dd=new c("send").description("Send a draft").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").addHelpText("after",d({context:"Sends the draft from the inbox address. The draft must have recipients and a body.",output:' {"object":"inbox_draft","id":"<uuid>","thread_id":"<uuid>","email_id":"<uuid>"}',errorCodes:["auth_error","send_error"],examples:["resend inboxes drafts send --inbox_id <inbox_id> --draft_id <draft_id>","resend inboxes drafts send --inbox_id <inbox_id> --draft_id <draft_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await g(e.draft_id,wt(i),o);await R({loading:"Sending draft...",sdkCall:n=>n.inboxes.drafts.send({inboxId:i,draftId:r}),errorCode:"send_error",successMsg:`Draft sent: ${r}`},o)});var Jr=(e,t)=>[...t,e],Td=new c("update").description("Update a draft's recipients, subject, or body").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").option("--to <address>","Replace recipients (repeatable)",Jr,[]).option("--cc <address>","Replace cc addresses (repeatable)",Jr,[]).option("--bcc <address>","Replace bcc addresses (repeatable)",Jr,[]).option("--subject <subject>","New subject").option("--text <text>","New plain text body").option("--html <html>","New HTML body").addHelpText("after",d({context:"At least one option is required. Provided fields replace the existing values.",output:' {"object":"inbox_draft","id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","html":"<html>|null","text":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","email_id":"<uuid>|null","created_at":"<date>","updated_at":"<date>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend inboxes drafts update --inbox_id <inbox_id> --draft_id <draft_id> --subject "Updated subject"','resend inboxes drafts update --inbox_id <inbox_id> --draft_id <draft_id> --text "New body" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.to.length>0||e.cc.length>0||e.bcc.length>0||e.subject!==void 0||e.text!==void 0||e.html!==void 0||h({message:"Provide at least one option to update: --to, --cc, --bcc, --subject, --text, or --html.",code:"no_changes"},{json:o.json});let r=await g(e.inbox_id,M,o),n=await g(e.draft_id,wt(r),o),s={inboxId:r,draftId:n,...e.to.length>0&&{to:e.to},...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.subject!==void 0&&{subject:e.subject},...e.text!==void 0&&{text:e.text},...e.html!==void 0&&{html:e.html}};await R({loading:"Updating draft...",sdkCall:a=>a.inboxes.drafts.update(s),errorCode:"update_error",successMsg:`Draft updated: ${n}`},o)});var Od=new c("drafts").description("Manage email drafts in an inbox").addHelpText("after",d({context:`Drafts are unsent emails in an inbox \u2014 standalone, or replies when created
742
- with --thread_id and --reply_to_email_id. Send one with "drafts send".`,examples:["resend inboxes drafts list --inbox_id <inbox_id>",'resend inboxes drafts create --inbox_id <inbox_id> --to user@example.com --subject "Hello" --text "Body"',"resend inboxes drafts send --inbox_id <inbox_id> --draft_id <draft_id>"]})).addCommand(Rd,{isDefault:!0}).addCommand(Kd).addCommand(Fd).addCommand(Td).addCommand(_d).addCommand(Dd);var Ed=new c("get").description("Retrieve an inbox by ID or email address").argument("[id]","Inbox UUID or inbox email address").addHelpText("after",d({output:' {"object":"inbox","id":"<uuid>","name":"<name>","email_address":"<address>","domain_id":"<uuid>","receiving_address":"<address>|null","from_name":"<name>|null","unread":0,"drafts":0,"last_received":"<date>|null","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend inboxes get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json","resend inboxes get support@yourdomain.com --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,M,i);await j({loading:"Fetching inbox...",sdkCall:n=>n.inboxes.get(r),onInteractive:n=>{console.log(`${n.email_address}`),console.log(`ID: ${n.id}`),console.log(`Name: ${n.name}`),n.from_name&&console.log(`From name: ${n.from_name}`),n.receiving_address&&console.log(`Receiving address: ${n.receiving_address}`),console.log(`Unread: ${n.unread}`),console.log(`Drafts: ${n.drafts}`),n.last_received&&console.log(`Last received: ${n.last_received}`)}},i)});var Bd=new c("create").description("Create a label in an inbox").option("--inbox_id <id>","Inbox UUID").option("--name <name>","Label name (required, max 64 characters)").addOption(new q("--color <color>","Label color (random when omitted)").choices(Lo)).addHelpText("after",d({context:`An inbox can have up to 100 labels.
744
+ Send the draft later with "resend inboxes drafts send".`,output:' {"object":"inbox_draft","id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","html":"<html>|null","text":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","email_id":null,"created_at":"<date>","updated_at":"<date>"}',errorCodes:["auth_error","invalid_options","missing_content","create_error"],examples:['resend inboxes drafts create --inbox_id <inbox_id> --to user@example.com --subject "Hello" --text "Draft body"','resend inboxes drafts create --inbox_id <inbox_id> --thread_id <thread_id> --reply_to_email_id <email_id> --to customer@example.com --text "Reply draft" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals();!!e.thread_id!=!!e.reply_to_email_id&&h({message:"--thread_id and --reply_to_email_id must be provided together.",code:"invalid_options"},{json:o.json}),e.to.length>0||e.cc.length>0||e.bcc.length>0||e.subject!==void 0||e.text!==void 0||e.html!==void 0||h({message:"Provide at least one of --to, --cc, --bcc, --subject, --text, or --html.",code:"missing_content"},{json:o.json});let n={inboxId:await g(e.inbox_id,H,o),...e.to.length>0&&{to:e.to},...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.subject!==void 0&&{subject:e.subject},...e.text!==void 0&&{text:e.text},...e.html!==void 0&&{html:e.html},...e.thread_id&&{threadId:e.thread_id,replyToEmailId:e.reply_to_email_id}};await P({loading:"Creating draft...",sdkCall:s=>s.inboxes.drafts.create(n),onInteractive:s=>{console.log(`Draft created: ${s.id}`),console.log(`Type: ${s.type}`)}},o)});function wt(e){return{resource:"draft",resourcePlural:"drafts",fetchItems:(t,{limit:o,after:i})=>t.inboxes.drafts.list({inboxId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.subject??t.to?.join(", ")??"(no subject)",hint:t.id})}}function Dc(e){let t=e.map(o=>[o.to?.join(", ")??"",o.subject??"(no subject)",o.type,o.updated_at,o.id]);return _(["To","Subject","Type","Updated","ID"],t,"(no drafts)")}var Tc=new d("delete").alias("rm").description("Delete a draft").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"inbox_draft","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes drafts delete --inbox_id <inbox_id> --draft_id <draft_id> --yes","resend inboxes drafts delete --inbox_id <inbox_id> --draft_id <draft_id> --yes --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await J(e.draft_id,wt(i),o);await z(r.id,!!e.yes,{confirmMessage:`Delete draft "${r.label}"?
745
+ ID: ${r.id}`,loading:"Deleting draft...",object:"inbox_draft",successMsg:"Draft deleted",sdkCall:n=>n.inboxes.drafts.remove({inboxId:i,draftId:r.id})},o)});var Oc=new d("get").description("Retrieve a draft by ID").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").addHelpText("after",c({output:' {"object":"inbox_draft","id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","html":"<html>|null","text":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","email_id":"<uuid>|null","created_at":"<date>","updated_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend inboxes drafts get --inbox_id <inbox_id> --draft_id <draft_id>","resend inboxes drafts get --inbox_id <inbox_id> --draft_id <draft_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await g(e.draft_id,wt(i),o);await B({loading:"Fetching draft...",sdkCall:n=>n.inboxes.drafts.get({inboxId:i,draftId:r}),onInteractive:n=>{console.log(`${n.subject??"(no subject)"}`),console.log(`ID: ${n.id}`),console.log(`Type: ${n.type}`),n.to?.length&&console.log(`To: ${n.to.join(", ")}`),console.log(`Updated: ${n.updated_at}`),console.log(""),console.log(n.text??n.html??"(no body)")}},o)});var Ec=new d("list").alias("ls").description("List drafts in an inbox").option("--inbox_id <id>","Inbox UUID").option("--limit <n>","Maximum number of drafts to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list drafts after this draft ID").option("--before <cursor>","Cursor for backward pagination \u2014 list drafts before this draft ID").addHelpText("after",c({context:"Pass the last draft ID of the previous page as --after to fetch the next page.",output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","snippet":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","updated_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend inboxes drafts list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes drafts list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json","resend inboxes drafts list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --after <draft_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o),n=await g(e.inbox_id,H,o);await S({loading:"Fetching drafts...",sdkCall:s=>s.inboxes.drafts.list({inboxId:n,...r}),onInteractive:s=>{console.log(Dc(s.data)),T(s,"inboxes drafts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,extraFlags:`--inbox_id ${n}`})}},o)});var Bc=new d("send").description("Send a draft").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").option("--idempotency-key <key>","Deduplicate this send request using this key").addHelpText("after",c({context:"Sends the draft from the inbox address. The draft must have recipients and a body.",output:' {"object":"inbox_draft","id":"<uuid>","thread_id":"<uuid>","email_id":"<uuid>"}',errorCodes:["auth_error","send_error"],examples:["resend inboxes drafts send --inbox_id <inbox_id> --draft_id <draft_id>","resend inboxes drafts send --inbox_id <inbox_id> --draft_id <draft_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await g(e.draft_id,wt(i),o);await F({loading:"Sending draft...",sdkCall:n=>n.inboxes.drafts.send({inboxId:i,draftId:r},e.idempotencyKey?{idempotencyKey:e.idempotencyKey}:void 0),errorCode:"send_error",successMsg:`Draft sent: ${r}`},o)});var Vr=(e,t)=>[...t,e],Ic=new d("update").description("Update a draft's recipients, subject, or body").option("--inbox_id <id>","Inbox UUID").option("--draft_id <id>","Draft UUID").option("--to <address>","Replace recipients (repeatable)",Vr,[]).option("--cc <address>","Replace cc addresses (repeatable)",Vr,[]).option("--bcc <address>","Replace bcc addresses (repeatable)",Vr,[]).option("--subject <subject>","New subject").option("--text <text>","New plain text body").option("--html <html>","New HTML body").addHelpText("after",c({context:"At least one option is required. Provided fields replace the existing values.",output:' {"object":"inbox_draft","id":"<uuid>","type":"standalone|reply","to":["<address>"]|null,"cc":[],"bcc":[],"subject":"<subject>|null","html":"<html>|null","text":"<text>|null","thread_id":"<uuid>|null","reply_to_email_id":"<uuid>|null","email_id":"<uuid>|null","created_at":"<date>","updated_at":"<date>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend inboxes drafts update --inbox_id <inbox_id> --draft_id <draft_id> --subject "Updated subject"','resend inboxes drafts update --inbox_id <inbox_id> --draft_id <draft_id> --text "New body" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.to.length>0||e.cc.length>0||e.bcc.length>0||e.subject!==void 0||e.text!==void 0||e.html!==void 0||h({message:"Provide at least one option to update: --to, --cc, --bcc, --subject, --text, or --html.",code:"no_changes"},{json:o.json});let r=await g(e.inbox_id,H,o),n=await g(e.draft_id,wt(r),o),s={inboxId:r,draftId:n,...e.to.length>0&&{to:e.to},...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.subject!==void 0&&{subject:e.subject},...e.text!==void 0&&{text:e.text},...e.html!==void 0&&{html:e.html}};await F({loading:"Updating draft...",sdkCall:a=>a.inboxes.drafts.update(s),errorCode:"update_error",successMsg:`Draft updated: ${n}`},o)});var jc=new d("drafts").description("Manage email drafts in an inbox").addHelpText("after",c({context:`Drafts are unsent emails in an inbox \u2014 standalone, or replies when created
746
+ with --thread_id and --reply_to_email_id. Send one with "drafts send".`,examples:["resend inboxes drafts list --inbox_id <inbox_id>",'resend inboxes drafts create --inbox_id <inbox_id> --to user@example.com --subject "Hello" --text "Body"',"resend inboxes drafts send --inbox_id <inbox_id> --draft_id <draft_id>"]})).addCommand(Ec,{isDefault:!0}).addCommand(Rc).addCommand(Oc).addCommand(Ic).addCommand(Tc).addCommand(Bc);var Pc=new d("get").description("Retrieve an inbox by ID or email address").argument("[id]","Inbox UUID or inbox email address").addHelpText("after",c({output:' {"object":"inbox","id":"<uuid>","name":"<name>","email_address":"<address>","domain_id":"<uuid>","receiving_address":"<address>|null","from_name":"<name>|null","unread":0,"drafts":0,"last_received":"<date>|null","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend inboxes get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json","resend inboxes get support@yourdomain.com --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,H,i);await B({loading:"Fetching inbox...",sdkCall:n=>n.inboxes.get(r),onInteractive:n=>{console.log(`${n.email_address}`),console.log(`ID: ${n.id}`),console.log(`Name: ${n.name}`),n.from_name&&console.log(`From name: ${n.from_name}`),n.receiving_address&&console.log(`Receiving address: ${n.receiving_address}`),console.log(`Unread: ${n.unread}`),console.log(`Drafts: ${n.drafts}`),n.last_received&&console.log(`Last received: ${n.last_received}`)}},i)});var $c=new d("create").description("Create a label in an inbox").option("--inbox_id <id>","Inbox UUID").option("--name <name>","Label name (required, max 64 characters)").addOption(new q("--color <color>","Label color (random when omitted)").choices(Wo)).addHelpText("after",c({context:`An inbox can have up to 100 labels.
743
747
 
744
- Non-interactive: --name is required.`,output:' {"object":"inbox_label","id":"<uuid>","name":"<name>","color":"<color>","created_at":"<date>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend inboxes labels create --inbox_id <inbox_id> --name "Billing"','resend inboxes labels create --inbox_id <inbox_id> --name "Urgent" --color crimson --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await E(e.name,{message:"Label name",placeholder:"e.g. Billing"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating label...",sdkCall:n=>n.inboxes.labels.create({inboxId:i,name:r,...e.color&&{color:e.color}}),onInteractive:n=>{console.log(`Label created: ${n.id}`),console.log(`Name: ${n.name} (${n.color})`)}},o)});function Ki(e){return{resource:"label",resourcePlural:"labels",fetchItems:t=>t.inboxes.labels.list({inboxId:e}).then(o=>({...o,data:o.data?{data:o.data.data,has_more:!1}:null})),display:t=>({label:t.name,hint:t.id})}}function Id(e){let t=e.map(o=>[o.name,o.color,o.created_at,o.id]);return _(["Name","Color","Created","ID"],t,"(no labels)")}var jd=new c("delete").alias("rm").description("Delete a label").option("--inbox_id <id>","Inbox UUID").option("--label_id <id>","Label UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`The label is removed from every thread that has it. Threads themselves are
748
+ Non-interactive: --name is required.`,output:' {"object":"inbox_label","id":"<uuid>","name":"<name>","color":"<color>","created_at":"<date>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend inboxes labels create --inbox_id <inbox_id> --name "Billing"','resend inboxes labels create --inbox_id <inbox_id> --name "Urgent" --color crimson --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await E(e.name,{message:"Label name",placeholder:"e.g. Billing"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating label...",sdkCall:n=>n.inboxes.labels.create({inboxId:i,name:r,...e.color&&{color:e.color}}),onInteractive:n=>{console.log(`Label created: ${n.id}`),console.log(`Name: ${n.name} (${n.color})`)}},o)});function ki(e){return{resource:"label",resourcePlural:"labels",fetchItems:t=>t.inboxes.labels.list({inboxId:e}).then(o=>({...o,data:o.data?{data:o.data.data,has_more:!1}:null})),display:t=>({label:t.name,hint:t.id})}}function Gc(e){let t=e.map(o=>[o.name,o.color,o.created_at,o.id]);return _(["Name","Color","Created","ID"],t,"(no labels)")}var Hc=new d("delete").alias("rm").description("Delete a label").option("--inbox_id <id>","Inbox UUID").option("--label_id <id>","Label UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`The label is removed from every thread that has it. Threads themselves are
745
749
  not deleted.
746
750
 
747
- Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"inbox_label","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes labels delete --inbox_id <inbox_id> --label_id <label_id> --yes","resend inboxes labels delete --inbox_id <inbox_id> --label_id <label_id> --yes --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await J(e.label_id,Ki(i),o);await z(r.id,!!e.yes,{confirmMessage:`Delete label "${r.label}"?
751
+ Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"inbox_label","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes labels delete --inbox_id <inbox_id> --label_id <label_id> --yes","resend inboxes labels delete --inbox_id <inbox_id> --label_id <label_id> --yes --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await J(e.label_id,ki(i),o);await z(r.id,!!e.yes,{confirmMessage:`Delete label "${r.label}"?
748
752
  ID: ${r.id}
749
- It will be removed from every thread that has it.`,loading:"Deleting label...",object:"inbox_label",successMsg:"Label deleted",sdkCall:n=>n.inboxes.labels.remove({inboxId:i,labelId:r.id})},o)});var Pd=new c("list").alias("ls").description("List labels in an inbox").option("--inbox_id <id>","Inbox UUID").addHelpText("after",d({context:'Returns all labels in the inbox (not paginated). Use the label IDs with "threads update --label_id" and "threads list --label".',output:' {"object":"list","data":[{"id":"<uuid>","name":"<name>","color":"cyan|teal|grass|lime|yellow|orange|iris|plum|crimson|bronze|mauve","created_at":"<date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend inboxes labels list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes labels list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o);await S({loading:"Fetching labels...",sdkCall:r=>r.inboxes.labels.list({inboxId:i}),onInteractive:r=>console.log(Id(r.data))},o)});var $d=new c("update").description("Update a label's name or color").option("--inbox_id <id>","Inbox UUID").option("--label_id <id>","Label UUID").option("--name <name>","New label name (max 64 characters)").addOption(new q("--color <color>","New label color").choices(Lo)).addHelpText("after",d({context:"At least one of --name or --color must be provided.",output:' {"object":"inbox_label","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend inboxes labels update --inbox_id <inbox_id> --label_id <label_id> --name "Billing"',"resend inboxes labels update --inbox_id <inbox_id> --label_id <label_id> --color teal --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals();!e.name&&!e.color&&h({message:"Provide at least one option to update: --name or --color.",code:"no_changes"},{json:o.json});let i=await g(e.inbox_id,M,o),r=await g(e.label_id,Ki(i),o);await R({loading:"Updating label...",sdkCall:n=>n.inboxes.labels.update({inboxId:i,labelId:r,...e.name&&{name:e.name},...e.color&&{color:e.color}}),errorCode:"update_error",successMsg:`Label updated: ${r}`},o)});var Gd=new c("labels").description("Manage labels for organizing threads in an inbox").addHelpText("after",d({context:`Labels organize threads within an inbox. Apply one with
753
+ It will be removed from every thread that has it.`,loading:"Deleting label...",object:"inbox_label",successMsg:"Label deleted",sdkCall:n=>n.inboxes.labels.remove({inboxId:i,labelId:r.id})},o)});var Qc=new d("list").alias("ls").description("List labels in an inbox").option("--inbox_id <id>","Inbox UUID").addHelpText("after",c({context:'Returns all labels in the inbox (not paginated). Use the label IDs with "threads update --label_id" and "threads list --label".',output:' {"object":"list","data":[{"id":"<uuid>","name":"<name>","color":"cyan|teal|grass|lime|yellow|orange|iris|plum|crimson|bronze|mauve","created_at":"<date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend inboxes labels list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes labels list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o);await S({loading:"Fetching labels...",sdkCall:r=>r.inboxes.labels.list({inboxId:i}),onInteractive:r=>console.log(Gc(r.data))},o)});var Nc=new d("update").description("Update a label's name or color").option("--inbox_id <id>","Inbox UUID").option("--label_id <id>","Label UUID").option("--name <name>","New label name (max 64 characters)").addOption(new q("--color <color>","New label color").choices(Wo)).addHelpText("after",c({context:"At least one of --name or --color must be provided.",output:' {"object":"inbox_label","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend inboxes labels update --inbox_id <inbox_id> --label_id <label_id> --name "Billing"',"resend inboxes labels update --inbox_id <inbox_id> --label_id <label_id> --color teal --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals();!e.name&&!e.color&&h({message:"Provide at least one option to update: --name or --color.",code:"no_changes"},{json:o.json});let i=await g(e.inbox_id,H,o),r=await g(e.label_id,ki(i),o);await F({loading:"Updating label...",sdkCall:n=>n.inboxes.labels.update({inboxId:i,labelId:r,...e.name&&{name:e.name},...e.color&&{color:e.color}}),errorCode:"update_error",successMsg:`Label updated: ${r}`},o)});var Mc=new d("labels").description("Manage labels for organizing threads in an inbox").addHelpText("after",c({context:`Labels organize threads within an inbox. Apply one with
750
754
  "resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --label_id <label_id>" and
751
- filter with "resend inboxes threads list --inbox_id <inbox_id> --label <label_id>".`,examples:["resend inboxes labels list --inbox_id <inbox_id>",'resend inboxes labels create --inbox_id <inbox_id> --name "Billing" --color teal',"resend inboxes labels delete --inbox_id <inbox_id> --label_id <label_id> --yes"]})).addCommand(Pd,{isDefault:!0}).addCommand(Bd).addCommand($d).addCommand(jd);var Hd=new c("list").alias("ls").description("List all inboxes").option("--limit <n>","Maximum number of inboxes to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","name":"<name>|null","email_address":"<address>","from_name":"<name>|null","unread":0,"last_received":"<date>|null"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend inboxes list","resend inboxes list --json","resend inboxes list --limit 25 --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching inboxes...",sdkCall:n=>n.inboxes.list(r),onInteractive:n=>{console.log(Ud(n.data)),T(n,"inboxes list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});function Ee(e){return{resource:"thread",resourcePlural:"threads",fetchItems:(t,{limit:o,after:i})=>t.inboxes.threads.list({inboxId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.subject??"(no subject)",hint:t.id})}}function Qd(e){let t=e.map(o=>[o.from??"",o.subject??"(no subject)",o.read?"yes":"no",String(o.message_count),o.received_at,o.id]);return _(["From","Subject","Read","Msgs","Received","ID"],t,"(no threads)")}function Nd(e){let t=e.map(o=>[o.direction,o.from,o.subject??"(no subject)",o.received_at,o.id]);return _(["Direction","From","Subject","Received","ID"],t,"(no emails)")}var Md=new c("delete").alias("rm").description("Delete a thread and all of its messages").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"inbox_thread","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes threads delete --inbox_id <inbox_id> --thread_id <thread_id> --yes","resend inboxes threads delete --inbox_id <inbox_id> --thread_id <thread_id> --yes --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await J(e.thread_id,Ee(i),o);await z(r.id,!!e.yes,{confirmMessage:`Delete thread "${r.label}"?
755
+ filter with "resend inboxes threads list --inbox_id <inbox_id> --label <label_id>".`,examples:["resend inboxes labels list --inbox_id <inbox_id>",'resend inboxes labels create --inbox_id <inbox_id> --name "Billing" --color teal',"resend inboxes labels delete --inbox_id <inbox_id> --label_id <label_id> --yes"]})).addCommand(Qc,{isDefault:!0}).addCommand($c).addCommand(Nc).addCommand(Hc);var qc=new d("list").alias("ls").description("List all inboxes").option("--limit <n>","Maximum number of inboxes to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","name":"<name>|null","email_address":"<address>","from_name":"<name>|null","unread":0,"last_received":"<date>|null"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend inboxes list","resend inboxes list --json","resend inboxes list --limit 25 --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching inboxes...",sdkCall:n=>n.inboxes.list(r),onInteractive:n=>{console.log(Uc(n.data)),T(n,"inboxes list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});function Ee(e){return{resource:"thread",resourcePlural:"threads",fetchItems:(t,{limit:o,after:i})=>t.inboxes.threads.list({inboxId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.subject??"(no subject)",hint:t.id})}}function Lc(e){let t=e.map(o=>[o.from??"",o.subject??"(no subject)",o.read?"yes":"no",String(o.message_count),o.received_at,o.id]);return _(["From","Subject","Read","Msgs","Received","ID"],t,"(no threads)")}function Wc(e){let t=e.map(o=>[o.direction,o.from,o.subject??"(no subject)",o.received_at,o.id]);return _(["Direction","From","Subject","Received","ID"],t,"(no emails)")}var Jc=new d("delete").alias("rm").description("Delete a thread and all of its messages").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"inbox_thread","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend inboxes threads delete --inbox_id <inbox_id> --thread_id <thread_id> --yes","resend inboxes threads delete --inbox_id <inbox_id> --thread_id <thread_id> --yes --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await J(e.thread_id,Ee(i),o);await z(r.id,!!e.yes,{confirmMessage:`Delete thread "${r.label}"?
752
756
  ID: ${r.id}
753
- All messages in this thread will be removed.`,loading:"Deleting thread...",object:"inbox_thread",successMsg:"Thread deleted",sdkCall:n=>n.inboxes.threads.remove({inboxId:i,threadId:r.id})},o)});var Vr=(e,t)=>[...t,e],qd=new c("forward").description("Forward an email in a thread to other recipients").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--email_id <id>",'Email UUID to forward (from "threads emails list")').option("--to <address>","Recipient address (repeat the flag for multiple recipients)",Vr,[]).option("--cc <address>","Cc address (repeat the flag for multiple addresses)",Vr,[]).option("--bcc <address>","Bcc address (repeat the flag for multiple addresses)",Vr,[]).option("--text <text>","Plain text note to include with the forward").option("--html <html>","HTML note to include with the forward").option("--subject <subject>","Override the forwarded subject").addHelpText("after",d({context:`Forwards the email from the inbox address. --to is required; --text/--html add an optional note.
754
- --to, --cc, and --bcc combined cannot exceed 50 recipients.`,output:' {"id":"<uuid>","email_id":"<uuid>","direction":"outbound","from":"<inbox-address>","to":["<recipient>"],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[],"read":true,"received_at":"<date>"}',errorCodes:["auth_error","missing_id","missing_to","create_error"],examples:["resend inboxes threads emails forward --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --to teammate@example.com",'resend inboxes threads emails forward --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --to a@x.com --to b@x.com --cc c@x.com --text "FYI" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.to.length===0&&h({message:"Provide at least one recipient with --to.",code:"missing_to"},{json:o.json});let i=await g(e.inbox_id,M,o),r=await g(e.thread_id,Ee(i),o),n=await E(e.email_id,{message:"Email ID to forward",placeholder:'from "threads emails list"'},{message:"Missing --email_id flag.",code:"missing_id"},o);await P({loading:"Forwarding email...",sdkCall:s=>s.inboxes.threads.emails.forward({inboxId:i,threadId:r,emailId:n,to:e.to,...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.text&&{text:e.text},...e.html&&{html:e.html},...e.subject&&{subject:e.subject}}),onInteractive:s=>{console.log(`Email forwarded: ${s.email_id}`),console.log(`To: ${s.to.join(", ")}`)}},o)});var Ld=new c("get").description("Retrieve a single email from a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--email_id <id>",'Email UUID (from "threads emails list")').addHelpText("after",d({output:' {"id":"<uuid>","direction":"inbound|outbound","from":"<sender>","to":[],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[{"id":"<id>","filename":"<name>|null","size":123|null}],"read":true,"received_at":"<date>"}',errorCodes:["auth_error","missing_id","fetch_error"],examples:["resend inboxes threads emails get --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id>","resend inboxes threads emails get --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await g(e.thread_id,Ee(i),o),n=await E(e.email_id,{message:"Email ID",placeholder:'from "threads emails list"'},{message:"Missing --email_id flag.",code:"missing_id"},o);await j({loading:"Fetching email...",sdkCall:s=>s.inboxes.threads.emails.get({inboxId:i,threadId:r,emailId:n}),onInteractive:s=>{console.log(`${s.subject??"(no subject)"}`),console.log(`ID: ${s.id}`),console.log(`[${s.direction}] ${s.from} \xB7 ${s.received_at}`),console.log(`To: ${s.to.join(", ")}`),s.attachments.length>0&&console.log(`Attachments: ${s.attachments.map(a=>a.filename??a.id).join(", ")}`),console.log(""),console.log(s.text??s.html??"(no body)")}},o)});var Wd=new c("list").alias("ls").description("List the emails in a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list emails after this email ID").option("--before <cursor>","Cursor for backward pagination \u2014 list emails before this email ID").addHelpText("after",d({context:`Emails are ordered oldest first and include their html and text bodies.
755
- Pass the last email ID of the previous page as --after to fetch the next page.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","direction":"inbound|outbound","from":"<sender>","to":[],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[],"read":true,"received_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id> --json","resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id> --limit 25 --after <email_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o),n=await g(e.inbox_id,M,o),s=await g(e.thread_id,Ee(n),o);await S({loading:"Fetching emails...",sdkCall:a=>a.inboxes.threads.emails.list({inboxId:n,threadId:s,...r}),onInteractive:a=>{console.log(Nd(a.data)),T(a,"inboxes threads emails list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,extraFlags:`--inbox_id ${n} --thread_id ${s}`})}},o)});var Jd=(e,t)=>[...t,e],Vd=new c("reply").description("Reply to an email in a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--email_id <id>",'Email UUID to reply to (from "threads emails list")').option("--cc <address>","Cc address (repeat the flag for multiple addresses)",Jd,[]).option("--bcc <address>","Bcc address (repeat the flag for multiple addresses)",Jd,[]).option("--text <text>","Plain text body of the reply").option("--html <html>","HTML body of the reply").option("--subject <subject>","Override the reply subject").addHelpText("after",d({context:`Sends the reply from the inbox address. The recipient comes from the original email.
757
+ All messages in this thread will be removed.`,loading:"Deleting thread...",object:"inbox_thread",successMsg:"Thread deleted",sdkCall:n=>n.inboxes.threads.remove({inboxId:i,threadId:r.id})},o)});var zr=(e,t)=>[...t,e],Vc=new d("forward").description("Forward an email in a thread to other recipients").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--email_id <id>",'Email UUID to forward (from "threads emails list")').option("--to <address>","Recipient address (repeat the flag for multiple recipients)",zr,[]).option("--cc <address>","Cc address (repeat the flag for multiple addresses)",zr,[]).option("--bcc <address>","Bcc address (repeat the flag for multiple addresses)",zr,[]).option("--text <text>","Plain text note to include with the forward").option("--html <html>","HTML note to include with the forward").option("--subject <subject>","Override the forwarded subject").option("--idempotency-key <key>","Deduplicate this send request using this key").addHelpText("after",c({context:`Forwards the email from the inbox address. --to is required; --text/--html add an optional note.
758
+ --to, --cc, and --bcc combined cannot exceed 50 recipients.`,output:' {"id":"<uuid>","email_id":"<uuid>","direction":"outbound","from":"<inbox-address>","to":["<recipient>"],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[],"read":true,"received_at":"<date>"}',errorCodes:["auth_error","missing_id","missing_to","create_error"],examples:["resend inboxes threads emails forward --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --to teammate@example.com",'resend inboxes threads emails forward --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --to a@x.com --to b@x.com --cc c@x.com --text "FYI" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.to.length===0&&h({message:"Provide at least one recipient with --to.",code:"missing_to"},{json:o.json});let i=await g(e.inbox_id,H,o),r=await g(e.thread_id,Ee(i),o),n=await E(e.email_id,{message:"Email ID to forward",placeholder:'from "threads emails list"'},{message:"Missing --email_id flag.",code:"missing_id"},o);await P({loading:"Forwarding email...",sdkCall:s=>s.inboxes.threads.emails.forward({inboxId:i,threadId:r,emailId:n,to:e.to,...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.text&&{text:e.text},...e.html&&{html:e.html},...e.subject&&{subject:e.subject}},e.idempotencyKey?{idempotencyKey:e.idempotencyKey}:void 0),onInteractive:s=>{console.log(`Email forwarded: ${s.email_id}`),console.log(`To: ${s.to.join(", ")}`)}},o)});var zc=new d("get").description("Retrieve a single email from a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--email_id <id>",'Email UUID (from "threads emails list")').addHelpText("after",c({output:' {"id":"<uuid>","direction":"inbound|outbound","from":"<sender>","to":[],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[{"id":"<id>","filename":"<name>|null","size":123|null}],"read":true,"received_at":"<date>"}',errorCodes:["auth_error","missing_id","fetch_error"],examples:["resend inboxes threads emails get --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id>","resend inboxes threads emails get --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await g(e.thread_id,Ee(i),o),n=await E(e.email_id,{message:"Email ID",placeholder:'from "threads emails list"'},{message:"Missing --email_id flag.",code:"missing_id"},o);await B({loading:"Fetching email...",sdkCall:s=>s.inboxes.threads.emails.get({inboxId:i,threadId:r,emailId:n}),onInteractive:s=>{console.log(`${s.subject??"(no subject)"}`),console.log(`ID: ${s.id}`),console.log(`[${s.direction}] ${s.from} \xB7 ${s.received_at}`),console.log(`To: ${s.to.join(", ")}`),s.attachments.length>0&&console.log(`Attachments: ${s.attachments.map(a=>a.filename??a.id).join(", ")}`),console.log(""),console.log(s.text??s.html??"(no body)")}},o)});var Yc=new d("list").alias("ls").description("List the emails in a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list emails after this email ID").option("--before <cursor>","Cursor for backward pagination \u2014 list emails before this email ID").addHelpText("after",c({context:`Emails are ordered oldest first and include their html and text bodies.
759
+ Pass the last email ID of the previous page as --after to fetch the next page.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","direction":"inbound|outbound","from":"<sender>","to":[],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[],"read":true,"received_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id> --json","resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id> --limit 25 --after <email_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o),n=await g(e.inbox_id,H,o),s=await g(e.thread_id,Ee(n),o);await S({loading:"Fetching emails...",sdkCall:a=>a.inboxes.threads.emails.list({inboxId:n,threadId:s,...r}),onInteractive:a=>{console.log(Wc(a.data)),T(a,"inboxes threads emails list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,extraFlags:`--inbox_id ${n} --thread_id ${s}`})}},o)});var Xc=(e,t)=>[...t,e],Zc=new d("reply").description("Reply to an email in a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--email_id <id>",'Email UUID to reply to (from "threads emails list")').option("--cc <address>","Cc address (repeat the flag for multiple addresses)",Xc,[]).option("--bcc <address>","Bcc address (repeat the flag for multiple addresses)",Xc,[]).option("--text <text>","Plain text body of the reply").option("--html <html>","HTML body of the reply").option("--subject <subject>","Override the reply subject").option("--idempotency-key <key>","Deduplicate this send request using this key").addHelpText("after",c({context:`Sends the reply from the inbox address. The recipient comes from the original email.
756
760
  At least one of --text or --html is required.
757
761
  --cc and --bcc are not copied from the original email; pass them to add recipients.
758
- The total number of recipients cannot exceed 50.`,output:' {"id":"<uuid>","email_id":"<uuid>","direction":"outbound","from":"<inbox-address>","to":["<recipient>"],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[],"read":true,"received_at":"<date>"}',errorCodes:["auth_error","missing_id","missing_content","create_error"],examples:['resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "On it \u2014 reply to follow."','resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --html "<p>Done!</p>" --json','resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "Looping in finance." --cc finance@example.com']})).action(async(e,t)=>{let o=t.optsWithGlobals(),{text:i,html:r}=e;!i&&!r&&h({message:"Provide --text or --html for the reply body.",code:"missing_content"},{json:o.json});let n=await g(e.inbox_id,M,o),s=await g(e.thread_id,Ee(n),o),a=await E(e.email_id,{message:"Email ID to reply to",placeholder:'from "threads emails list"'},{message:"Missing --email_id flag.",code:"missing_id"},o),l=i?{text:i,...r&&{html:r}}:{html:r};await P({loading:"Sending reply...",sdkCall:u=>u.inboxes.threads.emails.reply({inboxId:n,threadId:s,emailId:a,...l,...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.subject&&{subject:e.subject}}),onInteractive:u=>{console.log(`Reply sent: ${u.email_id}`),console.log(`To: ${u.to.join(", ")}`)}},o)});var zd=new c("emails").description("Work with individual emails in a thread").addHelpText("after",d({context:'Email IDs come from "resend inboxes threads emails list", which lists the messages in a thread.',examples:["resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads emails get --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id>",'resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "Thanks!"',"resend inboxes threads emails forward --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --to teammate@example.com"]})).addCommand(Wd,{isDefault:!0}).addCommand(Ld).addCommand(Vd).addCommand(qd);var Yd=new c("get").description("Retrieve a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").addHelpText("after",d({context:'Returns the thread summary. To read its messages, use "resend inboxes threads emails list".',output:' {"object":"inbox_thread","id":"<uuid>","subject":"<subject>|null","folder":"inbox|archive|spam|sent|trash","labels":[],"read":true}',errorCodes:["auth_error","fetch_error"],examples:["resend inboxes threads get --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --thread_id 3deaccfa-f572-443c-be6f-92b74f9d5c48","resend inboxes threads get --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --thread_id 3deaccfa-f572-443c-be6f-92b74f9d5c48 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,M,o),r=await g(e.thread_id,Ee(i),o);await j({loading:"Fetching thread...",sdkCall:n=>n.inboxes.threads.get({inboxId:i,threadId:r}),onInteractive:n=>{console.log(`${n.subject??"(no subject)"}`),console.log(`ID: ${n.id}`),console.log(`Folder: ${n.folder}`),n.labels.length>0&&console.log(`Labels: ${n.labels.map(s=>s.name).join(", ")}`),console.log(`Read: ${n.read?"yes":"no"}`)}},o)});var wg=(e,t)=>[...t,e],Xd=new c("list").alias("ls").description("List threads in an inbox").option("--inbox_id <id>","Inbox UUID").addOption(new q("--folder <folder>","Folder to list (default: inbox)").choices(ks)).option("--query <text>","Case-insensitive match against thread subjects and label names").option("--label <label_id>","Filter by label UUID (repeat the flag for multiple labels)",wg,[]).option("--limit <n>","Maximum number of threads to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list threads after this thread ID").option("--before <cursor>","Cursor for backward pagination \u2014 list threads before this thread ID").addHelpText("after",d({context:`Threads are ordered by newest activity first. Pass the last thread ID of the
762
+ The total number of recipients cannot exceed 50.`,output:' {"id":"<uuid>","email_id":"<uuid>","direction":"outbound","from":"<inbox-address>","to":["<recipient>"],"cc":[],"bcc":[],"reply_to":[],"subject":"<subject>|null","message_id":"<message-id>|null","html":"<html>|null","text":"<text>|null","attachments":[],"read":true,"received_at":"<date>"}',errorCodes:["auth_error","missing_id","missing_content","create_error"],examples:['resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "On it \u2014 reply to follow."','resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --html "<p>Done!</p>" --json','resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "Looping in finance." --cc finance@example.com']})).action(async(e,t)=>{let o=t.optsWithGlobals(),{text:i,html:r}=e;!i&&!r&&h({message:"Provide --text or --html for the reply body.",code:"missing_content"},{json:o.json});let n=await g(e.inbox_id,H,o),s=await g(e.thread_id,Ee(n),o),a=await E(e.email_id,{message:"Email ID to reply to",placeholder:'from "threads emails list"'},{message:"Missing --email_id flag.",code:"missing_id"},o),l=i?{text:i,...r&&{html:r}}:{html:r};await P({loading:"Sending reply...",sdkCall:u=>u.inboxes.threads.emails.reply({inboxId:n,threadId:s,emailId:a,...l,...e.cc.length>0&&{cc:e.cc},...e.bcc.length>0&&{bcc:e.bcc},...e.subject&&{subject:e.subject}},e.idempotencyKey?{idempotencyKey:e.idempotencyKey}:void 0),onInteractive:u=>{console.log(`Reply sent: ${u.email_id}`),console.log(`To: ${u.to.join(", ")}`)}},o)});var eu=new d("emails").description("Work with individual emails in a thread").addHelpText("after",c({context:'Email IDs come from "resend inboxes threads emails list", which lists the messages in a thread.',examples:["resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads emails get --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id>",'resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "Thanks!"',"resend inboxes threads emails forward --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --to teammate@example.com"]})).addCommand(Yc,{isDefault:!0}).addCommand(zc).addCommand(Zc).addCommand(Vc);var tu=new d("get").description("Retrieve a thread").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").addHelpText("after",c({context:'Returns the thread summary. To read its messages, use "resend inboxes threads emails list".',output:' {"object":"inbox_thread","id":"<uuid>","subject":"<subject>|null","folder":"inbox|archive|spam|sent|trash","labels":[],"read":true}',errorCodes:["auth_error","fetch_error"],examples:["resend inboxes threads get --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --thread_id 3deaccfa-f572-443c-be6f-92b74f9d5c48","resend inboxes threads get --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --thread_id 3deaccfa-f572-443c-be6f-92b74f9d5c48 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await g(e.inbox_id,H,o),r=await g(e.thread_id,Ee(i),o);await B({loading:"Fetching thread...",sdkCall:n=>n.inboxes.threads.get({inboxId:i,threadId:r}),onInteractive:n=>{console.log(`${n.subject??"(no subject)"}`),console.log(`ID: ${n.id}`),console.log(`Folder: ${n.folder}`),n.labels.length>0&&console.log(`Labels: ${n.labels.map(s=>s.name).join(", ")}`),console.log(`Read: ${n.read?"yes":"no"}`)}},o)});var kg=(e,t)=>[...t,e],ou=new d("list").alias("ls").description("List threads in an inbox").option("--inbox_id <id>","Inbox UUID").addOption(new q("--folder <folder>","Folder to list (default: inbox)").choices(_s)).option("--query <text>","Case-insensitive match against thread subjects and label names").option("--label <label_id>","Filter by label UUID (repeat the flag for multiple labels)",kg,[]).option("--limit <n>","Maximum number of threads to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list threads after this thread ID").option("--before <cursor>","Cursor for backward pagination \u2014 list threads before this thread ID").addHelpText("after",c({context:`Threads are ordered by newest activity first. Pass the last thread ID of the
759
763
  previous page as --after to fetch the next page.
760
764
 
761
- --label takes label UUIDs (from "resend inboxes labels list"), not label names.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","subject":"<subject>|null","from":"<sender>|null","to":[],"cc":[],"bcc":[],"labels":[],"message_count":1,"has_attachment":false,"has_draft":false,"read":false,"received_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --folder archive --json","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --query billing --json","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --after <thread_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o),n=await g(e.inbox_id,M,o);await S({loading:"Fetching threads...",sdkCall:s=>s.inboxes.threads.list({inboxId:n,...e.folder&&{folder:e.folder},...e.query&&{query:e.query},...e.label.length>0&&{label:e.label},...r}),onInteractive:s=>{console.log(Qd(s.data)),T(s,"inboxes threads list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,extraFlags:[`--inbox_id ${n}`,e.folder&&`--folder ${e.folder}`,e.query&&`--query ${e.query}`,...e.label.map(a=>`--label ${a}`)].filter(Boolean).join(" ")})}},o)});var Zd=new c("update").description("Mark a thread read or unread, move it, or apply a label").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--read","Mark every message in the thread as read").option("--unread","Mark every message in the thread as unread").addOption(new q("--folder <folder>","Move the thread to a folder").choices(_s)).option("--label_id <label_id>","Apply this label (UUID) to the thread").addHelpText("after",d({context:`At least one of --read/--unread, --folder, or --label_id is required.
762
- Threads cannot be moved to "sent".`,output:' {"object":"inbox_thread","id":"<uuid>","subject":"<subject>|null","folder":"inbox|archive|spam|sent|trash","labels":[],"read":true}',errorCodes:["auth_error","invalid_options","no_changes","update_error"],examples:["resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --read","resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --folder archive --json","resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --label_id <label_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals();e.read&&e.unread&&h({message:"Use either --read or --unread, not both.",code:"invalid_options"},{json:o.json});let i=e.read?!0:e.unread?!1:void 0;i===void 0&&!e.folder&&!e.label_id&&h({message:"Provide at least one option to update: --read/--unread, --folder, or --label_id.",code:"no_changes"},{json:o.json});let r=await g(e.inbox_id,M,o),n=await g(e.thread_id,Ee(r),o),s={inboxId:r,threadId:n,...i!==void 0&&{read:i},...e.folder&&{folder:e.folder},...e.label_id&&{labelId:e.label_id}};await R({loading:"Updating thread...",sdkCall:a=>a.inboxes.threads.update(s),errorCode:"update_error",successMsg:`Thread updated: ${n}`},o)});var eu=new c("threads").description("Browse and reply to email threads in an inbox").addHelpText("after",d({context:`Received messages are grouped into threads. "list" shows threads in a folder,
765
+ --label takes label UUIDs (from "resend inboxes labels list"), not label names.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","subject":"<subject>|null","from":"<sender>|null","to":[],"cc":[],"bcc":[],"labels":[],"message_count":1,"has_attachment":false,"has_draft":false,"read":false,"received_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","invalid_pagination","list_error"],examples:["resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --folder archive --json","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --query billing --json","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --after <thread_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o),n=await g(e.inbox_id,H,o);await S({loading:"Fetching threads...",sdkCall:s=>s.inboxes.threads.list({inboxId:n,...e.folder&&{folder:e.folder},...e.query&&{query:e.query},...e.label.length>0&&{label:e.label},...r}),onInteractive:s=>{console.log(Lc(s.data)),T(s,"inboxes threads list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,extraFlags:[`--inbox_id ${n}`,e.folder&&`--folder ${e.folder}`,e.query&&`--query ${e.query}`,...e.label.map(a=>`--label ${a}`)].filter(Boolean).join(" ")})}},o)});var iu=new d("update").description("Mark a thread read or unread, move it, or apply a label").option("--inbox_id <id>","Inbox UUID").option("--thread_id <id>","Thread UUID").option("--read","Mark every message in the thread as read").option("--unread","Mark every message in the thread as unread").addOption(new q("--folder <folder>","Move the thread to a folder").choices(Fs)).option("--label_id <label_id>","Apply this label (UUID) to the thread").addHelpText("after",c({context:`At least one of --read/--unread, --folder, or --label_id is required.
766
+ Threads cannot be moved to "sent".`,output:' {"object":"inbox_thread","id":"<uuid>","subject":"<subject>|null","folder":"inbox|archive|spam|sent|trash","labels":[],"read":true}',errorCodes:["auth_error","invalid_options","no_changes","update_error"],examples:["resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --read","resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --folder archive --json","resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --label_id <label_id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals();e.read&&e.unread&&h({message:"Use either --read or --unread, not both.",code:"invalid_options"},{json:o.json});let i=e.read?!0:e.unread?!1:void 0;i===void 0&&!e.folder&&!e.label_id&&h({message:"Provide at least one option to update: --read/--unread, --folder, or --label_id.",code:"no_changes"},{json:o.json});let r=await g(e.inbox_id,H,o),n=await g(e.thread_id,Ee(r),o),s={inboxId:r,threadId:n,...i!==void 0&&{read:i},...e.folder&&{folder:e.folder},...e.label_id&&{labelId:e.label_id}};await F({loading:"Updating thread...",sdkCall:a=>a.inboxes.threads.update(s),errorCode:"update_error",successMsg:`Thread updated: ${n}`},o)});var ru=new d("threads").description("Browse and reply to email threads in an inbox").addHelpText("after",c({context:`Received messages are grouped into threads. "list" shows threads in a folder,
763
767
  "get" returns one thread's summary, "update" marks read/unread, moves, or
764
- labels a thread, and "emails" lists and works with the messages in a thread.`,examples:["resend inboxes threads list --inbox_id <inbox_id>","resend inboxes threads get --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --read",'resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "Thanks!"']})).addCommand(Xd,{isDefault:!0}).addCommand(Yd).addCommand(Zd).addCommand(Md).addCommand(zd);var tu=new c("update").description("Update an inbox's name or from name").argument("[id]","Inbox UUID").option("--name <name>","New inbox name").option("--from_name <name>",'New name used when sending from this inbox, e.g. "Ada from Support" (a plain name, not "Name <email>")').addHelpText("after",d({context:`At least one of --name or --from_name is required.
768
+ labels a thread, and "emails" lists and works with the messages in a thread.`,examples:["resend inboxes threads list --inbox_id <inbox_id>","resend inboxes threads get --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads emails list --inbox_id <inbox_id> --thread_id <thread_id>","resend inboxes threads update --inbox_id <inbox_id> --thread_id <thread_id> --read",'resend inboxes threads emails reply --inbox_id <inbox_id> --thread_id <thread_id> --email_id <email_id> --text "Thanks!"']})).addCommand(ou,{isDefault:!0}).addCommand(tu).addCommand(iu).addCommand(Jc).addCommand(eu);var nu=new d("update").description("Update an inbox's name or from name").argument("[id]","Inbox UUID").option("--name <name>","New inbox name").option("--from_name <name>",'New name used when sending from this inbox, e.g. "Ada from Support" (a plain name, not "Name <email>")').addHelpText("after",c({context:`At least one of --name or --from_name is required.
765
769
  Pass --from_name "" to clear the from name.
766
770
 
767
771
  Note: the email address cannot be changed after creation.
768
- To use a different address, create a new inbox.`,output:' {"object":"inbox","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend inboxes update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Support"','resend inboxes update 78261eea-8f8b-4381-83c6-79fa7120f1cf --from_name "Ada from Support" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,M,i);!t.name&&t.from_name===void 0&&h({message:"Provide at least one option to update: --name or --from_name.",code:"no_changes"},{json:i.json});let n={...t.name&&{name:t.name},...t.from_name!==void 0&&{fromName:t.from_name}};await R({loading:"Updating inbox...",sdkCall:s=>s.inboxes.update(r,n),errorCode:"update_error",successMsg:`Inbox updated: ${r}`},i)});var iu=new c("inboxes").description(`${ou.default.cyan("\u25CF beta")} \xB7 Manage inboxes \u2014 email addresses at your domains that send and receive mail (request access to enable)`).addHelpText("after",d({context:`Beta: this command requires inboxes to be enabled on your account.
772
+ To use a different address, create a new inbox.`,output:' {"object":"inbox","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend inboxes update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Support"','resend inboxes update 78261eea-8f8b-4381-83c6-79fa7120f1cf --from_name "Ada from Support" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,H,i);!t.name&&t.from_name===void 0&&h({message:"Provide at least one option to update: --name or --from_name.",code:"no_changes"},{json:i.json});let n={...t.name&&{name:t.name},...t.from_name!==void 0&&{fromName:t.from_name}};await F({loading:"Updating inbox...",sdkCall:s=>s.inboxes.update(r,n),errorCode:"update_error",successMsg:`Inbox updated: ${r}`},i)});var au=new d("inboxes").description(`${su.default.cyan("\u25CF beta")} \xB7 Manage inboxes \u2014 email addresses at your domains that send and receive mail (request access to enable)`).addHelpText("after",c({context:`Beta: this command requires inboxes to be enabled on your account.
769
773
  Not enabled yet? Reach out to Resend to join the beta. Calls return an API error until then.
770
774
 
771
775
  An inbox is an email address at one of your verified domains that sends and receives email.
772
776
  Received messages are grouped into threads inside the inbox.
773
777
 
774
- Inboxes require a full-access API key \u2014 sending-only keys are rejected.`,examples:["resend inboxes list","resend inboxes create --email_address support@yourdomain.com","resend inboxes get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend inboxes update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Support"',"resend inboxes delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(vd).addCommand(Ed).addCommand(Hd,{isDefault:!0}).addCommand(eu).addCommand(Gd).addCommand(Od).addCommand(tu).addCommand(Sd);function ru(e){let t=e.map(o=>[o.method,o.endpoint,String(o.response_status),o.created_at,o.id]);return _(["Method","Endpoint","Status","Created","ID"],t,"(no logs)")}var nu={resource:"log",resourcePlural:"logs",fetchItems:(e,{limit:t,after:o})=>e.logs.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.method} ${e.endpoint}`,hint:e.id})};var su=new c("get").description("Retrieve a single API request log with full request/response bodies").argument("[id]","Log ID").addHelpText("after",d({output:" Full log object including request_body and response_body.",errorCodes:["auth_error","fetch_error"],examples:["resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55","resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,nu,i);await j({loading:"Fetching log...",sdkCall:n=>n.logs.get(r),onInteractive:n=>{console.log(`${n.method} ${n.endpoint} \u2014 ${n.response_status}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),console.log(`User-Agent: ${n.user_agent??"(none)"}`),n.request_body&&console.log(`
778
+ Inboxes require a full-access API key \u2014 sending-only keys are rejected.`,examples:["resend inboxes list","resend inboxes create --email_address support@yourdomain.com","resend inboxes get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend inboxes threads list --inbox_id 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend inboxes update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Support"',"resend inboxes delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(_c).addCommand(Pc).addCommand(qc,{isDefault:!0}).addCommand(ru).addCommand(Mc).addCommand(jc).addCommand(kc).addCommand(nu).addCommand(Fc);function lu(e){let t=e.map(o=>[o.method,o.endpoint,String(o.response_status),o.created_at,o.id]);return _(["Method","Endpoint","Status","Created","ID"],t,"(no logs)")}var du={resource:"log",resourcePlural:"logs",fetchItems:(e,{limit:t,after:o})=>e.logs.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.method} ${e.endpoint}`,hint:e.id})};var cu=new d("get").description("Retrieve a single API request log with full request/response bodies").argument("[id]","Log ID").addHelpText("after",c({output:" Full log object including request_body and response_body.",errorCodes:["auth_error","fetch_error"],examples:["resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55","resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,du,i);await B({loading:"Fetching log...",sdkCall:n=>n.logs.get(r),onInteractive:n=>{console.log(`${n.method} ${n.endpoint} \u2014 ${n.response_status}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),console.log(`User-Agent: ${n.user_agent??"(none)"}`),n.request_body&&console.log(`
775
779
  Request Body:
776
780
  ${JSON.stringify(n.request_body,null,2)}`),n.response_body&&console.log(`
777
781
  Response Body:
778
- ${JSON.stringify(n.response_body,null,2)}`)}},i)});var au=new c("list").alias("ls").description("List API request logs").option("--limit <n>","Maximum number of logs to return (1-100)","10").option("--after <cursor>","Return logs after this cursor (next page)").option("--before <cursor>","Return logs before this cursor (previous page)").addHelpText("after",d({output:` {"object":"list","data":[...],"has_more":true}
779
- The list response does not include request/response bodies \u2014 use "resend logs get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend logs list","resend logs list --limit 25 --json","resend logs list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching logs...",sdkCall:n=>n.logs.list(r),onInteractive:n=>{console.log(ru(n.data)),T(n,"logs list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var lu=new c("open").description("Open a log or the logs list in the Resend dashboard").argument("[id]","Log ID \u2014 omit to open the logs list").addHelpText("after",d({context:`Opens the Resend dashboard in your default browser.
782
+ ${JSON.stringify(n.response_body,null,2)}`)}},i)});var uu=new d("list").alias("ls").description("List API request logs").option("--limit <n>","Maximum number of logs to return (1-100)","10").option("--after <cursor>","Return logs after this cursor (next page)").option("--before <cursor>","Return logs before this cursor (previous page)").addHelpText("after",c({output:` {"object":"list","data":[...],"has_more":true}
783
+ The list response does not include request/response bodies \u2014 use "resend logs get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend logs list","resend logs list --limit 25 --json","resend logs list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching logs...",sdkCall:n=>n.logs.list(r),onInteractive:n=>{console.log(lu(n.data)),T(n,"logs list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var mu=new d("open").description("Open a log or the logs list in the Resend dashboard").argument("[id]","Log ID \u2014 omit to open the logs list").addHelpText("after",c({context:`Opens the Resend dashboard in your default browser.
780
784
  With an ID: opens that log's detail page.
781
- Without an ID: opens the logs list.`,examples:["resend logs open","resend logs open 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55"]})).action(async(e,t,o)=>{let i=e?he.log(e):he.logs,r=o.optsWithGlobals();await Te(i,r)});var cu=new c("logs").description("View API request logs").addHelpText("after",d({examples:["resend logs list","resend logs list --limit 25 --json","resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55","resend logs open","resend logs open 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55"]})).addCommand(su).addCommand(au,{isDefault:!0}).addCommand(lu);var du={resource:"OAuth grant",resourcePlural:"OAuth grants",fetchItems:(e,{limit:t,after:o})=>e.oauthGrants.list({limit:t,...o&&{after:o}}),display:e=>({label:e.client.name,hint:e.id})};function uu(e){let t=e.map(o=>[o.client.name,o.id,o.scopes.join(", "),o.created_at,o.revoked_at??""]);return _(["Client","ID","Scopes","Created","Revoked"],t,"(no OAuth grants)")}var mu=new c("list").alias("ls").description("List OAuth grants for the team (both active and revoked), including each grant's client, scopes, and revocation status").option("--limit <n>","Maximum number of OAuth grants to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({output:` {"object":"list","has_more":false,"data":[{"id":"<id>","client_id":"<id>","scopes":["<scope>"],"created_at":"<date>","revoked_at":"<date>|null","revoked_reason":"<reason>|null","client":{"name":"<name>","logo_uri":"<url>|null"}}]}
782
- Revoked grants have non-null revoked_at and revoked_reason.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend oauth-grants list","resend oauth-grants list --limit 25 --json","resend oauth-grants list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching OAuth grants...",sdkCall:n=>n.oauthGrants.list(r),onInteractive:n=>{console.log(uu(n.data)),T(n,"oauth-grants list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var pu=new c("revoke").description("Revoke an OAuth grant \u2014 every access and refresh token issued under it stops working immediately").argument("[id]","OAuth grant ID").option("--yes","Skip confirmation prompt").addHelpText("after",d({context:`Non-interactive: --yes is required to confirm revocation when stdin/stdout is not a TTY.
785
+ Without an ID: opens the logs list.`,examples:["resend logs open","resend logs open 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55"]})).action(async(e,t,o)=>{let i=e?he.log(e):he.logs,r=o.optsWithGlobals();await Te(i,r)});var pu=new d("logs").description("View API request logs").addHelpText("after",c({examples:["resend logs list","resend logs list --limit 25 --json","resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55","resend logs open","resend logs open 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55"]})).addCommand(cu).addCommand(uu,{isDefault:!0}).addCommand(mu);var fu={resource:"OAuth grant",resourcePlural:"OAuth grants",fetchItems:(e,{limit:t,after:o})=>e.oauthGrants.list({limit:t,...o&&{after:o}}),display:e=>({label:e.client.name,hint:e.id})};function hu(e){let t=e.map(o=>[o.client.name,o.id,o.scopes.join(", "),o.created_at,o.revoked_at??""]);return _(["Client","ID","Scopes","Created","Revoked"],t,"(no OAuth grants)")}var gu=new d("list").alias("ls").description("List OAuth grants for the team (both active and revoked), including each grant's client, scopes, and revocation status").option("--limit <n>","Maximum number of OAuth grants to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({output:` {"object":"list","has_more":false,"data":[{"id":"<id>","client_id":"<id>","scopes":["<scope>"],"created_at":"<date>","revoked_at":"<date>|null","revoked_reason":"<reason>|null","client":{"name":"<name>","logo_uri":"<url>|null"}}]}
786
+ Revoked grants have non-null revoked_at and revoked_reason.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend oauth-grants list","resend oauth-grants list --limit 25 --json","resend oauth-grants list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching OAuth grants...",sdkCall:n=>n.oauthGrants.list(r),onInteractive:n=>{console.log(hu(n.data)),T(n,"oauth-grants list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Au=new d("revoke").description("Revoke an OAuth grant \u2014 every access and refresh token issued under it stops working immediately").argument("[id]","OAuth grant ID").option("--yes","Skip confirmation prompt").addHelpText("after",c({context:`Non-interactive: --yes is required to confirm revocation when stdin/stdout is not a TTY.
783
787
 
784
788
  Any team API key can revoke any of the team's grants. Revocation is immediate and
785
- irreversible \u2014 the client would need to re-authorize to regain access.`,output:' {"object":"oauth_grant","id":"<id>","revoked_at":"<date>","revoked_reason":"<reason>"}',errorCodes:["auth_error","confirmation_required","revoke_error"],examples:["resend oauth-grants revoke 650e8400-e29b-41d4-a716-446655440001 --yes","resend oauth-grants revoke 650e8400-e29b-41d4-a716-446655440001 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,du,i);t.yes||await si(r.id,`Revoke OAuth grant for "${r.label}"?
789
+ irreversible \u2014 the client would need to re-authorize to regain access.`,output:' {"object":"oauth_grant","id":"<id>","revoked_at":"<date>","revoked_reason":"<reason>"}',errorCodes:["auth_error","confirmation_required","revoke_error"],examples:["resend oauth-grants revoke 650e8400-e29b-41d4-a716-446655440001 --yes","resend oauth-grants revoke 650e8400-e29b-41d4-a716-446655440001 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,fu,i);t.yes||await ai(r.id,`Revoke OAuth grant for "${r.label}"?
786
790
  ID: ${r.id}
787
- Every access and refresh token issued under it will stop working.`,i),await R({loading:"Revoking OAuth grant...",sdkCall:n=>n.oauthGrants.revoke(r.id),errorCode:"revoke_error",successMsg:"OAuth grant revoked"},i)});var fu=new c("oauth-grants").description("Manage OAuth grants (apps authorized to act on the team)").addHelpText("after",d({context:`An OAuth grant is a durable record of a client (app) authorized by the team.
791
+ Every access and refresh token issued under it will stop working.`,i),await F({loading:"Revoking OAuth grant...",sdkCall:n=>n.oauthGrants.revoke(r.id),errorCode:"revoke_error",successMsg:"OAuth grant revoked"},i)});var bu=new d("oauth-grants").description("Manage OAuth grants (apps authorized to act on the team)").addHelpText("after",c({context:`An OAuth grant is a durable record of a client (app) authorized by the team.
788
792
  - Listing returns every grant, active and revoked. revoked_at/revoked_reason are null while active.
789
- - Revoking is immediate: all access and refresh tokens issued under the grant stop working.`,examples:["resend oauth-grants list","resend oauth-grants list --limit 25 --json","resend oauth-grants revoke <id> --yes"]})).addCommand(mu,{isDefault:!0}).addCommand(pu);var hu=new c("open").description("Open the Resend dashboard in your browser").addHelpText("after",d({context:"Opens https://resend.com/emails in your default browser.",examples:["resend open"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Te(he.emails,o)});var gu=new c("contacts").description("List contacts belonging to a segment").argument("[segmentId]","ID of the segment").option("--limit <n>","Maximum number of contacts to return (1-100)","10").option("--after <cursor>","Return contacts after this cursor (next page)").option("--before <cursor>","Return contacts before this cursor (previous page)").addHelpText("after",d({context:`Lists all contacts that belong to the given segment.
793
+ - Revoking is immediate: all access and refresh tokens issued under the grant stop working.`,examples:["resend oauth-grants list","resend oauth-grants list --limit 25 --json","resend oauth-grants revoke <id> --yes"]})).addCommand(gu,{isDefault:!0}).addCommand(Au);var yu=new d("open").description("Open the Resend dashboard in your browser").addHelpText("after",c({context:"Opens https://resend.com/emails in your default browser.",examples:["resend open"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Te(he.emails,o)});var Cu=new d("contacts").description("List contacts belonging to a segment").argument("[segmentId]","ID of the segment").option("--limit <n>","Maximum number of contacts to return (1-100)","10").option("--after <cursor>","Return contacts after this cursor (next page)").option("--before <cursor>","Return contacts before this cursor (previous page)").addHelpText("after",c({context:`Lists all contacts that belong to the given segment.
790
794
 
791
795
  If no segment ID is provided interactively, a picker will prompt you to choose one.
792
796
 
793
797
  Pagination: use --after or --before with a contact ID as the cursor.
794
798
  Only one of --after or --before may be used at a time.
795
- The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --json","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --after 479e3145-dd38-4932-8c0c-e58b548c9e76"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Oe,i),n=D(t.limit,i),s=B(n,t.after,t.before,i);await S({loading:"Fetching segment contacts...",sdkCall:a=>a.contacts.list({segmentId:r,...s}),onInteractive:a=>{console.log(yi(a.data)),T(a,`segments contacts ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var Au=new c("create").description("Create a new segment").option("--name <name>","Segment name (required)").addHelpText("after",d({context:`Segments are named groups of contacts. Broadcasts target segments via segment_id.
799
+ The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --json","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --after 479e3145-dd38-4932-8c0c-e58b548c9e76"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Oe,i),n=D(t.limit,i),s=I(n,t.after,t.before,i);await S({loading:"Fetching segment contacts...",sdkCall:a=>a.contacts.list({segmentId:r,...s}),onInteractive:a=>{console.log(Ci(a.data)),T(a,`segments contacts ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var xu=new d("create").description("Create a new segment").option("--name <name>","Segment name (required)").addHelpText("after",c({context:`Segments are named groups of contacts. Broadcasts target segments via segment_id.
796
800
  Contacts can belong to multiple segments. Audiences are deprecated \u2014 use segments instead.
797
801
 
798
- Non-interactive: --name is required.`,output:' {"object":"segment","id":"<uuid>","name":"<name>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend segments create --name "Newsletter Subscribers"','resend segments create --name "Beta Users" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Segment name",placeholder:"e.g. Newsletter Subscribers"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating segment...",sdkCall:r=>r.segments.create({name:i}),onInteractive:r=>{console.log(`Segment created: ${r.id}`),console.log(`Name: ${r.name}`)}},o)});var bu=new c("delete").alias("rm").description("Delete a segment").argument("[id]","Segment UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`Warning: Deleting a segment removes it as a target for future broadcasts,
802
+ Non-interactive: --name is required.`,output:' {"object":"segment","id":"<uuid>","name":"<name>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend segments create --name "Newsletter Subscribers"','resend segments create --name "Beta Users" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Segment name",placeholder:"e.g. Newsletter Subscribers"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating segment...",sdkCall:r=>r.segments.create({name:i}),onInteractive:r=>{console.log(`Segment created: ${r.id}`),console.log(`Name: ${r.name}`)}},o)});var wu=new d("delete").alias("rm").description("Delete a segment").argument("[id]","Segment UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`Warning: Deleting a segment removes it as a target for future broadcasts,
799
803
  but does NOT delete the contacts within it.
800
804
 
801
805
  Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"segment","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,Oe,i);await z(r.id,!!t.yes,{confirmMessage:`Delete segment "${r.label}"?
802
806
  ID: ${r.id}
803
- Contacts will not be deleted, but broadcasts targeting this segment will no longer work.`,loading:"Deleting segment...",object:"segment",successMsg:"Segment deleted",sdkCall:n=>n.segments.remove(r.id)},i)});var yu=new c("get").description("Retrieve a segment by ID").argument("[id]","Segment UUID").addHelpText("after",d({output:' {"object":"segment","id":"<uuid>","name":"<name>","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Oe,i);await j({loading:"Fetching segment...",sdkCall:n=>n.segments.get(r),onInteractive:n=>{console.log(`${n.name}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`)}},i)});var Cu=new c("list").alias("ls").description("List all segments").option("--limit <n>","Maximum number of segments to return (1-100)","10").option("--after <cursor>","Return segments after this cursor (next page)").option("--before <cursor>","Return segments before this cursor (previous page)").addHelpText("after",d({context:`Pagination: use --after or --before with a segment ID as the cursor.
807
+ Contacts will not be deleted, but broadcasts targeting this segment will no longer work.`,loading:"Deleting segment...",object:"segment",successMsg:"Segment deleted",sdkCall:n=>n.segments.remove(r.id)},i)});var vu=new d("get").description("Retrieve a segment by ID").argument("[id]","Segment UUID").addHelpText("after",c({output:' {"object":"segment","id":"<uuid>","name":"<name>","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Oe,i);await B({loading:"Fetching segment...",sdkCall:n=>n.segments.get(r),onInteractive:n=>{console.log(`${n.name}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`)}},i)});var Uu=new d("list").alias("ls").description("List all segments").option("--limit <n>","Maximum number of segments to return (1-100)","10").option("--after <cursor>","Return segments after this cursor (next page)").option("--before <cursor>","Return segments before this cursor (previous page)").addHelpText("after",c({context:`Pagination: use --after or --before with a segment ID as the cursor.
804
808
  Only one of --after or --before may be used at a time.
805
809
  The response includes has_more: true when additional pages exist.
806
810
 
807
811
  Use "resend segments list" to discover segment IDs for use with broadcasts
808
- or "resend contacts add-segment".`,output:' {"object":"list","data":[{"id":"<uuid>","name":"<name>","created_at":"<date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments list","resend segments list --limit 25 --json","resend segments list --after 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching segments...",sdkCall:n=>n.segments.list(r),onInteractive:n=>{console.log(gi(n.data)),T(n,"segments list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var xu=new c("update").description("Rename a segment").argument("[id]","Segment UUID").option("--name <name>","New segment name").addHelpText("after",d({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY).",output:' {"object":"segment","id":"<uuid>"}',errorCodes:["auth_error","missing_name","update_error"],examples:['resend segments update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Active Subscribers"','resend segments update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Active Subscribers" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Oe,i),n=await E(t.name,{message:"New segment name",placeholder:"e.g. Active Subscribers",validate:s=>{if(!s)return"Name is required"}},{message:"Missing --name flag.",code:"missing_name"},i);n||h({message:"Name is required.",code:"missing_name"},{json:i.json}),await R({loading:"Updating segment...",sdkCall:s=>s.segments.update(r,{name:n}),errorCode:"update_error",successMsg:`Segment updated: ${r}`},i)});var wu=new c("segments").description("Manage segments").addHelpText("after",d({context:`Segments are the modern replacement for Audiences (deprecated).
812
+ or "resend contacts add-segment".`,output:' {"object":"list","data":[{"id":"<uuid>","name":"<name>","created_at":"<date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments list","resend segments list --limit 25 --json","resend segments list --after 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching segments...",sdkCall:n=>n.segments.list(r),onInteractive:n=>{console.log(Ai(n.data)),T(n,"segments list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Su=new d("update").description("Rename a segment").argument("[id]","Segment UUID").option("--name <name>","New segment name").addHelpText("after",c({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY).",output:' {"object":"segment","id":"<uuid>"}',errorCodes:["auth_error","missing_name","update_error"],examples:['resend segments update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Active Subscribers"','resend segments update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Active Subscribers" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Oe,i),n=await E(t.name,{message:"New segment name",placeholder:"e.g. Active Subscribers",validate:s=>{if(!s)return"Name is required"}},{message:"Missing --name flag.",code:"missing_name"},i);n||h({message:"Name is required.",code:"missing_name"},{json:i.json}),await F({loading:"Updating segment...",sdkCall:s=>s.segments.update(r,{name:n}),errorCode:"update_error",successMsg:`Segment updated: ${r}`},i)});var Ku=new d("segments").description("Manage segments").addHelpText("after",c({context:`Segments are the modern replacement for Audiences (deprecated).
809
813
  A segment is a named group of contacts. Broadcasts target segments via segment_id.
810
814
  Contacts can belong to multiple segments.
811
815
 
812
816
  Segment membership is managed through the contacts namespace:
813
817
  resend contacts add-segment <contactId> --segment-id <segmentId>
814
818
  resend contacts remove-segment <contactId> <segmentId>
815
- resend contacts segments <contactId>`,examples:["resend segments list",'resend segments create --name "Newsletter Subscribers"',"resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend segments update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Active Subscribers"',"resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(gu).addCommand(Au).addCommand(yu).addCommand(Cu,{isDefault:!0}).addCommand(xu).addCommand(bu);var zr=me(Je(),1);var vu=new c("add").description("Suppress an email address so it stops receiving your emails").argument("[email]","Email address to suppress").addHelpText("after",d({context:`Non-interactive: <email> is required (no prompts when stdin/stdout is not a TTY).
819
+ resend contacts segments <contactId>`,examples:["resend segments list",'resend segments create --name "Newsletter Subscribers"',"resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend segments update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Active Subscribers"',"resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(Cu).addCommand(xu).addCommand(vu).addCommand(Uu,{isDefault:!0}).addCommand(Su).addCommand(wu);var Yr=me(Je(),1);var ku=new d("add").description("Suppress an email address so it stops receiving your emails").argument("[email]","Email address to suppress").addHelpText("after",c({context:`Non-interactive: <email> is required (no prompts when stdin/stdout is not a TTY).
816
820
 
817
821
  A suppressed address is skipped on future sends. Added this way, the entry has
818
- origin "manual". Use "suppressions delete" to remove it again.`,output:' {"object":"suppression","id":"<id>"}',errorCodes:["auth_error","missing_email","create_error"],examples:["resend suppressions add spam@example.com","resend suppressions add spam@example.com --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await E(e,{message:"Email to suppress",placeholder:"e.g. spam@example.com"},{message:"Missing <email> argument.",code:"missing_email"},i);await P({loading:"Suppressing address...",sdkCall:n=>n.suppressions.add({email:r}),onInteractive:n=>{console.log(` ${zr.default.gray("Email:")} ${r}`),console.log(` ${zr.default.gray("ID:")} ${n.id}`)}},i)});X();function ki(e,t){let o;try{o=JSON.parse(e)}catch{h({message:"File content is not valid JSON.",code:"invalid_json"},{json:t.json})}Array.isArray(o)||h({message:"File content must be a JSON array of strings.",code:"invalid_format"},{json:t.json});let i=o;for(let r=0;r<i.length;r++)(typeof i[r]!="string"||i[r]==="")&&h({message:`Item at index ${r} must be a non-empty string.`,code:"invalid_format"},{json:t.json});return i}var Uu=new c("add").description("Suppress up to 100 email addresses from a JSON file in one request").option("--file <path>",'Path to a JSON file containing an array of email strings (use "-" for stdin; required in non-interactive mode)').addHelpText("after",d({context:`Non-interactive: --file
822
+ origin "manual". Use "suppressions delete" to remove it again.`,output:' {"object":"suppression","id":"<id>"}',errorCodes:["auth_error","missing_email","create_error"],examples:["resend suppressions add spam@example.com","resend suppressions add spam@example.com --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await E(e,{message:"Email to suppress",placeholder:"e.g. spam@example.com"},{message:"Missing <email> argument.",code:"missing_email"},i);await P({loading:"Suppressing address...",sdkCall:n=>n.suppressions.add({email:r}),onInteractive:n=>{console.log(` ${Yr.default.gray("Email:")} ${r}`),console.log(` ${Yr.default.gray("ID:")} ${n.id}`)}},i)});X();function _i(e,t){let o;try{o=JSON.parse(e)}catch{h({message:"File content is not valid JSON.",code:"invalid_json"},{json:t.json})}Array.isArray(o)||h({message:"File content must be a JSON array of strings.",code:"invalid_format"},{json:t.json});let i=o;for(let r=0;r<i.length;r++)(typeof i[r]!="string"||i[r]==="")&&h({message:`Item at index ${r} must be a non-empty string.`,code:"invalid_format"},{json:t.json});return i}var _u=new d("add").description("Suppress up to 100 email addresses from a JSON file in one request").option("--file <path>",'Path to a JSON file containing an array of email strings (use "-" for stdin; required in non-interactive mode)').addHelpText("after",c({context:`Non-interactive: --file
819
823
  Limit: 100 emails per request (API hard limit \u2014 warned if exceeded)
820
824
 
821
825
  File format (--file path):
822
- ["spam@example.com", "bounce@example.com"]`,output:' {"data":[{"object":"suppression","id":"<id>"}]}',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","create_error"],examples:["resend suppressions batch add --file ./emails.json",`echo '["a@example.com","b@example.com"]' | resend suppressions batch add --file -`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await ee(o),r=await E(e.file,{message:"Path to JSON file",placeholder:"./emails.json"},{message:"Missing --file flag. Provide a JSON file with an array of email strings.",code:"missing_file"},o),n=ie(r,o),s=ki(n,o);s.length>100&&console.warn(`Warning: ${s.length} emails exceeds the 100-email limit. The API may reject this request.`);let a=await ce("Suppressing addresses...",()=>i.suppressions.batch.add({emails:s}),"create_error",o);if(!o.json&&w()){console.log(`Suppressed ${a.data.length} address${a.data.length===1?"":"es"}`);for(let l of a.data)console.log(` ${l.id}`)}else N(a,{json:o.json})});X();var Su=new c("remove").alias("rm").description("Remove up to 100 suppressions from a JSON file in one request").option("--file <path>",'Path to a JSON file containing an array of email strings (use "-" for stdin; required in non-interactive mode)').option("--ids","Treat the file entries as suppression IDs instead of email addresses").addHelpText("after",d({context:`Non-interactive: --file
826
+ ["spam@example.com", "bounce@example.com"]`,output:' {"data":[{"object":"suppression","id":"<id>"}]}',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","create_error"],examples:["resend suppressions batch add --file ./emails.json",`echo '["a@example.com","b@example.com"]' | resend suppressions batch add --file -`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await ee(o),r=await E(e.file,{message:"Path to JSON file",placeholder:"./emails.json"},{message:"Missing --file flag. Provide a JSON file with an array of email strings.",code:"missing_file"},o),n=ie(r,o),s=_i(n,o);s.length>100&&console.warn(`Warning: ${s.length} emails exceeds the 100-email limit. The API may reject this request.`);let a=await de("Suppressing addresses...",()=>i.suppressions.batch.add({emails:s}),"create_error",o);if(!o.json&&w()){console.log(`Suppressed ${a.data.length} address${a.data.length===1?"":"es"}`);for(let l of a.data)console.log(` ${l.id}`)}else M(a,{json:o.json})});X();var Fu=new d("remove").alias("rm").description("Remove up to 100 suppressions from a JSON file in one request").option("--file <path>",'Path to a JSON file containing an array of email strings (use "-" for stdin; required in non-interactive mode)').option("--ids","Treat the file entries as suppression IDs instead of email addresses").addHelpText("after",c({context:`Non-interactive: --file
823
827
  Limit: 100 entries per request (API hard limit \u2014 warned if exceeded)
824
828
  By default entries are treated as email addresses; pass --ids to remove by suppression ID.
825
829
 
826
830
  File format (--file path):
827
- ["spam@example.com", "bounce@example.com"]`,output:' {"data":[{"object":"suppression","id":"<id>","deleted":true}]}',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","delete_error"],examples:["resend suppressions batch remove --file ./emails.json","resend suppressions batch remove --file ./ids.json --ids",`echo '["a@example.com","b@example.com"]' | resend suppressions batch rm --file -`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await ee(o),r=await E(e.file,{message:"Path to JSON file",placeholder:"./emails.json"},{message:"Missing --file flag. Provide a JSON file with an array of strings.",code:"missing_file"},o),n=ie(r,o),s=ki(n,o);s.length>100&&console.warn(`Warning: ${s.length} entries exceeds the 100-entry limit. The API may reject this request.`);let a=await ce("Removing suppressions...",()=>i.suppressions.batch.remove(e.ids?{ids:s}:{emails:s}),"delete_error",o);if(!o.json&&w()){console.log(`Removed ${a.data.length} suppression${a.data.length===1?"":"s"}`);for(let l of a.data)console.log(` ${l.id}`)}else N(a,{json:o.json})});var Ku=new c("batch").description("Suppress or remove many addresses in a single request").addHelpText("after",d({context:`Batch operations read a JSON array of strings from --file (up to 100 per request).
828
- "add" always operates on emails. "remove" defaults to emails; pass --ids to remove by ID.`,examples:["resend suppressions batch add --file ./emails.json","resend suppressions batch remove --file ./emails.json","resend suppressions batch remove --file ./ids.json --ids"]})).addCommand(Uu).addCommand(Su);var _i={resource:"suppression",resourcePlural:"suppressions",fetchItems:(e,{limit:t,after:o})=>e.suppressions.list({limit:t,...o&&{after:o}}),display:e=>({label:e.email,hint:e.id})};function ku(e){let t=e.map(o=>[o.email,o.id,o.origin,o.created_at]);return _(["Email","ID","Origin","Created"],t,"(no suppressions)")}var _u=new c("delete").alias("rm").description("Remove a suppression so the address can receive your emails again").argument("[id-or-email]","Suppression ID or the suppressed email address").option("--yes","Skip confirmation prompt").addHelpText("after",d({context:`Non-interactive: --yes is required to confirm removal when stdin/stdout is not a TTY.
831
+ ["spam@example.com", "bounce@example.com"]`,output:' {"data":[{"object":"suppression","id":"<id>","deleted":true}]}',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","delete_error"],examples:["resend suppressions batch remove --file ./emails.json","resend suppressions batch remove --file ./ids.json --ids",`echo '["a@example.com","b@example.com"]' | resend suppressions batch rm --file -`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await ee(o),r=await E(e.file,{message:"Path to JSON file",placeholder:"./emails.json"},{message:"Missing --file flag. Provide a JSON file with an array of strings.",code:"missing_file"},o),n=ie(r,o),s=_i(n,o);s.length>100&&console.warn(`Warning: ${s.length} entries exceeds the 100-entry limit. The API may reject this request.`);let a=await de("Removing suppressions...",()=>i.suppressions.batch.remove(e.ids?{ids:s}:{emails:s}),"delete_error",o);if(!o.json&&w()){console.log(`Removed ${a.data.length} suppression${a.data.length===1?"":"s"}`);for(let l of a.data)console.log(` ${l.id}`)}else M(a,{json:o.json})});var Ru=new d("batch").description("Suppress or remove many addresses in a single request").addHelpText("after",c({context:`Batch operations read a JSON array of strings from --file (up to 100 per request).
832
+ "add" always operates on emails. "remove" defaults to emails; pass --ids to remove by ID.`,examples:["resend suppressions batch add --file ./emails.json","resend suppressions batch remove --file ./emails.json","resend suppressions batch remove --file ./ids.json --ids"]})).addCommand(_u).addCommand(Fu);var Fi={resource:"suppression",resourcePlural:"suppressions",fetchItems:(e,{limit:t,after:o})=>e.suppressions.list({limit:t,...o&&{after:o}}),display:e=>({label:e.email,hint:e.id})};function Du(e){let t=e.map(o=>[o.email,o.id,o.origin,o.created_at]);return _(["Email","ID","Origin","Created"],t,"(no suppressions)")}var Tu=new d("delete").alias("rm").description("Remove a suppression so the address can receive your emails again").argument("[id-or-email]","Suppression ID or the suppressed email address").option("--yes","Skip confirmation prompt").addHelpText("after",c({context:`Non-interactive: --yes is required to confirm removal when stdin/stdout is not a TTY.
829
833
 
830
- Removing a suppression means future sends to this address are no longer skipped.`,output:' {"object":"suppression","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend suppressions delete spam@example.com --yes","resend suppressions rm 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,_i,i);await z(r.id,!!t.yes,{confirmMessage:`Remove suppression "${r.label}"?
834
+ Removing a suppression means future sends to this address are no longer skipped.`,output:' {"object":"suppression","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend suppressions delete spam@example.com --yes","resend suppressions rm 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,Fi,i);await z(r.id,!!t.yes,{confirmMessage:`Remove suppression "${r.label}"?
831
835
  ID: ${r.id}
832
- Resend will be able to send to this address again.`,loading:"Removing suppression...",object:"suppression",successMsg:"Suppression removed",sdkCall:n=>n.suppressions.remove(r.id)},i)});var Fu=new c("get").description("Retrieve a suppression by ID or email address").argument("[id-or-email]","Suppression ID or the suppressed email address").addHelpText("after",d({output:' {"object":"suppression","id":"<id>","email":"<email>","origin":"bounce|complaint|manual","source_id":"<id>|null","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend suppressions get spam@example.com","resend suppressions get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,_i,i);await j({loading:"Fetching suppression...",sdkCall:n=>n.suppressions.get(r),onInteractive:n=>{console.log(`${n.email}`),console.log(`ID: ${n.id}`),console.log(`Origin: ${n.origin}`),n.source_id&&console.log(`Source: ${n.source_id}`),console.log(`Created: ${n.created_at}`)}},i)});var Ru=new c("list").alias("ls").description("List suppressed email addresses").option("--limit <n>","Maximum number of suppressions to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addOption(new q("--origin <origin>","Filter by how the address was suppressed").choices(["bounce","complaint","manual"])).addHelpText("after",d({output:' {"object":"list","has_more":false,"data":[{"object":"suppression","id":"<id>","email":"<email>","origin":"bounce|complaint|manual","source_id":"<id>|null","created_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend suppressions list","resend suppressions list --origin bounce --json","resend suppressions list --limit 25 --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching suppressions...",sdkCall:n=>n.suppressions.list({...r,...e.origin&&{origin:e.origin}}),onInteractive:n=>{console.log(ku(n.data)),T(n,"suppressions list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,...e.origin&&{extraFlags:`--origin ${e.origin}`}})}},o)});var Du=new c("suppressions").description("Manage the suppression list \u2014 addresses that won't receive your emails").addHelpText("after",d({context:`Suppressions block future sends to an address. Entries have an origin:
836
+ Resend will be able to send to this address again.`,loading:"Removing suppression...",object:"suppression",successMsg:"Suppression removed",sdkCall:n=>n.suppressions.remove(r.id)},i)});var Ou=new d("get").description("Retrieve a suppression by ID or email address").argument("[id-or-email]","Suppression ID or the suppressed email address").addHelpText("after",c({output:' {"object":"suppression","id":"<id>","email":"<email>","origin":"bounce|complaint|manual","source_id":"<id>|null","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend suppressions get spam@example.com","resend suppressions get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,Fi,i);await B({loading:"Fetching suppression...",sdkCall:n=>n.suppressions.get(r),onInteractive:n=>{console.log(`${n.email}`),console.log(`ID: ${n.id}`),console.log(`Origin: ${n.origin}`),n.source_id&&console.log(`Source: ${n.source_id}`),console.log(`Created: ${n.created_at}`)}},i)});var Eu=new d("list").alias("ls").description("List suppressed email addresses").option("--limit <n>","Maximum number of suppressions to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addOption(new q("--origin <origin>","Filter by how the address was suppressed").choices(["bounce","complaint","manual"])).addHelpText("after",c({output:' {"object":"list","has_more":false,"data":[{"object":"suppression","id":"<id>","email":"<email>","origin":"bounce|complaint|manual","source_id":"<id>|null","created_at":"<date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend suppressions list","resend suppressions list --origin bounce --json","resend suppressions list --limit 25 --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching suppressions...",sdkCall:n=>n.suppressions.list({...r,...e.origin&&{origin:e.origin}}),onInteractive:n=>{console.log(Du(n.data)),T(n,"suppressions list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile,...e.origin&&{extraFlags:`--origin ${e.origin}`}})}},o)});var Bu=new d("suppressions").description("Manage the suppression list \u2014 addresses that won't receive your emails").addHelpText("after",c({context:`Suppressions block future sends to an address. Entries have an origin:
833
837
  bounce added automatically after a hard bounce
834
838
  complaint added automatically after a spam complaint
835
839
  manual added by you via "suppressions add"
836
840
 
837
- get/delete accept either a suppression ID or the email address.`,examples:["resend suppressions list","resend suppressions add spam@example.com","resend suppressions get spam@example.com","resend suppressions delete spam@example.com --yes","resend suppressions batch add --file ./emails.json"]})).addCommand(Ru,{isDefault:!0}).addCommand(vu).addCommand(Fu).addCommand(_u).addCommand(Ku);X();function Fi(e){return e.map(t=>{let[o,i,...r]=t.split(":");if(!o)throw new Error(`Invalid --var "${t}": key is required.`);if(i!=="string"&&i!=="number")throw new Error(`Invalid --var "${t}": type must be "string" or "number".`);let n=r.length?r.join(":"):void 0;if(n!=null&&n==="")throw new Error(`Invalid --var "${t}": fallback value cannot be empty.`);let s=n;if(i==="number"){if(s!=null&&Number.isNaN(Number(s)))throw new Error(`Invalid --var "${t}": fallback "${s}" is not a valid number.`);return{key:o,type:"number",...s!=null?{fallbackValue:Number(s)}:{}}}return{key:o,type:"string",...s!=null?{fallbackValue:s}:{}}})}var tt={resource:"template",resourcePlural:"templates",fetchItems:(e,{limit:t,after:o})=>e.templates.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function Tu(e){let t=e.map(o=>[o.name,o.status,o.alias??"",o.id,o.created_at]);return _(["Name","Status","Alias","ID","Created"],t,"(no templates)")}var Ou=new c("create").description("Create a new template").option("--name <name>","Template name \u2014 required").option("--html <html>","HTML body").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin)').option("--subject <subject>","Email subject").option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--from <address>","Sender address").option("--reply-to <address>","Reply-to address").option("--alias <alias>","Template alias for lookup by name").option("--var <var...>","Template variable: KEY:type or KEY:type:fallback (repeatable)").addHelpText("after",d({context:`Creates a new draft template. Use "resend templates publish" to make it available for sending.
841
+ get/delete accept either a suppression ID or the email address.`,examples:["resend suppressions list","resend suppressions add spam@example.com","resend suppressions get spam@example.com","resend suppressions delete spam@example.com --yes","resend suppressions batch add --file ./emails.json"]})).addCommand(Eu,{isDefault:!0}).addCommand(ku).addCommand(Ou).addCommand(Tu).addCommand(Ru);X();function Ri(e){return e.map(t=>{let[o,i,...r]=t.split(":");if(!o)throw new Error(`Invalid --var "${t}": key is required.`);if(i!=="string"&&i!=="number")throw new Error(`Invalid --var "${t}": type must be "string" or "number".`);let n=r.length?r.join(":"):void 0;if(n!=null&&n==="")throw new Error(`Invalid --var "${t}": fallback value cannot be empty.`);let s=n;if(i==="number"){if(s!=null&&Number.isNaN(Number(s)))throw new Error(`Invalid --var "${t}": fallback "${s}" is not a valid number.`);return{key:o,type:"number",...s!=null?{fallbackValue:Number(s)}:{}}}return{key:o,type:"string",...s!=null?{fallbackValue:s}:{}}})}var tt={resource:"template",resourcePlural:"templates",fetchItems:(e,{limit:t,after:o})=>e.templates.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function Iu(e){let t=e.map(o=>[o.name,o.status,o.alias??"",o.id,o.created_at]);return _(["Name","Status","Alias","ID","Created"],t,"(no templates)")}var ju=new d("create").description("Create a new template").option("--name <name>","Template name \u2014 required").option("--html <html>","HTML body").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin)').option("--subject <subject>","Email subject").option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--from <address>","Sender address").option("--reply-to <address>","Reply-to address").option("--alias <alias>","Template alias for lookup by name").option("--var <var...>","Template variable: KEY:type or KEY:type:fallback (repeatable)").addHelpText("after",c({context:`Creates a new draft template. Use "resend templates publish" to make it available for sending.
838
842
 
839
843
  --name is required. Body: provide --html, --html-file, or --react-email. Optionally add --text or --text-file for plain-text.
840
844
 
@@ -844,24 +848,24 @@ get/delete accept either a suppression ID or the email address.`,examples:["rese
844
848
  --html "<p>Hi {{{NAME}}}, your total is {{{PRICE}}}</p>"
845
849
  --var NAME:string --var PRICE:number:0
846
850
 
847
- Non-interactive: --name and a body (--html, --html-file, or --react-email) are required. --text-file provides a plain-text fallback.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","missing_name","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend templates create --name "Welcome" --html "<h1>Hello</h1>" --subject "Welcome!"','resend templates create --name "Newsletter" --html-file ./template.html --from acme@example.com','resend templates create --name "Onboarding" --html "<p>Hi</p>" --alias onboarding --json','resend templates create --name "Order" --html "<p>{{{PRODUCT}}}: {{{PRICE}}}</p>" --var PRODUCT:string:item --var PRICE:number:25']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=e.name;if(!i){(!w()||o.json)&&h({message:"Missing --name flag.",code:"missing_name"},{json:o.json});let s=await Z({message:"Template name",placeholder:"e.g. Welcome Email",validate:a=>a?void 0:"Required"});F(s)&&O("Cancelled."),i=s}e.htmlFile==="-"&&e.textFile==="-"&&h({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile)&&h({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:o.json});let r=e.html,n=e.text;if(e.htmlFile&&(e.html&&process.stderr.write(`Warning: both --html and --html-file provided; using --html-file
851
+ Non-interactive: --name and a body (--html, --html-file, or --react-email) are required. --text-file provides a plain-text fallback.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","missing_name","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend templates create --name "Welcome" --html "<h1>Hello</h1>" --subject "Welcome!"','resend templates create --name "Newsletter" --html-file ./template.html --from acme@example.com','resend templates create --name "Onboarding" --html "<p>Hi</p>" --alias onboarding --json','resend templates create --name "Order" --html "<p>{{{PRODUCT}}}: {{{PRICE}}}</p>" --var PRODUCT:string:item --var PRICE:number:25']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=e.name;if(!i){(!w()||o.json)&&h({message:"Missing --name flag.",code:"missing_name"},{json:o.json});let s=await Z({message:"Template name",placeholder:"e.g. Welcome Email",validate:a=>a?void 0:"Required"});R(s)&&O("Cancelled."),i=s}e.htmlFile==="-"&&e.textFile==="-"&&h({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile)&&h({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:o.json});let r=e.html,n=e.text;if(e.htmlFile&&(e.html&&process.stderr.write(`Warning: both --html and --html-file provided; using --html-file
848
852
  `),r=ie(e.htmlFile,o)),e.textFile&&(e.text&&process.stderr.write(`Warning: both --text and --text-file provided; using --text-file
849
- `),n=ie(e.textFile,o)),e.reactEmail&&(r=await qe(e.reactEmail,o)),!r){(!w()||o.json)&&h({message:"Missing body. Provide --html, --html-file, or --react-email.",code:"missing_body"},{json:o.json});let s=await Z({message:"HTML body",placeholder:"<h1>Hello {{name}}</h1>",validate:a=>a?void 0:"Required"});F(s)&&O("Cancelled."),r=s}await P({loading:"Creating template...",sdkCall:s=>Promise.resolve(s.templates.create({name:i,html:r,...e.subject&&{subject:e.subject},...n&&{text:n},...e.from&&{from:e.from},...e.replyTo&&{replyTo:e.replyTo},...e.alias&&{alias:e.alias},...e.var&&{variables:Fi(e.var)}})),onInteractive:s=>{console.log(`Template created: ${s.id}`)}},o)});var Eu=new c("delete").alias("rm").description("Delete a template").argument("[id]","Template ID or alias").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`Warning: Deleting a template is permanent and cannot be undone.
853
+ `),n=ie(e.textFile,o)),e.reactEmail&&(r=await qe(e.reactEmail,o)),!r){(!w()||o.json)&&h({message:"Missing body. Provide --html, --html-file, or --react-email.",code:"missing_body"},{json:o.json});let s=await Z({message:"HTML body",placeholder:"<h1>Hello {{name}}</h1>",validate:a=>a?void 0:"Required"});R(s)&&O("Cancelled."),r=s}await P({loading:"Creating template...",sdkCall:s=>Promise.resolve(s.templates.create({name:i,html:r,...e.subject&&{subject:e.subject},...n&&{text:n},...e.from&&{from:e.from},...e.replyTo&&{replyTo:e.replyTo},...e.alias&&{alias:e.alias},...e.var&&{variables:Ri(e.var)}})),onInteractive:s=>{console.log(`Template created: ${s.id}`)}},o)});var Pu=new d("delete").alias("rm").description("Delete a template").argument("[id]","Template ID or alias").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`Warning: Deleting a template is permanent and cannot be undone.
850
854
 
851
855
  Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"template","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend templates rm my-template-alias --yes","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,tt,i);await z(r.id,!!t.yes,{confirmMessage:`Delete template "${r.label}"?
852
856
  ID: ${r.id}
853
- This action is permanent and cannot be undone.`,loading:"Deleting template...",object:"template",successMsg:"Template deleted",sdkCall:n=>n.templates.remove(r.id)},i)});var Bu=new c("duplicate").description("Duplicate a template").argument("[id]","Template ID or alias to duplicate").addHelpText("after",d({context:`Creates a copy of an existing template and returns the new template ID.
857
+ This action is permanent and cannot be undone.`,loading:"Deleting template...",object:"template",successMsg:"Template deleted",sdkCall:n=>n.templates.remove(r.id)},i)});var $u=new d("duplicate").description("Duplicate a template").argument("[id]","Template ID or alias to duplicate").addHelpText("after",c({context:`Creates a copy of an existing template and returns the new template ID.
854
858
  The duplicate is created as a draft with " (Copy)" appended to the original name.
855
- All fields (HTML, subject, variables, etc.) are copied to the new template.`,output:' {"object":"template","id":"<new-template-id>"}',errorCodes:["auth_error","create_error"],examples:["resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate my-template-alias --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,tt,i);await P({loading:"Duplicating template...",sdkCall:n=>Promise.resolve(n.templates.duplicate(r)),onInteractive:n=>{console.log(`Template duplicated: ${n.id}`)}},i)});var Iu=new c("get").description("Retrieve a template by ID or alias").argument("[id]","Template ID or alias").addHelpText("after",d({context:"Returns the full template including HTML body, variables, and publication status.",output:' {"object":"template","id":"...","name":"...","subject":"...","status":"draft|published","html":"...","alias":"...","from":"...","reply_to":["..."],"variables":[...],"created_at":"...","updated_at":"..."}',errorCodes:["auth_error","fetch_error"],examples:["resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates get my-template-alias","resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,tt,i);await j({loading:"Fetching template...",sdkCall:n=>n.templates.get(r),onInteractive:n=>{if(console.log(`${n.name}`),console.log(`ID: ${n.id}`),console.log(`Status: ${n.status}`),n.alias&&console.log(`Alias: ${n.alias}`),n.subject&&console.log(`Subject: ${n.subject}`),n.from&&console.log(`From: ${n.from}`),n.reply_to?.length&&console.log(`Reply-To: ${n.reply_to.join(", ")}`),n.html){let s=n.html.length>200?`${n.html.slice(0,197)}...`:n.html;console.log(`HTML: ${s}`)}n.variables?.length&&console.log(`Variables: ${n.variables.map(s=>s.key).join(", ")}`),n.published_at&&console.log(`Published: ${n.published_at}`),console.log(`Created: ${n.created_at}`),console.log(`Updated: ${n.updated_at}`)}},i)});var ju=new c("list").alias("ls").description("List all templates").option("--limit <n>","Maximum number of templates to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",d({output:' {"object":"list","has_more":false,"data":[{"id":"...","name":"...","status":"draft|published","alias":"...","created_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend templates list","resend templates list --limit 5","resend templates list --after <template-id> --limit 10","resend templates list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching templates...",sdkCall:n=>n.templates.list(r),onInteractive:n=>{console.log(Tu(n.data)),T(n,"templates list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Pu=new c("open").description("Open a template or the templates list in the Resend dashboard").argument("[id]","Template ID \u2014 omit to open the templates list").addHelpText("after",d({context:`Opens the Resend dashboard in your default browser.
859
+ All fields (HTML, subject, variables, etc.) are copied to the new template.`,output:' {"object":"template","id":"<new-template-id>"}',errorCodes:["auth_error","create_error"],examples:["resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate my-template-alias --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,tt,i);await P({loading:"Duplicating template...",sdkCall:n=>Promise.resolve(n.templates.duplicate(r)),onInteractive:n=>{console.log(`Template duplicated: ${n.id}`)}},i)});var Gu=new d("get").description("Retrieve a template by ID or alias").argument("[id]","Template ID or alias").addHelpText("after",c({context:"Returns the full template including HTML body, variables, and publication status.",output:' {"object":"template","id":"...","name":"...","subject":"...","status":"draft|published","html":"...","alias":"...","from":"...","reply_to":["..."],"variables":[...],"created_at":"...","updated_at":"..."}',errorCodes:["auth_error","fetch_error"],examples:["resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates get my-template-alias","resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,tt,i);await B({loading:"Fetching template...",sdkCall:n=>n.templates.get(r),onInteractive:n=>{if(console.log(`${n.name}`),console.log(`ID: ${n.id}`),console.log(`Status: ${n.status}`),n.alias&&console.log(`Alias: ${n.alias}`),n.subject&&console.log(`Subject: ${n.subject}`),n.from&&console.log(`From: ${n.from}`),n.reply_to?.length&&console.log(`Reply-To: ${n.reply_to.join(", ")}`),n.html){let s=n.html.length>200?`${n.html.slice(0,197)}...`:n.html;console.log(`HTML: ${s}`)}n.variables?.length&&console.log(`Variables: ${n.variables.map(s=>s.key).join(", ")}`),n.published_at&&console.log(`Published: ${n.published_at}`),console.log(`Created: ${n.created_at}`),console.log(`Updated: ${n.updated_at}`)}},i)});var Hu=new d("list").alias("ls").description("List all templates").option("--limit <n>","Maximum number of templates to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",c({output:' {"object":"list","has_more":false,"data":[{"id":"...","name":"...","status":"draft|published","alias":"...","created_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend templates list","resend templates list --limit 5","resend templates list --after <template-id> --limit 10","resend templates list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching templates...",sdkCall:n=>n.templates.list(r),onInteractive:n=>{console.log(Iu(n.data)),T(n,"templates list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Qu=new d("open").description("Open a template or the templates list in the Resend dashboard").argument("[id]","Template ID \u2014 omit to open the templates list").addHelpText("after",c({context:`Opens the Resend dashboard in your default browser.
856
860
  With an ID: opens that template's page for editing or viewing.
857
- Without an ID: opens the templates list.`,examples:["resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t,o)=>{let i=e?he.template(e):he.templates,r=o.optsWithGlobals();await Te(i,r)});var $u=new c("publish").description("Publish a draft template").argument("[id]","Template ID or alias").addHelpText("after",d({context:`Promotes a draft template to published status, making it available for use in emails.
861
+ Without an ID: opens the templates list.`,examples:["resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t,o)=>{let i=e?he.template(e):he.templates,r=o.optsWithGlobals();await Te(i,r)});var Nu=new d("publish").description("Publish a draft template").argument("[id]","Template ID or alias").addHelpText("after",c({context:`Promotes a draft template to published status, making it available for use in emails.
858
862
  After updating a published template, re-publish to make the changes live.
859
- Publishing an already-published template re-publishes it with the latest draft changes.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","publish_error"],examples:["resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,tt,i);await R({loading:"Publishing template...",sdkCall:n=>n.templates.publish(r),errorCode:"publish_error",successMsg:`Template published: ${r}`,retryTransient:!0},i)});var Gu=new c("update").description("Update an existing template").argument("[id]","Template ID or alias").option("--name <name>","Update template name").option("--html <html>","Update HTML body").option("--html-file <path>",'Path to an HTML file to replace the body (use "-" for stdin)').option("--subject <subject>","Update subject").option("--text <text>","Update plain-text body").option("--text-file <path>",'Path to a plain-text file to replace the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--from <address>","Update sender address").option("--reply-to <address>","Update reply-to address").option("--alias <alias>","Update template alias").option("--var <var...>","Template variable: KEY:type or KEY:type:fallback (repeatable)").addHelpText("after",d({context:`At least one option is required. Only the provided fields are changed; others are left as-is.
863
+ Publishing an already-published template re-publishes it with the latest draft changes.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","publish_error"],examples:["resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,tt,i);await F({loading:"Publishing template...",sdkCall:n=>n.templates.publish(r),errorCode:"publish_error",successMsg:`Template published: ${r}`,retryTransient:!0},i)});var Mu=new d("update").description("Update an existing template").argument("[id]","Template ID or alias").option("--name <name>","Update template name").option("--html <html>","Update HTML body").option("--html-file <path>",'Path to an HTML file to replace the body (use "-" for stdin)').option("--subject <subject>","Update subject").option("--text <text>","Update plain-text body").option("--text-file <path>",'Path to a plain-text file to replace the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--from <address>","Update sender address").option("--reply-to <address>","Update reply-to address").option("--alias <alias>","Update template alias").option("--var <var...>","Template variable: KEY:type or KEY:type:fallback (repeatable)").addHelpText("after",c({context:`At least one option is required. Only the provided fields are changed; others are left as-is.
860
864
 
861
865
  --var declares a template variable using the format KEY:type or KEY:type:fallback.
862
866
  Valid types: string, number.
863
867
  Variables must match {{{KEY}}} placeholders in the HTML body.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","no_changes","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","update_error"],examples:['resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Updated Name"',"resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --html-file ./new-template.html",'resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --subject "New Subject" --from "acme@example.com" --json',"resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --var PRODUCT:string:item --var PRICE:number:25"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals();t.name==null&&t.html==null&&t.htmlFile==null&&t.reactEmail==null&&t.subject==null&&t.text==null&&t.textFile==null&&t.from==null&&t.replyTo==null&&t.alias==null&&t.var==null&&h({message:"Provide at least one option to update: --name, --html, --html-file, --react-email, --subject, --text, --text-file, --from, --reply-to, --alias, or --var.",code:"no_changes"},{json:i.json}),t.reactEmail!=null&&(t.html!=null||t.htmlFile!=null)&&h({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:i.json}),t.html!=null&&t.htmlFile!=null&&h({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:i.json}),t.htmlFile==="-"&&t.textFile==="-"&&h({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:i.json});let r=await g(e,tt,i),n=t.html,s=t.text;t.htmlFile!=null&&(n=ie(t.htmlFile,i)),t.textFile!=null&&(t.text!=null&&process.stderr.write(`Warning: both --text and --text-file provided; using --text-file
864
- `),s=ie(t.textFile,i)),t.reactEmail!=null&&(n=await qe(t.reactEmail,i)),await R({loading:"Updating template...",sdkCall:a=>a.templates.update(r,{...t.name!=null&&{name:t.name},...n!=null&&{html:n},...t.subject!=null&&{subject:t.subject},...s!=null&&{text:s},...t.from!=null&&{from:t.from},...t.replyTo!=null&&{replyTo:t.replyTo},...t.alias!=null&&{alias:t.alias},...t.var!=null&&{variables:Fi(t.var)}}),errorCode:"update_error",successMsg:`Template updated: ${r}`,retryTransient:!0},i)});var Hu=new c("templates").description("Manage templates").addHelpText("after",d({context:`Lifecycle:
868
+ `),s=ie(t.textFile,i)),t.reactEmail!=null&&(n=await qe(t.reactEmail,i)),await F({loading:"Updating template...",sdkCall:a=>a.templates.update(r,{...t.name!=null&&{name:t.name},...n!=null&&{html:n},...t.subject!=null&&{subject:t.subject},...s!=null&&{text:s},...t.from!=null&&{from:t.from},...t.replyTo!=null&&{replyTo:t.replyTo},...t.alias!=null&&{alias:t.alias},...t.var!=null&&{variables:Ri(t.var)}}),errorCode:"update_error",successMsg:`Template updated: ${r}`,retryTransient:!0},i)});var qu=new d("templates").description("Manage templates").addHelpText("after",c({context:`Lifecycle:
865
869
  Templates follow a draft \u2192 published workflow:
866
870
  1. create \u2014 creates a draft template
867
871
  2. update \u2014 edits name, subject, HTML, variables, etc.
@@ -875,7 +879,7 @@ Template variables:
875
879
  Each variable must be declared with --var when creating or updating:
876
880
  --var KEY:type e.g. --var NAME:string
877
881
  --var KEY:type:fallback e.g. --var PRICE:number:25
878
- Valid types: string, number.`,examples:["resend templates list",'resend templates create --name "Welcome" --html "<h1>Hello {{{NAME}}}</h1>" --subject "Welcome!" --var NAME:string',"resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --subject "Updated Subject"',"resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).addCommand(Ou).addCommand(Iu).addCommand(Pu).addCommand(ju,{isDefault:!0}).addCommand(Gu).addCommand(Eu).addCommand($u).addCommand(Bu);var Qu=new c("create").description("Create a new topic for subscription management").option("--name <name>","Topic name (required)").option("--description <description>","Description shown to contacts when managing subscriptions").addOption(new q("--default-subscription <mode>","Default subscription state for contacts").choices(["opt_in","opt_out"]).default("opt_in")).addHelpText("after",d({context:`Topics enable fine-grained subscription management. Contacts can opt in or out of
882
+ Valid types: string, number.`,examples:["resend templates list",'resend templates create --name "Welcome" --html "<h1>Hello {{{NAME}}}</h1>" --subject "Welcome!" --var NAME:string',"resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --subject "Updated Subject"',"resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).addCommand(ju).addCommand(Gu).addCommand(Qu).addCommand(Hu,{isDefault:!0}).addCommand(Mu).addCommand(Pu).addCommand(Nu).addCommand($u);var Lu=new d("create").description("Create a new topic for subscription management").option("--name <name>","Topic name (required)").option("--description <description>","Description shown to contacts when managing subscriptions").addOption(new q("--default-subscription <mode>","Default subscription state for contacts").choices(["opt_in","opt_out"]).default("opt_in")).addHelpText("after",c({context:`Topics enable fine-grained subscription management. Contacts can opt in or out of
879
883
  individual topics. Broadcasts can target only contacts opted into a specific topic.
880
884
 
881
885
  Example topics: "Product Updates", "Security Alerts", "Weekly Digest".
@@ -884,16 +888,16 @@ Example topics: "Product Updates", "Security Alerts", "Weekly Digest".
884
888
  opt_in Contacts receive broadcasts unless they explicitly opt out (default)
885
889
  opt_out Contacts do NOT receive broadcasts unless they explicitly opt in
886
890
 
887
- Non-interactive: --name is required.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out','resend topics create --name "Security Alerts" --description "Critical security notices" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Topic name",placeholder:"e.g. Product Updates"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating topic...",sdkCall:r=>r.topics.create({name:i,defaultSubscription:e.defaultSubscription,...e.description&&{description:e.description}}),onInteractive:r=>{console.log(`Topic created: ${r.id}`)}},o)});var Nu=new c("delete").alias("rm").description("Delete a topic").argument("[id]","Topic UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`Warning: Deleting a topic removes all contact subscriptions to that topic and may affect
891
+ Non-interactive: --name is required.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out','resend topics create --name "Security Alerts" --description "Critical security notices" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.name,{message:"Topic name",placeholder:"e.g. Product Updates"},{message:"Missing --name flag.",code:"missing_name"},o);await P({loading:"Creating topic...",sdkCall:r=>r.topics.create({name:i,defaultSubscription:e.defaultSubscription,...e.description&&{description:e.description}}),onInteractive:r=>{console.log(`Topic created: ${r.id}`)}},o)});var Wu=new d("delete").alias("rm").description("Delete a topic").argument("[id]","Topic UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`Warning: Deleting a topic removes all contact subscriptions to that topic and may affect
888
892
  broadcasts that reference this topic_id. Contacts themselves are not deleted.
889
893
 
890
894
  Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"topic","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,yt,i);await z(r.id,!!t.yes,{confirmMessage:`Delete topic "${r.label}"?
891
895
  ID: ${r.id}
892
- All contact subscriptions and broadcast associations will be removed.`,loading:"Deleting topic...",object:"topic",successMsg:"Topic deleted",sdkCall:n=>n.topics.remove(r.id)},i)});var Mu=new c("get").description("Retrieve a topic by ID").argument("[id]","Topic UUID").addHelpText("after",d({output:' {"id":"<uuid>","name":"<name>","description":"<desc>","default_subscription":"opt_in|opt_out","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,yt,i);await j({loading:"Fetching topic...",sdkCall:n=>n.topics.get(r),onInteractive:n=>{console.log(`${n.name}`),console.log(`ID: ${n.id}`),n.description&&console.log(`Description: ${n.description}`),console.log(`Default subscription: ${n.default_subscription}`),console.log(`Created: ${n.created_at}`)}},i)});var qu=new c("list").alias("ls").description("List all topics").addHelpText("after",d({context:`Returns all topics in your account. Topic subscription management for individual
893
- contacts is handled via "resend contacts topics <contactId>".`,output:' {"data":[{"id":"<uuid>","name":"<name>","description":"<desc>","default_subscription":"opt_in|opt_out","created_at":"<date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend topics list","resend topics list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await S({loading:"Fetching topics...",sdkCall:i=>i.topics.list(),onInteractive:i=>console.log(gl(i.data))},o)});var Lu=new c("update").description("Update a topic's name or description").argument("[id]","Topic UUID").option("--name <name>","New topic name").option("--description <description>","New description shown to contacts").addHelpText("after",d({context:`At least one of --name or --description must be provided to update the topic.
896
+ All contact subscriptions and broadcast associations will be removed.`,loading:"Deleting topic...",object:"topic",successMsg:"Topic deleted",sdkCall:n=>n.topics.remove(r.id)},i)});var Ju=new d("get").description("Retrieve a topic by ID").argument("[id]","Topic UUID").addHelpText("after",c({output:' {"id":"<uuid>","name":"<name>","description":"<desc>","default_subscription":"opt_in|opt_out","created_at":"<date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,yt,i);await B({loading:"Fetching topic...",sdkCall:n=>n.topics.get(r),onInteractive:n=>{console.log(`${n.name}`),console.log(`ID: ${n.id}`),n.description&&console.log(`Description: ${n.description}`),console.log(`Default subscription: ${n.default_subscription}`),console.log(`Created: ${n.created_at}`)}},i)});var Vu=new d("list").alias("ls").description("List all topics").addHelpText("after",c({context:`Returns all topics in your account. Topic subscription management for individual
897
+ contacts is handled via "resend contacts topics <contactId>".`,output:' {"data":[{"id":"<uuid>","name":"<name>","description":"<desc>","default_subscription":"opt_in|opt_out","created_at":"<date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend topics list","resend topics list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await S({loading:"Fetching topics...",sdkCall:i=>i.topics.list(),onInteractive:i=>console.log(Al(i.data))},o)});var zu=new d("update").description("Update a topic's name or description").argument("[id]","Topic UUID").option("--name <name>","New topic name").option("--description <description>","New description shown to contacts").addHelpText("after",c({context:`At least one of --name or --description must be provided to update the topic.
894
898
 
895
899
  Note: --default-subscription cannot be changed after creation.
896
- To change the default subscription, delete the topic and recreate it.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"','resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --description "Critical notices" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,yt,i);!t.name&&!t.description&&h({message:"Provide at least one option to update: --name or --description.",code:"no_changes"},{json:i.json}),await R({loading:"Updating topic...",sdkCall:n=>n.topics.update({id:r,...t.name&&{name:t.name},...t.description&&{description:t.description}}),errorCode:"update_error",successMsg:`Topic updated: ${r}`},i)});var Wu=new c("topics").description("Manage topics for contact subscription preferences").addHelpText("after",d({context:`Topics enable fine-grained subscription management beyond the global unsubscribe flag.
900
+ To change the default subscription, delete the topic and recreate it.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"','resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --description "Critical notices" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,yt,i);!t.name&&!t.description&&h({message:"Provide at least one option to update: --name or --description.",code:"no_changes"},{json:i.json}),await F({loading:"Updating topic...",sdkCall:n=>n.topics.update({id:r,...t.name&&{name:t.name},...t.description&&{description:t.description}}),errorCode:"update_error",successMsg:`Topic updated: ${r}`},i)});var Yu=new d("topics").description("Manage topics for contact subscription preferences").addHelpText("after",c({context:`Topics enable fine-grained subscription management beyond the global unsubscribe flag.
897
901
  A contact can opt in or out of individual topics independently.
898
902
 
899
903
  Broadcasts can target a topic_id so only contacts who have opted into that topic
@@ -906,11 +910,11 @@ Subscription states:
906
910
 
907
911
  Contact topic subscriptions are managed via the contacts namespace:
908
912
  resend contacts topics <contactId>
909
- resend contacts update-topics <contactId> --topic-id <id> --subscription opt_in`,examples:["resend topics list",'resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out',"resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"',"resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(Qu).addCommand(Mu).addCommand(qu,{isDefault:!0}).addCommand(Lu).addCommand(Nu);X();Uo();Kt();var Ju=new c("update").description("Check for available CLI updates").addHelpText("after",d({context:`Checks the latest release on GitHub (bypasses the cache).
913
+ resend contacts update-topics <contactId> --topic-id <id> --subscription opt_in`,examples:["resend topics list",'resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out',"resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"',"resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(Lu).addCommand(Ju).addCommand(Vu,{isDefault:!0}).addCommand(zu).addCommand(Wu);X();Uo();Kt();var Xu=new d("update").description("Check for available CLI updates").addHelpText("after",c({context:`Checks the latest release on GitHub (bypasses the cache).
910
914
  Shows the current version, latest version, and how to upgrade.`,output:` {"current":"1.4.0","latest":"1.5.0","update_available":true,"upgrade_command":"npm install -g resend-cli"}
911
- {"current":"1.5.0","latest":"1.5.0","update_available":false}`,examples:["resend update","resend update --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),r=w()&&!o.json?le("Checking for updates..."):null,n=await Hr();if(!n){r?.fail("Could not check for updates"),h({message:"Could not reach GitHub releases",code:"fetch_failed"},{json:o.json});return}let s=wi(se,n),a=vi();if(o.json||!w()){N({current:se,latest:n,update_available:s,...s?{upgrade_command:a}:{}},{json:o.json});return}if(s){let l=a.startsWith("http");r?.warn(`Update available: v${se} \u2192 v${n}`),console.log(`
915
+ {"current":"1.5.0","latest":"1.5.0","update_available":false}`,examples:["resend update","resend update --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),r=w()&&!o.json?le("Checking for updates..."):null,n=await Qr();if(!n){r?.fail("Could not check for updates"),h({message:"Could not reach GitHub releases",code:"fetch_failed"},{json:o.json});return}let s=vi(se,n),a=Ui();if(o.json||!w()){M({current:se,latest:n,update_available:s,...s?{upgrade_command:a}:{}},{json:o.json});return}if(s){let l=a.startsWith("http");r?.warn(`Update available: v${se} \u2192 v${n}`),console.log(`
912
916
  ${l?"Visit":"Run"}: \x1B[36m${a}\x1B[0m
913
- `)}else r?.stop(`Already up to date (v${se})`)});X();var lt=["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.scheduled","email.suppressed","email.received","contact.created","contact.updated","contact.deleted","contact.topics.updated","domain.created","domain.updated","domain.deleted","suppression.added","suppression.removed","topic.created","topic.updated","topic.deleted","inbox.created","inbox.updated","inbox.deleted","inbox.thread.created","inbox.email.received","inbox.email.sent","inbox.thread.folder.updated","inbox.thread.assigned","inbox.thread.unassigned","inbox.thread.labels.updated","inbox.draft.created","inbox.draft.updated","inbox.draft.sent","inbox.draft.deleted"];function eo(e){return e.flatMap(t=>t.split(",")).map(t=>t.trim()).filter(Boolean)}var xe={resource:"webhook",resourcePlural:"webhooks",fetchItems:(e,{limit:t,after:o})=>e.webhooks.list({limit:t,...o&&{after:o}}),display:e=>({label:e.endpoint,hint:e.id})};function Vu(e){let t=e.map(o=>{let i=(o.events??[]).join(", "),r=i.length>60?`${i.slice(0,57)}...`:i;return[o.endpoint,r,o.status,o.id]});return _(["Endpoint","Events","Status","ID"],t,"(no webhooks)")}var zu=new c("create").description("Register a new webhook endpoint to receive real-time event notifications").option("--endpoint <endpoint>","HTTPS URL to receive webhook events (required)").option("--events <events...>",'Event types to subscribe to (comma or space-separated). Use "all" for all 37 events.').addHelpText("after",d({context:`Webhooks deliver real-time event notifications to your HTTPS endpoint.
917
+ `)}else r?.stop(`Already up to date (v${se})`)});X();var lt=["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.scheduled","email.suppressed","email.received","contact.created","contact.updated","contact.deleted","contact.topics.updated","domain.created","domain.updated","domain.deleted","suppression.added","suppression.removed","topic.created","topic.updated","topic.deleted","inbox.created","inbox.updated","inbox.deleted","inbox.thread.created","inbox.email.received","inbox.email.sent","inbox.thread.folder.updated","inbox.thread.assigned","inbox.thread.unassigned","inbox.thread.labels.updated","inbox.draft.created","inbox.draft.updated","inbox.draft.sent","inbox.draft.deleted"];function eo(e){return e.flatMap(t=>t.split(",")).map(t=>t.trim()).filter(Boolean)}var xe={resource:"webhook",resourcePlural:"webhooks",fetchItems:(e,{limit:t,after:o})=>e.webhooks.list({limit:t,...o&&{after:o}}),display:e=>({label:e.endpoint,hint:e.id})};function Zu(e){let t=e.map(o=>{let i=(o.events??[]).join(", "),r=i.length>60?`${i.slice(0,57)}...`:i;return[o.endpoint,r,o.status,o.id]});return _(["Endpoint","Events","Status","ID"],t,"(no webhooks)")}var em=new d("create").description("Register a new webhook endpoint to receive real-time event notifications").option("--endpoint <endpoint>","HTTPS URL to receive webhook events (required)").option("--events <events...>",'Event types to subscribe to (comma or space-separated). Use "all" for all 37 events.').addHelpText("after",c({context:`Webhooks deliver real-time event notifications to your HTTPS endpoint.
914
918
  Events fire per-recipient: a batch email to 3 recipients generates 3 email.sent events.
915
919
 
916
920
  --endpoint must use HTTPS.
@@ -939,38 +943,38 @@ Use the signing_secret in the response to verify webhook payloads using Svix
939
943
  signature headers (svix-id, svix-timestamp, svix-signature). "resend webhooks get" returns it again.
940
944
  Use resend.webhooks.verify() in your application to validate incoming payloads.
941
945
 
942
- Non-interactive: --endpoint and --events are required.`,output:' {"object":"webhook","id":"<uuid>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","missing_endpoint","missing_events","create_error"],examples:["resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks create --endpoint https://app.example.com/hooks/resend --events email.sent email.bounced","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.endpoint,{message:"Webhook endpoint URL",placeholder:"https://your-app.com/webhooks/resend",validate:s=>{if(!s)return"Endpoint URL is required";if(!s.startsWith("https://"))return"Endpoint must use HTTPS"}},{message:"Missing --endpoint flag.",code:"missing_endpoint"},o),r,n=e.events?.length?eo(e.events):void 0;if(n?.includes("all"))r=lt;else if(n?.length)r=n;else{(!w()||o.json)&&h({message:"Missing --events flag.",code:"missing_events"},{json:o.json});let s=await Vn({message:"Select event types to subscribe to",options:lt.map(a=>({value:a,label:a}))});F(s)&&O("Cancelled."),r=s}await P({loading:"Creating webhook...",sdkCall:s=>s.webhooks.create({endpoint:i,events:r}),onInteractive:s=>{console.log("Webhook created"),console.log(`ID: ${s.id}`),console.log(`Signing Secret: ${s.signing_secret}`)}},o)});var Yu=new c("delete").alias("rm").description("Delete a webhook endpoint and stop all event deliveries to it").argument("[id]","Webhook UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",d({context:`Warning: Deleting a webhook immediately stops event delivery to the endpoint.
946
+ Non-interactive: --endpoint and --events are required.`,output:' {"object":"webhook","id":"<uuid>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","missing_endpoint","missing_events","create_error"],examples:["resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks create --endpoint https://app.example.com/hooks/resend --events email.sent email.bounced","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.endpoint,{message:"Webhook endpoint URL",placeholder:"https://your-app.com/webhooks/resend",validate:s=>{if(!s)return"Endpoint URL is required";if(!s.startsWith("https://"))return"Endpoint must use HTTPS"}},{message:"Missing --endpoint flag.",code:"missing_endpoint"},o),r,n=e.events?.length?eo(e.events):void 0;if(n?.includes("all"))r=lt;else if(n?.length)r=n;else{(!w()||o.json)&&h({message:"Missing --events flag.",code:"missing_events"},{json:o.json});let s=await zn({message:"Select event types to subscribe to",options:lt.map(a=>({value:a,label:a}))});R(s)&&O("Cancelled."),r=s}await P({loading:"Creating webhook...",sdkCall:s=>s.webhooks.create({endpoint:i,events:r}),onInteractive:s=>{console.log("Webhook created"),console.log(`ID: ${s.id}`),console.log(`Signing Secret: ${s.signing_secret}`)}},o)});var tm=new d("delete").alias("rm").description("Delete a webhook endpoint and stop all event deliveries to it").argument("[id]","Webhook UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",c({context:`Warning: Deleting a webhook immediately stops event delivery to the endpoint.
943
947
  In-flight events may still be attempted once before the deletion takes effect.
944
948
  To temporarily pause delivery without losing configuration, use:
945
949
  resend webhooks update <id> --status disabled
946
950
 
947
951
  Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"webhook","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend webhooks delete wh_abc123 --yes","resend webhooks delete wh_abc123 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await J(e,xe,i);await z(r.id,!!t.yes,{confirmMessage:`Delete webhook "${r.label}"?
948
952
  ID: ${r.id}
949
- Events will no longer be delivered to this endpoint.`,loading:"Deleting webhook...",object:"webhook",successMsg:"Webhook deleted",sdkCall:n=>n.webhooks.remove(r.id)},i)});function to(e){return{resource:"webhook event",resourcePlural:"webhook events",fetchItems:(t,{limit:o,after:i})=>t.webhooks.events.list({webhookId:e,limit:o,...i&&{after:i}}),display:t=>({label:`${t.type} (${t.status})`,hint:t.id})}}function Xu(e){let t=e.map(o=>[o.type,o.status,o.created_at,o.id]);return _(["Type","Status","Created","ID"],t,"(no webhook events)")}function Zu(e){let t=e.map(o=>{let i=o.response.replace(/\s+/g," ").trim();return[String(o.http_status_code),o.sent_at,i.length>60?`${i.slice(0,57)}...`:i,o.id]});return _(["HTTP","Sent","Response","ID"],t,"(no delivery attempts)")}var em=new c("attempts").description("List the delivery attempts for a webhook event, most recent first").argument("[webhookId]","Webhook ID").argument("[eventId]","Webhook event ID").option("--limit <n>","Maximum number of attempts to return (1-100)","10").option("--after <cursor>","Return attempts after this attempt ID (next page)").addHelpText("after",d({context:`Each attempt records what your endpoint returned: http_status_code and the
953
+ Events will no longer be delivered to this endpoint.`,loading:"Deleting webhook...",object:"webhook",successMsg:"Webhook deleted",sdkCall:n=>n.webhooks.remove(r.id)},i)});function to(e){return{resource:"webhook event",resourcePlural:"webhook events",fetchItems:(t,{limit:o,after:i})=>t.webhooks.events.list({webhookId:e,limit:o,...i&&{after:i}}),display:t=>({label:`${t.type} (${t.status})`,hint:t.id})}}function om(e){let t=e.map(o=>[o.type,o.status,o.created_at,o.id]);return _(["Type","Status","Created","ID"],t,"(no webhook events)")}function im(e){let t=e.map(o=>{let i=o.response.replace(/\s+/g," ").trim();return[String(o.http_status_code),o.sent_at,i.length>60?`${i.slice(0,57)}...`:i,o.id]});return _(["HTTP","Sent","Response","ID"],t,"(no delivery attempts)")}var rm=new d("attempts").description("List the delivery attempts for a webhook event, most recent first").argument("[webhookId]","Webhook ID").argument("[eventId]","Webhook event ID").option("--limit <n>","Maximum number of attempts to return (1-100)","10").option("--after <cursor>","Return attempts after this attempt ID (next page)").addHelpText("after",c({context:`Each attempt records what your endpoint returned: http_status_code and the
950
954
  response body. Use this to debug why an event ended up in the failed status.
951
955
 
952
- This endpoint paginates forward only \u2014 there is no --before cursor.`,output:' {"object":"list","has_more":false,"data":[{"id":"atmpt_...","http_status_code":500,"response":"Internal Server Error","sent_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks events attempts 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events attempts 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2 --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xe,r),s=await g(t,to(n),r),a=D(o.limit,r);await S({loading:"Fetching delivery attempts...",sdkCall:l=>l.webhooks.events.attempts.list({webhookId:n,eventId:s,limit:a,...o.after!==void 0&&{after:o.after}}),onInteractive:l=>{console.log(Zu(l.data)),T(l,`webhooks events attempts ${n} ${s}`,{limit:a,apiKey:r.apiKey,profile:r.profile})}},r)});var tm=new c("get").description("Retrieve a single event delivered to a webhook").argument("[webhookId]","Webhook ID").argument("[eventId]","Webhook event ID").addHelpText("after",d({context:`next_attempt_at is when the next delivery attempt is scheduled. It is null
956
+ This endpoint paginates forward only \u2014 there is no --before cursor.`,output:' {"object":"list","has_more":false,"data":[{"id":"atmpt_...","http_status_code":500,"response":"Internal Server Error","sent_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks events attempts 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events attempts 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2 --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xe,r),s=await g(t,to(n),r),a=D(o.limit,r);await S({loading:"Fetching delivery attempts...",sdkCall:l=>l.webhooks.events.attempts.list({webhookId:n,eventId:s,limit:a,...o.after!==void 0&&{after:o.after}}),onInteractive:l=>{console.log(im(l.data)),T(l,`webhooks events attempts ${n} ${s}`,{limit:a,apiKey:r.apiKey,profile:r.profile})}},r)});var nm=new d("get").description("Retrieve a single event delivered to a webhook").argument("[webhookId]","Webhook ID").argument("[eventId]","Webhook event ID").addHelpText("after",c({context:`next_attempt_at is when the next delivery attempt is scheduled. It is null
953
957
  once the event reaches success or failed.
954
958
 
955
- payload is the JSON body that was sent to your endpoint.`,output:' {"object":"webhook_event","id":"msg_...","type":"email.sent","created_at":"...","status":"attempting","next_attempt_at":"...","payload":{...}}',errorCodes:["auth_error","fetch_error"],examples:["resend webhooks events get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2 --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xe,r),s=await g(t,to(n),r);await j({loading:"Fetching webhook event...",sdkCall:a=>a.webhooks.events.get({webhookId:n,eventId:s}),onInteractive:a=>{console.log(`${a.type} - ${a.status}`),console.log(`ID: ${a.id}`),console.log(`Created: ${a.created_at}`),console.log(`Next attempt: ${a.next_attempt_at??"none scheduled"}`),console.log(`
959
+ payload is the JSON body that was sent to your endpoint.`,output:' {"object":"webhook_event","id":"msg_...","type":"email.sent","created_at":"...","status":"attempting","next_attempt_at":"...","payload":{...}}',errorCodes:["auth_error","fetch_error"],examples:["resend webhooks events get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2 --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xe,r),s=await g(t,to(n),r);await B({loading:"Fetching webhook event...",sdkCall:a=>a.webhooks.events.get({webhookId:n,eventId:s}),onInteractive:a=>{console.log(`${a.type} - ${a.status}`),console.log(`ID: ${a.id}`),console.log(`Created: ${a.created_at}`),console.log(`Next attempt: ${a.next_attempt_at??"none scheduled"}`),console.log(`
956
960
  Payload:
957
- ${JSON.stringify(a.payload,null,2)}`)}},r)});var om=new c("list").alias("ls").description("List the events delivered to a webhook, most recent first").argument("[webhookId]","Webhook ID").option("--limit <n>","Maximum number of events to return (1-100)","10").option("--after <cursor>","Return events after this event ID (next page)").addHelpText("after",d({context:`status is the delivery status of the event to this webhook:
961
+ ${JSON.stringify(a.payload,null,2)}`)}},r)});var sm=new d("list").alias("ls").description("List the events delivered to a webhook, most recent first").argument("[webhookId]","Webhook ID").option("--limit <n>","Maximum number of events to return (1-100)","10").option("--after <cursor>","Return events after this event ID (next page)").addHelpText("after",c({context:`status is the delivery status of the event to this webhook:
958
962
  pending, attempting, success, or failed.
959
963
 
960
- This endpoint paginates forward only \u2014 there is no --before cursor.`,output:' {"object":"list","has_more":false,"data":[{"id":"msg_...","type":"email.sent","created_at":"...","status":"success"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --limit 50","resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --after msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i),n=D(t.limit,i);await S({loading:"Fetching webhook events...",sdkCall:s=>s.webhooks.events.list({webhookId:r,limit:n,...t.after!==void 0&&{after:t.after}}),onInteractive:s=>{console.log(Xu(s.data)),T(s,`webhooks events list ${r}`,{limit:n,apiKey:i.apiKey,profile:i.profile})}},i)});var im=new c("replay").description("Queue another delivery attempt for a webhook event").argument("[webhookId]","Webhook ID").argument("[eventId]","Webhook event ID").addHelpText("after",d({context:`Queues one more delivery of the event. Does not schedule automatic retries.
961
- The webhook must be enabled \u2014 re-enable it first with: resend webhooks update <webhook-id> --status enabled`,output:' {"object":"webhook_event","id":"msg_..."}',errorCodes:["auth_error","replay_error"],examples:["resend webhooks events replay 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events replay 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2 --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xe,r),s=await g(t,to(n),r);await R({loading:"Replaying webhook event...",sdkCall:a=>a.webhooks.events.replay({webhookId:n,eventId:s}),errorCode:"replay_error",successMsg:`Webhook event replay queued: ${s}`},r)});var rm=new c("events").description("Inspect or replay the events Resend delivered to a webhook").addHelpText("after",d({context:`Debugging a webhook that is missing deliveries:
964
+ This endpoint paginates forward only \u2014 there is no --before cursor.`,output:' {"object":"list","has_more":false,"data":[{"id":"msg_...","type":"email.sent","created_at":"...","status":"success"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --limit 50","resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --after msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i),n=D(t.limit,i);await S({loading:"Fetching webhook events...",sdkCall:s=>s.webhooks.events.list({webhookId:r,limit:n,...t.after!==void 0&&{after:t.after}}),onInteractive:s=>{console.log(om(s.data)),T(s,`webhooks events list ${r}`,{limit:n,apiKey:i.apiKey,profile:i.profile})}},i)});var am=new d("replay").description("Queue another delivery attempt for a webhook event").argument("[webhookId]","Webhook ID").argument("[eventId]","Webhook event ID").addHelpText("after",c({context:`Queues one more delivery of the event. Does not schedule automatic retries.
965
+ The webhook must be enabled \u2014 re-enable it first with: resend webhooks update <webhook-id> --status enabled`,output:' {"object":"webhook_event","id":"msg_..."}',errorCodes:["auth_error","replay_error"],examples:["resend webhooks events replay 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events replay 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2 --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await g(e,xe,r),s=await g(t,to(n),r);await F({loading:"Replaying webhook event...",sdkCall:a=>a.webhooks.events.replay({webhookId:n,eventId:s}),errorCode:"replay_error",successMsg:`Webhook event replay queued: ${s}`},r)});var lm=new d("events").description("Inspect or replay the events Resend delivered to a webhook").addHelpText("after",c({context:`Debugging a webhook that is missing deliveries:
962
966
  1. resend webhooks events list <webhook-id> (find the event)
963
967
  2. resend webhooks events get <webhook-id> <event-id> (see the payload we sent)
964
968
  3. resend webhooks events attempts <webhook-id> <event-id> (see what your endpoint returned)
965
969
  4. resend webhooks events replay <webhook-id> <event-id> (queue another delivery)
966
970
 
967
971
  Events are listed most recent first. Both list commands paginate forward only,
968
- with --after.`,examples:["resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend webhooks events get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events attempts 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events replay 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2"]})).addCommand(om,{isDefault:!0}).addCommand(tm).addCommand(em).addCommand(im);var nm=new c("get").description("Retrieve a webhook endpoint configuration by ID").argument("[id]","Webhook UUID").addHelpText("after",d({context:'The response includes the signing_secret. Rotate it with "resend webhooks rotate-signing-secret <id>".',output:' {"object":"webhook","id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled|disabled","created_at":"<date>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","fetch_error"],examples:["resend webhooks get wh_abc123","resend webhooks get wh_abc123 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i);await j({loading:"Fetching webhook...",sdkCall:n=>n.webhooks.get(r),onInteractive:n=>{console.log(`${n.endpoint}`),console.log(`ID: ${n.id}`),console.log(`Status: ${n.status}`),console.log(`Events: ${(n.events??[]).join(", ")||"(none)"}`),console.log(`Created: ${n.created_at}`),console.log(`Signing Secret: ${n.signing_secret}`)}},i)});var sm=new c("list").alias("ls").description("List all registered webhook endpoints").option("--limit <n>","Maximum number of webhooks to return (1-100)","10").option("--after <cursor>","Return webhooks after this cursor (next page)").option("--before <cursor>","Return webhooks before this cursor (previous page)").addHelpText("after",d({context:`Pagination: use --after or --before with a webhook ID as the cursor.
972
+ with --after.`,examples:["resend webhooks events list 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend webhooks events get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events attempts 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2","resend webhooks events replay 4dd369bc-aa82-4ff3-97de-514ae3000ee0 msg_1srOrx2ZWZBpBUvZwXKQmoEYga2"]})).addCommand(sm,{isDefault:!0}).addCommand(nm).addCommand(rm).addCommand(am);var dm=new d("get").description("Retrieve a webhook endpoint configuration by ID").argument("[id]","Webhook UUID").addHelpText("after",c({context:'The response includes the signing_secret. Rotate it with "resend webhooks rotate-signing-secret <id>".',output:' {"object":"webhook","id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled|disabled","created_at":"<date>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","fetch_error"],examples:["resend webhooks get wh_abc123","resend webhooks get wh_abc123 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i);await B({loading:"Fetching webhook...",sdkCall:n=>n.webhooks.get(r),onInteractive:n=>{console.log(`${n.endpoint}`),console.log(`ID: ${n.id}`),console.log(`Status: ${n.status}`),console.log(`Events: ${(n.events??[]).join(", ")||"(none)"}`),console.log(`Created: ${n.created_at}`),console.log(`Signing Secret: ${n.signing_secret}`)}},i)});var cm=new d("list").alias("ls").description("List all registered webhook endpoints").option("--limit <n>","Maximum number of webhooks to return (1-100)","10").option("--after <cursor>","Return webhooks after this cursor (next page)").option("--before <cursor>","Return webhooks before this cursor (previous page)").addHelpText("after",c({context:`Pagination: use --after or --before with a webhook ID as the cursor.
969
973
  Only one of --after or --before may be used at a time.
970
- The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled","created_at":"<date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks list","resend webhooks list --limit 25 --json","resend webhooks list --after wh_abc123 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=B(i,e.after,e.before,o);await S({loading:"Fetching webhooks...",sdkCall:n=>n.webhooks.list(r),onInteractive:n=>{console.log(Vu(n.data)),T(n,"webhooks list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var lm=require("node:http");var we=me(Je(),1);X();function am(e){return e?"error"in e?e.timeout?{status:504,body:"Forward target timed out"}:{status:502,body:"Forward target unreachable"}:e.status>=200&&e.status<300?{status:200,body:"OK"}:{status:e.status,body:"Forward target failed"}:{status:200,body:"OK"}}var cm=["svix-id","svix-timestamp","svix-signature"],vg=3e4;function Ug(){return new Date().toLocaleTimeString("en-GB",{hour12:!1})}function Sg(e){let t=pe(e.type??"unknown"),o=e.data??{},i=pe(o.id??o.email_id??o.draft_id??o.thread_id??o.inbox_id??""),r="";if(t.startsWith("email.")){let n=pe(o.from??""),s=pe(Array.isArray(o.to)?o.to[0]:"");(n||s)&&(r=`${n} -> ${s}`)}else if(t.startsWith("domain.")||t.startsWith("topic."))r=pe(o.name??"");else if(t.startsWith("contact.")||t.startsWith("suppression."))r=pe(o.email??"");else if(t.startsWith("inbox.")){let n=o.email,s=o.draft,a=o.thread,l=o.inbox;if(n){let u=pe(n.from??""),m=pe(Array.isArray(n.to)?n.to[0]:"");r=`${u} -> ${m}`}else s||a?r=pe(s?.subject??a?.subject??""):l&&(r=pe(l.email_address??""))}return{type:t,resourceId:i,detail:r}}function Kg(e){let t=`${e} ${kg(e)}`;return e>=200&&e<300?we.default.green(t):e>=400&&e<500?we.default.yellow(t):we.default.red(t)}function kg(e){return{200:"OK",201:"Created",204:"No Content",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[e]??""}async function _g(e,t,o){let i={"content-type":"application/json"};for(let s of cm){let a=o[s];a&&(i[s]=a)}let r=e.startsWith("http")?e:`http://${e}`;return{status:(await fetch(r,{method:"POST",headers:i,body:t,signal:AbortSignal.timeout(vg)})).status}}function Fg(e){return new Promise((t,o)=>{let i=[];e.on("data",r=>i.push(r)),e.on("end",()=>t(Buffer.concat(i).toString())),e.on("error",o)})}async function Rg(e,t,o){process.stderr.write(`
974
+ The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled","created_at":"<date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks list","resend webhooks list --limit 25 --json","resend webhooks list --after wh_abc123 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=D(e.limit,o),r=I(i,e.after,e.before,o);await S({loading:"Fetching webhooks...",sdkCall:n=>n.webhooks.list(r),onInteractive:n=>{console.log(Zu(n.data)),T(n,"webhooks list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var mm=require("node:http");var we=me(Je(),1);X();function um(e){return e?"error"in e?e.timeout?{status:504,body:"Forward target timed out"}:{status:502,body:"Forward target unreachable"}:e.status>=200&&e.status<300?{status:200,body:"OK"}:{status:e.status,body:"Forward target failed"}:{status:200,body:"OK"}}var pm=["svix-id","svix-timestamp","svix-signature"],_g=3e4;function Fg(){return new Date().toLocaleTimeString("en-GB",{hour12:!1})}function Rg(e){let t=pe(e.type??"unknown"),o=e.data??{},i=pe(o.id??o.email_id??o.draft_id??o.thread_id??o.inbox_id??""),r="";if(t.startsWith("email.")){let n=pe(o.from??""),s=pe(Array.isArray(o.to)?o.to[0]:"");(n||s)&&(r=`${n} -> ${s}`)}else if(t.startsWith("domain.")||t.startsWith("topic."))r=pe(o.name??"");else if(t.startsWith("contact.")||t.startsWith("suppression."))r=pe(o.email??"");else if(t.startsWith("inbox.")){let n=o.email,s=o.draft,a=o.thread,l=o.inbox;if(n){let u=pe(n.from??""),m=pe(Array.isArray(n.to)?n.to[0]:"");r=`${u} -> ${m}`}else s||a?r=pe(s?.subject??a?.subject??""):l&&(r=pe(l.email_address??""))}return{type:t,resourceId:i,detail:r}}function Dg(e){let t=`${e} ${Tg(e)}`;return e>=200&&e<300?we.default.green(t):e>=400&&e<500?we.default.yellow(t):we.default.red(t)}function Tg(e){return{200:"OK",201:"Created",204:"No Content",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[e]??""}async function Og(e,t,o){let i={"content-type":"application/json"};for(let s of pm){let a=o[s];a&&(i[s]=a)}let r=e.startsWith("http")?e:`http://${e}`;return{status:(await fetch(r,{method:"POST",headers:i,body:t,signal:AbortSignal.timeout(_g)})).status}}function Eg(e){return new Promise((t,o)=>{let i=[];e.on("data",r=>i.push(r)),e.on("end",()=>t(Buffer.concat(i).toString())),e.on("error",o)})}async function Bg(e,t,o){process.stderr.write(`
971
975
  Cleaning up...`);try{await e.webhooks.remove(t),process.stderr.write(` Webhook ${t} deleted.
972
976
  `)}catch{process.stderr.write(` Failed to delete webhook ${t}.
973
- `)}o.close()}var dm=new c("listen").description("Listen for webhook events locally during development").option("--url <url>","Public URL for receiving webhooks (your tunnel URL)").option("--forward-to <url>","Forward payloads to this local URL").option("--events <events...>","Event types to listen for (default: all)").option("--port <port>","Local server port","4318").addHelpText("after",d({context:`Start a local server that receives Resend webhook events in real time.
977
+ `)}o.close()}var fm=new d("listen").description("Listen for webhook events locally during development").option("--url <url>","Public URL for receiving webhooks (your tunnel URL)").option("--forward-to <url>","Forward payloads to this local URL").option("--events <events...>","Event types to listen for (default: all)").option("--port <port>","Local server port","4318").addHelpText("after",c({context:`Start a local server that receives Resend webhook events in real time.
974
978
 
975
979
  You must provide a public URL (e.g. from ngrok or localtunnel) that
976
980
  points to the local server port. The CLI will:
@@ -981,10 +985,10 @@ points to the local server port. The CLI will:
981
985
  5. Delete the temporary webhook on exit (Ctrl+C)
982
986
 
983
987
  Important: your tunnel must forward traffic to the same port as --port (default 4318).
984
- For example, if using ngrok: ngrok http 4318`,examples:["resend webhooks listen --url https://example.ngrok-free.app","resend webhooks listen --url https://example.ngrok-free.app --forward-to localhost:3000/webhook","resend webhooks listen --url https://example.ngrok-free.app --events email.sent email.bounced","resend webhooks listen --url https://example.ngrok-free.app --port 8080"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.url,{message:"Public tunnel URL",placeholder:"https://example.ngrok-free.app",validate:A=>{if(!A)return"URL is required";if(!A.startsWith("https://")&&!A.startsWith("http://"))return"URL must start with http:// or https://"}},{message:"Missing --url flag.",code:"missing_url"},o),r=Number.parseInt(e.port??"4318",10);(Number.isNaN(r)||r<1||r>65535)&&h({message:"Invalid port number.",code:"invalid_port"},{json:o.json});let n=e.events?.length?eo(e.events):void 0,s;n?.includes("all")?s=lt:n?.length?s=n:s=lt;let a=await ee(o),l=o.json||!w(),u=(0,lm.createServer)(async(A,b)=>{try{if(A.method!=="POST"){b.writeHead(405).end("Method not allowed");return}let x=await Fg(A),v;try{v=JSON.parse(x)}catch{b.writeHead(400).end("Invalid JSON");return}let U={};for(let $ of cm){let L=A.headers[$];U[$]=Array.isArray(L)?L[0]:L}let{type:K,resourceId:k,detail:I}=Sg(v),G;if(e.forwardTo)try{let{status:$}=await _g(e.forwardTo,x,U);G={status:$}}catch($){let L=$ instanceof DOMException&&$.name==="TimeoutError";G={error:$ instanceof Error?$.message:"Unknown error",timeout:L}}if(l){let $={timestamp:new Date().toISOString(),type:K,resource_id:k,payload:v};e.forwardTo&&G&&($.forwarded="error"in G?{url:e.forwardTo,error:G.error}:{url:e.forwardTo,status:G.status}),console.log(JSON.stringify($))}else{let $=we.default.dim(`[${Ug()}]`),L=K.padEnd(20),ve=k.padEnd(14);if(process.stderr.write(`${$} ${we.default.bold(L)} ${we.default.cyan(ve)} ${I}
988
+ For example, if using ngrok: ngrok http 4318`,examples:["resend webhooks listen --url https://example.ngrok-free.app","resend webhooks listen --url https://example.ngrok-free.app --forward-to localhost:3000/webhook","resend webhooks listen --url https://example.ngrok-free.app --events email.sent email.bounced","resend webhooks listen --url https://example.ngrok-free.app --port 8080"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await E(e.url,{message:"Public tunnel URL",placeholder:"https://example.ngrok-free.app",validate:A=>{if(!A)return"URL is required";if(!A.startsWith("https://")&&!A.startsWith("http://"))return"URL must start with http:// or https://"}},{message:"Missing --url flag.",code:"missing_url"},o),r=Number.parseInt(e.port??"4318",10);(Number.isNaN(r)||r<1||r>65535)&&h({message:"Invalid port number.",code:"invalid_port"},{json:o.json});let n=e.events?.length?eo(e.events):void 0,s;n?.includes("all")?s=lt:n?.length?s=n:s=lt;let a=await ee(o),l=o.json||!w(),u=(0,mm.createServer)(async(A,b)=>{try{if(A.method!=="POST"){b.writeHead(405).end("Method not allowed");return}let x=await Eg(A),v;try{v=JSON.parse(x)}catch{b.writeHead(400).end("Invalid JSON");return}let U={};for(let $ of pm){let L=A.headers[$];U[$]=Array.isArray(L)?L[0]:L}let{type:K,resourceId:k,detail:j}=Rg(v),G;if(e.forwardTo)try{let{status:$}=await Og(e.forwardTo,x,U);G={status:$}}catch($){let L=$ instanceof DOMException&&$.name==="TimeoutError";G={error:$ instanceof Error?$.message:"Unknown error",timeout:L}}if(l){let $={timestamp:new Date().toISOString(),type:K,resource_id:k,payload:v};e.forwardTo&&G&&($.forwarded="error"in G?{url:e.forwardTo,error:G.error}:{url:e.forwardTo,status:G.status}),console.log(JSON.stringify($))}else{let $=we.default.dim(`[${Fg()}]`),L=K.padEnd(20),ve=k.padEnd(14);if(process.stderr.write(`${$} ${we.default.bold(L)} ${we.default.cyan(ve)} ${j}
985
989
  `),e.forwardTo&&G){let re=e.forwardTo.startsWith("http")?e.forwardTo:`http://${e.forwardTo}`;"error"in G?process.stderr.write(`${we.default.dim(" -> POST")} ${re} ${we.default.red(`[Error: ${G.error}]`)}
986
- `):process.stderr.write(`${we.default.dim(" -> POST")} ${re} ${we.default.dim(`[${Kg(G.status)}]`)}
987
- `)}}let Q=am(G);b.writeHead(Q.status).end(Q.body)}catch{b.headersSent||b.writeHead(500).end("Internal error")}});try{await new Promise((A,b)=>{u.on("error",b),u.listen(r,A)})}catch(A){h({message:A instanceof Error?`Failed to start local server on port ${r}: ${A.message}`:`Failed to start local server on port ${r}`,code:"server_listen_error"},{json:o.json})}let m=le("Setting up webhook listener...",o.quiet),p;try{let{data:A,error:b}=await a.webhooks.create({endpoint:i,events:s});(b||!A)&&(m.fail("Failed to create webhook"),u.close(),h({message:b?.message??"Unexpected empty response",code:"create_error"},{json:o.json})),p=A.id}catch(A){m.fail("Failed to create webhook"),u.close(),h({message:A instanceof Error?A.message:"Unknown error",code:"create_error"},{json:o.json})}if(m.stop("Webhook listener ready"),!l){let A=s.length===lt.length?"all events":s.length<=3?s.join(", "):`${s.slice(0,3).join(", ")} (+${s.length-3} more)`;if(process.stderr.write(`
990
+ `):process.stderr.write(`${we.default.dim(" -> POST")} ${re} ${we.default.dim(`[${Dg(G.status)}]`)}
991
+ `)}}let N=um(G);b.writeHead(N.status).end(N.body)}catch{b.headersSent||b.writeHead(500).end("Internal error")}});try{await new Promise((A,b)=>{u.on("error",b),u.listen(r,A)})}catch(A){h({message:A instanceof Error?`Failed to start local server on port ${r}: ${A.message}`:`Failed to start local server on port ${r}`,code:"server_listen_error"},{json:o.json})}let m=le("Setting up webhook listener...",o.quiet),p;try{let{data:A,error:b}=await a.webhooks.create({endpoint:i,events:s});(b||!A)&&(m.fail("Failed to create webhook"),u.close(),h({message:b?.message??"Unexpected empty response",code:"create_error"},{json:o.json})),p=A.id}catch(A){m.fail("Failed to create webhook"),u.close(),h({message:A instanceof Error?A.message:"Unknown error",code:"create_error"},{json:o.json})}if(m.stop("Webhook listener ready"),!l){let A=s.length===lt.length?"all events":s.length<=3?s.join(", "):`${s.slice(0,3).join(", ")} (+${s.length-3} more)`;if(process.stderr.write(`
988
992
  `),process.stderr.write(` ${we.default.bold("Webhook:")} ${p}
989
993
  `),process.stderr.write(` ${we.default.bold("Endpoint:")} ${i}
990
994
  `),process.stderr.write(` ${we.default.bold("Events:")} ${A}
@@ -993,16 +997,16 @@ For example, if using ngrok: ngrok http 4318`,examples:["resend webhooks listen
993
997
  `)}process.stderr.write(`
994
998
  Ready! Listening for webhook events. Press Ctrl+C to stop.
995
999
 
996
- `)}let f=!1,y=async()=>{f||(f=!0,await Rg(a,p,u),process.exit(Mt()))};ri(y),process.on("SIGTERM",y),await new Promise(()=>{})});var um=new c("rotate-signing-secret").description("Generate a new signing secret for a webhook").argument("[id]","Webhook UUID").addHelpText("after",d({context:`Generates a new signing secret and returns it. For 24 hours, payloads are
1000
+ `)}let f=!1,y=async()=>{f||(f=!0,await Bg(a,p,u),process.exit(Mt()))};ni(y),process.on("SIGTERM",y),await new Promise(()=>{})});var hm=new d("rotate-signing-secret").description("Generate a new signing secret for a webhook").argument("[id]","Webhook UUID").addHelpText("after",c({context:`Generates a new signing secret and returns it. For 24 hours, payloads are
997
1001
  signed with both the new and the previous secret, so either one verifies them.
998
- After that, only the new secret does. Update your verification code within that window.`,output:' {"object":"webhook","id":"<uuid>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","create_error"],examples:["resend webhooks rotate-signing-secret 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend webhooks rotate-signing-secret 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i);await P({loading:"Rotating webhook signing secret...",sdkCall:n=>n.webhooks.rotateSigningSecret(r),onInteractive:n=>{console.log("Webhook signing secret rotated"),console.log(`ID: ${n.id}`),console.log(`Signing Secret: ${n.signing_secret}`)}},i)});var mm=new c("update").description("Update a webhook's endpoint URL, event subscriptions, or enabled status").argument("[id]","Webhook UUID").option("--endpoint <endpoint>","New HTTPS URL for this webhook").option("--events <events...>",'Replace the full event subscription list (comma or space-separated). Use "all" for all 37 events.').addOption(new q("--status <status>","Enable or disable event delivery for this webhook").choices(["enabled","disabled"])).addHelpText("after",d({context:`At least one of --endpoint, --events, or --status must be provided.
1002
+ After that, only the new secret does. Update your verification code within that window.`,output:' {"object":"webhook","id":"<uuid>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","create_error"],examples:["resend webhooks rotate-signing-secret 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend webhooks rotate-signing-secret 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i);await P({loading:"Rotating webhook signing secret...",sdkCall:n=>n.webhooks.rotateSigningSecret(r),onInteractive:n=>{console.log("Webhook signing secret rotated"),console.log(`ID: ${n.id}`),console.log(`Signing Secret: ${n.signing_secret}`)}},i)});var gm=new d("update").description("Update a webhook's endpoint URL, event subscriptions, or enabled status").argument("[id]","Webhook UUID").option("--endpoint <endpoint>","New HTTPS URL for this webhook").option("--events <events...>",'Replace the full event subscription list (comma or space-separated). Use "all" for all 37 events.').addOption(new q("--status <status>","Enable or disable event delivery for this webhook").choices(["enabled","disabled"])).addHelpText("after",c({context:`At least one of --endpoint, --events, or --status must be provided.
999
1003
 
1000
1004
  --events replaces the entire event list (it is not additive).
1001
1005
  Use "all" as a shorthand for all 37 event types.
1002
1006
 
1003
1007
  --status controls whether events are delivered to this endpoint:
1004
1008
  enabled Events are delivered (default on creation)
1005
- disabled Events are suppressed without deleting the webhook`,output:' {"object":"webhook","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:["resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend","resend webhooks update wh_abc123 --events email.sent email.bounced","resend webhooks update wh_abc123 --events all","resend webhooks update wh_abc123 --status disabled","resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend --events all --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i),n=t.events?.length?eo(t.events):void 0,s=n!==void 0;!t.endpoint&&!s&&!t.status&&h({message:"Provide at least one option to update: --endpoint, --events, or --status.",code:"no_changes"},{json:i.json}),s&&!n.length&&h({message:"Missing --events values.",code:"no_changes"},{json:i.json});let a=n?.includes("all")?lt:n?.length?n:void 0;await R({loading:"Updating webhook...",sdkCall:l=>l.webhooks.update(r,{...t.endpoint&&{endpoint:t.endpoint},...a?.length&&{events:a},...t.status&&{status:t.status}}),errorCode:"update_error",successMsg:`Webhook updated: ${r}`},i)});var pm=new c("webhooks").description("Manage webhook endpoints for real-time event notifications").addHelpText("after",d({context:`Webhooks let you receive real-time event notifications from Resend at an HTTPS endpoint.
1009
+ disabled Events are suppressed without deleting the webhook`,output:' {"object":"webhook","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:["resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend","resend webhooks update wh_abc123 --events email.sent email.bounced","resend webhooks update wh_abc123 --events all","resend webhooks update wh_abc123 --status disabled","resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend --events all --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await g(e,xe,i),n=t.events?.length?eo(t.events):void 0,s=n!==void 0;!t.endpoint&&!s&&!t.status&&h({message:"Provide at least one option to update: --endpoint, --events, or --status.",code:"no_changes"},{json:i.json}),s&&!n.length&&h({message:"Missing --events values.",code:"no_changes"},{json:i.json});let a=n?.includes("all")?lt:n?.length?n:void 0;await F({loading:"Updating webhook...",sdkCall:l=>l.webhooks.update(r,{...t.endpoint&&{endpoint:t.endpoint},...a?.length&&{events:a},...t.status&&{status:t.status}}),errorCode:"update_error",successMsg:`Webhook updated: ${r}`},i)});var Am=new d("webhooks").description("Manage webhook endpoints for real-time event notifications").addHelpText("after",c({context:`Webhooks let you receive real-time event notifications from Resend at an HTTPS endpoint.
1006
1010
  Payloads are signed with Svix headers for verification.
1007
1011
 
1008
1012
  Event categories (37 total):
@@ -1026,18 +1030,18 @@ Signature verification (Svix):
1026
1030
  Rotate a secret with "resend webhooks rotate-signing-secret <id>"; "resend webhooks get" returns the current one.
1027
1031
 
1028
1032
  Delivery history:
1029
- Inspect what Resend sent and what your endpoint returned with "resend webhooks events".`,examples:["resend webhooks list","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks get wh_abc123","resend webhooks update wh_abc123 --status disabled","resend webhooks rotate-signing-secret wh_abc123","resend webhooks delete wh_abc123 --yes","resend webhooks events list wh_abc123"]})).addCommand(zu).addCommand(nm).addCommand(rm).addCommand(dm).addCommand(sm,{isDefault:!0}).addCommand(mm).addCommand(um).addCommand(Yu);var hm=require("node:path");ye();X();var fm={flag:"flag",env:"environment variable",config:"config file",secure_storage:"secure storage"},Dg={full_access:"full access",sending_access:"sending access"},gm=new c("whoami").description("Show current authentication status").addHelpText("after",d({setup:!0,context:`Local only \u2014 no network calls.
1030
- Shows which profile is active and where the active credential comes from.`,output:' {"authenticated":true,"profile":"production","api_key":"re_...abcd","source":"config","config_path":"/Users/you/.config/resend/credentials.json"}\n {"error":{"message":"Not authenticated.\\nRun `resend login` to get started.","code":"not_authenticated"}}',examples:["resend whoami","resend whoami --json","resend whoami --profile production"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=o.profile,r=await Rt(o.apiKey,i,{refresh:!1});if(!r){let f=i||ti(i),y=Fe(),A=y.some(U=>U.name===f),b=i||process.env.RESEND_PROFILE,x=b&&!A?`Profile "${f}" not found.
1031
- Available profiles: ${y.map(U=>U.name).join(", ")||"(none)"}`:"Not authenticated.\nRun `resend login` to get started.",v=b&&!A?"profile_not_found":"not_authenticated";o.json||!w()?h({message:x,code:v},{json:o.json}):h({message:x,code:v},{json:!1})}let n=r.profile??ti(i),s=(0,hm.join)(Qe(),"credentials.json"),a=r.type==="api_key"?r.key:r.access_token,l=r.source,u=r.type==="api_key"?r.permission:void 0;if(o.json||!w()){N({authenticated:!0,profile:n,api_key:At(a),source:l,...u&&{permission:u},config_path:s},{json:o.json});return}let m=r.type==="oauth_grant"?`${fm[l]} (oauth)`:fm[l],p=u?Dg[u]:void 0;console.log(""),console.log(` Profile: ${n}`),console.log(r.type==="oauth_grant"?` Token: ${At(a)}`:` API Key: ${At(a)}`),console.log(` Source: ${m}`),p&&console.log(` Access: ${p}`),console.log(` Config: ${s}`),console.log("")});function Am(e,t={}){let o=t.getArgv??(()=>process.argv.slice(2)),i=[],r=[e];for(;r.length>0;){let n=r.pop();if(!n)break;i.push(n);for(let s of n.commands)r.push(s)}for(let n of i){let a=n.configureOutput().outputError??((l,u)=>u(l));n.configureOutput({outputError:(l,u)=>{a(Tg(l,e,o()),u)}})}}function Tg(e,t,o){if(!Eg(e))return e;let i=Og(t,o);return i?Bg(e,i):e}function Og(e,t){let o=e,i=[];for(let r=0;r<t.length;r+=1){let n=t[r];if(!n||n==="--")return;let s=r;if(n.startsWith("-")&&n!=="-"){let u=n.startsWith("--")?n.split("=",1)[0]:n.length>2?n.slice(0,2):n,m;for(let p of Ig(o)){for(let f of p.createHelp().visibleOptions(p))if(f.long===u||f.short===u){m=f;break}if(m)break}if(!m)s=void 0;else if(!m.required&&!m.optional)s=r+1;else if(m.variadic)s=t.length;else if(n.startsWith("--")&&n.includes("="))s=r+1;else if(!n.startsWith("--")&&n.length>2)s=r+1;else{let p=t[r+1];m.optional&&(p===void 0||p.startsWith("-"))?s=r+1:s=Math.min(r+2,t.length)}}if(s===void 0)return;if(s!==r){r=s-1;continue}if(n.startsWith("-"))return;let a=jg(o).find(u=>ym(u).has(n));if(a){o=a,i.push(a.name());continue}let l=Pg(n,bm(o)).map(u=>[e.name(),...i,u.name()].join(" "));return l.length===0?void 0:{unknownCommand:n,suggestions:l}}}function Eg(e){return/^error: unknown command /.test(e)||/^error: too many arguments/.test(e)}function Bg(e,t){let o=e.endsWith(`
1033
+ Inspect what Resend sent and what your endpoint returned with "resend webhooks events".`,examples:["resend webhooks list","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks get wh_abc123","resend webhooks update wh_abc123 --status disabled","resend webhooks rotate-signing-secret wh_abc123","resend webhooks delete wh_abc123 --yes","resend webhooks events list wh_abc123"]})).addCommand(em).addCommand(dm).addCommand(lm).addCommand(fm).addCommand(cm,{isDefault:!0}).addCommand(gm).addCommand(hm).addCommand(tm);var ym=require("node:path");ye();X();var bm={flag:"flag",env:"environment variable",config:"config file",secure_storage:"secure storage"},Ig={full_access:"full access",sending_access:"sending access"},Cm=new d("whoami").description("Show current authentication status").addHelpText("after",c({setup:!0,context:`Local only \u2014 no network calls.
1034
+ Shows which profile is active and where the active credential comes from.`,output:' {"authenticated":true,"profile":"production","api_key":"re_...abcd","source":"config","config_path":"/Users/you/.config/resend/credentials.json"}\n {"error":{"message":"Not authenticated.\\nRun `resend login` to get started.","code":"not_authenticated"}}',examples:["resend whoami","resend whoami --json","resend whoami --profile production"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=o.profile,r=await Rt(o.apiKey,i,{refresh:!1});if(!r){let f=i||oi(i),y=Fe(),A=y.some(U=>U.name===f),b=i||process.env.RESEND_PROFILE,x=b&&!A?`Profile "${f}" not found.
1035
+ Available profiles: ${y.map(U=>U.name).join(", ")||"(none)"}`:"Not authenticated.\nRun `resend login` to get started.",v=b&&!A?"profile_not_found":"not_authenticated";o.json||!w()?h({message:x,code:v},{json:o.json}):h({message:x,code:v},{json:!1})}let n=r.profile??oi(i),s=(0,ym.join)(Qe(),"credentials.json"),a=r.type==="api_key"?r.key:r.access_token,l=r.source,u=r.type==="api_key"?r.permission:void 0;if(o.json||!w()){M({authenticated:!0,profile:n,api_key:At(a),source:l,...u&&{permission:u},config_path:s},{json:o.json});return}let m=r.type==="oauth_grant"?`${bm[l]} (oauth)`:bm[l],p=u?Ig[u]:void 0;console.log(""),console.log(` Profile: ${n}`),console.log(r.type==="oauth_grant"?` Token: ${At(a)}`:` API Key: ${At(a)}`),console.log(` Source: ${m}`),p&&console.log(` Access: ${p}`),console.log(` Config: ${s}`),console.log("")});function xm(e,t={}){let o=t.getArgv??(()=>process.argv.slice(2)),i=[],r=[e];for(;r.length>0;){let n=r.pop();if(!n)break;i.push(n);for(let s of n.commands)r.push(s)}for(let n of i){let a=n.configureOutput().outputError??((l,u)=>u(l));n.configureOutput({outputError:(l,u)=>{a(jg(l,e,o()),u)}})}}function jg(e,t,o){if(!$g(e))return e;let i=Pg(t,o);return i?Gg(e,i):e}function Pg(e,t){let o=e,i=[];for(let r=0;r<t.length;r+=1){let n=t[r];if(!n||n==="--")return;let s=r;if(n.startsWith("-")&&n!=="-"){let u=n.startsWith("--")?n.split("=",1)[0]:n.length>2?n.slice(0,2):n,m;for(let p of Hg(o)){for(let f of p.createHelp().visibleOptions(p))if(f.long===u||f.short===u){m=f;break}if(m)break}if(!m)s=void 0;else if(!m.required&&!m.optional)s=r+1;else if(m.variadic)s=t.length;else if(n.startsWith("--")&&n.includes("="))s=r+1;else if(!n.startsWith("--")&&n.length>2)s=r+1;else{let p=t[r+1];m.optional&&(p===void 0||p.startsWith("-"))?s=r+1:s=Math.min(r+2,t.length)}}if(s===void 0)return;if(s!==r){r=s-1;continue}if(n.startsWith("-"))return;let a=Qg(o).find(u=>vm(u).has(n));if(a){o=a,i.push(a.name());continue}let l=Ng(n,wm(o)).map(u=>[e.name(),...i,u.name()].join(" "));return l.length===0?void 0:{unknownCommand:n,suggestions:l}}}function $g(e){return/^error: unknown command /.test(e)||/^error: too many arguments/.test(e)}function Gg(e,t){let o=e.endsWith(`
1032
1036
  `)?`
1033
1037
  `:"",{suggestions:i}=t,r=i.length===1?"Did you mean this?":"Did you mean one of these?",n=i.map(s=>` ${s}`).join(`
1034
1038
  `);return`error: unknown command '${t.unknownCommand}'
1035
1039
 
1036
1040
  ${r}
1037
- ${n}${o}`}function Ig(e){let t=[];for(let o=e;o;o=o.parent)t.push(o);return t}function bm(e){return e.createHelp().visibleCommands(e).filter(t=>!t._hidden)}function jg(e){let t=[...e.commands];for(let o of bm(e))t.includes(o)||t.push(o);return t}function ym(e){return new Set([e.name(),...e.aliases()])}function Pg(e,t){let o=t.map(r=>{let n=Number.POSITIVE_INFINITY;for(let s of ym(r)){if(s.length<=1)continue;let a=$g(e,s,3),l=Math.max(e.length,s.length),u=(l-a)/l;a<=3&&u>.4&&a<n&&(n=a)}return{command:r,distance:n}}).filter(r=>Number.isFinite(r.distance));if(o.length===0)return[];let i=Math.min(...o.map(r=>r.distance));return o.filter(r=>r.distance===i).sort((r,n)=>r.command.name().localeCompare(n.command.name())).map(r=>r.command)}function $g(e,t,o=Number.POSITIVE_INFINITY){if(Math.abs(e.length-t.length)>o)return Math.max(e.length,t.length);let i=[];for(let r=0;r<=e.length;r+=1)i[r]=[r];for(let r=0;r<=t.length;r+=1)i[0][r]=r;for(let r=1;r<=t.length;r+=1)for(let n=1;n<=e.length;n+=1){let s=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+1))}return i[e.length][t.length]}var Gg=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 "," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557"," \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551"," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551"," \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D"," \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D "];function Cm(){process.stdout.write(`
1038
- `);for(let e of Gg)process.stdout.write(`${e}
1041
+ ${n}${o}`}function Hg(e){let t=[];for(let o=e;o;o=o.parent)t.push(o);return t}function wm(e){return e.createHelp().visibleCommands(e).filter(t=>!t._hidden)}function Qg(e){let t=[...e.commands];for(let o of wm(e))t.includes(o)||t.push(o);return t}function vm(e){return new Set([e.name(),...e.aliases()])}function Ng(e,t){let o=t.map(r=>{let n=Number.POSITIVE_INFINITY;for(let s of vm(r)){if(s.length<=1)continue;let a=Mg(e,s,3),l=Math.max(e.length,s.length),u=(l-a)/l;a<=3&&u>.4&&a<n&&(n=a)}return{command:r,distance:n}}).filter(r=>Number.isFinite(r.distance));if(o.length===0)return[];let i=Math.min(...o.map(r=>r.distance));return o.filter(r=>r.distance===i).sort((r,n)=>r.command.name().localeCompare(n.command.name())).map(r=>r.command)}function Mg(e,t,o=Number.POSITIVE_INFINITY){if(Math.abs(e.length-t.length)>o)return Math.max(e.length,t.length);let i=[];for(let r=0;r<=e.length;r+=1)i[r]=[r];for(let r=0;r<=t.length;r+=1)i[0][r]=r;for(let r=1;r<=t.length;r+=1)for(let n=1;n<=e.length;n+=1){let s=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+1))}return i[e.length][t.length]}var qg=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 "," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557"," \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551"," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551"," \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D"," \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D "];function Um(){process.stdout.write(`
1042
+ `);for(let e of qg)process.stdout.write(`${e}
1039
1043
  `);process.stdout.write(`
1040
- `)}Zr();Uo();Kt();ha();var en="",_m=[],Fm=[],vt=new c().name("resend").description("Resend CLI \u2014 email for developers").configureHelp({showGlobalOptions:!0,styleTitle:e=>oo.default.gray(e)}).configureOutput({writeErr:e=>{process.stderr.write(e.replace(/^error:/,()=>oo.default.red("error:")))}}).helpCommand(!0).version(`${Zn} v${se}`,"-v, --version","Output the current version").option("--api-key <key>","Resend API key (overrides env/config)").option("-p, --profile <name>","Profile to use (overrides RESEND_PROFILE)").option("--json","Force JSON output").option("-q, --quiet","Suppress spinners and status output (implies --json)").option("--insecure-storage","Save API key as plaintext instead of secure storage").hook("preAction",(e,t)=>{let o=[];for(let r=t;r?.parent;r=r.parent)o.unshift(r.name());en=o.join(" ");let i=r=>r.options.filter(n=>r.getOptionValueSource(n.attributeName())==="cli").map(n=>n.long?.replace(/^--/,"")??n.short?.replace(/^-/,"")??"").filter(Boolean);_m=i(t),Fm=i(e),t.optsWithGlobals().quiet&&e.setOptionValue("json",!0),t.optsWithGlobals().insecureStorage&&(process.env.RESEND_CREDENTIAL_STORE="file")}).addHelpText("after",`
1044
+ `)}en();Uo();Kt();ga();var tn="",Tm=[],Om=[],vt=new d().name("resend").description("Resend CLI \u2014 email for developers").configureHelp({showGlobalOptions:!0,styleTitle:e=>oo.default.gray(e)}).configureOutput({writeErr:e=>{process.stderr.write(e.replace(/^error:/,()=>oo.default.red("error:")))}}).helpCommand(!0).version(`${es} v${se}`,"-v, --version","Output the current version").option("--api-key <key>","Resend API key (overrides env/config)").option("-p, --profile <name>","Profile to use (overrides RESEND_PROFILE)").option("--json","Force JSON output").option("-q, --quiet","Suppress spinners and status output (implies --json)").option("--insecure-storage","Save API key as plaintext instead of secure storage").hook("preAction",(e,t)=>{let o=[];for(let r=t;r?.parent;r=r.parent)o.unshift(r.name());tn=o.join(" ");let i=r=>r.options.filter(n=>r.getOptionValueSource(n.attributeName())==="cli").map(n=>n.long?.replace(/^--/,"")??n.short?.replace(/^-/,"")??"").filter(Boolean);Tm=i(t),Om=i(e),t.optsWithGlobals().quiet&&e.setOptionValue("json",!0),t.optsWithGlobals().insecureStorage&&(process.env.RESEND_CREDENTIAL_STORE="file")}).addHelpText("after",`
1041
1045
  ${oo.default.gray("Examples:")}
1042
1046
 
1043
1047
  - Login to Resend
@@ -1047,4 +1051,4 @@ ${oo.default.gray("Examples:")}
1047
1051
  - Send an email
1048
1052
 
1049
1053
  ${oo.default.blue("$ resend emails send")}
1050
- `).action(()=>{process.stdout.isTTY&&Cm();let e=vt.opts();e.apiKey&&h({message:"--api-key is a per-command override and was not saved. To store your API key, run `resend login`.",code:"missing_command"},{json:e.json}),vt.help()}).addCommand(ui).addCommand(pd).addCommand(kl).addCommand(Ya).addCommand(wd).addCommand(Hu).addCommand(Cc).addCommand(Zl).addCommand(wu).addCommand(Wu).addCommand($c).addCommand(cu).addCommand(Il).addCommand(Du).addCommand(iu).addCommand(Fa).addCommand(pm).addCommand(fu).addCommand(Pa).addCommand(mi).addCommand(gm).addCommand(_c).addCommand(hu).addCommand(xc).addCommand(Ju).addCommand(Ql).addCommand(Ll),Rm=new c("telemetry").description("Telemetry management").helpCommand(!1);Rm.command("flush").argument("<file>").action(async e=>{let{flushFromFile:t}=await Promise.resolve().then(()=>(Zr(),km));await t(e)});vt.addCommand(Rm,{hidden:!0});Am(vt);vt.parseAsync().then(()=>{let e=vt.args[0];if(e==="update"||e==="telemetry")return;en&&Xr(en,{...vt.opts(),flags:_m,globalFlags:Fm});let t=vt.opts();Kc({json:!!(t.json||t.quiet)}).catch(()=>{})}).catch(e=>{h({message:W(e,"An unexpected error occurred"),code:"unexpected_error"})});
1054
+ `).action(()=>{process.stdout.isTTY&&Um();let e=vt.opts();e.apiKey&&h({message:"--api-key is a per-command override and was not saved. To store your API key, run `resend login`.",code:"missing_command"},{json:e.json}),vt.help()}).addCommand(mi).addCommand(fc).addCommand(_l).addCommand(Xa).addCommand(vc).addCommand(qu).addCommand(xd).addCommand(ed).addCommand(Ku).addCommand(Yu).addCommand(Gd).addCommand(pu).addCommand(jl).addCommand(Bu).addCommand(au).addCommand(Ra).addCommand(Am).addCommand(bu).addCommand($a).addCommand(pi).addCommand(Cm).addCommand(Fd).addCommand(yu).addCommand(wd).addCommand(Xu).addCommand(Nl).addCommand(Wl),Em=new d("telemetry").description("Telemetry management").helpCommand(!1);Em.command("flush").argument("<file>").action(async e=>{let{flushFromFile:t}=await Promise.resolve().then(()=>(en(),Dm));await t(e)});vt.addCommand(Em,{hidden:!0});xm(vt);vt.parseAsync().then(()=>{let e=vt.args[0];if(e==="update"||e==="telemetry")return;tn&&Zr(tn,{...vt.opts(),flags:Tm,globalFlags:Om});let t=vt.opts();kd({json:!!(t.json||t.quiet)}).catch(()=>{})}).catch(e=>{h({message:W(e,"An unexpected error occurred"),code:"unexpected_error"})});