@tsuga/cli 1.0.5 → 1.0.7

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.
Files changed (2) hide show
  1. package/dist/cli.js +40 -39
  2. package/package.json +3 -5
package/dist/cli.js CHANGED
@@ -1,53 +1,54 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var nb=Object.create;var ns=Object.defineProperty;var ob=Object.getOwnPropertyDescriptor;var ib=Object.getOwnPropertyNames;var ab=Object.getPrototypeOf,sb=Object.prototype.hasOwnProperty;var Ur=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ft=(e,t)=>{for(var r in t)ns(e,r,{get:t[r],enumerable:!0})},mb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ib(t))!sb.call(e,i)&&i!==r&&ns(e,i,{get:()=>t[i],enumerable:!(n=ob(t,i))||n.enumerable});return e};var Lc=(e,t,r)=>(r=e!=null?nb(ab(e)):{},mb(t||!e||!e.__esModule?ns(r,"default",{value:e,enumerable:!0}):r,e));var so=Ur(is=>{var Di=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},os=class extends Di{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};is.CommanderError=Di;is.InvalidArgumentError=os});var ji=Ur(ss=>{var{InvalidArgumentError:pb}=so(),as=class{constructor(t,r){switch(this.description=r||"",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.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new pb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function cb(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}ss.Argument=as;ss.humanReadableArgName=cb});var cs=Ur(ps=>{var{humanReadableArgName:ub}=ji(),ms=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 r=t.commands.filter(i=>!i._hidden),n=t._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,s)=>i.name().localeCompare(s.name())),r}compareOptions(t,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(i=>!i.hidden),n=t._getHelpOption();if(n&&!n.hidden){let i=n.short&&t._findOption(n.short),s=n.long&&t._findOption(n.long);!i&&!s?r.push(n):n.long&&!s?r.push(t.createOption(n.long,n.description)):n.short&&!i&&r.push(t.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(n=>ub(n)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let i=t.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatHelp(t,r){let n=r.padWidth(t,r),i=r.helpWidth??80;function s(E,C){return r.formatItem(E,n,C,r)}let p=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],c=r.commandDescription(t);c.length>0&&(p=p.concat([r.boxWrap(r.styleCommandDescription(c),i),""]));let l=r.visibleArguments(t).map(E=>s(r.styleArgumentTerm(r.argumentTerm(E)),r.styleArgumentDescription(r.argumentDescription(E))));l.length>0&&(p=p.concat([r.styleTitle("Arguments:"),...l,""]));let g=r.visibleOptions(t).map(E=>s(r.styleOptionTerm(r.optionTerm(E)),r.styleOptionDescription(r.optionDescription(E))));if(g.length>0&&(p=p.concat([r.styleTitle("Options:"),...g,""])),r.showGlobalOptions){let E=r.visibleGlobalOptions(t).map(C=>s(r.styleOptionTerm(r.optionTerm(C)),r.styleOptionDescription(r.optionDescription(C))));E.length>0&&(p=p.concat([r.styleTitle("Global Options:"),...E,""]))}let y=r.visibleCommands(t).map(E=>s(r.styleSubcommandTerm(r.subcommandTerm(E)),r.styleSubcommandDescription(r.subcommandDescription(E))));return y.length>0&&(p=p.concat([r.styleTitle("Commands:"),...y,""])),p.join(`
3
- `)}displayWidth(t){return Nc(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).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(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).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,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,n,i){let p=" ".repeat(2);if(!n)return p+t;let c=t.padEnd(r+t.length-i.displayWidth(t)),l=2,y=(this.helpWidth??80)-r-l-2,E;return y<this.minWidthToWrap||i.preformatted(n)?E=n:E=i.boxWrap(n,y).replace(/\n/g,`
4
- `+" ".repeat(r+l)),p+c+" ".repeat(l)+E.replace(/\n/g,`
5
- ${p}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let n=t.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return n.forEach(p=>{let c=p.match(i);if(c===null){s.push("");return}let l=[c.shift()],g=this.displayWidth(l[0]);c.forEach(y=>{let E=this.displayWidth(y);if(g+E<=r){l.push(y),g+=E;return}s.push(l.join(""));let C=y.trimStart();l=[C],g=this.displayWidth(C)}),s.push(l.join(""))}),s.join(`
6
- `)}};function Nc(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}ps.Help=ms;ps.stripColor=Nc});var fs=Ur(ds=>{var{InvalidArgumentError:lb}=so(),us=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let n=db(t);this.short=n.shortFlag,this.long=n.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}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),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}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new lb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Mc(this.name().replace(/^no-/,"")):Mc(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ls=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(t,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return r.negate===(s===t)}};function Mc(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function db(e){let t,r,n=/^-[^-]$/,i=/^--[^-]/,s=e.split(/[ |,]+/).concat("guard");if(n.test(s[0])&&(t=s.shift()),i.test(s[0])&&(r=s.shift()),!t&&n.test(s[0])&&(t=s.shift()),!t&&i.test(s[0])&&(t=r,r=s.shift()),s[0].startsWith("-")){let p=s[0],c=`option creation failed due to '${p}' in option flags '${e}'`;throw/^-[^-][^-]/.test(p)?new Error(`${c}
2
+ "use strict";var Ub=Object.create;var ds=Object.defineProperty;var Nb=Object.getOwnPropertyDescriptor;var Lb=Object.getOwnPropertyNames;var Mb=Object.getPrototypeOf,wb=Object.prototype.hasOwnProperty;var Lr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yt=(e,t)=>{for(var r in t)ds(e,r,{get:t[r],enumerable:!0})},$b=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lb(t))!wb.call(e,i)&&i!==r&&ds(e,i,{get:()=>t[i],enumerable:!(o=Nb(t,i))||o.enumerable});return e};var Vc=(e,t,r)=>(r=e!=null?Ub(Mb(e)):{},$b(t||!e||!e.__esModule?ds(r,"default",{value:e,enumerable:!0}):r,e));var uo=Lr(gs=>{var Fi=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},fs=class extends Fi{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};gs.CommanderError=Fi;gs.InvalidArgumentError=fs});var qi=Lr(Is=>{var{InvalidArgumentError:Db}=uo(),ys=class{constructor(t,r){switch(this.description=r||"",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.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new Db(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Gb(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}Is.Argument=ys;Is.humanReadableArgName=Gb});var Ts=Lr(hs=>{var{humanReadableArgName:vb}=qi(),Es=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 r=t.commands.filter(i=>!i._hidden),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((i,s)=>i.name().localeCompare(s.name())),r}compareOptions(t,r){let o=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(i=>!i.hidden),o=t._getHelpOption();if(o&&!o.hidden){let i=o.short&&t._findOption(o.short),s=o.long&&t._findOption(o.long);!i&&!s?r.push(o):o.long&&!s?r.push(t.createOption(o.long,o.description)):o.short&&!i&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let i=o.options.filter(s=>!s.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(o=>vb(o)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let i=t.parent;i;i=i.parent)o=i.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatHelp(t,r){let o=r.padWidth(t,r),i=r.helpWidth??80;function s(E,O){return r.formatItem(E,o,O,r)}let p=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],u=r.commandDescription(t);u.length>0&&(p=p.concat([r.boxWrap(r.styleCommandDescription(u),i),""]));let l=r.visibleArguments(t).map(E=>s(r.styleArgumentTerm(r.argumentTerm(E)),r.styleArgumentDescription(r.argumentDescription(E))));l.length>0&&(p=p.concat([r.styleTitle("Arguments:"),...l,""]));let g=r.visibleOptions(t).map(E=>s(r.styleOptionTerm(r.optionTerm(E)),r.styleOptionDescription(r.optionDescription(E))));if(g.length>0&&(p=p.concat([r.styleTitle("Options:"),...g,""])),r.showGlobalOptions){let E=r.visibleGlobalOptions(t).map(O=>s(r.styleOptionTerm(r.optionTerm(O)),r.styleOptionDescription(r.optionDescription(O))));E.length>0&&(p=p.concat([r.styleTitle("Global Options:"),...E,""]))}let y=r.visibleCommands(t).map(E=>s(r.styleSubcommandTerm(r.subcommandTerm(E)),r.styleSubcommandDescription(r.subcommandDescription(E))));return y.length>0&&(p=p.concat([r.styleTitle("Commands:"),...y,""])),p.join(`
3
+ `)}displayWidth(t){return Wc(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).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(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).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,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,o,i){let p=" ".repeat(2);if(!o)return p+t;let u=t.padEnd(r+t.length-i.displayWidth(t)),l=2,y=(this.helpWidth??80)-r-l-2,E;return y<this.minWidthToWrap||i.preformatted(o)?E=o:E=i.boxWrap(o,y).replace(/\n/g,`
4
+ `+" ".repeat(r+l)),p+u+" ".repeat(l)+E.replace(/\n/g,`
5
+ ${p}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return o.forEach(p=>{let u=p.match(i);if(u===null){s.push("");return}let l=[u.shift()],g=this.displayWidth(l[0]);u.forEach(y=>{let E=this.displayWidth(y);if(g+E<=r){l.push(y),g+=E;return}s.push(l.join(""));let O=y.trimStart();l=[O],g=this.displayWidth(O)}),s.push(l.join(""))}),s.join(`
6
+ `)}};function Wc(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}hs.Help=Es;hs.stripColor=Wc});var bs=Lr(As=>{var{InvalidArgumentError:jb}=uo(),xs=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let o=Fb(t);this.short=o.shortFlag,this.long=o.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}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),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}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new jb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Qc(this.name().replace(/^no-/,"")):Qc(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},_s=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let i=this.negativeOptions.get(o).presetArg,s=i!==void 0?i:!1;return r.negate===(s===t)}};function Qc(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function Fb(e){let t,r,o=/^-[^-]$/,i=/^--[^-]/,s=e.split(/[ |,]+/).concat("guard");if(o.test(s[0])&&(t=s.shift()),i.test(s[0])&&(r=s.shift()),!t&&o.test(s[0])&&(t=s.shift()),!t&&i.test(s[0])&&(t=r,r=s.shift()),s[0].startsWith("-")){let p=s[0],u=`option creation failed due to '${p}' in option flags '${e}'`;throw/^-[^-][^-]/.test(p)?new Error(`${u}
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
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(p)?new Error(`${c}
10
- - too many short flags`):i.test(p)?new Error(`${c}
11
- - too many long flags`):new Error(`${c}
12
- - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}ds.Option=us;ds.DualOptions=ls});var $c=Ur(wc=>{function fb(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let n=0;n<=e.length;n++)r[n]=[n];for(let n=0;n<=t.length;n++)r[0][n]=n;for(let n=1;n<=t.length;n++)for(let i=1;i<=e.length;i++){let s=1;e[i-1]===t[n-1]?s=0:s=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+s),i>1&&n>1&&e[i-1]===t[n-2]&&e[i-2]===t[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[e.length][t.length]}function gb(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(p=>p.slice(2)));let n=[],i=3,s=.4;return t.forEach(p=>{if(p.length<=1)return;let c=fb(e,p),l=Math.max(e.length,p.length);(l-c)/l>s&&(c<i?(i=c,n=[p]):c===i&&n.push(p))}),n.sort((p,c)=>p.localeCompare(c)),r&&(n=n.map(p=>`--${p}`)),n.length>1?`
13
- (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
14
- (Did you mean ${n[0]}?)`:""}wc.suggestSimilar=gb});var jc=Ur(hs=>{var yb=require("node:events").EventEmitter,gs=require("node:child_process"),Ft=require("node:path"),Fi=require("node:fs"),te=require("node:process"),{Argument:Ib,humanReadableArgName:Eb}=ji(),{CommanderError:ys}=so(),{Help:hb,stripColor:Tb}=cs(),{Option:vc,DualOptions:xb}=fs(),{suggestSimilar:Gc}=$c(),Is=class e extends yb{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:r=>te.stdout.write(r),writeErr:r=>te.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>te.stdout.isTTY?te.stdout.columns:void 0,getErrHelpWidth:()=>te.stderr.isTTY?te.stderr.columns:void 0,getOutHasColors:()=>Es()??(te.stdout.isTTY&&te.stdout.hasColors?.()),getErrHasColors:()=>Es()??(te.stderr.isTTY&&te.stderr.hasColors?.()),stripColor:r=>Tb(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}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 r=this;r;r=r.parent)t.push(r);return t}command(t,r,n){let i=r,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,p,c]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(p);return i&&(l.description(i),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,c&&l.arguments(c),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),i?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new hb,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(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,r){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 r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new Ib(t,r)}argument(t,r,n,i){let s=this.createArgument(t,r);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.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,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,n,i]=t.match(/([^ ]+) *(.*)/),s=r??"display help for command",p=this.createCommand(n);return p.helpOption(!1),i&&p.arguments(i),s&&p.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=p,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=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,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
16
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,n){this._exitCallback&&this._exitCallback(new ys(t,r,n)),te.exit(t)}action(t){let r=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),t.apply(this,s)};return this._actionHandler=r,this}createOption(t,r){return new vc(t,r)}_callParseArg(t,r,n,i){try{return t.parseArg(r,n)}catch(s){if(s.code==="commander.invalidArgument"){let p=`${i} ${s.message}`;this.error(p,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let n=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 '${n}'
17
- - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=i=>[i.name()].concat(i.aliases()),n=r(t).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),s=r(t).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),n=t.attributeName();if(t.negate){let s=t.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(n,t.defaultValue,"default");let i=(s,p,c)=>{s==null&&t.presetArg!==void 0&&(s=t.presetArg);let l=this.getOptionValue(n);s!==null&&t.parseArg?s=this._callParseArg(t,s,l,p):s!==null&&t.variadic&&(s=t._concatValue(s,l)),s==null&&(t.negate?s=!1:t.isBoolean()||t.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,c)};return this.on("option:"+r,s=>{let p=`error: option '${t.flags}' argument '${s}' is invalid.`;i(s,p,"cli")}),t.envVar&&this.on("optionEnv:"+r,s=>{let p=`error: option '${t.flags}' value '${s}' from env '${t.envVar}' is invalid.`;i(s,p,"env")}),this}_optionEx(t,r,n,i,s){if(typeof r=="object"&&r instanceof vc)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let p=this.createOption(r,n);if(p.makeOptionMandatory(!!t.mandatory),typeof i=="function")p.default(s).argParser(i);else if(i instanceof RegExp){let c=i;i=(l,g)=>{let y=c.exec(l);return y?y[0]:g},p.default(s).argParser(i)}else p.default(i);return this.addOption(p)}option(t,r,n,i){return this._optionEx({},t,r,n,i)}requiredOption(t,r,n,i){return this._optionEx({mandatory:!0},t,r,n,i)}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,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,n){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=n,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(t)!==void 0&&(r=n.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){te.versions?.electron&&(r.from="electron");let i=te.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}t===void 0&&(t=te.argv),this.rawArgs=t.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=t[1],n=t.slice(2);break;case"electron":te.defaultApp?(this._scriptPath=t[1],n=t.slice(2)):n=t.slice(1);break;case"user":n=t.slice(0);break;case"eval":n=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return this._parseCommand([],n),this}async parseAsync(t,r){this._prepareForParse();let n=this._prepareUserArgs(t,r);return await this._parseCommand([],n),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
- - 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,r,n){if(Fi.existsSync(t))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${t}' does not exist
19
- - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
9
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(p)?new Error(`${u}
10
+ - too many short flags`):i.test(p)?new Error(`${u}
11
+ - too many long flags`):new Error(`${u}
12
+ - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}As.Option=xs;As.DualOptions=_s});var Jc=Lr(Zc=>{function qb(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let i=1;i<=e.length;i++){let s=1;e[i-1]===t[o-1]?s=0:s=1,r[i][o]=Math.min(r[i-1][o]+1,r[i][o-1]+1,r[i-1][o-1]+s),i>1&&o>1&&e[i-1]===t[o-2]&&e[i-2]===t[o-1]&&(r[i][o]=Math.min(r[i][o],r[i-2][o-2]+1))}return r[e.length][t.length]}function Bb(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(p=>p.slice(2)));let o=[],i=3,s=.4;return t.forEach(p=>{if(p.length<=1)return;let u=qb(e,p),l=Math.max(e.length,p.length);(l-u)/l>s&&(u<i?(i=u,o=[p]):u===i&&o.push(p))}),o.sort((p,u)=>p.localeCompare(u)),r&&(o=o.map(p=>`--${p}`)),o.length>1?`
13
+ (Did you mean one of ${o.join(", ")}?)`:o.length===1?`
14
+ (Did you mean ${o[0]}?)`:""}Zc.suggestSimilar=Bb});var ru=Lr(Ps=>{var Hb=require("node:events").EventEmitter,Os=require("node:child_process"),Ht=require("node:path"),Bi=require("node:fs"),re=require("node:process"),{Argument:Kb,humanReadableArgName:zb}=qi(),{CommanderError:Ss}=uo(),{Help:Yb,stripColor:Vb}=Ts(),{Option:Xc,DualOptions:Wb}=bs(),{suggestSimilar:eu}=Jc(),Rs=class e extends Hb{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:r=>re.stdout.write(r),writeErr:r=>re.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>re.stdout.isTTY?re.stdout.columns:void 0,getErrHelpWidth:()=>re.stderr.isTTY?re.stderr.columns:void 0,getOutHasColors:()=>Cs()??(re.stdout.isTTY&&re.stdout.hasColors?.()),getErrHasColors:()=>Cs()??(re.stderr.isTTY&&re.stderr.hasColors?.()),stripColor:r=>Vb(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}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 r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let i=r,s=o;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,p,u]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(p);return i&&(l.description(i),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,u&&l.arguments(u),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),i?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Yb,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(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,r){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 r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new Kb(t,r)}argument(t,r,o,i){let s=this.createArgument(t,r);return typeof o=="function"?s.default(i).argParser(o):s.default(o),this.addArgument(s),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.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,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,o,i]=t.match(/([^ ]+) *(.*)/),s=r??"display help for command",p=this.createCommand(o);return p.helpOption(!1),i&&p.arguments(i),s&&p.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=p,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=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,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
16
+ Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new Ss(t,r,o)),re.exit(t)}action(t){let r=o=>{let i=this.registeredArguments.length,s=o.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),t.apply(this,s)};return this._actionHandler=r,this}createOption(t,r){return new Xc(t,r)}_callParseArg(t,r,o,i){try{return t.parseArg(r,o)}catch(s){if(s.code==="commander.invalidArgument"){let p=`${i} ${s.message}`;this.error(p,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=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 '${o}'
17
+ - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=i=>[i.name()].concat(i.aliases()),o=r(t).find(i=>this._findCommand(i));if(o){let i=r(this._findCommand(o)).join("|"),s=r(t).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let s=t.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let i=(s,p,u)=>{s==null&&t.presetArg!==void 0&&(s=t.presetArg);let l=this.getOptionValue(o);s!==null&&t.parseArg?s=this._callParseArg(t,s,l,p):s!==null&&t.variadic&&(s=t._concatValue(s,l)),s==null&&(t.negate?s=!1:t.isBoolean()||t.optional?s=!0:s=""),this.setOptionValueWithSource(o,s,u)};return this.on("option:"+r,s=>{let p=`error: option '${t.flags}' argument '${s}' is invalid.`;i(s,p,"cli")}),t.envVar&&this.on("optionEnv:"+r,s=>{let p=`error: option '${t.flags}' value '${s}' from env '${t.envVar}' is invalid.`;i(s,p,"env")}),this}_optionEx(t,r,o,i,s){if(typeof r=="object"&&r instanceof Xc)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let p=this.createOption(r,o);if(p.makeOptionMandatory(!!t.mandatory),typeof i=="function")p.default(s).argParser(i);else if(i instanceof RegExp){let u=i;i=(l,g)=>{let y=u.exec(l);return y?y[0]:g},p.default(s).argParser(i)}else p.default(i);return this.addOption(p)}option(t,r,o,i){return this._optionEx({},t,r,o,i)}requiredOption(t,r,o,i){return this._optionEx({mandatory:!0},t,r,o,i)}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,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){re.versions?.electron&&(r.from="electron");let i=re.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}t===void 0&&(t=re.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":re.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),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
+ - 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,r,o){if(Bi.existsSync(t))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${t}' does not exist
19
+ - if '${o}' 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
- - ${i}`;throw new Error(s)}_executeSubCommand(t,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(y,E){let C=Ft.resolve(y,E);if(Fi.existsSync(C))return C;if(i.includes(Ft.extname(E)))return;let Pe=i.find(ot=>Fi.existsSync(`${C}${ot}`));if(Pe)return`${C}${Pe}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let p=t._executableFile||`${this._name}-${t._name}`,c=this._executableDir||"";if(this._scriptPath){let y;try{y=Fi.realpathSync(this._scriptPath)}catch{y=this._scriptPath}c=Ft.resolve(Ft.dirname(y),c)}if(c){let y=s(c,p);if(!y&&!t._executableFile&&this._scriptPath){let E=Ft.basename(this._scriptPath,Ft.extname(this._scriptPath));E!==this._name&&(y=s(c,`${E}-${t._name}`))}p=y||p}n=i.includes(Ft.extname(p));let l;te.platform!=="win32"?n?(r.unshift(p),r=Dc(te.execArgv).concat(r),l=gs.spawn(te.argv[0],r,{stdio:"inherit"})):l=gs.spawn(p,r,{stdio:"inherit"}):(this._checkForMissingExecutable(p,c,t._name),r.unshift(p),r=Dc(te.execArgv).concat(r),l=gs.spawn(te.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(E=>{te.on(E,()=>{l.killed===!1&&l.exitCode===null&&l.kill(E)})});let g=this._exitCallback;l.on("close",y=>{y=y??1,g?g(new ys(y,"commander.executeSubCommandAsync","(close)")):te.exit(y)}),l.on("error",y=>{if(y.code==="ENOENT")this._checkForMissingExecutable(p,c,t._name);else if(y.code==="EACCES")throw new Error(`'${p}' not executable`);if(!g)te.exit(1);else{let E=new ys(1,"commander.executeSubCommandAsync","(error)");E.nestedError=y,g(E)}}),this.runningCommand=l}_dispatchSubcommand(t,r,n){let i=this._findCommand(t);i||this.help({error:!0}),i._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}),s}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==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=(n,i,s)=>{let p=i;if(i!==null&&n.parseArg){let c=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;p=this._callParseArg(n,i,s,c)}return p};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((p,c)=>t(n,c,p),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=t(n,s,n.defaultValue))),r[i]=s}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let n=t,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(p=>{i.push({hookedCommand:s,callback:p})})}),r==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(t,r,n){let i=t;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,r))}),i}_parseCommand(t,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(n.operands),r=n.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let p;return p=this._chainOrCallHooks(p,"preAction"),p=this._chainOrCall(p,()=>this._actionHandler(this.processedArgs)),this.parent&&(p=this._chainOrCall(p,()=>{this.parent.emit(s,t,r)})),p=this._chainOrCallHooks(p,"postAction"),p}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});t.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=t.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],n=[],i=r,s=t.slice();function p(l){return l.length>1&&l[0]==="-"}let c=null;for(;s.length;){let l=s.shift();if(l==="--"){i===n&&i.push(l),i.push(...s);break}if(c&&!p(l)){this.emit(`option:${c.name()}`,l);continue}if(c=null,p(l)){let g=this._findOption(l);if(g){if(g.required){let y=s.shift();y===void 0&&this.optionMissingArgument(g),this.emit(`option:${g.name()}`,y)}else if(g.optional){let y=null;s.length>0&&!p(s[0])&&(y=s.shift()),this.emit(`option:${g.name()}`,y)}else this.emit(`option:${g.name()}`);c=g.variadic?g:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let g=this._findOption(`-${l[1]}`);if(g){g.required||g.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${g.name()}`,l.slice(2)):(this.emit(`option:${g.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let g=l.indexOf("="),y=this._findOption(l.slice(0,g));if(y&&(y.required||y.optional)){this.emit(`option:${y.name()}`,l.slice(g+1));continue}}if(p(l)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(l)){r.push(l),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){n.push(l),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(l),s.length>0&&i.push(...s);break}i.push(l)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();t[i]=i===this._versionOptionName?this._version:this[i]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
21
+ - ${i}`;throw new Error(s)}_executeSubCommand(t,r){r=r.slice();let o=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(y,E){let O=Ht.resolve(y,E);if(Bi.existsSync(O))return O;if(i.includes(Ht.extname(E)))return;let Ne=i.find(it=>Bi.existsSync(`${O}${it}`));if(Ne)return`${O}${Ne}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let p=t._executableFile||`${this._name}-${t._name}`,u=this._executableDir||"";if(this._scriptPath){let y;try{y=Bi.realpathSync(this._scriptPath)}catch{y=this._scriptPath}u=Ht.resolve(Ht.dirname(y),u)}if(u){let y=s(u,p);if(!y&&!t._executableFile&&this._scriptPath){let E=Ht.basename(this._scriptPath,Ht.extname(this._scriptPath));E!==this._name&&(y=s(u,`${E}-${t._name}`))}p=y||p}o=i.includes(Ht.extname(p));let l;re.platform!=="win32"?o?(r.unshift(p),r=tu(re.execArgv).concat(r),l=Os.spawn(re.argv[0],r,{stdio:"inherit"})):l=Os.spawn(p,r,{stdio:"inherit"}):(this._checkForMissingExecutable(p,u,t._name),r.unshift(p),r=tu(re.execArgv).concat(r),l=Os.spawn(re.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(E=>{re.on(E,()=>{l.killed===!1&&l.exitCode===null&&l.kill(E)})});let g=this._exitCallback;l.on("close",y=>{y=y??1,g?g(new Ss(y,"commander.executeSubCommandAsync","(close)")):re.exit(y)}),l.on("error",y=>{if(y.code==="ENOENT")this._checkForMissingExecutable(p,u,t._name);else if(y.code==="EACCES")throw new Error(`'${p}' not executable`);if(!g)re.exit(1);else{let E=new Ss(1,"commander.executeSubCommandAsync","(error)");E.nestedError=y,g(E)}}),this.runningCommand=l}_dispatchSubcommand(t,r,o){let i=this._findCommand(t);i||this.help({error:!0}),i._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(o));else return i._parseCommand(r,o)}),s}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==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=(o,i,s)=>{let p=i;if(i!==null&&o.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${o.name()}'.`;p=this._callParseArg(o,i,s,u)}return p};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,i)=>{let s=o.defaultValue;o.variadic?i<this.args.length?(s=this.args.slice(i),o.parseArg&&(s=s.reduce((p,u)=>t(o,u,p),o.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],o.parseArg&&(s=t(o,s,o.defaultValue))),r[i]=s}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(p=>{i.push({hookedCommand:s,callback:p})})}),r==="postAction"&&i.reverse(),i.forEach(s=>{o=this._chainOrCall(o,()=>s.callback(s.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let i=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(s=>{i=this._chainOrCall(i,()=>s(this,r))}),i}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let p;return p=this._chainOrCallHooks(p,"preAction"),p=this._chainOrCall(p,()=>this._actionHandler(this.processedArgs)),this.parent&&(p=this._chainOrCall(p,()=>{this.parent.emit(s,t,r)})),p=this._chainOrCallHooks(p,"postAction"),p}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(o=>{let i=o.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let i=t.find(s=>o.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(o,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],i=r,s=t.slice();function p(l){return l.length>1&&l[0]==="-"}let u=null;for(;s.length;){let l=s.shift();if(l==="--"){i===o&&i.push(l),i.push(...s);break}if(u&&!p(l)){this.emit(`option:${u.name()}`,l);continue}if(u=null,p(l)){let g=this._findOption(l);if(g){if(g.required){let y=s.shift();y===void 0&&this.optionMissingArgument(g),this.emit(`option:${g.name()}`,y)}else if(g.optional){let y=null;s.length>0&&!p(s[0])&&(y=s.shift()),this.emit(`option:${g.name()}`,y)}else this.emit(`option:${g.name()}`);u=g.variadic?g:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let g=this._findOption(`-${l[1]}`);if(g){g.required||g.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${g.name()}`,l.slice(2)):(this.emit(`option:${g.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let g=l.indexOf("="),y=this._findOption(l.slice(0,g));if(y&&(y.required||y.optional)){this.emit(`option:${y.name()}`,l.slice(g+1));continue}}if(p(l)&&(i=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(l)){r.push(l),s.length>0&&o.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){o.push(l),s.length>0&&o.push(...s);break}}if(this._passThroughOptions){i.push(l),s.length>0&&i.push(...s);break}i.push(l)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let i=this.options[o].attributeName();t[i]=i===this._versionOptionName?this._version:this[i]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){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 n=r||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in te.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,te.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new xb(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&t.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let n=p=>{let c=p.attributeName(),l=this.getOptionValue(c),g=this.options.find(E=>E.negate&&c===E.attributeName()),y=this.options.find(E=>!E.negate&&c===E.attributeName());return g&&(g.presetArg===void 0&&l===!1||g.presetArg!==void 0&&l===g.presetArg)?g:y||p},i=p=>{let c=n(p),l=c.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${c.envVar}'`:`option '${c.flags}'`},s=`error: ${i(t)} cannot be used with ${i(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let p=s.createHelp().visibleOptions(s).filter(c=>c.long).map(c=>c.long);i=i.concat(p),s=s.parent}while(s&&!s._enablePositionalOptions);r=Gc(t,i)}let n=`error: unknown option '${t}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${t.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),r=Gc(t,i)}let n=`error: unknown command '${t}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(t,r,n){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${t}
25
- `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(t);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>Eb(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=Ft.basename(t,Ft.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),n=this._getOutputContext(t);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(t){t=t||{};let r=!!t.error,n,i,s;return r?(n=c=>this._outputConfiguration.writeErr(c),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=c=>this._outputConfiguration.writeOut(c),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:r,write:c=>(i||(c=this._outputConfiguration.stripColor(c)),n(c)),hasColors:i,helpWidth:s}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let n=this._getOutputContext(t),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(p=>p.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:n.error});if(r&&(s=r(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(p=>p.emit("afterAllHelp",i))}helpOption(t,r){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(te.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(t))throw new Error(`Unexpected value for position to addHelpText.
26
- Expecting one of '${n.join("', '")}'`);let i=`${t}Help`;return this.on(i,s=>{let p;typeof r=="function"?p=r({error:s.error,command:s.command}):p=r,p&&s.write(`${p}
27
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Dc(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",i="9229",s;return(s=t.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],n=s[3],i=s[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:t})}function Es(){if(te.env.NO_COLOR||te.env.FORCE_COLOR==="0"||te.env.FORCE_COLOR==="false")return!1;if(te.env.FORCE_COLOR||te.env.CLICOLOR_FORCE!==void 0)return!0}hs.Command=Is;hs.useColor=Es});var Hc=Ur(gt=>{var{Argument:Fc}=ji(),{Command:Ts}=jc(),{CommanderError:_b,InvalidArgumentError:qc}=so(),{Help:Ab}=cs(),{Option:Bc}=fs();gt.program=new Ts;gt.createCommand=e=>new Ts(e);gt.createOption=(e,t)=>new Bc(e,t);gt.createArgument=(e,t)=>new Fc(e,t);gt.Command=Ts;gt.Option=Bc;gt.Argument=Fc;gt.Help=Ab;gt.CommanderError=_b;gt.InvalidArgumentError=qc;gt.InvalidOptionArgumentError=qc});var Kc=Lc(Hc(),1),{program:m$,createCommand:p$,createArgument:c$,createOption:u$,CommanderError:l$,InvalidArgumentError:d$,InvalidOptionArgumentError:f$,Command:zc,Argument:g$,Option:y$,Help:I$}=Kc.default;var d={};ft(d,{Assign:()=>bb,Clone:()=>po,Create:()=>SO,Discard:()=>RO,Metrics:()=>ht,Update:()=>CO});var ht={assign:0,create:0,clone:0,discard:0,update:0};function bb(e,t){return ht.assign+=1,{...e,...t}}var a={};ft(a,{Entries:()=>Vb,EntriesRegExp:()=>zb,Every:()=>Bb,EveryAll:()=>Hb,GraphemeCount:()=>jb,HasPropertyKey:()=>Kb,IsArray:()=>Lr,IsAsyncIterator:()=>kb,IsBigInt:()=>mo,IsBoolean:()=>Xc,IsClassInstance:()=>Gb,IsConstructor:()=>Ub,IsDeepEqual:()=>bs,IsEqual:()=>W,IsFunction:()=>eu,IsGreaterEqualThan:()=>ru,IsGreaterThan:()=>wb,IsInteger:()=>_s,IsIterator:()=>Lb,IsLessEqualThan:()=>tu,IsLessThan:()=>$b,IsMaxLength:()=>Fb,IsMinLength:()=>qb,IsMultipleOf:()=>vb,IsNull:()=>Hi,IsNumber:()=>Ki,IsObject:()=>Nr,IsObjectNotArray:()=>Nb,IsString:()=>nr,IsSymbol:()=>Mb,IsUndefined:()=>As,IsValueLike:()=>Db,Keys:()=>Bi,Symbols:()=>Yb,Values:()=>Wb});function rr(e,t,r){return e>=t&&e<=r}function Vc(e){return rr(e,127462,127487)}function Ob(e){return rr(e,65024,65039)}function Sb(e){return rr(e,768,879)||rr(e,6832,6911)||rr(e,7616,7679)||rr(e,65056,65071)}function qi(e){return e>65535?2:1}function Yc(e,t){for(;t<e.length;){let r=e.codePointAt(t);if(Sb(r)||Ob(r))t+=qi(r);else break}return t}function xs(e,t){let r=e.codePointAt(t),n=t+qi(r);for(n=Yc(e,n);n<e.length-1&&e[n]==="\u200D";){let i=e.codePointAt(n+1);n+=1+qi(i),n=Yc(e,n)}return Vc(r)&&n<e.length&&Vc(e.codePointAt(n))&&(n+=qi(e.codePointAt(n))),n}function Wc(e){return rr(e,55296,56319)||rr(e,768,879)||e===8205}function Qc(e){let t=0,r=0;for(;r<e.length;)r=xs(e,r),t++;return t}function Rb(e,t){let r=0,n=0;for(;n<e.length;)if(n=xs(e,n),r++,r>=t)return!0;return!1}function Cb(e,t){let r=0,n=0;for(;n<e.length;)if(n=xs(e,n),r++,r>t)return!1;return!0}function Zc(e,t){let r=0;for(;r<e.length;){if(Wc(e.charCodeAt(r)))return Rb(e,t);if(r++,r>=t)return!0}return!1}function Jc(e,t){let r=0;for(;r<e.length;){if(Wc(e.charCodeAt(r)))return Cb(e,t);if(r++,r>t)return!1}return!0}function Lr(e){return Array.isArray(e)}function kb(e){return Nr(e)&&Symbol.asyncIterator in e}function mo(e){return W(typeof e,"bigint")}function Xc(e){return W(typeof e,"boolean")}function Ub(e){if(As(e)||!eu(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function eu(e){return W(typeof e,"function")}function _s(e){return Number.isInteger(e)}function Lb(e){return Nr(e)&&Symbol.iterator in e}function Hi(e){return W(e,null)}function Ki(e){return Number.isFinite(e)}function Nb(e){return Nr(e)&&!Lr(e)}function Nr(e){return W(typeof e,"object")&&!Hi(e)}function nr(e){return W(typeof e,"string")}function Mb(e){return W(typeof e,"symbol")}function As(e){return W(e,void 0)}function W(e,t){return e===t}function wb(e,t){return e>t}function $b(e,t){return e<t}function tu(e,t){return e<=t}function ru(e,t){return e>=t}function vb(e,t){if(mo(e)||mo(t))return BigInt(e)%BigInt(t)===0n;let r=1e-10;if(!Ki(e)||_s(e)&&1/t%1===0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t))<r}function Gb(e){if(!Nr(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return Hi(t)?!1:W(typeof t.constructor,"function")&&!(W(t.constructor,globalThis.Object)||W(t.constructor.name,"Object"))}function Db(e){return mo(e)||Xc(e)||Hi(e)||Ki(e)||nr(e)||As(e)}function jb(e){return Qc(e)}function Fb(e,t){return Jc(e,t)}function qb(e,t){return Zc(e,t)}function Bb(e,t,r){for(let n=t;n<e.length;n++)if(!r(e[n],n))return!1;return!0}function Hb(e,t,r){let n=!0;for(let i=t;i<e.length;i++)r(e[i],i)||(n=!1);return n}function Kb(e,t){return W(t,"__proto__")||W(t,"constructor")?Object.prototype.hasOwnProperty.call(e,t):t in e}function zb(e){return Bi(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function Vb(e){return Object.entries(e)}function Bi(e){return Object.getOwnPropertyNames(e)}function Yb(e){return Object.getOwnPropertySymbols(e)}function Wb(e){return Object.values(e)}function Qb(e,t){if(!Nr(t))return!1;let r=Bi(e);return W(r.length,Bi(t).length)&&r.every(n=>bs(e[n],t[n]))}function Zb(e,t){return Lr(t)&&W(e.length,t.length)&&e.every((r,n)=>bs(e[n],t[n]))}function bs(e,t){return Lr(e)?Zb(e,t):Nr(e)?Qb(e,t):W(e,t)}var Ke={};ft(Ke,{IsBigInt64Array:()=>uO,IsBigUint64Array:()=>lO,IsBoolean:()=>Jb,IsDate:()=>fO,IsFloat32Array:()=>pO,IsFloat64Array:()=>cO,IsInt16Array:()=>iO,IsInt32Array:()=>sO,IsInt8Array:()=>rO,IsMap:()=>yO,IsNumber:()=>Xb,IsRegExp:()=>dO,IsSet:()=>gO,IsString:()=>eO,IsTypeArray:()=>tO,IsUint16Array:()=>aO,IsUint32Array:()=>mO,IsUint8Array:()=>nO,IsUint8ClampedArray:()=>oO});function Jb(e){return e instanceof Boolean}function Xb(e){return e instanceof Number}function eO(e){return e instanceof String}function tO(e){return globalThis.ArrayBuffer.isView(e)}function rO(e){return e instanceof globalThis.Int8Array}function nO(e){return e instanceof globalThis.Uint8Array}function oO(e){return e instanceof globalThis.Uint8ClampedArray}function iO(e){return e instanceof globalThis.Int16Array}function aO(e){return e instanceof globalThis.Uint16Array}function sO(e){return e instanceof globalThis.Int32Array}function mO(e){return e instanceof globalThis.Uint32Array}function pO(e){return e instanceof globalThis.Float32Array}function cO(e){return e instanceof globalThis.Float64Array}function uO(e){return e instanceof globalThis.BigInt64Array}function lO(e){return e instanceof globalThis.BigUint64Array}function dO(e){return e instanceof globalThis.RegExp}function fO(e){return e instanceof globalThis.Date}function gO(e){return e instanceof globalThis.Set}function yO(e){return e instanceof globalThis.Map}function EO(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~guard")}function hO(e){return e.map(t=>Os(t))}function TO(e){let t={},r=Object.getOwnPropertyDescriptors(e);for(let n of Object.keys(r)){let i=r[n];a.HasPropertyKey(i,"value")&&Object.defineProperty(t,n,{...i,value:Os(i.value)})}return t}function xO(e){return new RegExp(e.source,e.flags)}function Os(e){return e instanceof RegExp?xO(e):EO(e)?e:a.IsArray(e)?hO(e):a.IsObject(e)?TO(e):e}function po(e){return ht.clone+=1,Os(e)}var pt={};ft(pt,{Get:()=>bO,Reset:()=>_O,Set:()=>AO});var Mr={immutableTypes:!1,maxErrors:8,useEval:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1};function _O(){Mr.immutableTypes=!1,Mr.maxErrors=8,Mr.useEval=!0,Mr.exactOptionalPropertyTypes=!1,Mr.enumerableKind=!1}function AO(e){for(let t of a.Keys(e)){let r=e[t];r!==void 0&&Object.defineProperty(Mr,t,{value:r})}}function bO(){return Mr}function OO(e,t,r={}){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function nu(e,t){return{...e,...t}}function SO(e,t,r={}){ht.create+=1;let n=pt.Get(),i=nu(t,r),s=n.enumerableKind?nu(i,e):OO(i,e);return n.immutableTypes?Object.freeze(s):s}function RO(e,t){ht.discard+=1;let r={},n=Object.getOwnPropertyDescriptors(po(e)),i=new Set(t);for(let s of Object.keys(n))i.has(s)||Object.defineProperty(r,s,n[s]);return r}function CO(e,t,r){ht.update+=1;let n=pt.Get(),i=po(e);for(let s of Object.keys(t))Object.defineProperty(i,s,{configurable:!0,writable:!0,enumerable:n.enumerableKind,value:t[s]});for(let s of Object.keys(r))Object.defineProperty(i,s,{configurable:!0,enumerable:!0,writable:!0,value:r[s]});return i}function T(e,t){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.IsEqual(e["~kind"],t)}function _(e){return a.IsObject(e)}function ou(e){return d.Create({"~kind":"OptionalAddAction"},{type:e},{})}function iu(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"OptionalAddAction")&&_(e.type)}function au(e){return d.Create({"~kind":"OptionalRemoveAction"},{type:e},{})}function su(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"OptionalRemoveAction")&&_(e.type)}function mu(e){return d.Create({"~kind":"ReadonlyAddAction"},{type:e},{})}function pu(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"ReadonlyAddAction")&&_(e.type)}function cu(e){return d.Create({"~kind":"ReadonlyRemoveAction"},{type:e},{})}function uu(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"ReadonlyRemoveAction")&&_(e.type)}function S(e,t,r){return d.Create({"~kind":"Deferred"},{action:e,parameters:t,options:r},{})}function lu(e){return T(e,"Deferred")}function Ss(e){return d.Update(e,{"~immutable":!0},{})}function or(e){return Ss(e)}function wr(e){return _(e)&&a.HasPropertyKey(e,"~immutable")}function dn(e){return d.Discard(e,["~optional"])}function Ze(e){return d.Update(e,{"~optional":!0},{})}function zi(e){return Ze(e)}function be(e){return _(e)&&a.HasPropertyKey(e,"~optional")}function Vi(e){return d.Discard(e,["~readonly"])}function Je(e){return d.Update(e,{"~readonly":!0},{})}function Yi(e){return Je(e)}function $r(e){return _(e)&&a.HasPropertyKey(e,"~readonly")}function Tt(e,t){return d.Create({"~kind":"Array"},{type:"array",items:e},t)}function Q(e){return T(e,"Array")}function Wi(e){return d.Discard(e,["~kind","type","items"])}function St(e,t){return d.Create({"~kind":"AsyncIterator"},{type:"asyncIterator",iteratorItems:e},t)}function Be(e){return T(e,"AsyncIterator")}function du(e){return d.Discard(e,["~kind","type","iteratorItems"])}function fu(e){return{enumerable:pt.Get().enumerableKind,writable:!1,configurable:!1,value:e}}var Qi=class{constructor(){globalThis.Object.defineProperty(this,"~kind",fu("Base")),globalThis.Object.defineProperty(this,"~guard",fu({check:t=>this.Check(t),errors:t=>this.Errors(t)}))}Check(t){return!0}Errors(t){return[]}Convert(t){return t}Clean(t){return t}Default(t){return t}Create(){throw new Error("Create not implemented")}Clone(){throw Error("Clone not implemented")}};function ct(e){return T(e,"Base")}function ir(e,t,r={}){return d.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},r)}function Oe(e){return T(e,"Constructor")}function gu(e){return d.Discard(e,["~kind","type","parameters","instanceType"])}function ar(e,t,r={}){return d.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},r)}function Se(e){return T(e,"Function")}function yu(e){return d.Discard(e,["~kind","type","parameters","returnType"])}function Te(e,t){return d.Create({"~kind":"Ref"},{$ref:e},t)}function re(e){return T(e,"Ref")}function sr(e,t){return d.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function fn(e){return T(e,"Generic")}var Iu="(?!)";function z(e){return d.Create({"~kind":"Never"},{not:{}},e)}function qt(e){return T(e,"Never")}function PO(){return["(not-resolvable)",z()]}function kO(){return["(not-generic)",z()]}function UO(e,t,r){return[e,sr(t,r)]}function LO(e,t,r){return t in e?Eu(e,t,e[t],r):PO()}function Eu(e,t,r,n){return fn(r)?UO(t,r.parameters,r.expression):re(r)?LO(e,r.$ref,n):kO()}function hu(e,t,r){return Eu(e,"(anonymous)",t,r)}function Rt(e,t,r){let n=a.Keys(e).reduce((i,s)=>({...i,[s]:d.Update(e[s],{},{$id:s})}),{});return d.Create({"~kind":"Cyclic"},{$defs:n,$ref:t},r)}function ne(e){return T(e,"Cyclic")}var X={};ft(X,{Match:()=>NO});function NO(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}function we(e){return d.Create({"~kind":"Unknown"},{},e)}function Xe(e){return T(e,"Unknown")}function co(...e){let[t,r]=X.Match(e,{2:(n,i)=>[n,i,i],1:n=>[n,we(),we()]});return d.Create({"~kind":"Infer"},{type:"infer",name:t,extends:r},{})}function ye(e){return T(e,"Infer")}function gn(e){return d.Create({"~kind":"Any"},{},e)}function ze(e){return T(e,"Any")}function Tu(e){return a.IsObjectNotArray(e)}function xu(e){return a.Keys(e).filter(r=>isNaN(r)).reduce((r,n)=>[...r,e[n]],[])}function _u(e,t){let r=Tu(e)?xu(e):e;return d.Create({"~kind":"Enum"},{enum:r},t)}function Ie(e){return T(e,"Enum")}function ut(e,t={}){return d.Create({"~kind":"Intersect"},{allOf:e},t)}function P(e){return T(e,"Intersect")}function Au(e){return d.Discard(e,["~kind","allOf"])}function D(){throw new Error("Unreachable")}var pr={};ft(pr,{Hash:()=>ZO,HashCode:()=>ku});function MO(e){let t=new Set,r=e;for(;r&&r!==Object.prototype;){for(let n of Reflect.ownKeys(r))n!=="constructor"&&typeof n!="symbol"&&t.add(n);r=Object.getPrototypeOf(r)}return[...t]}function wO(e){return typeof e=="number"}var Ve;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(Ve||(Ve={}));var yn=BigInt("14695981039346656037"),[$O,vO]=[BigInt("1099511628211"),BigInt("18446744073709551616")],GO=Array.from({length:256}).map((e,t)=>BigInt(t)),Ru=new Float64Array(1),Cu=new DataView(Ru.buffer),Pu=new Uint8Array(Ru.buffer);function $e(e){yn=yn^GO[e],yn=yn*$O%vO}function DO(e){$e(Ve.Array);for(let t of e)mr(t)}function jO(e){$e(Ve.BigInt),Cu.setBigInt64(0,e);for(let t of Pu)$e(t)}function Ou(e){$e(Ve.Boolean),$e(e?1:0)}function FO(e){$e(Ve.Constructor),mr(e.toString())}function qO(e){$e(Ve.Date),mr(e.getTime())}function BO(e){$e(Ve.Function),mr(e.toString())}function HO(e){$e(Ve.Null)}function Su(e){$e(Ve.Number),Cu.setFloat64(0,e,!0);for(let t of Pu)$e(t)}function KO(e){$e(Ve.Object);for(let t of MO(e).sort())mr(t),mr(e[t])}function zO(e){$e(Ve.RegExp),Rs(e.toString())}var VO=new TextEncoder;function Rs(e){$e(Ve.String);for(let t of VO.encode(e))$e(t)}function YO(e){$e(Ve.Symbol),mr(e.toString())}function WO(e){$e(Ve.TypeArray);let t=new Uint8Array(e.buffer);for(let r=0;r<t.length;r++)$e(t[r])}function QO(e){return $e(Ve.Undefined)}function mr(e){return Ke.IsTypeArray(e)?WO(e):Ke.IsDate(e)?qO(e):Ke.IsRegExp(e)?zO(e):Ke.IsBoolean(e)?Ou(e.valueOf()):Ke.IsString(e)?Rs(e.valueOf()):Ke.IsNumber(e)?Su(e.valueOf()):wO(e)?Su(e):a.IsArray(e)?DO(e):a.IsBoolean(e)?Ou(e):a.IsBigInt(e)?jO(e):a.IsConstructor(e)?FO(e):a.IsNull(e)?HO(e):a.IsObject(e)?KO(e):a.IsString(e)?Rs(e):a.IsSymbol(e)?YO(e):a.IsUndefined(e)?QO(e):a.IsFunction(e)?BO(e):D()}function ku(e){return yn=BigInt("14695981039346656037"),mr(e),yn}function ZO(e){return ku(e).toString(16).padStart(16,"0")}function Uu(e){switch(e.keyword){case"additionalProperties":return"must not have additional properties";case"anyOf":return"must match a schema in anyOf";case"boolean":return"schema is false";case"const":return"must be equal to constant";case"contains":return"must contain at least 1 valid item";case"dependencies":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"dependentRequired":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"enum":return"must be equal to one of the allowed values";case"exclusiveMaximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"exclusiveMinimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"format":return`must match format "${e.params.format}"`;case"if":return`must match "${e.params.failingKeyword}" schema`;case"maxItems":return`must not have more than ${e.params.limit} items`;case"maxLength":return`must not have more than ${e.params.limit} characters`;case"maxProperties":return`must not have more than ${e.params.limit} properties`;case"maximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"minItems":return`must not have fewer than ${e.params.limit} items`;case"minLength":return`must not have fewer than ${e.params.limit} characters`;case"minProperties":return`must not have fewer than ${e.params.limit} properties`;case"minimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"multipleOf":return`must be multiple of ${e.params.multipleOf}`;case"not":return"must not be valid";case"oneOf":return"must match exactly one schema in oneOf";case"pattern":return`must match pattern "${e.params.pattern}"`;case"propertyNames":return`property names ${e.params.propertyNames.join(", ")} are invalid`;case"required":return`must have required properties ${e.params.requiredProperties.join(", ")}`;case"type":return typeof e.params.type=="string"?`must be ${e.params.type}`:`must be either ${e.params.type.join(" or ")}`;case"unevaluatedItems":return"must not have unevaluated items";case"unevaluatedProperties":return"must not have unevaluated properties";case"uniqueItems":return"must not have duplicate items";case"~guard":return"must match check function";case"~refine":return e.params.message;default:return"an unknown validation error occurred"}}var JO=Uu;function Lu(){return JO}var uo=class{constructor(t,r){this.type=t,this.decode=r}Encode(t){let r=this.type,n=vr(r)?p=>this.decode(r["~codec"].decode(p)):this.decode,i=vr(r)?p=>r["~codec"].encode(t(p)):t,s={decode:n,encode:i};return d.Update(this.type,{"~codec":s},{})}},lo=class{constructor(t){this.type=t}Decode(t){return new uo(this.type,t)}};function Zi(e){return new lo(e)}function Mu(e,t){return Zi(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function wu(e,t){return Zi(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function vr(e){return _(e)&&a.HasPropertyKey(e,"~codec")&&a.IsObject(e["~codec"])&&a.HasPropertyKey(e["~codec"],"encode")&&a.HasPropertyKey(e["~codec"],"decode")}function eS(e,t){let r=Ji(e)?[...e["~refine"],t]:[t];return d.Update(e,{"~refine":r},{})}function $u(e,t,r="error"){return eS(e,{refine:t,message:r})}function Ji(e){return _(e)&&a.HasPropertyKey(e,"~refine")}var vu="-?(?:0|[1-9][0-9]*)n";function fo(e){return d.Create({"~kind":"BigInt"},{type:"bigint"},e)}function it(e){return T(e,"BigInt")}function Xi(e){return d.Create({"~kind":"Boolean"},{type:"boolean"},e)}function Ye(e){return T(e,"Boolean")}function go(e){return d.Create({"~kind":"Identifier"},{name:e})}function Gu(e){return T(e,"Identifier")}var ea="-?(?:0|[1-9][0-9]*)";function Gr(e){return d.Create({"~kind":"Integer"},{type:"integer"},e)}function ke(e){return T(e,"Integer")}function Ct(e,t){return d.Create({"~kind":"Iterator"},{type:"iterator",iteratorItems:e},t)}function He(e){return T(e,"Iterator")}function Du(e){return d.Discard(e,["~kind","type","iteratorItems"])}var Cs=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function tS(e){return a.IsBigInt(e)?"bigint":a.IsBoolean(e)?"boolean":a.IsNumber(e)?"number":a.IsString(e)?"string":(()=>{throw new Cs(e)})()}function q(e,t){return d.Create({"~kind":"Literal"},{type:tS(e),const:e},t)}function ta(e){return a.IsBigInt(e)||a.IsBoolean(e)||a.IsNumber(e)||a.IsString(e)}function ju(e){return V(e)&&a.IsBigInt(e.const)}function Fu(e){return V(e)&&a.IsBoolean(e.const)}function In(e){return V(e)&&a.IsNumber(e.const)}function En(e){return V(e)&&a.IsString(e.const)}function V(e){return T(e,"Literal")}function cr(e){return d.Create({"~kind":"Null"},{type:"null"},e)}function Pt(e){return T(e,"Null")}var ra="-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?";function lt(e){return d.Create({"~kind":"Number"},{type:"number"},e)}function ue(e){return T(e,"Number")}function hn(e){return d.Create({"~kind":"Symbol"},{type:"symbol"},e)}function kt(e){return T(e,"Symbol")}function qu(e){return a.Keys(e).filter(t=>!be(e[t]))}function Bu(e){return a.Keys(e)}function na(e){return a.Values(e)}function rS(e,t={}){let r=qu(e),n=r.length>0?{required:r}:{};return d.Create({"~kind":"Object"},{type:"object",...n,properties:e},t)}var k=rS;function N(e){return T(e,"Object")}function Hu(e){return d.Discard(e,["~kind","type","properties","required"])}function Dr(...e){let[t,r,n]=X.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[i,s,s],1:i=>[i,we(),we()]});return d.Create({"~kind":"Parameter"},{name:t,extends:r,equals:n},{})}function Ku(e){return T(e,"Parameter")}function Ut(e,t){return d.Create({"~kind":"Promise"},{type:"promise",item:e},t)}function ve(e){return T(e,"Promise")}function zu(e){return d.Discard(e,["~kind","type","item"])}var oa=".*";function et(e){return d.Create({"~kind":"String"},{type:"string"},e)}function xe(e){return T(e,"String")}function tt(e,t){let r="object",n={[e]:t};return d.Create({"~kind":"Record"},{type:r,patternProperties:n})}var Tn=`^${ea}$`,xn=`^${ra}$`,Lt=`^${oa}$`;function yo(e,t,r={}){return S("Record",[e,t],r)}function nS(e,t,r={}){return O({},yo(e,t,r))}function ia(e,t,r={}){return nS(e,t,r)}function Vu(e,t){return tt(e,t)}function at(e){return a.Keys(e.patternProperties)[0]}function _n(e){let t=at(e);return a.IsEqual(t,Tn)?Gr():a.IsEqual(t,xn)?lt():et()}function Ge(e){return e.patternProperties[at(e)]}function le(e){return T(e,"Record")}function jr(e){return d.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function ur(e){return T(e,"Rest")}function aa(e){return d.Create({"~kind":"This"},{$ref:"#"},e)}function Yu(e){return T(e,"This")}function Ue(e,t={}){let[r,n,i]=[e,e.length,!1];return d.Create({"~kind":"Tuple"},{type:"array",additionalItems:i,items:r,minItems:n},t)}function B(e){return T(e,"Tuple")}function Wu(e){return d.Discard(e,["~kind","type","items","minItems","additionalItems"])}function An(e){return d.Create({"~kind":"Undefined"},{type:"undefined"},e)}function Nt(e){return T(e,"Undefined")}function v(e,t={}){return d.Create({"~kind":"Union"},{anyOf:e},t)}function x(e){return T(e,"Union")}function Qu(e){return d.Discard(e,["~kind","anyOf"])}function Zu(e){return d.Create({"~kind":"Unsafe"},{},e)}function Ju(e){return T(e,"Unsafe")}function sa(e){return d.Create({"~kind":"Void"},{type:"void"},e)}function st(e){return T(e,"Void")}function iS(e,t){return a.IsEqual(e,"Array")?Tt(t[0]):a.IsEqual(e,"AsyncIterator")?St(t[0]):a.IsEqual(e,"Iterator")?Ct(t[0]):a.IsEqual(e,"Promise")?Ut(t[0]):a.IsEqual(e,"Awaited")?wo(t[0]):a.IsEqual(e,"Capitalize")?Eo(t[0]):a.IsEqual(e,"ConstructorParameters")?Ao(t[0]):a.IsEqual(e,"Evaluate")?ks(t[0]):a.IsEqual(e,"Exclude")?bo(t[0],t[1]):a.IsEqual(e,"Extract")?Oo(t[0],t[1]):a.IsEqual(e,"Index")?Sn(t[0],t[1]):a.IsEqual(e,"InstanceType")?So(t[0]):a.IsEqual(e,"Lowercase")?ho(t[0]):a.IsEqual(e,"NonNullable")?Ro(t[0]):a.IsEqual(e,"Omit")?Co(t[0],t[1]):a.IsEqual(e,"Options")?Cn(t[0],t[1]):a.IsEqual(e,"Parameters")?Po(t[0]):a.IsEqual(e,"Partial")?ko(t[0]):a.IsEqual(e,"Pick")?Uo(t[0],t[1]):a.IsEqual(e,"Readonly")?Lo(t[0]):a.IsEqual(e,"KeyOf")?Rn(t[0]):a.IsEqual(e,"Record")?yo(t[0],t[1]):a.IsEqual(e,"Required")?No(t[0]):a.IsEqual(e,"ReturnType")?Mo(t[0]):a.IsEqual(e,"Uncapitalize")?To(t[0]):a.IsEqual(e,"Uppercase")?xo(t[0]):ma(Te(e),t)}function Fr(){throw Error("Unreachable")}var aS=(e,t=[])=>e.reduce((r,n)=>a.IsArray(n)&&a.IsEqual(n.length,2)?[...r,n[0]]:[...r,n],[]),Bt=e=>{let[t,r]=e;return aS([...t,...r])};function nl(e){return Dr(e[0],e[2],e[4])}function ol(e){return Dr(e[0],e[2],e[2])}function il(e){return Dr(e[0],we(),e[2])}function al(e){return Dr(e,we(),we())}function sl(e){return Bt(e)}function ml(e){return e[1]}function pl(e){return Bt(e)}function cl(e){return e[1]}function ul(e){return iS(e[0],e[1])}function ll(e){return null}function dl(e){return et()}function fl(e){return lt()}function gl(e){return Xi()}function yl(e){return An()}function Il(e){return cr()}function El(e){return Gr()}function hl(e){return fo()}function Tl(e){return we()}function xl(e){return gn()}function _l(e){return k({})}function Al(e){return z()}function bl(e){return hn()}function Ol(e){return sa()}function Sl(e){return aa()}function Rl(e){return e[1]}function Cl(e){return q(e)}function Pl(e){return a.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function kl(e){return e[1]}function Ul(e){return Io(e)}function Ll(e){return q(BigInt(e))}function Nl(e){return q(a.IsEqual(e,"true"))}function Ml(e){return q(parseFloat(e))}function wl(e){return q(e)}function $l(e){return e.length>0}function vl(e){return e.reduce((t,r)=>a.IsEqual(r.length,3)?[...t,[r[1]]]:[...t,[]],[])}function Gl(e){return a.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function Dl(e){return a.IsArray(e)&&a.IsEqual(e.length,3)?e[1]:e}var Xu=(e,t)=>t.reduceRight((r,n)=>{let i=n;return a.IsEqual(i.length,1)?Sn(r,i[0]):a.IsEqual(i.length,0)?Tt(r):Fr()},e),el=(e,t)=>a.IsEqual(t.length,3)?_o(e,t[0],t[1],t[2]):e;function jl(e){let[t,r,n,i]=e;return el(t?Rn(Xu(r,n)):Xu(r,n),i)}function Ps(e,t){return a.IsEqual(t.length,3)?(()=>{let[r,n,i]=t,s=Ps(n,i);if(a.IsEqual(r,"&"))return P(s)?ut([e,...s.allOf]):ut([e,s]);if(a.IsEqual(r,"|"))return x(s)?v([e,...s.anyOf]):v([e,s]);Fr()})():e}function Fl(e){let[t,r]=e;return Ps(t,r)}function ql(e){let[t,r]=e;return Ps(t,r)}function Bl(e){return Ss(e[1])}function Hl(e){return e[1]}function Kl(e){return sr(e[0],e[2])}function zl(e){return a.IsEqual(e.length,4)?co(e[1],e[3]):a.IsEqual(e.length,2)?co(e[1],we()):Fr()}function Vl(e){return`${e}`}function Yl(e){return ke(e[3])?Tn:ue(e[3])?xn:kt(e[3])?Lt:xe(e[3])?Lt:Fr()}function Wl(e){return e.length>0}function Ql(e){return e.length>0}function Zl(e){let[t,r,n,i,s]=e;return{[r]:t&&n?Je(Ze(s)):t&&!n?Je(s):!t&&n?Ze(s):s}}function Jl(e){return Bt(e)}function Xl(e){return e.reduce((t,r)=>a.HasPropertyKey(r,Tn)||a.HasPropertyKey(r,xn)||a.HasPropertyKey(r,Lt)?[t[0],d.Assign(t[1],r)]:[d.Assign(t[0],r),t[1]],[{},{}])}function ed(e){return Xl(e[1])}function td(e){let[t,r]=e,n=a.IsEqual(a.Keys(r).length,0)?{}:{patternProperties:r};return k(t,n)}function rd(e){return a.IsEqual(e.length,5)?Je(Ze(e[4])):a.IsEqual(e.length,3)?e[2]:a.IsEqual(e.length,4)?a.IsEqual(e[2],"readonly")?Je(e[3]):Ze(e[3]):Fr()}function nd(e){return Je(Ze(e[1]))}function od(e){return Je(e[1])}function id(e){return Ze(e[0])}function ad(e){return a.IsEqual(e.length,2)?jr(e[1]):a.IsEqual(e.length,1)?e[0]:Fr()}function sd(e){return Bt(e)}function md(e){return Ue(e[1])}function pd(e){return Je(Ze(e[4]))}function cd(e){return Je(e[3])}function ud(e){return Ze(e[3])}function ld(e){return e[2]}function dd(e){return a.IsEqual(e.length,2)?jr(e[1]):a.IsEqual(e.length,1)?e[0]:Fr()}function fd(e){return Bt(e)}function gd(e){return ar(e[1],e[4])}function yd(e){return ir(e[2],e[5])}function tl(e,t){return a.IsEqual(e,"remove")?cu(t):a.IsEqual(e,"add")?mu(t):t}function Id(e){return a.IsEqual(e.length,2)&&a.IsEqual(e[0],"-")?"remove":a.IsEqual(e.length,2)&&a.IsEqual(e[0],"+")||a.IsEqual(e.length,1)?"add":"none"}function rl(e,t){return a.IsEqual(e,"remove")?au(t):a.IsEqual(e,"add")?ou(t):t}function Ed(e){return a.IsEqual(e.length,2)&&a.IsEqual(e[0],"-")?"remove":a.IsEqual(e.length,2)&&a.IsEqual(e[0],"+")||a.IsEqual(e.length,1)?"add":"none"}function hd(e){return a.IsEqual(e.length,2)?[e[1]]:[]}function Td(e){return a.IsArray(e[6])&&a.IsEqual(e[6].length,1)?bn(go(e[3]),e[5],e[6][0],tl(e[1],rl(e[8],e[10]))):bn(go(e[3]),e[5],Te(e[3]),tl(e[1],rl(e[8],e[10])))}function xd(e){return Te(e)}function _d(e){return Cn(e[2],e[4])}function Ad(e){return parseFloat(e)}function bd(e){return a.IsEqual(e,"true")}function Od(e){return null}function Sd(e){return{[e[0]]:e[2]}}function Rd(e){return Bt(e)}function sS(e){return e.reduce((t,r)=>d.Assign(t,r),{})}function Cd(e){return sS(e[1])}function Pd(e){return Bt(e)}function kd(e){return e[1]}function Ud(e){return fo()}function Ld(e){return et()}function Nd(e){return lt()}function Md(e){return Gr()}function wd(e){return z()}function $d(e){return q(e)}function vd(e){return v(e[1])}function Gd(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Dd(e){return[e[0],...e[1]]}function jd(e){return e[1]}function Fd(e){return Bt(e)}function qd(e){return a.IsEqual(e.length,2)?e[1]:[]}function Bd(e){let t=e[2],r=e[3],[n,i]=e[4],s=a.IsEqual(a.Keys(i).length,0)?{}:{patternProperties:i};return{[e[1]]:sr(t,On(r,n,s))}}function Hd(e){let t=e[2],[r,n]=e[3],i=a.IsEqual(a.Keys(n).length,0)?{}:{patternProperties:n};return{[e[1]]:On(t,r,i)}}function Kd(e){return{[e[1]]:sr(e[2],e[4])}}function zd(e){return{[e[1]]:e[3]}}function Vd(e){return null}function Yd(e){return Xl(Bt(e))}function Wd(e){return e[1]}function Qd(e){let t=e[0],r=e[1];return Us(d.Assign(t,r[0]))}function ee(e){return Lr(e)&&W(e.length,2)}function cS(e,t){return W(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function Re(e,t){let[r,...n]=e;return nr(r)?(()=>{let i=cS(r,t);return W(i.length,2)?i:Re(n,t)})():[]}function Ls(e,t){return Array.from({length:t-e+1},(r,n)=>String.fromCharCode(e+n))}var Zd=[...Ls(97,122),...Ls(65,90)],Ns="0",Ms=Ls(49,57),Pn=[Ns,...Ms],Jd=" ",kn=`
28
- `;var lr="_",pa=".",Xd="$",ca="-";var ef="//",tf="/*",lS="*/";function rf(e){let t=e.indexOf(lS);return W(t,-1)?"":e.slice(t+2)}function nf(e){let t=e.indexOf(kn);return W(t,-1)?"":e.slice(t)}function dS(e){return e.replace(/^[ \t\r\f\v]+/,"")}function ua(e){let t=dS(e);return t.startsWith(tf)?ua(rf(t.slice(2))):t.startsWith(ef)?ua(nf(t.slice(2))):t}function rt(e){let t=e.trimStart();return t.startsWith(tf)?rt(rf(t.slice(2))):t.startsWith(ef)?rt(nf(t.slice(2))):t}function fS(e,t){return e.includes(t)}function Un(e,t,r,n=""){let i=Re(e,r);return ee(i)?fS(t,i[0])?Un(e,t,i[1],n):Un(e,t,i[1],`${n}${i[0]}`):[n,r]}function la(e,t){let r=Re([e],t);return ee(r)?r:["",t]}function gS(e){return la(ca,e)}function yS(e){return Re(Ms,e)}var IS=[...Pn,lr];function ES(e){return Un(IS,[lr],e)}function hS(e){let t=gS(e);return ee(t)?(()=>{let r=Re([Ns],t[1]);return ee(r)?[`${t[0]}${r[0]}`,r[1]]:(()=>{let n=yS(t[1]);return ee(n)?(()=>{let i=ES(n[1]);return ee(i)?[`${t[0]}${n[0]}${i[0]}`,i[1]]:[]})():[]})()})():[]}function da(e){return hS(rt(e))}function TS(e){let t=da(e);return ee(t)?(()=>{let r=Re(["n"],t[1]);return ee(r)?[`${t[0]}`,r[1]]:[]})():[]}function of(e){return TS(e)}function ws(e,t){return Re([e],t)}function I(e,t){return W(e,"")?["",t]:e.startsWith(kn)?ws(e,ua(t)):e.startsWith(Jd)?ws(e,t):ws(e,rt(t))}var af=[...Zd,lr,Xd];function xS(e){return Re(af,e)}var _S=[...af,...Pn];function sf(e,t=""){let r=Re(_S,e);return ee(r)?sf(r[1],`${t}${r[0]}`):[t,e]}function AS(e){let t=xS(e);return ee(t)?(()=>{let r=sf(t[1]);return ee(r)?[`${t[0]}${r[0]}`,r[1]]:[]})():[]}function de(e){return AS(rt(e))}var bS=[...Pn,lr];function OS(e){return la(ca,e)}function SS(e){return ee(Re([pa],e))}function mf(e){let t=Un(bS,[lr],e);return ee(t)?W(t[0],"")?[]:[t[0],t[1]]:[]}function RS(e,t){let r=Re([pa],t);return ee(r)?(()=>{let n=mf(r[1]);return ee(n)?[`${e}0${r[0]}${n[0]}`,n[1]]:[]})():[]}function CS(e,t){let r=da(t);return ee(r)?(()=>{let n=Re([pa],r[1]);return ee(n)?(()=>{let i=mf(n[1]);return ee(i)?[`${e}${r[0]}${n[0]}${i[0]}`,i[1]]:[`${e}${r[0]}`,n[1]]})():[`${e}${r[0]}`,r[1]]})():[]}function PS(e){let t=OS(e);return ee(t)?SS(t[1])?RS(t[0],t[1]):CS(t[0],t[1]):[]}function fa(e){return PS(rt(e))}function pf(e,t){let[r,...n]=e;return nr(r)?t.startsWith(r)?!0:pf(n,t):!1}function dr(e,t,r=""){return W(t,"")?[]:pf(e,t)?[r,t]:(()=>{let[n,i]=[t.slice(0,1),t.slice(1)];return dr(e,i,`${r}${n}`)})()}function kS(e,t,r){return r.startsWith(e)?(()=>{let n=dr([t],r.slice(e.length));return ee(n)?n[1].startsWith(t)?[`${n[0]}`,n[1].slice(t.length)]:[]:[]})():[]}function US(e,t,r){return r.startsWith(e)?(()=>{let n=dr([kn,t],r.slice(e.length));return ee(n)?n[1].startsWith(t)?[`${n[0]}`,n[1].slice(t.length)]:[]:[]})():[]}function cf(e,t,r,n){return r?kS(e,t,rt(n)):US(e,t,rt(n))}function LS(e,t){return Re(e,t)}function NS(e,t){return cf(e,e,!1,t)}function MS(e,t){let r=LS(e,t);return ee(r)?NS(r[0],`${r[0]}${r[1]}`):[]}function ga(e,t){return MS(e,rt(t))}function uf(e,t){let r=dr(e,t);return ee(r)?W(r[0],"")?[]:r:[]}var m=(e,t,r=()=>[])=>e.length===2?t(e):r(),$S=e=>m(m(de(e),([t,r])=>m(I("extends",r),([n,i])=>m(Y(i),([s,p])=>m(I("=",p),([c,l])=>m(Y(l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[nl(t),r]),vS=e=>m(m(de(e),([t,r])=>m(I("extends",r),([n,i])=>m(Y(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[ol(t),r]),GS=e=>m(m(de(e),([t,r])=>m(I("=",r),([n,i])=>m(Y(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[il(t),r]),DS=e=>m(de(e),([t,r])=>[al(t),r]),ff=e=>m(m($S(e),([t,r])=>[t,r],()=>m(vS(e),([t,r])=>[t,r],()=>m(GS(e),([t,r])=>[t,r],()=>m(DS(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),gf=(e,t=[])=>m(m(ff(e),([r,n])=>m(I(",",n),([i,s])=>[[r,i],s])),([r,n])=>gf(n,[...t,r]),()=>[t,e]),jS=e=>m(m(gf(e),([t,r])=>m(m(m(ff(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[sl(t),r]),Gs=e=>m(m(I("<",e),([t,r])=>m(jS(r),([n,i])=>m(I(">",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[ml(t),r]),yf=(e,t=[])=>m(m(Y(e),([r,n])=>m(I(",",n),([i,s])=>[[r,i],s])),([r,n])=>yf(n,[...t,r]),()=>[t,e]),FS=e=>m(m(yf(e),([t,r])=>m(m(m(Y(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[pl(t),r]),qS=e=>m(m(I("<",e),([t,r])=>m(FS(r),([n,i])=>m(I(">",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[cl(t),r]),BS=e=>m(m(de(e),([t,r])=>m(qS(r),([n,i])=>[[t,n],i])),([t,r])=>[ul(t),r]),If=e=>m(m(m(I(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[ll(t),r]),Ef=e=>m(I("string",e),([t,r])=>[dl(t),r]),hf=e=>m(I("number",e),([t,r])=>[fl(t),r]),HS=e=>m(I("boolean",e),([t,r])=>[gl(t),r]),KS=e=>m(I("undefined",e),([t,r])=>[yl(t),r]),zS=e=>m(I("null",e),([t,r])=>[Il(t),r]),Tf=e=>m(I("integer",e),([t,r])=>[El(t),r]),VS=e=>m(I("bigint",e),([t,r])=>[hl(t),r]),YS=e=>m(I("unknown",e),([t,r])=>[Tl(t),r]),WS=e=>m(I("any",e),([t,r])=>[xl(t),r]),QS=e=>m(I("object",e),([t,r])=>[_l(t),r]),ZS=e=>m(I("never",e),([t,r])=>[Al(t),r]),xf=e=>m(I("symbol",e),([t,r])=>[bl(t),r]),JS=e=>m(I("void",e),([t,r])=>[Ol(t),r]),XS=e=>m(I("this",e),([t,r])=>[Sl(t),r]),eR=e=>m(m(Ef(e),([t,r])=>[t,r],()=>m(hf(e),([t,r])=>[t,r],()=>m(HS(e),([t,r])=>[t,r],()=>m(KS(e),([t,r])=>[t,r],()=>m(zS(e),([t,r])=>[t,r],()=>m(Tf(e),([t,r])=>[t,r],()=>m(VS(e),([t,r])=>[t,r],()=>m(YS(e),([t,r])=>[t,r],()=>m(WS(e),([t,r])=>[t,r],()=>m(QS(e),([t,r])=>[t,r],()=>m(ZS(e),([t,r])=>[t,r],()=>m(xf(e),([t,r])=>[t,r],()=>m(JS(e),([t,r])=>[t,r],()=>m(XS(e),([t,r])=>[t,r],()=>[])))))))))))))),([t,r])=>[t,r]),tR=e=>m(m(I("${",e),([t,r])=>m(Y(r),([n,i])=>m(I("}",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[Rl(t),r]),$s=e=>m(dr(["${","`"],e),([t,r])=>[Cl(t),r]),_f=e=>m(m(m($s(e),([t,r])=>m(tR(r),([n,i])=>m(_f(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[t,r],()=>m(m($s(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m($s(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[Pl(t),r]),Ds=e=>m(m(I("`",e),([t,r])=>m(_f(r),([n,i])=>m(I("`",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[kl(t),r]),rR=e=>m(Ds(e),([t,r])=>[Ul(t),r]),nR=e=>m(of(e),([t,r])=>[Ll(t),r]),oR=e=>m(m(I("true",e),([t,r])=>[t,r],()=>m(I("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[Nl(t),r]),iR=e=>m(fa(e),([t,r])=>[Ml(t),r]),aR=e=>m(ga(["'",'"'],e),([t,r])=>[wl(t),r]),sR=e=>m(m(nR(e),([t,r])=>[t,r],()=>m(oR(e),([t,r])=>[t,r],()=>m(iR(e),([t,r])=>[t,r],()=>m(aR(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),mR=e=>m(m(m(I("keyof",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[$l(t),r]),Af=(e,t=[])=>m(m(m(I("[",e),([r,n])=>m(Y(n),([i,s])=>m(I("]",s),([p,c])=>[[r,i,p],c]))),([r,n])=>[r,n],()=>m(m(I("[",e),([r,n])=>m(I("]",n),([i,s])=>[[r,i],s])),([r,n])=>[r,n],()=>[])),([r,n])=>Af(n,[...t,r]),()=>[t,e]),pR=e=>m(Af(e),([t,r])=>[vl(t),r]),cR=e=>m(m(m(I("extends",e),([t,r])=>m(Y(r),([n,i])=>m(I("?",i),([s,p])=>m(Y(p),([c,l])=>m(I(":",l),([g,y])=>m(Y(y),([E,C])=>[[t,n,s,c,g,E],C])))))),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Gl(t),r]),uR=e=>m(m(m(I("(",e),([t,r])=>m(Y(r),([n,i])=>m(I(")",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[t,r],()=>m(eR(e),([t,r])=>[t,r],()=>m(AR(e),([t,r])=>[t,r],()=>m(PR(e),([t,r])=>[t,r],()=>m(rR(e),([t,r])=>[t,r],()=>m(sR(e),([t,r])=>[t,r],()=>m(wR(e),([t,r])=>[t,r],()=>m(MR(e),([t,r])=>[t,r],()=>m(DR(e),([t,r])=>[t,r],()=>m(FR(e),([t,r])=>[t,r],()=>m(BS(e),([t,r])=>[t,r],()=>m(jR(e),([t,r])=>[t,r],()=>[])))))))))))),([t,r])=>[Dl(t),r]),bf=e=>m(m(mR(e),([t,r])=>m(uR(r),([n,i])=>m(pR(i),([s,p])=>m(cR(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[jl(t),r]),Of=e=>m(m(m(I("&",e),([t,r])=>m(bf(r),([n,i])=>m(Of(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Sf=e=>m(m(bf(e),([t,r])=>m(Of(r),([n,i])=>[[t,n],i])),([t,r])=>[Fl(t),r]),Rf=e=>m(m(m(I("|",e),([t,r])=>m(Sf(r),([n,i])=>m(Rf(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),ya=e=>m(m(Sf(e),([t,r])=>m(Rf(r),([n,i])=>[[t,n],i])),([t,r])=>[ql(t),r]),lR=e=>m(m(I("readonly",e),([t,r])=>m(ya(r),([n,i])=>[[t,n],i])),([t,r])=>[Bl(t),r]),dR=e=>m(m(I("|",e),([t,r])=>m(ya(r),([n,i])=>[[t,n],i])),([t,r])=>[Hl(t),r]),fR=e=>m(m(Gs(e),([t,r])=>m(I("=",r),([n,i])=>m(Y(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[Kl(t),r]),gR=e=>m(m(m(I("infer",e),([t,r])=>m(de(r),([n,i])=>m(I("extends",i),([s,p])=>m(ya(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[t,r],()=>m(m(I("infer",e),([t,r])=>m(de(r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>[])),([t,r])=>[zl(t),r]),Y=e=>m(m(gR(e),([t,r])=>[t,r],()=>m(dR(e),([t,r])=>[t,r],()=>m(lR(e),([t,r])=>[t,r],()=>m(ya(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),yR=e=>m(fa(e),([t,r])=>[Vl(t),r]),IR=e=>m(de(e),([t,r])=>[t,r]),ER=e=>m(ga(["'",'"'],e),([t,r])=>[t,r]),hR=e=>m(m(I("[",e),([t,r])=>m(de(r),([n,i])=>m(I(":",i),([s,p])=>m(m(Tf(p),([c,l])=>[c,l],()=>m(hf(p),([c,l])=>[c,l],()=>m(Ef(p),([c,l])=>[c,l],()=>m(xf(p),([c,l])=>[c,l],()=>[])))),([c,l])=>m(I("]",l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[Yl(t),r]),Cf=e=>m(m(yR(e),([t,r])=>[t,r],()=>m(IR(e),([t,r])=>[t,r],()=>m(ER(e),([t,r])=>[t,r],()=>m(hR(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),TR=e=>m(m(m(I("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Wl(t),r]),xR=e=>m(m(m(I("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Ql(t),r]),Pf=e=>m(m(TR(e),([t,r])=>m(Cf(r),([n,i])=>m(xR(i),([s,p])=>m(I(":",p),([c,l])=>m(Y(l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[Zl(t),r]),kf=e=>m(m(m(I(",",e),([t,r])=>m(I(`
29
- `,r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(I(";",e),([t,r])=>m(I(`
30
- `,r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(I(",",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m(I(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m(I(`
31
- `,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),Uf=(e,t=[])=>m(m(Pf(e),([r,n])=>m(kf(n),([i,s])=>[[r,i],s])),([r,n])=>Uf(n,[...t,r]),()=>[t,e]),_R=e=>m(m(Uf(e),([t,r])=>m(m(m(Pf(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[Jl(t),r]),js=e=>m(m(I("{",e),([t,r])=>m(_R(r),([n,i])=>m(I("}",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[ed(t),r]),AR=e=>m(js(e),([t,r])=>[td(t),r]),bR=e=>m(m(m(de(e),([t,r])=>m(I("?",r),([n,i])=>m(I(":",i),([s,p])=>m(I("readonly",p),([c,l])=>m(Y(l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[t,r],()=>m(m(de(e),([t,r])=>m(I(":",r),([n,i])=>m(I("readonly",i),([s,p])=>m(Y(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[t,r],()=>m(m(de(e),([t,r])=>m(I("?",r),([n,i])=>m(I(":",i),([s,p])=>m(Y(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[t,r],()=>m(m(de(e),([t,r])=>m(I(":",r),([n,i])=>m(Y(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[t,r],()=>[])))),([t,r])=>[rd(t),r]),OR=e=>m(m(I("readonly",e),([t,r])=>m(Y(r),([n,i])=>m(I("?",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[nd(t),r]),SR=e=>m(m(I("readonly",e),([t,r])=>m(Y(r),([n,i])=>[[t,n],i])),([t,r])=>[od(t),r]),RR=e=>m(m(Y(e),([t,r])=>m(I("?",r),([n,i])=>[[t,n],i])),([t,r])=>[id(t),r]),lf=e=>m(m(bR(e),([t,r])=>[t,r],()=>m(OR(e),([t,r])=>[t,r],()=>m(SR(e),([t,r])=>[t,r],()=>m(RR(e),([t,r])=>[t,r],()=>m(Y(e),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),Lf=e=>m(m(m(I("...",e),([t,r])=>m(lf(r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(lf(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[ad(t),r]),Nf=(e,t=[])=>m(m(Lf(e),([r,n])=>m(I(",",n),([i,s])=>[[r,i],s])),([r,n])=>Nf(n,[...t,r]),()=>[t,e]),CR=e=>m(m(Nf(e),([t,r])=>m(m(m(Lf(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[sd(t),r]),PR=e=>m(m(I("[",e),([t,r])=>m(CR(r),([n,i])=>m(I("]",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[md(t),r]),kR=e=>m(m(de(e),([t,r])=>m(I("?",r),([n,i])=>m(I(":",i),([s,p])=>m(I("readonly",p),([c,l])=>m(Y(l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[pd(t),r]),UR=e=>m(m(de(e),([t,r])=>m(I(":",r),([n,i])=>m(I("readonly",i),([s,p])=>m(Y(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[cd(t),r]),LR=e=>m(m(de(e),([t,r])=>m(I("?",r),([n,i])=>m(I(":",i),([s,p])=>m(Y(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[ud(t),r]),NR=e=>m(m(de(e),([t,r])=>m(I(":",r),([n,i])=>m(Y(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[ld(t),r]),df=e=>m(m(kR(e),([t,r])=>[t,r],()=>m(UR(e),([t,r])=>[t,r],()=>m(LR(e),([t,r])=>[t,r],()=>m(NR(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),Mf=e=>m(m(m(I("...",e),([t,r])=>m(df(r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(df(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[dd(t),r]),wf=(e,t=[])=>m(m(Mf(e),([r,n])=>m(I(",",n),([i,s])=>[[r,i],s])),([r,n])=>wf(n,[...t,r]),()=>[t,e]),$f=e=>m(m(wf(e),([t,r])=>m(m(m(Mf(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[fd(t),r]),MR=e=>m(m(I("(",e),([t,r])=>m($f(r),([n,i])=>m(I(")",i),([s,p])=>m(I("=>",p),([c,l])=>m(Y(l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[gd(t),r]),wR=e=>m(m(I("new",e),([t,r])=>m(I("(",r),([n,i])=>m($f(i),([s,p])=>m(I(")",p),([c,l])=>m(I("=>",l),([g,y])=>m(Y(y),([E,C])=>[[t,n,s,c,g,E],C])))))),([t,r])=>[yd(t),r]),$R=e=>m(m(m(I("+",e),([t,r])=>m(I("readonly",r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(I("-",e),([t,r])=>m(I("readonly",r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(I("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[Id(t),r]),vR=e=>m(m(m(I("+",e),([t,r])=>m(I("?",r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(I("-",e),([t,r])=>m(I("?",r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(I("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[Ed(t),r]),GR=e=>m(m(m(I("as",e),([t,r])=>m(Y(r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[hd(t),r]),DR=e=>m(m(I("{",e),([t,r])=>m($R(r),([n,i])=>m(I("[",i),([s,p])=>m(de(p),([c,l])=>m(I("in",l),([g,y])=>m(Y(y),([E,C])=>m(GR(C),([Pe,ot])=>m(I("]",ot),([ao,zA])=>m(vR(zA),([VA,YA])=>m(I(":",YA),([WA,QA])=>m(Y(QA),([ZA,JA])=>m(If(JA),([XA,eb])=>m(I("}",eb),([tb,rb])=>[[t,n,s,c,g,E,Pe,ao,VA,WA,ZA,XA,tb],rb]))))))))))))),([t,r])=>[Td(t),r]),jR=e=>m(de(e),([t,r])=>[xd(t),r]),FR=e=>m(m(I("Options",e),([t,r])=>m(I("<",r),([n,i])=>m(Y(i),([s,p])=>m(I(",",p),([c,l])=>m(Df(l),([g,y])=>m(I(">",y),([E,C])=>[[t,n,s,c,g,E],C])))))),([t,r])=>[_d(t),r]),qR=e=>m(fa(e),([t,r])=>[Ad(t),r]),BR=e=>m(m(I("true",e),([t,r])=>[t,r],()=>m(I("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[bd(t),r]),HR=e=>m(ga(['"',"'"],e),([t,r])=>[t,r]),KR=e=>m(I("null",e),([t,r])=>[Od(t),r]),vf=e=>m(m(Cf(e),([t,r])=>m(I(":",r),([n,i])=>m(Fs(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[Sd(t),r]),Gf=(e,t=[])=>m(m(vf(e),([r,n])=>m(kf(n),([i,s])=>[[r,i],s])),([r,n])=>Gf(n,[...t,r]),()=>[t,e]),zR=e=>m(m(Gf(e),([t,r])=>m(m(m(vf(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[Rd(t),r]),Df=e=>m(m(I("{",e),([t,r])=>m(zR(r),([n,i])=>m(I("}",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[Cd(t),r]),jf=(e,t=[])=>m(m(Fs(e),([r,n])=>m(I(",",n),([i,s])=>[[r,i],s])),([r,n])=>jf(n,[...t,r]),()=>[t,e]),VR=e=>m(m(jf(e),([t,r])=>m(m(m(Fs(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[Pd(t),r]),YR=e=>m(m(I("[",e),([t,r])=>m(VR(r),([n,i])=>m(I("]",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[kd(t),r]),Fs=e=>m(m(qR(e),([t,r])=>[t,r],()=>m(BR(e),([t,r])=>[t,r],()=>m(HR(e),([t,r])=>[t,r],()=>m(KR(e),([t,r])=>[t,r],()=>m(Df(e),([t,r])=>[t,r],()=>m(YR(e),([t,r])=>[t,r],()=>[])))))),([t,r])=>[t,r]),WR=e=>m(I("-?(?:0|[1-9][0-9]*)n",e),([t,r])=>[Ud(t),r]),QR=e=>m(I(".*",e),([t,r])=>[Ld(t),r]),ZR=e=>m(I("-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?",e),([t,r])=>[Nd(t),r]),JR=e=>m(I("-?(?:0|[1-9][0-9]*)",e),([t,r])=>[Md(t),r]),XR=e=>m(I("(?!)",e),([t,r])=>[wd(t),r]),eC=e=>m(uf(["-?(?:0|[1-9][0-9]*)n",".*","-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?","-?(?:0|[1-9][0-9]*)","(?!)","(",")","$","|"],e),([t,r])=>[$d(t),r]),tC=e=>m(m(WR(e),([t,r])=>[t,r],()=>m(QR(e),([t,r])=>[t,r],()=>m(ZR(e),([t,r])=>[t,r],()=>m(JR(e),([t,r])=>[t,r],()=>m(XR(e),([t,r])=>[t,r],()=>m(rC(e),([t,r])=>[t,r],()=>m(eC(e),([t,r])=>[t,r],()=>[]))))))),([t,r])=>[t,r]),rC=e=>m(m(I("(",e),([t,r])=>m(qs(r),([n,i])=>m(I(")",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[vd(t),r]),Ff=e=>m(m(m(vs(e),([t,r])=>m(I("|",r),([n,i])=>m(Ff(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[t,r],()=>m(m(vs(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[]))),([t,r])=>[Gd(t),r]),vs=e=>m(m(tC(e),([t,r])=>m(qs(r),([n,i])=>[[t,n],i])),([t,r])=>[Dd(t),r]),qs=e=>m(m(Ff(e),([t,r])=>[t,r],()=>m(vs(e),([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),qf=e=>m(m(I("^",e),([t,r])=>m(qs(r),([n,i])=>m(I("$",i),([s,p])=>[[t,n,s],p]))),([t,r])=>[jd(t),r]),Bf=(e,t=[])=>m(m(Y(e),([r,n])=>m(I(",",n),([i,s])=>[[r,i],s])),([r,n])=>Bf(n,[...t,r]),()=>[t,e]),nC=e=>m(m(Bf(e),([t,r])=>m(m(m(Y(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[Fd(t),r]),Hf=e=>m(m(m(I("extends",e),([t,r])=>m(nC(r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[qd(t),r]),oC=e=>m(m(I("interface",e),([t,r])=>m(de(r),([n,i])=>m(Gs(i),([s,p])=>m(Hf(p),([c,l])=>m(js(l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[Bd(t),r]),iC=e=>m(m(I("interface",e),([t,r])=>m(de(r),([n,i])=>m(Hf(i),([s,p])=>m(js(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[Hd(t),r]),aC=e=>m(m(I("type",e),([t,r])=>m(de(r),([n,i])=>m(Gs(i),([s,p])=>m(I("=",p),([c,l])=>m(Y(l),([g,y])=>[[t,n,s,c,g],y]))))),([t,r])=>[Kd(t),r]),sC=e=>m(m(I("type",e),([t,r])=>m(de(r),([n,i])=>m(I("=",i),([s,p])=>m(Y(p),([c,l])=>[[t,n,s,c],l])))),([t,r])=>[zd(t),r]),mC=e=>m(m(m(I("export",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Vd(t),r]),pC=e=>m(m(m(I(";",e),([t,r])=>m(I(`
32
- `,r),([n,i])=>[[t,n],i])),([t,r])=>[t,r],()=>m(m(I(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m(I(`
33
- `,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]),Kf=(e,t=[])=>m(m(Bs(e),([r,n])=>m(pC(n),([i,s])=>[[r,i],s])),([r,n])=>Kf(n,[...t,r]),()=>[t,e]),cC=e=>m(m(Kf(e),([t,r])=>m(m(m(Bs(r),([n,i])=>[[n],i]),([n,i])=>[n,i],()=>m([[],r],([n,i])=>[n,i],()=>[])),([n,i])=>[[t,n],i])),([t,r])=>[Yd(t),r]),Bs=e=>m(m(mC(e),([t,r])=>m(m(oC(r),([n,i])=>[n,i],()=>m(iC(r),([n,i])=>[n,i],()=>m(aC(r),([n,i])=>[n,i],()=>m(sC(r),([n,i])=>[n,i],()=>[])))),([n,i])=>m(If(i),([s,p])=>[[t,n,s],p]))),([t,r])=>[Wd(t),r]),uC=e=>m(m(Bs(e),([t,r])=>m(cC(r),([n,i])=>[[t,n],i])),([t,r])=>[Qd(t),r]),zf=e=>m(m(uC(e),([t,r])=>[t,r],()=>m(fR(e),([t,r])=>[t,r],()=>m(Y(e),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]);function Vf(e){let t=Ds(`\`${e}\``);return a.IsEqual(t.length,2)?t[0]:D()}function Io(e,t={}){return S("TemplateLiteral",[e],t)}function Yf(e){return O({},Io(e,{}))}function dC(e){let t=Vf(e);return Yf(t)}function Wf(e,t={}){let r=a.IsString(e)?dC(e):Yf(e);return d.Update(r,{},t)}function Ee(e){return T(e,"TemplateLiteral")}var U={};ft(U,{ExtendsFalse:()=>G,ExtendsTrue:()=>b,ExtendsUnion:()=>Hs,IsExtendsFalse:()=>fC,IsExtendsTrue:()=>Zf,IsExtendsTrueLike:()=>fe,IsExtendsUnion:()=>Qf});function Hs(e){return d.Create({"~kind":"ExtendsUnion"},{inferred:e})}function Qf(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"inferred")&&a.IsEqual(e["~kind"],"ExtendsUnion")&&a.IsObject(e.inferred)}function b(e){return d.Create({"~kind":"ExtendsTrue"},{inferred:e})}function Zf(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"inferred")&&a.IsEqual(e["~kind"],"ExtendsTrue")&&a.IsObject(e.inferred)}function G(){return d.Create({"~kind":"ExtendsFalse"},{})}function fC(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.IsEqual(e["~kind"],"ExtendsFalse")}function fe(e){return Qf(e)||Zf(e)}function Ia(e){let t=qf(e);return a.IsEqual(t.length,2)?t[0]:D()}function gC(e){return!0}function Jf(e){let[t,...r]=e;return _(t)?yC(t)?Jf(r):!1:!0}function Xf(e){return a.IsEqual(e.length,0)?!1:Jf(e)}function yC(e){return x(e)?Xf(e.anyOf):V(e)?gC(e.const):!1}function Ea(e){return Xf(e)}function eg(e,t,r=[]){let[n,...i]=e;return a.IsString(n)?eg(i,t,[...r,`${n}${t}`]):r}function IC(e,t){return a.IsEqual(e.length,0)?[`${t}`]:eg(e,t)}function tg(e,t,r=[]){let[n,...i]=t;return _(n)?tg(e,i,[...r,...rg(e,n)]):r}function rg(e,t){return x(t)?tg(e,t.anyOf):V(t)?IC(e,t.const):D()}function ng(e,t){let[r,...n]=t;return _(r)?ng(rg(e,r),n):e}function EC(e){return e.map(t=>q(t))}function hC(e){let t=ng([],e),r=EC(t);return v(r)}function TC(e){return a.IsEqual(e.length,0)?D():a.IsEqual(e.length,1)&&V(e[0])?e[0]:hC(e)}function De(e){let t=Ia(e);return Ea(t)?TC(t):et()}function xC(e){return a.IsString(e)||a.IsNumber(e)?q(e):a.IsNull(e)?cr():z()}function xt(e){return e.map(r=>xC(r))}function $o(e){let t=xt(e);return v(t)}function qr(e){return $o(e.enum)}function _C(e,t,r,n){let i=Z(e,r,n);return fe(i)?b(d.Assign(d.Assign(e,i.inferred),{[t]:r})):G()}function AC(e,t){return b(e)}function bC(e,t,r){let n=$o(r);return Z(e,t,n)}function og(e,t,r){let[n,...i]=r;return _(n)?(()=>{let s=Z(e,t,n);return fe(s)?og(s.inferred,t,i):G()})():b(e)}function OC(e,t,r){let n=De(r);return Z(e,t,n)}function ig(e,t,r){let[n,...i]=r;return _(n)?(()=>{let s=Z(e,t,n);return fe(s)?b(s.inferred):ig(e,t,i)})():G()}function j(e,t,r){return ze(r)?AC(e,t):Ie(r)?bC(e,t,r.enum):ye(r)?_C(e,r.name,t,r.extends):P(r)?og(e,t,r.allOf):Ee(r)?OC(e,t,r.pattern):x(r)?ig(e,t,r.anyOf):Xe(r)?b(e):G()}function ag(e,t,r){return ye(r)?j(e,t,r):ze(r)?b(e):Xe(r)?b(e):Hs(e)}function SC(e,t){let r=wr(e),n=wr(t);return r&&n||!r&&n?!0:!(r&&!n)}function sg(e,t,r,n){return Q(n)?SC(t,n)?Z(e,r,n.items):G():j(e,t,n)}function mg(e,t,r){return Be(r)?Z(e,t,r.iteratorItems):j(e,St(t),r)}function pg(e,t,r){return it(r)?b(e):j(e,t,r)}function cg(e,t,r){return Ye(r)?b(e):j(e,t,r)}function RC(e,t,r,n,i){let s=ye(n)?t:n,p=ye(n)?n:t,c=be(t),l=be(n),g=Z(e,s,p);return!c&&l?G():fe(g)?vo(g.inferred,r,i):G()}function CC(e,t,r,n){let[i,...s]=n;return _(i)?RC(e,t,r,i,s):be(t)?b(e):G()}function PC(e,t,r){let[n,...i]=t;return _(n)?CC(e,n,i,r):b(e)}function vo(e,t,r){return PC(e,t,r)}function ha(e,t,r){return st(r)?b(e):Z(e,t,r)}function ug(e,t,r,n){return Oe(n)?(()=>{let i=vo(e,t,n.parameters);return fe(i)?ha(i.inferred,r,n.instanceType):G()})():G()}function lg(e,t,r){return Z(e,qr(t),r)}function dg(e,t,r,n){return Se(n)?(()=>{let i=vo(e,t,n.parameters);return fe(i)?ha(i.inferred,r,n.returnType):G()})():G()}function fg(e,t,r){return ke(r)?b(e):ue(r)?b(e):j(e,t,r)}var Go="equal",kC="disjoint",Do="left-inside",jo="right-inside";function Fo(e,t){let r=[Xe(e)?U.ExtendsFalse():Fe({},e,t),Xe(e)?U.ExtendsTrue({}):Fe({},t,e)];return U.IsExtendsTrueLike(r[0])&&U.IsExtendsTrueLike(r[1])?Go:U.IsExtendsTrueLike(r[0])&&U.IsExtendsFalse(r[1])?Do:U.IsExtendsFalse(r[0])&&U.IsExtendsTrueLike(r[1])?jo:kC}function UC(e){return x(e)?Mt(e.anyOf):[e]}function Mt(e){return e.reduce((t,r)=>[...t,...UC(r)],[])}function Ks(e){return e.reduceRight((r,n,i)=>({[i]:n,...r}),{})}function gg(e){let t=Ks(e.items);return k(t)}function LC(e,t){return $r(e)?!!$r(t):!1}function NC(e,t){return be(e)?!!be(t):!1}function MC(e,t){let r=LC(e,t),n=NC(e,t),i=he([e,t]),s=Vi(dn(i));return r&&n?Je(Ze(s)):r&&!n?Je(s):!r&&n?Ze(s):s}function wC(e,t,r){return r in e?r in t?MC(e[r],t[r]):e[r]:r in t?t[r]:z()}function $C(e,t){return[...new Set([...a.Keys(t),...a.Keys(e)])].reduce((n,i)=>({...n,[i]:wC(e,t,i)}),{})}function yg(e){return N(e)?e.properties:B(e)?Ks(e.items):D()}function Ig(e,t){let r=yg(e),n=yg(t),i=$C(r,n);return k(i)}function Eg(e,t){let r=Fo(e,t);return a.IsEqual(r,Do)?e:a.IsEqual(r,jo)||a.IsEqual(r,Go)?t:z()}function hg(e){return N(e)||B(e)}function Tg(e){return P(e)?he(e.allOf):e}function vC(e,t){let r=Tg(e),n=Tg(t),i=hg(r),s=hg(n);return i&&s?Ig(fr(r),n):i&&!s?fr(r):!i&&s?n:Eg(fr(r),n)}function xg(e,t,r=[]){let[n,...i]=t;return a.IsUndefined(n)?r.length===0?[e]:r:xg(e,i,[...r,vC(e,n)])}function _g(e,t,r=[]){let[n,...i]=e;return _(n)?_g(i,t,[...r,...qo([n],t)]):r}function qo(e,t=[]){let[r,...n]=e;return _(r)?x(r)?qo(n,_g(r.anyOf,t)):qo(n,xg(r,t)):t}function he(e){let t=qo(e);return zs(t)}function Ht(e){return zs(e)}function fr(e){return P(e)?he(e.allOf):x(e)?Ht(e.anyOf):e}function Br(e){return a.IsEqual(e.length,1)?e[0]:a.IsEqual(e.length,0)?z():v(e)}function GC(e,t){return t.filter(r=>Fo(e,r)!==jo)}function DC(e,t){let r=t.some(n=>{let i=Fo(e,n);return a.IsEqual(i,Do)||a.IsEqual(i,Go)});return a.IsEqual(r,!1)}function jC(e,t){let r=fr(e);return ze(r)?[r]:DC(r,t)?[...GC(r,t),r]:t}function Vs(e,t=[]){let[r,...n]=e;return _(r)?N(r)?Vs(n,[...t,r]):Vs(n,jC(r,t)):t}function zs(e){let t=Vs(e),r=Mt(t);return r.length===0?z():r.length===1?r[0]:v(r)}function FC(e,t,r,n){let i=h(e,t,r);return d.Update(fr(i),{},n)}function Ag(e,t,r,n){return FC(e,t,r,n)}function bg(e,t,r){let n=he(t);return Z(e,n,r)}function Og(e,t,r){return He(r)?Z(e,t,r.iteratorItems):j(e,Ct(t),r)}function Ta(e,t,r){return t===r?b(e):G()}function qC(e,t,r){return V(r)?Ta(e,t,r.const):it(r)?b(e):j(e,q(t),r)}function BC(e,t,r){return V(r)?Ta(e,t,r.const):Ye(r)?b(e):j(e,q(t),r)}function HC(e,t,r){return V(r)?Ta(e,t,r.const):ue(r)?b(e):j(e,q(t),r)}function KC(e,t,r){return V(r)?Ta(e,t,r.const):xe(r)?b(e):j(e,q(t),r)}function Sg(e,t,r){return a.IsBigInt(t.const)?qC(e,t.const,r):a.IsBoolean(t.const)?BC(e,t.const,r):a.IsNumber(t.const)?HC(e,t.const,r):a.IsString(t.const)?KC(e,t.const,r):D()}function Rg(e,t,r){return ye(r)?j(e,t,r):b(e)}function Cg(e,t,r){return Pt(r)?b(e):j(e,t,r)}function Pg(e,t,r){return ue(r)?b(e):j(e,t,r)}function zC(e,t,r){return be(t)?be(r)?b(e):G():b(e)}function VC(e,t,r){return ye(r)&&qt(r.extends)?G():(()=>{let n=Z(e,t,r);return fe(n)?zC(n.inferred,t,r):G()})()}function YC(e,t){return e.reduce((r,n)=>n in t?fe(t[n])?{...r,...t[n].inferred}:D():D(),{})}function WC(e,t,r){let n={};for(let p of a.Keys(r))n[p]=p in t?VC({},t[p],r[p]):be(r[p])?ye(r[p])?b(d.Assign(e,{[r[p].name]:r[p].extends})):b(e):G();let i=a.Values(n).every(p=>fe(p)),s=i?YC(a.Keys(n),n):{};return i?b(s):G()}function QC(e,t,r){let n=WC(e,t,r);return fe(n)?b(d.Assign(e,n.inferred)):G()}function ZC(e,t,r){return QC(e,t,r)}function kg(e,t,r){return N(r)?ZC(e,t,r.properties):j(e,k(t),r)}function Ug(e,t,r){return ve(r)?Z(e,t,r.item):j(e,Ut(t),r)}function Lg(e,t,r){return xe(r)?b(e):j(e,t,r)}function Ng(e,t,r){return kt(r)?b(e):j(e,t,r)}function Mg(e,t,r){let n=De(t);return Z(e,n,r)}function Ys(e,t){return d.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function Bo(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"name")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"Inferrable")&&a.IsString(e.name)&&a.IsObject(e.type)}function Ws(e){return ur(e)?ye(e.items)?Q(e.items.extends)?Ys(e.items.name,e.items.extends.items):Xe(e.items.extends)?Ys(e.items.name,e.items.extends):void 0:D():void 0}function xa(e){return ye(e)?Ys(e.name,e.extends):void 0}function Qs(e,t,r=[]){let[n,...i]=e;return _(n)?(()=>{let s=Z({},n,t);return fe(s)?Qs(i,t,[...r,n]):void 0})():r}function wg(e,t,r,n){let i=Qs(r,n);return a.IsArray(i)?b(d.Assign(e,{[t]:Ue(i)})):G()}function _a(e,t,r,n){let i=Qs(r,n);return a.IsArray(i)?b(d.Assign(e,{[t]:v(i)})):G()}function JC(e){return[...e].reverse()}function Zs(e,t){return t?JC(e):e}function XC(e){let t=e.length>0?e[0]:void 0,r=_(t)?Ws(t):void 0;return _(r)}function eP(e,t,r,n,i,s){let p=Z(e,r,i);return fe(p)?$g(p.inferred,t,n,s):G()}function tP(e,t,r,n,i){let s=Ws(n);return Bo(s)?wg(e,s.name,Zs(r,t),s.type):(()=>{let[p,...c]=r;return _(p)?eP(e,t,p,c,n,i):G()})()}function rP(e,t,r,n){let[i,...s]=n;return _(i)?tP(e,t,r,i,s):a.IsEqual(r.length,0)?b(e):G()}function $g(e,t,r,n){return rP(e,t,r,n)}function nP(e,t,r){let n=Aa(e,{callstack:[]},r),i=XC(n);return $g(e,i,Zs(t,i),Zs(n,i))}function vg(e,t,r){let n=xa(r);return Bo(n)?_a(e,n.name,t,n.type):(()=>{let[i,...s]=t;return _(i)?(()=>{let p=Z(e,i,r);return fe(p)?vg(p.inferred,s,r):G()})():b(e)})()}function Gg(e,t,r){let n=Aa(e,{callstack:[]},t);return B(r)?nP(e,n,r.items):Q(r)?vg(e,n,r.items):j(e,Ue(n),r)}function Dg(e,t,r){return st(r)?b(e):Nt(r)?b(e):j(e,t,r)}function jg(e,t,r){let[n,...i]=r;return _(n)?(()=>{let s=Z(e,t,n);return fe(s)?b(s.inferred):jg(e,t,i)})():G()}function Js(e,t,r){let[n,...i]=t;return _(n)?(()=>{let s=jg(e,n,r);return fe(s)?Js(s.inferred,i,r):G()})():b(e)}function Fg(e,t,r){let n=xa(r);return Bo(n)?_a(e,n.name,t,n.type):x(r)?Js(e,t,r.anyOf):Js(e,t,[r])}function qg(e,t,r){return ye(r)?j(e,t,r):ze(r)?b(e):Xe(r)?b(e):G()}function Bg(e,t,r){return st(r)?b(e):j(e,t,r)}function Z(e,t,r){return ze(t)?ag(e,t,r):Q(t)?sg(e,t,t.items,r):Be(t)?mg(e,t.iteratorItems,r):it(t)?pg(e,t,r):Ye(t)?cg(e,t,r):Oe(t)?ug(e,t.parameters,t.instanceType,r):Ie(t)?lg(e,t,r):Se(t)?dg(e,t.parameters,t.returnType,r):ke(t)?fg(e,t,r):P(t)?bg(e,t.allOf,r):He(t)?Og(e,t.iteratorItems,r):V(t)?Sg(e,t,r):qt(t)?Rg(e,t,r):Pt(t)?Cg(e,t,r):ue(t)?Pg(e,t,r):N(t)?kg(e,t.properties,r):ve(t)?Ug(e,t.item,r):xe(t)?Lg(e,t,r):kt(t)?Ng(e,t,r):Ee(t)?Mg(e,t.pattern,r):B(t)?Gg(e,t.items,r):Nt(t)?Dg(e,t,r):x(t)?Fg(e,t.anyOf,r):Xe(t)?qg(e,t,r):st(t)?Bg(e,t,r):G()}function On(e,t,r={}){return S("Interface",[e,t],r)}function Ln(e){return _(e)&&a.HasPropertyKey(e,"action")&&a.IsEqual(e.action,"Interface")}function Hg(e,t,r={}){return O({},On(e,t,r))}function oP(e,t,r){return e.includes(r)?!0:gr([...e,r],t,t[r])}function Kg(e,t,r){let n=na(r);return Hr(e,t,n)}function Hr(e,t,r){let[n,...i]=r;return _(n)?gr(e,t,n)?!0:Hr(e,t,i):!1}function gr(e,t,r){return re(r)?oP(e,t,r.$ref):Q(r)?gr(e,t,r.items):Be(r)?gr(e,t,r.iteratorItems):Oe(r)?Hr(e,t,[...r.parameters,r.instanceType]):Se(r)?Hr(e,t,[...r.parameters,r.returnType]):Ln(r)?Kg(e,t,r.parameters[1]):P(r)?Hr(e,t,r.allOf):He(r)?gr(e,t,r.iteratorItems):N(r)?Kg(e,t,r.properties):ve(r)?gr(e,t,r.item):x(r)?Hr(e,t,r.anyOf):B(r)?Hr(e,t,r.items):le(r)?gr(e,t,Ge(r)):!1}function ba(e,t,r){return gr(e,t,r)}function iP(e,t){return t.reduce((r,n)=>n in e?ba([n],e,e[n])?[...r,n]:r:D(),[])}function zg(e){let t=Bu(e);return iP(e,t)}function aP(e,t,r){return r.includes(t)?r:t in e?yr(e,e[t],[...r,t]):D()}function Vg(e,t,r){let n=na(t);return Nn(e,n,r)}function Nn(e,t,r){return t.reduce((n,i)=>yr(e,i,n),r)}function yr(e,t,r){return re(t)?aP(e,t.$ref,r):Q(t)?yr(e,t.items,r):Be(t)?yr(e,t.iteratorItems,r):Oe(t)?Nn(e,[...t.parameters,t.instanceType],r):Se(t)?Nn(e,[...t.parameters,t.returnType],r):Ln(t)?Vg(e,t.parameters[1],r):P(t)?Nn(e,t.allOf,r):He(t)?yr(e,t.iteratorItems,r):N(t)?Vg(e,t.properties,r):ve(t)?yr(e,t.item,r):x(t)?Nn(e,t.anyOf,r):B(t)?Nn(e,t.items,r):le(t)?yr(e,Ge(t),r):r}function Yg(e,t,r){return yr(e,r,[t])}function sP(e){return gn()}function mP(e){return a.Keys(e).reduce((t,r)=>({...t,[r]:wt(e[r])}),{})}function Ho(e){return e.reduce((t,r)=>[...t,wt(r)],[])}function wt(e){return re(e)?sP(e.$ref):Q(e)?Tt(wt(e.items),Wi(e)):Be(e)?St(wt(e.iteratorItems)):Oe(e)?ir(Ho(e.parameters),wt(e.instanceType)):Se(e)?ar(Ho(e.parameters),wt(e.returnType)):P(e)?ut(Ho(e.allOf)):He(e)?Ct(wt(e.iteratorItems)):N(e)?k(mP(e.properties)):ve(e)?Ut(wt(e.item)):le(e)?ia(_n(e),wt(Ge(e))):x(e)?v(Ho(e.anyOf)):B(e)?Ue(Ho(e.items)):e}function pP(e,t){return t in e?wt(e[t]):we()}function Wg(e){return pP(e.$defs,e.$ref)}function cP(e,t,r){let n=mt(e,{callstack:[]},t),i=Ko({},{callstack:[]},r);return he([...n,k(i)])}function uP(e,t){return a.Keys(e).filter(n=>t.includes(n)).reduce((n,i)=>{let s=e[i],p=Ln(s)?cP(e,s.parameters[0],s.parameters[1]):s;return{...n,[i]:p}},{})}function Qg(e,t,r){let n=Yg(e,t,r),i=uP(e,n);return Rt(i,t)}function Zg(e,t){return t in e?re(e[t])?Zg(e,e[t].$ref):e[t]:z()}function $t(e,t){return Zg(e,t)}function Jg(e){return ne(e)?Wg(e):e}function Fe(e,t,r){let n=Jg(t),i=Jg(r);return Z(e,n,i)}function lP(e,t,r){if(ye(t)||Mn(t)||U.IsExtendsTrueLike(Fe({},t,r)))return;let n={parameter:e,extends:r,received:t};throw new Error("Generic argument does not satify constraint",{cause:n})}function Xg(e,t,r,n,i){let s=h(e,t,i);return lP(r,s,n),d.Assign(e,{[r]:s})}function dP(e,t,r,n,i){let s=h(e,t,r.extends),p=h(e,t,r.equals),[c,...l]=i;return _(c)?Xs(Xg(e,t,r.name,s,c),t,n,l):Xs(Xg(e,t,r.name,s,p),t,n,[])}function Xs(e,t,r,n){let[i,...s]=r;return _(i)?dP(e,t,i,s,n):e}function ey(e,t,r,n){return Xs(e,t,r,n)}function fP(e){return a.IsGreaterThan(e.length,0)?e[0]:""}function ty(e,t,r,n){let i=mt(e,t,n);return ma(r,i)}function gP(e,t,r,n){return ty(e,t,Te(r),n)}function yP(e,t,r,n,i,s){let p=mt(e,t,s),c=ey(e,t,n,p),l=h(c,{callstack:[...t.callstack,r]},i);return h(e,t,l)}function Oa(e,t,r,n){let[i,s]=hu(e,r,n);return fn(s)?a.IsEqual(fP(t.callstack),i)?gP(e,t,i,n):yP(e,t,i,s.parameters,s.expression,n):ty(e,t,r,n)}function ma(e,t){return d.Create({"~kind":"Call"},{target:e,arguments:t},{})}function ry(e,t){return Oa({},{callstack:[]},e,t)}function Mn(e){return T(e,"Call")}function ny(e){return ve(e)?ny(e.item):e}function IP(e,t,r,n){let i=h(e,t,r);return d.Update(ny(i),{},n)}function oy(e,t,r,n){return L(e,[r])?IP(e,t,r,n):wo(r,n)}function iy(e,t){return e(t)}function ay(e,t){return a.IsString(t)?q(iy(e,t)):q(t)}function sy(e,t){let r=De(t);return Kt(e,r)}function my(e,t){let r=t.map(n=>Kt(e,n));return v(r)}function Kt(e,t){return V(t)?ay(e,t.const):Ee(t)?sy(e,t.pattern):x(t)?my(e,t.anyOf):t}function Eo(e,t={}){return S("Capitalize",[e],t)}function py(e,t={}){return O({},Eo(e,t))}function ho(e,t={}){return S("Lowercase",[e],t)}function cy(e,t={}){return O({},ho(e,t))}function To(e,t={}){return S("Uncapitalize",[e],t)}function uy(e,t={}){return O({},To(e,t))}function xo(e,t={}){return S("Uppercase",[e],t)}function ly(e,t={}){return O({},xo(e,t))}var EP=e=>e[0].toUpperCase()+e.slice(1),hP=e=>e.toLowerCase(),TP=e=>e[0].toLowerCase()+e.slice(1),xP=e=>e.toUpperCase();function _P(e,t,r,n){let i=h(e,t,r);return d.Update(Kt(EP,i),{},n)}function dy(e,t,r,n){return L(e,[r])?_P(e,t,r,n):Eo(r,n)}function AP(e,t,r,n){let i=h(e,t,r);return d.Update(Kt(hP,i),{},n)}function fy(e,t,r,n){return L(e,[r])?AP(e,t,r,n):ho(r,n)}function bP(e,t,r,n){let i=h(e,t,r);return d.Update(Kt(TP,i),{},n)}function gy(e,t,r,n){return L(e,[r])?bP(e,t,r,n):To(r,n)}function OP(e,t,r,n){let i=h(e,t,r);return d.Update(Kt(xP,i),{},n)}function yy(e,t,r,n){return L(e,[r])?OP(e,t,r,n):xo(r,n)}function _o(e,t,r,n,i={}){return S("Conditional",[e,t,r,n],i)}function Iy(e,t,r,n,i={}){return O({},_o(e,t,r,n,i))}function SP(e,t,r,n,i,s,p){let c=h(e,t,r),l=h(e,t,n),g=Fe(e,c,l);return d.Update(U.IsExtendsUnion(g)?v([h(g.inferred,t,i),h(e,t,s)]):U.IsExtendsTrue(g)?h(g.inferred,t,i):h(e,t,s),{},p)}function Ey(e,t,r,n,i,s,p){return L(e,[r,n])?SP(e,t,r,n,i,s,p):_o(r,n,i,s,p)}function Ao(e,t={}){return S("ConstructorParameters",[e],t)}function hy(e,t={}){return O({},Ao(e,t))}function RP(e){return Oe(e)?h({},{callstack:[]},Ue(e.parameters)):z()}function CP(e,t,r,n){let i=h(e,t,r);return d.Update(RP(i),{},n)}function Ty(e,t,r,n){return L(e,[r])?CP(e,t,r,n):Ao(r,n)}function bo(e,t,r={}){return S("Exclude",[e,t],r)}function xy(e,t,r={}){return O({},bo(e,t,r))}function _y(e,t){return e.reduce((r,n)=>[...r,...Ay(n,t)],[])}function Ay(e,t){let r=Fe({},e,t);return U.IsExtendsTrueLike(r)?[]:[e]}function PP(e,t){let r=Ie(e)?_y(xt(e.enum),t):x(e)?_y(Mt(e.anyOf),t):Ay(e,t);return Ht(r)}function kP(e,t,r,n,i){let s=h(e,t,r),p=h(e,t,n);return d.Update(PP(s,p),{},i)}function Sa(e,t,r,n,i){return L(e,[r,n])?kP(e,t,r,n,i):bo(r,n,i)}function Oo(e,t,r={}){return S("Extract",[e,t],r)}function by(e,t,r={}){return O({},Oo(e,t,r))}function Oy(e,t){return e.reduce((r,n)=>[...r,...Sy(n,t)],[])}function Sy(e,t){let r=Fe({},e,t);return U.IsExtendsTrueLike(r)?[e]:[]}function UP(e,t){let r=Ie(e)?Oy(xt(e.enum),t):x(e)?Oy(Mt(e.anyOf),t):Sy(e,t);return Ht(r)}function LP(e,t,r,n,i){let s=h(e,t,r),p=h(e,t,n);return d.Update(UP(s,p),{},i)}function Ry(e,t,r,n,i){return L(e,[r,n])?LP(e,t,r,n,i):Oo(r,n,i)}var NP=new RegExp("^(?:0|[1-9][0-9]*)$");function wn(e){let t=`${e}`;return NP.test(t)?parseInt(t):e}function MP(e){return q(wn(e))}function Cy(e){return e.map(t=>Py(t))}function Py(e){return P(e)?ut(Cy(e.allOf)):x(e)?v(Cy(e.anyOf)):V(e)?MP(e.const):e}function ky(e,t){let r=Py(t),n=Fe({},r,lt());return U.IsExtendsTrueLike(n)?e:z()}function Uy(e,t){let r=$t(e,t);return vt(r)}function Ra(e){return e.reduce((t,r)=>[...t,...vt(r)],[])}function Ly(e){let t=xt(e);return Ra(t)}function Ny(e){let t=he(e);return vt(t)}function My(e){return[`${e}`]}function wy(e){let t=De(e);return vt(t)}function vt(e){return ne(e)?Uy(e.$defs,e.$ref):Ie(e)?Ly(e.enum):P(e)?Ny(e.allOf):V(e)?My(e.const):Ee(e)?wy(e.pattern):x(e)?Ra(e.anyOf):[]}function $n(e){return vt(e)}function wP(e,t){return t in e?[e[t]]:[]}function $P(e,t){return t.reduce((r,n)=>[...r,...wP(e,n)],[])}function $y(e,t){let r=$n(t),n=$P(e,r);return Ht(n)}function vP(e){return q(wn(e))}function vy(e){return e.map(t=>em(t))}function em(e){return P(e)?ut(vy(e.allOf)):x(e)?v(vy(e.anyOf)):V(e)?vP(e.const):e}function GP(e,t){return e.reduceRight((r,n,i)=>{let s=Fe({},q(i),t);return U.IsExtendsTrueLike(s)?[n,...r]:r},[])}function DP(e,t){let r=em(t),n=GP(e,r);return Br(n)}function jP(e){return Br(e)}function Gy(e,t){return ue(t)||ke(t)?jP(e):DP(e,t)}function FP(e){return e.reduce((t,r)=>ta(r)?[...t,q(r)]:t,[])}function vn(e){let t=FP(e);return v(t)}function Sn(e,t,r={}){return S("Index",[e,t],r)}function Dy(e,t,r={}){let n=a.IsArray(t)?vn(t):t;return O({},Sn(e,n,r))}function jy(e,t){let r=$t(e,t);return _t(r)}function qP(e,t){let r=a.Keys(e).filter(y=>!a.HasPropertyKey(t,y)),n=a.Keys(t).filter(y=>!a.HasPropertyKey(e,y)),i=a.Keys(e).filter(y=>a.HasPropertyKey(t,y)),s=r.reduce((y,E)=>({...y,[E]:e[E]}),{}),p=n.reduce((y,E)=>({...y,[E]:t[E]}),{}),c=i.reduce((y,E)=>({...y,[E]:he([e[E],t[E]])}),{}),l=d.Assign(s,p);return d.Assign(l,c)}function Fy(e){return e.reduce((t,r)=>qP(t,_t(r)),{})}function qy(e){let t=gg(Ue(e));return _t(t)}function BP(e,t){return a.Keys(e).filter(i=>i in t).reduce((i,s)=>({...i,[s]:Ht([e[s],t[s]])}),{})}function By(e,t){let[r,...n]=e;return _(r)?By(n,BP(t,_t(r))):t}function Hy(e){let[t,...r]=e;return _(t)?By(r,_t(t)):D()}function _t(e){return ne(e)?jy(e.$defs,e.$ref):P(e)?Fy(e.allOf):x(e)?Hy(e.anyOf):B(e)?qy(e.items):N(e)?e.properties:{}}function Gn(e){let t=_t(e);return k(t)}function HP(e){return ne(e)||P(e)||x(e)?Gn(e):e}function KP(e,t){let r=HP(e);return Q(r)?ky(r.items,t):N(r)?$y(r.properties,t):B(r)?Gy(r.items,t):z()}function zP(e,t,r,n,i){let s=h(e,t,r),p=h(e,t,n);return d.Update(KP(s,p),{},i)}function Ky(e,t,r,n,i){return L(e,[r,n])?zP(e,t,r,n,i):Sn(r,n,i)}function So(e,t={}){return S("InstanceType",[e],t)}function zy(e,t={}){return O({},So(e,t))}function VP(e){return Oe(e)?e.instanceType:z()}function YP(e,t,r,n){let i=h(e,t,r);return d.Update(VP(i),{},n)}function Vy(e,t,r,n={}){return L(e,[r])?YP(e,t,r,n):So(r,n)}function WP(e,t,r,n,i){let s=mt(e,{callstack:[]},r),p=Ko(e,{callstack:[]},n),c=he([...s,k(p)]);return d.Update(c,{},i)}function Yy(e,t,r,n,i){return L(e,r)?WP(e,t,r,n,i):On(r,n,i)}function Rn(e,t={}){return S("KeyOf",[e],t)}function Wy(e,t={}){return O({},Rn(e,t))}function Qy(){return v([lt(),et(),hn()])}function Zy(e){return lt()}function QP(e){return e.reduce((r,n)=>ta(n)?[...r,q(wn(n))]:D(),[])}function Jy(e){let t=a.Keys(e),r=QP(t);return Br(r)}function Xy(e){return _n(e)}function eI(e){let t=e.map((r,n)=>q(n));return Br(t)}function ZP(e){return ne(e)||P(e)||x(e)?Gn(e):e}function JP(e){let t=ZP(e);return ze(t)?Qy():Q(t)?Zy(t.items):N(t)?Jy(t.properties):le(t)?Xy(t):B(t)?eI(t.items):z()}function XP(e,t,r,n){let i=h(e,t,r);return d.Update(JP(i),{},n)}function tI(e,t,r,n){return L(e,[r])?XP(e,t,r,n):Rn(r,n)}function ek(e){let t=De(e);return tm(t)}function rI(e){return e.reduce((t,r)=>[...t,...tm(r)],[])}function tm(e){return Ie(e)?rI(xt(e.enum)):En(e)||In(e)?[e]:Ee(e)?ek(e.pattern):x(e)?rI(e.anyOf):[]}function nI(e){return tm(e)}function bn(e,t,r,n,i={}){return S("Mapped",[e,t,r,n],i)}function oI(e,t,r,n,i={}){return O({},bn(e,t,r,n,i))}function tk(e,t,r,n,i){let s=d.Assign(e,{[r.name]:n}),p=h(s,t,i);return Ee(p)?De(p.pattern):p}function rk(e,t,r,n,i){let s=d.Assign(e,{[r.name]:n});return h(s,t,i)}function nk(e,t,r,n,i,s){let p=rk(e,t,r,n,s),c=tk(e,t,r,n,i);return En(c)||In(c)?{[c.const]:p}:{}}function ok(e,t,r,n,i,s){return n.reduce((p,c)=>({...p,...nk(e,t,r,c,i,s)}),{})}function ik(e,t,r,n,i,s){let p=nI(n),c=ok(e,t,r,p,i,s);return k(c)}function ak(e,t,r,n,i,s,p){let c=h(e,t,n);return d.Update(ik(e,t,r,c,i,s),{},p)}function iI(e,t,r,n,i,s,p){return L(e,[n])?ak(e,t,r,n,i,s,p):bn(r,n,i,s,p)}function sk(e,t){return a.Keys(e).filter(n=>t.includes(n)).reduce((n,i)=>({...n,[i]:Qg(e,i,e[i])}),{})}function mk(e,t){return a.Keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>({...n,[i]:h(e,{callstack:[]},e[i])}),{})}function pk(e,t){let r=zg(e),n=sk(e,r),i=mk(e,r),s={...n,...i};return d.Update(s,{},t)}function aI(e,t,r,n){let i=d.Assign(e,r);return pk(i,n)}function Ro(e,t={}){return S("NonNullable",[e],t)}function sI(e,t={}){return O({},Ro(e,t))}function ck(e){let t=v([cr(),An()]);return Sa({},{callstack:[]},e,t,{})}function uk(e,t,r,n){let i=h(e,t,r);return d.Update(ck(i),{},n)}function mI(e,t,r,n){return L(e,[r])?uk(e,t,r,n):Ro(r,n)}function Ca(e){let t=Gn(e);return N(t)?t.properties:D()}function Co(e,t,r={}){return S("Omit",[e,t],r)}function pI(e,t,r={}){let n=a.IsArray(t)?vn(t):t;return O({},Co(e,n,r))}function lk(e,t){return a.Keys(e).reduce((n,i)=>t.includes(i)?n:{...n,[i]:e[i]},{})}function dk(e,t){let r=Ca(e),n=$n(t),i=lk(r,n);return k(i)}function fk(e,t,r,n,i){let s=h(e,t,r),p=h(e,t,n);return d.Update(dk(s,p),{},i)}function cI(e,t,r,n,i){return L(e,[r,n])?fk(e,t,r,n,i):Co(r,n,i)}function Cn(e,t){return S("Options",[e,t],{})}function Pa(e,t){return O({},Cn(e,t))}function gk(e,t,r,n){let i=h(e,t,r);return d.Update(i,{},n)}function uI(e,t,r,n){return L(e,[r])?gk(e,t,r,n):Cn(r,n)}function Po(e,t={}){return S("Parameters",[e],t)}function lI(e,t={}){return O({},Po(e,t))}function yk(e){return Se(e)?h({},{callstack:[]},Ue(e.parameters)):z()}function Ik(e,t,r,n){let i=h(e,t,r);return d.Update(yk(i),{},n)}function dI(e,t,r,n){return L(e,[r])?Ik(e,t,r,n):Po(r,n)}function ko(e,t={}){return S("Partial",[e],t)}function fI(e,t={}){return O({},ko(e,t))}function gI(e,t){let r=$t(e,t),n=Ir(r);return Rt(d.Assign(e,{[t]:n}),t)}function yI(e){let t=e.map(r=>Ir(r));return he(t)}function II(e){let t=e.map(r=>Ir(r));return v(t)}function EI(e){let t=a.Keys(e).reduce((n,i)=>({...n,[i]:zi(e[i])}),{});return k(t)}function Ir(e){return ne(e)?gI(e.$defs,e.$ref):P(e)?yI(e.allOf):x(e)?II(e.anyOf):N(e)?EI(e.properties):k({})}function Ek(e,t,r,n){let i=h(e,t,r);return d.Update(Ir(i),{},n)}function hI(e,t,r,n){return L(e,[r])?Ek(e,t,r,n):ko(r,n)}function Uo(e,t,r={}){return S("Pick",[e,t],r)}function TI(e,t,r={}){let n=a.IsArray(t)?vn(t):t;return O({},Uo(e,n,r))}function hk(e,t){return a.Keys(e).reduce((n,i)=>t.includes(i)?d.Assign(n,{[i]:e[i]}):n,{})}function Tk(e,t){let r=Ca(e),n=$n(t),i=hk(r,n);return k(i)}function xk(e,t,r,n,i){let s=h(e,t,r),p=h(e,t,n);return d.Update(Tk(s,p),{},i)}function xI(e,t,r,n,i){return L(e,[r,n])?xk(e,t,r,n,i):Uo(r,n,i)}function Lo(e,t={}){return S("ReadonlyType",[e],t)}function _I(e,t={}){return O({},Lo(e,t))}function AI(e){return or(Tt(e))}function bI(e,t){let r=$t(e,t),n=Er(r);return Rt(d.Assign(e,{[t]:n}),t)}function OI(e){let t=e.map(r=>Er(r));return he(t)}function SI(e){let t=a.Keys(e).reduce((n,i)=>({...n,[i]:Yi(e[i])}),{});return k(t)}function RI(e){return or(Ue(e))}function CI(e){let t=e.map(r=>Er(r));return v(t)}function Er(e){return Q(e)?AI(e.items):ne(e)?bI(e.$defs,e.$ref):P(e)?OI(e.allOf):N(e)?SI(e.properties):B(e)?RI(e.items):x(e)?CI(e.anyOf):e}function _k(e,t,r,n){let i=h(e,t,r);return d.Update(Er(i),{},n)}function PI(e,t,r,n){return L(e,[r])?_k(e,t,r,n):Lo(r,n)}function kI(e){return tt(Lt,e)}function UI(e){return k({true:e,false:e})}function LI(e,t){let r=$o(e);return hr(r,t)}function NI(e,t){return tt(Tn,t)}function MI(e,t){let r=he(e);return hr(r,t)}function wI(e,t){return a.IsString(e)||a.IsNumber(e)?k({[e]:t}):a.IsEqual(e,!1)?k({false:t}):a.IsEqual(e,!0)?k({true:t}):k({})}function $I(e,t){return tt(xn,t)}function vI(e,t){return a.HasPropertyKey(e,"pattern")&&(a.IsString(e.pattern)||e.pattern instanceof RegExp)?tt(e.pattern.toString(),t):tt(Lt,t)}function GI(e,t){let r=Ia(e);return Ea(r)?hr(De(e),t):tt(e,t)}function Ak(e){return e.some(t=>xe(t)||ue(t)||ke(t))}function bk(e,t){return a.IsEqual(Ak(e),!0)?tt(Lt,t):void 0}function Ok(e,t){return e.reduce((r,n)=>V(n)&&(a.IsString(n.const)||a.IsNumber(n.const))?{...r,[n.const]:t}:r,{})}function Sk(e,t){let r=Ok(e,t);return k(r)}function DI(e,t){let r=Mt(e),n=bk(r,t);return _(n)?n:Sk(r,t)}function hr(e,t){return ze(e)?kI(t):Ye(e)?UI(t):Ie(e)?LI(e.enum,t):ke(e)?NI(e,t):P(e)?MI(e.allOf,t):V(e)?wI(e.const,t):ue(e)?$I(e,t):x(e)?DI(e.anyOf,t):xe(e)?vI(e,t):Ee(e)?GI(e.pattern,t):k({})}function Rk(e,t,r,n,i){let s=h(e,t,r),p=h(e,t,n);return d.Update(hr(s,p),{},i)}function jI(e,t,r,n,i){return L(e,[r])?Rk(e,t,r,n,i):yo(r,n,i)}function FI(e,t,r){return r in e?ba([r],e,e[r])?Te(r):h(e,t,e[r]):Te(r)}function qI(e,t){let r=$t(e,t),n=Tr(r);return Rt(d.Assign(e,{[t]:n}),t)}function BI(e){let t=e.map(r=>Tr(r));return he(t)}function HI(e){let t=e.map(r=>Tr(r));return v(t)}function KI(e){let t=a.Keys(e).reduce((n,i)=>({...n,[i]:dn(e[i])}),{});return k(t)}function Tr(e){return ne(e)?qI(e.$defs,e.$ref):P(e)?BI(e.allOf):x(e)?HI(e.anyOf):N(e)?KI(e.properties):k({})}function No(e,t={}){return S("Required",[e],t)}function zI(e,t={}){return O({},No(e,t))}function Ck(e,t,r,n){let i=h(e,t,r);return d.Update(Tr(i),{},n)}function VI(e,t,r,n){return L(e,[r])?Ck(e,t,r,n):No(r,n)}function Mo(e,t={}){return S("ReturnType",[e],t)}function YI(e,t={}){return O({},Mo(e,t))}function Pk(e){return Se(e)?e.returnType:z()}function kk(e,t,r,n){let i=h(e,t,r);return d.Update(Pk(i),{},n)}function WI(e,t,r,n){return L(e,[r])?kk(e,t,r,n):Mo(r,n)}function QI(e){return d.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function Uk(e){return e.join("|")}function Lk(e){return e.slice(1,e.length-1)}function Nk(e,t,r){return xr(t,`${r}${e}`)}function Mk(e,t){return xr(e,`${t}${vu}`)}function wk(e,t){return xr(e,`${t}${ea}`)}function $k(e,t){return xr(e,`${t}${ra}`)}function vk(e,t){return nm(v([q("false"),q("true")]),e,t)}function Gk(e,t){return xr(e,`${t}${oa}`)}function Dk(e,t,r){return xr(t,`${r}${Lk(e)}`)}function jk(e,t,r,n=[]){let i=xt(e);return rm(i,t,r)}function rm(e,t,r,n=[]){let[i,...s]=e;return _(i)?rm(s,t,r,[...n,nm(i,[],"")]):xr(t,`${r}(${Uk(n)})`)}function nm(e,t,r){return Ie(e)?jk(e.enum,t,r):ke(e)?wk(t,r):V(e)?Nk(e.const,t,r):it(e)?Mk(t,r):Ye(e)?vk(t,r):ue(e)?$k(t,r):xe(e)?Gk(t,r):Ee(e)?Dk(e.pattern,t,r):x(e)?rm(e.anyOf,t,r):Iu}function xr(e,t){let[r,...n]=e;return _(r)?nm(r,n,t):t}function Fk(e){return`^${xr(e,"")}$`}function ZI(e){let t=Fk(e);return QI(t)}function qk(e,t,r,n){let i=mt(e,t,r);return d.Update(ZI(i),{},n)}function JI(e,t,r,n){return L(e,r)?qk(e,t,r,n):Io(r,n)}function Bk(e){return ur(e)?B(e.items)?om(e.items.items):ye(e.items)?[e]:re(e.items)?[e]:[z()]:[e]}function om(e){return e.reduce((r,n)=>[...r,...Bk(n)],[])}function Hk(e,t){return t in e}function Kk(e,t){return P(t)?L(e,t.allOf):x(t)?L(e,t.anyOf):re(t)?Hk(e,t.$ref):!0}function L(e,t){let[r,...n]=t;return _(r)?Kk(e,r)?L(e,n):!1:!0}function zo(e,t,r){return uu(e)?zo(e.type,"remove",r):su(e)?zo(e.type,t,"remove"):pu(e)?zo(e.type,"add",r):iu(e)?zo(e.type,t,"add"):[e,t,r]}function zk(e,t){return a.IsEqual(e,"remove")?Vi(t):a.IsEqual(e,"add")?Je(t):t}function Vk(e,t){return a.IsEqual(e,"remove")?dn(t):a.IsEqual(e,"add")?Ze(t):t}function Ko(e,t,r){return a.Keys(r).reduce((n,i)=>({...n,[i]:h(e,t,r[i])}),{})}function Aa(e,t,r){let n=mt(e,t,r);return om(n)}function mt(e,t,r){return r.map(n=>h(e,t,n))}function Yk(e,t,r,n,i){return a.IsEqual(r,"Awaited")?oy(e,t,n[0],i):a.IsEqual(r,"Capitalize")?dy(e,t,n[0],i):a.IsEqual(r,"Conditional")?Ey(e,t,n[0],n[1],n[2],n[3],i):a.IsEqual(r,"ConstructorParameters")?Ty(e,t,n[0],i):a.IsEqual(r,"Evaluate")?Ag(e,t,n[0],i):a.IsEqual(r,"Exclude")?Sa(e,t,n[0],n[1],i):a.IsEqual(r,"Extract")?Ry(e,t,n[0],n[1],i):a.IsEqual(r,"Index")?Ky(e,t,n[0],n[1],i):a.IsEqual(r,"InstanceType")?Vy(e,t,n[0],i):a.IsEqual(r,"Interface")?Yy(e,t,n[0],n[1],i):a.IsEqual(r,"KeyOf")?tI(e,t,n[0],i):a.IsEqual(r,"Lowercase")?fy(e,t,n[0],i):a.IsEqual(r,"Mapped")?iI(e,t,n[0],n[1],n[2],n[3],i):a.IsEqual(r,"Module")?aI(e,t,n[0],i):a.IsEqual(r,"NonNullable")?mI(e,t,n[0],i):a.IsEqual(r,"Pick")?xI(e,t,n[0],n[1],i):a.IsEqual(r,"Options")?uI(e,t,n[0],n[1]):a.IsEqual(r,"Parameters")?dI(e,t,n[0],i):a.IsEqual(r,"Partial")?hI(e,t,n[0],i):a.IsEqual(r,"Omit")?cI(e,t,n[0],n[1],i):a.IsEqual(r,"ReadonlyType")?PI(e,t,n[0],i):a.IsEqual(r,"Record")?jI(e,t,n[0],n[1],i):a.IsEqual(r,"Required")?VI(e,t,n[0],i):a.IsEqual(r,"ReturnType")?WI(e,t,n[0],i):a.IsEqual(r,"TemplateLiteral")?JI(e,t,n[0],i):a.IsEqual(r,"Uncapitalize")?gy(e,t,n[0],i):a.IsEqual(r,"Uppercase")?yy(e,t,n[0],i):S(r,n,i)}function h(e,t,r){let n=wr(r),i=zo(r,$r(r)?"add":"none",be(r)?"add":"none"),s=ct(i[0])?i[0].Clone():i[0],p=re(s)?FI(e,t,s.$ref):Q(s)?Tt(h(e,t,s.items),Wi(s)):Be(s)?St(h(e,t,s.iteratorItems),du(s)):Mn(s)?Oa(e,t,s.target,s.arguments):Oe(s)?ir(mt(e,t,s.parameters),h(e,t,s.instanceType),gu(s)):lu(s)?Yk(e,t,s.action,s.parameters,s.options):Se(s)?ar(mt(e,t,s.parameters),h(e,t,s.returnType),yu(s)):P(s)?ut(mt(e,t,s.allOf),Au(s)):He(s)?Ct(h(e,t,s.iteratorItems),Du(s)):N(s)?k(Ko(e,t,s.properties),Hu(s)):ve(s)?Ut(h(e,t,s.item),zu(s)):le(s)?Vu(at(s),h(e,t,Ge(s))):ur(s)?jr(h(e,t,s.items)):B(s)?Ue(Aa(e,t,s.items),Wu(s)):x(s)?v(mt(e,t,s.anyOf),Qu(s)):s,c=n?or(p):p;return zk(i[1],Vk(i[2],c))}function O(e,t){return h(e,{callstack:[]},t)}function wo(e,t={}){return S("Awaited",[e],t)}function XI(e,t={}){return O({},wo(e,t))}function ks(e,t={}){return S("Evaluate",[e],t)}function At(e,t={}){return O({},ks(e,t))}function Us(e,t={}){return S("Module",[e],t)}function eE(e,t={}){return O({},Us(e,t))}function tE(...e){let[t,r,n]=X.Match(e,{2:(p,c)=>a.IsString(p)?[{},p,c]:[p,c,{}],3:(p,c,l)=>[p,c,l],1:p=>[{},p,{}]}),i=zf(r),s=a.IsArray(i)&&a.IsEqual(i.length,2)?h(t,{callstack:[]},i[0]):z();return d.Update(s,{},n)}var o={};ft(o,{Any:()=>gn,Array:()=>Tt,AsyncIterator:()=>St,Awaited:()=>XI,Base:()=>Qi,BigInt:()=>fo,Boolean:()=>Xi,Call:()=>ry,Capitalize:()=>py,Codec:()=>Zi,Conditional:()=>Iy,Constructor:()=>ir,ConstructorParameters:()=>hy,Cyclic:()=>Rt,Decode:()=>Mu,DecodeBuilder:()=>lo,Encode:()=>wu,EncodeBuilder:()=>uo,Enum:()=>_u,Evaluate:()=>At,Exclude:()=>xy,Extends:()=>Fe,ExtendsResult:()=>U,Extract:()=>by,Function:()=>ar,Generic:()=>sr,Identifier:()=>go,Immutable:()=>or,Index:()=>Dy,Infer:()=>co,InstanceType:()=>zy,Instantiate:()=>O,Integer:()=>Gr,Interface:()=>Hg,Intersect:()=>ut,IsAny:()=>ze,IsArray:()=>Q,IsAsyncIterator:()=>Be,IsBase:()=>ct,IsBigInt:()=>it,IsBoolean:()=>Ye,IsCall:()=>Mn,IsCodec:()=>vr,IsConstructor:()=>Oe,IsCyclic:()=>ne,IsEnum:()=>Ie,IsFunction:()=>Se,IsGeneric:()=>fn,IsIdentifier:()=>Gu,IsImmutable:()=>wr,IsInfer:()=>ye,IsInteger:()=>ke,IsIntersect:()=>P,IsIterator:()=>He,IsKind:()=>T,IsLiteral:()=>V,IsNever:()=>qt,IsNull:()=>Pt,IsNumber:()=>ue,IsObject:()=>N,IsOptional:()=>be,IsParameter:()=>Ku,IsPromise:()=>ve,IsReadonly:()=>$r,IsRecord:()=>le,IsRef:()=>re,IsRefine:()=>Ji,IsRest:()=>ur,IsSchema:()=>_,IsString:()=>xe,IsSymbol:()=>kt,IsTemplateLiteral:()=>Ee,IsThis:()=>Yu,IsTuple:()=>B,IsUndefined:()=>Nt,IsUnion:()=>x,IsUnknown:()=>Xe,IsUnsafe:()=>Ju,IsVoid:()=>st,Iterator:()=>Ct,KeyOf:()=>Wy,Literal:()=>q,Lowercase:()=>cy,Mapped:()=>oI,Module:()=>eE,Never:()=>z,NonNullable:()=>sI,Null:()=>cr,Number:()=>lt,Object:()=>k,Omit:()=>pI,Optional:()=>zi,Options:()=>Pa,Parameter:()=>Dr,Parameters:()=>lI,Partial:()=>fI,Pick:()=>TI,Promise:()=>Ut,Readonly:()=>Yi,ReadonlyType:()=>_I,Record:()=>ia,RecordKey:()=>_n,RecordKeyAsPattern:()=>at,RecordValue:()=>Ge,Ref:()=>Te,Refine:()=>$u,Required:()=>zI,Rest:()=>jr,ReturnType:()=>YI,Script:()=>tE,String:()=>et,Symbol:()=>hn,TemplateLiteral:()=>Wf,This:()=>aa,Tuple:()=>Ue,Uncapitalize:()=>uy,Undefined:()=>An,Union:()=>v,Unknown:()=>we,Unsafe:()=>Zu,Uppercase:()=>ly,Void:()=>sa});var H=o.Object({success:o.Literal(!0,{description:"Indicates the resource was deleted successfully"})},{$id:"DeleteResponse",example:{success:!0}});function _r(e){throw new Error(`assertUnreachable: ${JSON.stringify(e,null,2)}`)}var rE="lowercase-email";var Wk=(e,t)=>RegExp(`^${e.source}(${t.source}${e.source})*$`),Qk=/[a-zA-Z0-9-_]+/,Zk=/\./,aoe=Wk(Qk,Zk);var nE="lowercase-domain";var Jk=new Set;function F(e,t,r={}){let n=t.map(i=>{let s=i;return s.$id?(Jk.add(i),o.Ref(s.$id)):i});return o.Unsafe({...r,type:"object",discriminator:{propertyName:e},required:[e],oneOf:n})}function A(){return o.Unsafe({type:"string",format:"date-time"})}function u({allowEmpty:e=!0,type:t="short",description:r}={}){let n=e?0:1;switch(t){case"email":return o.String({format:rE,minLength:n,maxLength:254,description:r});case"lowercase-domain":return o.String({format:nE,minLength:n,maxLength:250,description:r});case"tsuga-query":return o.String({format:"tsuga-query",minLength:n,maxLength:1e4,description:r});case"tags-query":return o.String({format:"tags-query",minLength:n,maxLength:1e4,description:r});case"date-time":return o.String({format:"date-time",description:r});case"uri":return o.String({format:"uri",description:r});case"user-password":return o.String({format:"user-password",minLength:12,maxLength:250,description:r});case"long":return o.String({minLength:n,maxLength:5e4,description:r});case"short":return o.String({minLength:n,maxLength:250,description:r});case"math-formula":return o.String({format:"math-formula",minLength:n,maxLength:250,description:r});case"time":return o.String({format:"time",description:r});default:_r(t)}}var Xk=["asset-change","cluster-integration-config","explorer-saved-view","inventory","saml-config","sensitive-data-scanner-rule","service","team-remap-config","user-data","user-self","monitor-alert","monitor-debugging","retention-policy","org","custom-usage-tag"],e0=["ingestion-api-key","operation-api-key","audit-log","dashboard","dashboard-report","inventory-settings","log-route","monitor","notification-integration","notification-rule","notification-silence","quality-report","tag-policy","team","team-members","user-invitation","user-permissions"],t0=["log","metric","trace"],r0=[...e0,...t0],yoe=[...Xk,...r0];var oE=["admin","public_editor","public_viewer","teams_only"],Dn=["admin","editor","viewer"];var Kr="/v0/team-membership",im=o.Object({id:o.String(),userId:o.String(),teamId:o.String(),roleKey:o.Enum(Dn)}),iE=o.Object({userId:u({allowEmpty:!1}),teamId:u({allowEmpty:!1}),roleKey:o.Enum(Dn)}),n0=o.Object({userId:u({allowEmpty:!1}),teamId:u({allowEmpty:!1})}),o0=o.Optional(o.Object({userId:o.Optional(u({allowEmpty:!1})),teamId:o.Optional(u({allowEmpty:!1}))})),Ioe=f({tags:["access-control"],url:Kr,method:"GET",query:o0,response:o.Array(im)}),Eoe=f({tags:["access-control"],url:Kr,method:"POST",body:iE,response:im}),hoe=f({tags:["access-control"],url:Kr,method:"PUT",body:iE,response:im}),Toe=f({tags:["access-control"],url:Kr,method:"DELETE",body:n0,response:H}),ka=500,i0=o.Object({teamId:u({allowEmpty:!1}),members:o.Array(o.Object({userId:o.Optional(u({allowEmpty:!1})),userEmail:o.Optional(u({allowEmpty:!1,type:"email"})),roleKey:o.Enum(Dn)},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:ka})}),a0=o.Object({results:o.Array(o.Object({userId:o.String(),status:o.Enum(["added","already_member","user_not_found"])}))}),xoe=f({tags:["access-control"],url:`${Kr}/bulk-add`,method:"POST",body:i0,response:a0}),_oe=f({tags:["access-control"],url:`${Kr}/bulk-update-user-roles`,method:"PUT",body:o.Object({userIds:o.Array(u({allowEmpty:!1}),{minItems:1,maxItems:ka}),teamId:u({allowEmpty:!1}),role:o.Enum(Dn)}),response:o.Object({})}),s0=o.Object({teamId:u({allowEmpty:!1}),userIds:o.Optional(o.Array(u({allowEmpty:!1}),{minItems:1,maxItems:ka})),userEmails:o.Optional(o.Array(u({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:ka}))},{oneOf:[{required:["userIds"]},{required:["userEmails"]}]}),m0=o.Object({results:o.Array(o.Object({userId:o.String(),status:o.Enum(["removed","not_member","user_not_found"])}))}),Aoe=f({tags:["access-control"],url:`${Kr}/bulk-remove`,method:"DELETE",body:s0,response:m0});var p0={"ingestion-api-key":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"audit-log":{read:["public_viewer","public_editor","admin"],write:[]},"custom-usage-tag":{read:["admin"],write:["admin"]},"cluster-integration-config":{read:["admin"],write:["admin"]},"explorer-saved-view":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]},"operation-api-key":{read:["public_viewer","public_editor","admin"],write:["admin"]},"asset-change":{read:["public_viewer","public_editor","admin"],write:[]},"inventory-settings":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},dashboard:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},inventory:{read:["public_viewer","public_editor","admin"],write:[]},log:{read:["public_viewer","public_editor","admin"],write:[]},"log-route":{read:["public_viewer","public_editor","admin"],write:["admin","public_editor"]},metric:{read:["public_viewer","public_editor","admin"],write:[]},trace:{read:["public_viewer","public_editor","admin"],write:[]},monitor:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"monitor-alert":{read:["public_viewer","public_editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-rule":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-silence":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"saml-config":{read:["admin"],write:["admin"]},org:{read:["public_viewer","public_editor","admin"],write:["admin"]},"quality-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"sensitive-data-scanner-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},"retention-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},service:{read:["public_viewer","public_editor","admin"],write:[]},"tag-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},team:{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-members":{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-remap-config":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-data":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-invitation":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-permissions":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-self":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]}},c0={"ingestion-api-key":{read:["viewer","editor","admin"],write:["editor","admin"]},"audit-log":{read:["viewer","editor","admin"],write:[]},"asset-change":{read:["viewer","editor","admin"],write:[]},"custom-usage-tag":{read:[],write:[]},"cluster-integration-config":{read:[],write:[]},"explorer-saved-view":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"operation-api-key":{read:["viewer","editor","admin"],write:["admin"]},"inventory-settings":{read:["viewer","editor","admin"],write:["editor","admin"]},dashboard:{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-report":{read:["viewer","editor","admin"],write:[]},inventory:{read:["viewer","editor","admin"],write:[]},log:{read:["viewer","editor","admin"],write:[]},"log-route":{read:["viewer","editor","admin"],write:["editor","admin"]},metric:{read:["viewer","editor","admin"],write:[]},trace:{read:["viewer","editor","admin"],write:[]},monitor:{read:["viewer","editor","admin"],write:["editor","admin"]},"monitor-alert":{read:["viewer","editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-rule":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-silence":{read:["viewer","editor","admin"],write:["editor","admin"]},"saml-config":{read:["admin"],write:[]},org:{read:["viewer","editor","admin"],write:[]},"quality-report":{read:["viewer","editor","admin"],write:["editor","admin"]},"sensitive-data-scanner-rule":{read:["viewer","editor","admin"],write:[]},"retention-policy":{read:[],write:[]},service:{read:["viewer","editor","admin"],write:[]},"tag-policy":{read:[],write:[]},team:{read:["viewer","editor","admin"],write:["admin"]},"team-members":{read:["viewer","editor","admin"],write:["admin"]},"team-remap-config":{read:[],write:[]},"user-data":{read:["viewer","editor","admin"],write:["admin"]},"user-invitation":{read:["viewer","editor","admin"],write:["admin"]},"user-permissions":{read:["viewer","editor","admin"],write:[]},"user-self":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]}},u0={user:p0,team:c0};function am(e){return aE(e,"team")}function sm(e){return aE(e,"user")}function aE(e,t){let r=[],n=u0[t];for(let[i,s]of Object.entries(n))for(let[p,c]of Object.entries(s))c.includes(e)&&r.push({actionType:p,resourceType:i});return r}var Poe={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:sm("admin"),roleKey:"admin"},public_editor:{name:"Public editor",description:"Can view and edit assets in public teams, but not access private teams or critical settings.",permissions:sm("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:sm("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access assets in their own teams.",permissions:[],roleKey:"teams_only"}},koe={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:am("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, logs, monitors).",permissions:am("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:am("viewer"),roleKey:"viewer"}};var sE=o.Object({type:o.Literal("number"),number:o.String()}),l0=o.Object({type:o.Literal("string"),string:o.String()}),d0=o.Object({type:o.Literal("timestamp"),timestamp:o.String()}),mm=F("type",[sE,l0,d0]),f0=o.Object({by:o.Record(o.String(),mm),computed:o.Record(o.String(),sE)}),mE=o.Object({buckets:o.Array(f0)});var cE=1456444800,uE=4927737600,g0=cE*1e3,y0=uE*1e3,Ua=1704067200,pm=Ua*1e3,lE={title:"TimeRange",description:"Time range to query",examples:[{from:Ua,to:Ua}]},I0={title:"TimeRange",description:"Time range to query",examples:[{from:pm,to:pm}]},La=e=>o.Integer({description:e,examples:[Ua],minimum:cE,maximum:uE,format:"int64"}),pE=e=>o.Integer({description:e,examples:[pm],minimum:g0,maximum:y0,format:"int64"}),zt=o.Object({from:o.Optional(La("Start timestamp in seconds")),to:o.Optional(La("End timestamp in seconds"))},lE),yt=o.Object({from:La("Start timestamp in seconds"),to:La("End timestamp in seconds")},lE),dE=o.Object({from:pE("Start timestamp in milliseconds"),to:pE("End timestamp in milliseconds")},I0);var E0="/v0/aggregation",h0=o.Union([o.Literal("a"),o.Literal("d"),o.Literal("q"),o.Literal("w"),o.Literal("h")]),T0=o.Object({parallelism:o.Number(),engine:h0,recordBatchCache:o.Optional(o.Boolean()),includeNullGroups:o.Optional(o.Boolean()),shadow:o.Optional(o.Boolean())}),bt=["logs","metrics","traces"],x0={logs:"Logs",metrics:"Metrics",traces:"Traces"},_0=[...bt,"connections"],Boe={...x0,connections:"Connections"},fE=o.Enum(_0,{description:"Data source being queried"}),cm=o.Enum(bt,{description:"Data source being queried for this aggregation"}),jn=u({description:"Attribute containing the values to aggregate"}),A0=F("type",[o.Object({type:o.Literal("count",{description:"Counts the total number of records"})},{$id:"AggregateCount",title:"Count"}),o.Object({type:o.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:jn},{$id:"AggregateUniqueCount",title:"UniqueCount"}),o.Object({type:o.Literal("average",{description:"Calculates the average value of the selected field"}),field:jn},{$id:"AggregateAverage",title:"Average"}),o.Object({type:o.Literal("max",{description:"Finds the largest value of the field"}),field:jn},{$id:"AggregateMax",title:"Max"}),o.Object({type:o.Literal("min",{description:"Finds the smallest value of the field"}),field:jn},{$id:"AggregateMin",title:"Min"}),o.Object({type:o.Literal("sum",{description:"Sums the values of the selected field"}),field:jn},{$id:"AggregateSum",title:"Sum"}),o.Object({type:o.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:jn,percentile:o.Number()},{$id:"AggregatePercentile",title:"Percentile"})],{title:"Aggregate"}),b0=F("type",[o.Object({type:o.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),o.Object({type:o.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),o.Object({type:o.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),o.Object({type:o.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),o.Object({type:o.Literal("increase",{description:"`Increase` is designed for cumulative metrics. It computes the increase of cumulative metrics automatically handling counter resets. When used with an aggregation like `sum` it combines all series without requiring an explicit group-by."})},{$id:"FunctionIncrease",title:"Increase"}),o.Object({type:o.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:u({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"FunctionRolling",title:"Rolling"}),o.Object({type:o.Literal("log",{description:"Applies a logarithm transformation to the values"}),base:o.Integer({description:"The base of the logarithm",minimum:2})},{$id:"FunctionLog",title:"Log"}),o.Object({type:o.Literal("power",{description:"Raises values to a specified power"}),exponent:o.Integer({description:"The exponent to raise values to"})},{$id:"FunctionPower",title:"Power"}),o.Object({type:o.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"})],{title:"Function"});var O0=F("type",[o.Object({type:o.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),o.Object({type:o.Literal("timeseries"),aggregationWindow:u({description:'Time bucket size for aggregation (e.g. "10s", "60s", "1m")'})},{title:"Timeseries",description:"Returns a time series"})]),um=15,S0=["zero","null"],R0=o.Enum(S0),C0=o.Object({mode:o.Object({type:R0})}),gE={aggregate:A0,functions:o.Optional(o.Array(b0,{maxItems:10,description:"Post-processing functions applied to aggregation results"})),fill:o.Optional(C0)},yE={maxItems:um,description:"Aggregations that may be combined together in the same query"},Vo=o.Array(o.Object({...gE,filter:o.Optional(u({type:"tsuga-query",description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),yE),Fn=o.Array(o.Object({...gE,filter:u({type:"tsuga-query"})},{title:"MonitorAggregationQuery"}),yE);var Yo=u({type:"math-formula",description:"Formula referencing query outputs (e.g. q1+q2) to compute derived series"}),P0=o.Object({fields:o.Array(u(),{maxItems:1}),limit:o.Number()},{title:"AggregationGroupBy"}),k0=7,Wo=o.Array(P0,{maxItems:k0,description:"Fields used to group the results"}),Hoe=f({tags:["aggregation"],url:`${E0}/multi-query`,method:"POST",body:o.Object({timeRange:dE,queries:Vo,groupBy:o.Optional(Wo),returnType:O0,dataSource:cm,formula:Yo,executionOptions:T0,triggeredBy:o.Optional(o.Literal("refresh")),shouldStreamResults:o.Optional(o.Boolean()),clusterId:o.Optional(u({allowEmpty:!1}))}),response:mE}),U0=["per-second","per-minute","per-hour","rate"],zr=o.Enum(U0),Koe=F("type",[o.Object({type:o.Literal("count"),count:o.Object({field:o.Optional(u()),timeNormalization:o.Optional(zr)})}),o.Object({type:o.Literal("average"),average:o.Object({field:u(),timeNormalization:o.Optional(zr)})}),o.Object({type:o.Literal("min"),min:o.Object({field:u(),timeNormalization:o.Optional(zr)})}),o.Object({type:o.Literal("max"),max:o.Object({field:u(),timeNormalization:o.Optional(zr)})}),o.Object({type:o.Literal("sum"),sum:o.Object({field:u(),timeNormalization:o.Optional(zr)})}),o.Object({type:o.Literal("percentile"),percentile:o.Object({field:u(),percentile:o.Number(),timeNormalization:o.Optional(zr)})}),o.Object({type:o.Literal("uniqueCount"),uniqueCount:o.Object({field:u(),timeNormalization:o.Optional(zr)})})]),L0=o.Object({type:o.Literal("time"),time:o.Object({interval:u()})}),N0=o.Object({type:o.Literal("histogram"),histogram:o.Object({field:u(),interval:o.Number(),bounds:o.Optional(o.Object({min:o.Number(),max:o.Number()}))})}),M0=o.Object({type:o.Literal("topList"),topList:o.Object({field:u(),size:o.Number(),orderBy:o.Optional(o.Object({computeRef:u(),order:o.Union([o.Literal("asc"),o.Literal("desc")])}))})}),zoe=F("type",[L0,N0,M0]);var lm=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],dm=["light","dark"];var w0={light:{red:{text:"foreground.red",background:"avatar.background.red"},orange:{text:"foreground.orange",background:"avatar.background.orange"},amber:{text:"foreground.amber",background:"avatar.background.amber"},yellow:{text:"foreground.yellow",background:"avatar.background.yellow"},green:{text:"foreground.green",background:"avatar.background.green"},emerald:{text:"foreground.emerald",background:"avatar.background.emerald"},teal:{text:"foreground.teal",background:"avatar.background.teal"},cyan:{text:"foreground.cyan",background:"avatar.background.cyan"},sky:{text:"foreground.sky",background:"avatar.background.sky"},blue:{text:"foreground.blue",background:"avatar.background.blue"},indigo:{text:"foreground.indigo",background:"avatar.background.indigo"},purple:{text:"foreground.purple",background:"avatar.background.purple"},pink:{text:"foreground.pink",background:"avatar.background.pink"}},dark:{red:{text:"avatar.foreground.foreground",background:"avatar.solid-background.red"},orange:{text:"avatar.foreground.foreground",background:"avatar.solid-background.orange"},amber:{text:"avatar.foreground.foreground",background:"avatar.solid-background.amber"},yellow:{text:"avatar.foreground.foreground",background:"avatar.solid-background.yellow"},green:{text:"avatar.foreground.foreground",background:"avatar.solid-background.green"},emerald:{text:"avatar.foreground.foreground",background:"avatar.solid-background.emerald"},teal:{text:"avatar.foreground.foreground",background:"avatar.solid-background.teal"},cyan:{text:"avatar.foreground.foreground",background:"avatar.solid-background.cyan"},sky:{text:"avatar.foreground.foreground",background:"avatar.solid-background.sky"},blue:{text:"avatar.foreground.foreground",background:"avatar.solid-background.blue"},indigo:{text:"avatar.foreground.foreground",background:"avatar.solid-background.indigo"},purple:{text:"avatar.foreground.foreground",background:"avatar.solid-background.purple"},pink:{text:"avatar.foreground.foreground",background:"avatar.solid-background.pink"}},gradient:{red:"var(--chakra-colors-gradient-red)",orange:"var(--chakra-colors-gradient-orange)",amber:"var(--chakra-colors-gradient-amber)",yellow:"var(--chakra-colors-gradient-yellow)",green:"var(--chakra-colors-gradient-green)",emerald:"var(--chakra-colors-gradient-emerald)",teal:"var(--chakra-colors-gradient-teal)",cyan:"var(--chakra-colors-gradient-cyan)",sky:"var(--chakra-colors-gradient-sky)",blue:"var(--chakra-colors-gradient-blue)",indigo:"var(--chakra-colors-gradient-indigo)",purple:"var(--chakra-colors-gradient-purple)",pink:"var(--chakra-colors-gradient-pink)"}},IE=["activity-heart","activity","airplay","airpods","alarm-clock","anchor","annotation-dots","annotation-heart","annotation-question","annotation","announcement-03","asterisk-01","atom-01","atom-02","award-03","award-04","award-05","backpack","bank-note-01","bank-note-02","bank-note-03","battery-charging-01","beaker-01","beaker-02","bell-03","bell-04","bell-ringing-03","bell-ringing-04","bluetooth-connect","bluetooth-on","book-closed","book-open-01","book-open-02","bookmark","briefcase-01","briefcase-02","brush-01","brush-02","brush-03","building-01","building-02","building-03","building-08","bus","calculator","calendar-check-01","calendar-date","calendar-heart-01","calendar","camera-01","camera-lens","car-01","certificate-01","certificate-02","check-heart","clipboard-attachment","clipboard-check","clipboard-download","clipboard","clock-snooze","clock-stopwatch","cloud-01","cloud-lightning","cloud-moon","cloud-raining-01","cloud-raining-03","cloud-raining-05","cloud-raining-06","cloud-snowing-01","cloud-sun-01","cloud-sun-02","cloud-sun-03","code-browser","code-circle-01","code-circle-02","code-circle-03","code-square-01","code-square-02","coins-hand","coins-stacked-01","colors","compass-01","compass-02","compass-03","compass","credit-card-01","credit-card-02","cube-02","cube-04","cube-outline","currency-bitcoin-circle","currency-dollar-circle","currency-ethereum-circle","currency-euro-circle","currency-pound-circle","currency-ruble-circle","currency-rupee-circle","currency-yen-circle","cursor-click-01","cursor-click-02","diamond-01","diamond-02","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","disc-01","disc-02","droplets-01","droplets-02","droplets-03","dropper","face-content","face-frown","face-happy","face-neutral","face-sad","face-smile","face-wink","feather","file-02","file-05","file-06","file-heart-01","file-heart-02","file-search-01","file-search-02","file-search-03","film-01","film-02","fingerprint-03","fingerprint-04","flag-01","flag-04","flash-off","flash","gaming-pad-01","gaming-pad-02","gift-01","glasses-01","glasses-02","globe-03","globe-04","globe-05","globe-06","globe-slated-01","globe-slated-02","graduation-hat-01","graduation-hat-02","hash-01","hash-02","headphones-01","headphones-02","heart-circle","heart-hand","heart-hexagon","heart-octagon","heart-rounded","heart-square","hearts","hexagon-01","hexagon-02","home-03","home-smile","hourglass-01","hourglass-02","hourglass-03","hurricane-01","hurricane-02","hurricane-03","image-01","image-02","image-03","image-04","image-05","keyboard-01","laptop-01","life-buoy-01","life-buoy-02","lightbulb-02","lightbulb-03","lightbulb-04","lock-keyhole-circle","lock-keyhole-square","luggage-01","luggage-02","luggage-03","magic-wand-01","magic-wand-02","map-01","map-02","mark","marker-pin-01","marker-pin-04","marker-pin-05","marker-pin-06","medical-circle","medical-cross","medical-square","message-chat-square","message-notification-square","message-smile-square","message-text-square-02","microphone-01","microphone-02","microscope","modem-01","modem-02","monitor-03","monitor-04","monitor-05","moon-01","moon-eclipse","moon-star","music-note-01","music-note-02","music-note-plus","octagon","palette","paperclip","pentagon","phone-01","phone-02","phone-call-01","phone","piggy-bank-01","pin-01","pin-02","plane","play-circle","play-square","podcast","power-02","presentation-chart-01","printer","receipt","recording-01","recording-02","recording-03","rocket-01","rocket-02","roller-brush","rss-01","rss-02","ruler","scales-01","scales-02","server-06","shield-01","shield-02","shield-03","shield-dollar","shield-zap","shopping-bag-01","shopping-cart-01","signal-01","signal-02","signal-03","simcard","sliders-01","sliders-02","snowflake-01","snowflake-02","speaker-01","speaker-02","speaker-03","speedometer-01","speedometer-02","speedometer-03","speedometer-04","square","stand","star-03","star-07","sticker-circle","sticker-square","sun-setting-01","sun-setting-02","sun-setting-03","sun","sunrise","sunset","tablet-01","tag-01","tag-02","tag-03","target-01","target-02","target-03","target-04","target-05","terminal-browser","terminal-circle","terminal-square","thermometer-02","thermometer-03","thermometer-cold","thermometer-warm","thumbs-down","thumbs-up","ticket-01","tool-01","tool-02","train","tram","translate-01","triangle","trophy-01","trophy-02","truck-01","truck-02","tv-02","umbrella-01","umbrella-02","umbrella-03","virus","voicemail","wallet-01","wallet-02","wallet-05","watch-circle","watch-square","waves","webcam-01","webcam-02","wind-01","wind-02","wind-03","youtube","zap-circle","zap-fast","zap"];var Joe=w0.light.red.background;var EE=[{key:"amex15_digits",name:"American Express card (1x15 digits)",category:"financial-data",example:"378282246310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex4443_digits",name:"American Express card (4+4+4+3 digits)",category:"financial-data",example:"3782 8224 6310 005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex465_digits",name:"American Express card (4+6+5 digits)",category:"financial-data",example:"3782 822463 10005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex87_digits",name:"American Express card (8+7 digits)",category:"financial-data",example:"37828224 6310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card14_digits",name:"Diners card (1x14 digits)",category:"financial-data",example:"30569309025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card4442_digits",name:"Diners card (4+4+4+2 digits)",category:"financial-data",example:"3056 9309 0259 04",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card464_digits",name:"Diners card (4+6+4 digits)",category:"financial-data",example:"3056 930902 5904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card86_digits",name:"Diners card (8+6 digits)",category:"financial-data",example:"30569309 025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card16_digits",name:"Discover card (1x16 digits)",category:"financial-data",example:"6011111111111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card88_digits",name:"Discover card (2x8 digits)",category:"financial-data",example:"60111111 11111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card4444_digits",name:"Discover card (4x4 digits)",category:"financial-data",example:"6011 1111 1111 1117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card16_digits",name:"JCB card (1x16 digits)",category:"financial-data",example:"3530111333300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card88_digits",name:"JCB card (2x8 digits)",category:"financial-data",example:"35301113 33300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card4444_digits",name:"JCB card (4x4 digits)",category:"financial-data",example:"3530 1113 3330 0000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card16_digits",name:"Maestro card (1x16 digits)",category:"financial-data",example:"6759649826438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card88_digits",name:"Maestro card (2x8 digits)",category:"financial-data",example:"67596498 26438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card4444_digits",name:"Maestro card (4x4 digits)",category:"financial-data",example:"6759 6498 2643 8453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard16_digits",name:"Mastercard (1x16 digits)",category:"financial-data",example:"5555555555554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard88_digits",name:"MasterCard (2x8 digits)",category:"financial-data",example:"55555555 55554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard4444_digits",name:"MasterCard (4x4 digits)",category:"financial-data",example:"5555 5555 5555 4444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa16_digits",name:"Visa (1x16 digits)",category:"financial-data",example:"4111111111111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa19_digits",name:"Visa (1x19 digits)",category:"financial-data",example:"4111111111111111151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa88_digits",name:"Visa (2x8 digits)",category:"financial-data",example:"41111111 11111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa883_digits",name:"Visa (8+8+3 digits)",category:"financial-data",example:"41111111 11111111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa4444_digits",name:"Visa (4x4 digits)",category:"financial-data",example:"4111 1111 1111 1111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa44443_digits",name:"Visa (4+4+4+4+3 digits)",category:"financial-data",example:"4111 1111 1111 1111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"dropbox_long_lived_api_token",name:"Dropbox long lived API token",category:"credential",example:"767cb868836AAAAAAAAAAszri2cnmzu5tr0yf-nvclmwfyiswl67qyqw-uzn-scg",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})"},{key:"dropbox_short_lived_api_token",name:"Dropbox short lived API token",category:"credential",example:"sl.nu0yvsrposcjeyjcpmbfrmqygllrxpahrgbt8flml9xroifbic",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:sl\\.[a-z0-9\\-=_]{50})"},{key:"french_nirpp",name:"French social security number (NIRPP)",category:"personal-information",example:"188073512757119",isUsingLuhnAlgorithm:!1,regexp:"([12])\\s*[0-9]{2}\\s*(0[1-9]|1[0-2])\\s*(2[AB]|[0-9]{2})\\s*([0-9]{3})\\s*([0-9]{3})(\\s*[0-9]{2})?"},{key:"ip_address",name:"IP address",category:"device-identifier",example:"81.55.13.53",isUsingLuhnAlgorithm:!1,regexp:""},{key:"social_security_number",name:"Social security number",category:"personal-information",example:"437-02-2223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])[-\\s]*(?:0[1-9]|[1-9]0|[1-9][1-9])[-\\s]*(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"email",name:"Email",category:"credential",example:"admin@tsuga.com",isUsingLuhnAlgorithm:!1,regexp:"[a-zA-Z0-9-_.]*[a-zA-Z0-9_](@[a-zA-Z0-9_]+)(\\.[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?[a-zA-Z])(?-u:\\b)"},{key:"one_password_secret_key",name:"1Password secret key",category:"credential",example:"A3-O28NKC-F58GULWCN72-4NIKS-KGY7V-U7FAT",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)A3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}(?-u:\\b)"},{key:"one_password_service_account_token",name:"1Password service account token",category:"credential",example:"ops_eyJdAZ/FoIyz0jAXpEQOrRdIE8ydVaYfAXeZXGFqHWfBOjnE/Vgf5kHIbwrNAp2WeFNPeFiVJPlLv1hmaTVums0ldq1Kv8JEglMqP3f0ATBuX/WRbKqXYS3Z1wSzxg6S0krW4df7ZplvK04+JhJimejyTEH5dYaxqsYDBSLxjeEq7JWsmHEuXj6WP5qQi7FB+5s+CwhWPWY/jDhUMB3fdowXbfv5VnWri3iYrfBh+bFeRe9KURhXGHRDE9hgs",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ops_eyJ[a-zA-Z0-9+/]{50}"},{key:"adafruit_api_key",name:"Adafruit API key",category:"credential",example:"jb9pb4unb2bhe7xqepmgwtl2jg7ti101",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{32})"},{key:"adobe_client_id",name:"Adobe client ID",category:"credential",example:"c4166853dfd2897ebe706d49ef13fe63",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"adobe_client_secret",name:"Adobe client secret",category:"credential",example:"p8e-bb6e1614324ae48e507d33af176db3b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:p8e-[a-z0-9]{32})"},{key:"age_secret_key",name:"Age secret key",category:"credential",example:"AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}"},{key:"airtable_api_key",name:"Airtable API key",category:"credential",example:"19b73hbi0tc5cdy4w",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{17})"},{key:"algolia_api_key",name:"Algolia API key",category:"credential",example:"346155deb68d31c4018d73de73452947",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"alibaba_access_key_id",name:"Alibaba Cloud AccessKey ID",category:"credential",example:"LTAI7cc6804e4c2155cd52bd",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:LTAI[a-z0-9]{20})"},{key:"alibaba_secret_key",name:"Alibaba Cloud secret key",category:"credential",example:"suwixirhh10xhnko9bv0vfg2971u9p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"anthropic_admin_api_key",name:"Anthropic admin API key",category:"credential",example:"sk-ant-admin01-abc12fake-456def789ghij-klmnopqrstuvwx-3456yza789bcde-12fakehijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-admin01-[a-zA-Z0-9_-]{93}AA)"},{key:"anthropic_api_key",name:"Anthropic API key",category:"credential",example:"sk-ant-api03-abc123xyz-456def789ghij-klmnopqrstuvwx-3456yza789bcde-1234fghijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-api03-[a-zA-Z0-9_-]{93}AA)"},{key:"artifactory_api_key",name:"Artifactory API key",category:"credential",example:"AKCpt771klpkqllt647fdf36fq43radbz2w2nyetvx4l90qyeef8kbgkmke63ul5vf6mqsy82",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AKCp[A-Za-z0-9]{69}(?-u:\\b)"},{key:"artifactory_reference_token",name:"Artifactory reference token",category:"credential",example:"cmVmdc6i6888t9viuobfd88e46pdonjjsvmme6np82qti7wzbj7l9m1ygtyl9wik",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)cmVmd[A-Za-z0-9]{59}(?-u:\\b)"},{key:"asana_client_id",name:"Asana client ID",category:"credential",example:"9760134337886314",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{16})"},{key:"asana_client_secret",name:"Asana client secret",category:"credential",example:"tcnc8mjrf5bad359nnz3j1z90gow67ji",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"atlassian_api_token",name:"Atlassian API token",category:"credential",example:"fdo4scsa4kh53jnenkfp5fbe",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{20}[a-f0-9]{4})|(?-u:\\b)(?:ATATT3[A-Za-z0-9_-=]{50})"},{key:"authress_service_client_access_key",name:"Authress service client access key",category:"credential",example:"sc_scmz00n9xj.0ykp.acc_2k5vtnrec4.55vc9459s-gc5qlia7a67jvzm0bobn3g0ezimd3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\\.[a-z0-9]{4,6}\\.(?-i:acc)[_-][a-z0-9-]{10,32}\\.[a-z0-9+/_=-]{30})"},{key:"aws_access_token",name:"AWS access token",category:"credential",example:"AKIALALEMEL33243OLIB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})(?-u:\\b)"},{key:"azure_ad_client_secret",name:"Azure AD client secret",category:"credential",example:"bP88Q~rcBcYjzzOhg1Hnn76Wm3jGgakZiZ.8vMgR",isUsingLuhnAlgorithm:!1,regexp:"(?:^|[\\\\'\"` \\r\\n\\t\\f\\v>=:(?:,)])(?:[a-zA-Z0-9_~.]{3}[0-9]Q~[a-zA-Z0-9_~.-]{31,34})(?:$|[\\\\'\"` \\r\\n\\t\\f\\v<),])"},{key:"bitbucket_client_id",name:"Bitbucket client ID",category:"credential",example:"yyxmjnl3kahirvct7sat2082pzqdyf09",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"bitbucket_client_secret",name:"Bitbucket client secret",category:"credential",example:"fylw1pominwz91e5guqjiugw6srutpl64vzch5rnt8xnt31ka7so9va73fscz836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{64})"},{key:"beamer_api_token",name:"Beamer API token",category:"credential",example:"b_zhy-phuoqk13asco6az4u_0yhtklgswm4umkv95nv4gu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:b_[a-z0-9=_\\-]{44})"},{key:"codecov_access_token",name:"Codecov access token",category:"credential",example:"r93iopllonuphk41qglet20y8cb83thm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"clickhouse_cloud_api_secret_key",name:"ClickHouse Cloud API secret key",category:"credential",example:"4b1dbRdW3rOcB7xLthrM4BTBGK1qPLkHigpN1bXD6z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:4b1d[A-Za-z0-9]{38})(?-u:\\b)"},{key:"clojars_api_token",name:"Clojars API token",category:"credential",example:"CLOJARS_d1vd7t0blxaarzx25dxoda4hm5ox86st6o5ww7tnzsfz07wvu223bf0fmgim",isUsingLuhnAlgorithm:!1,regexp:"CLOJARS_[a-z0-9]{60}"},{key:"cloudflare_api_key",name:"Cloudflare API key",category:"credential",example:"ckg0h_dzkxnl627gy3nskpq9wzm4d5hc_vxk272h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"cloudflare_global_api_key",name:"Cloudflare global API key",category:"credential",example:"1d003bb65ec73ad2691fb76631b6496e3c9d9",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{37})"},{key:"cloudflare_origin_ca_key",name:"Cloudflare Origin CA key",category:"credential",example:"v1.0-aaa334dc886f30631ba0a610-0d98ef66290d7e50aac7c27b5986c99e6f3f1084c881d8ac0eae5de1d1aa0644076ff57022069b3237d19afe60ad045f207ef2b16387ee37b749441b2ae2e9ebe5b4606e846475d4a5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:v1\\.0-[a-f0-9]{24}-[a-f0-9]{50})"},{key:"cohere_api_token",name:"Cohere API token",category:"credential",example:"lpn59BQ4FNUabVJh1vCpIqZpQbaViELQrTa14p9D",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-zA-Z0-9]{40})"},{key:"confluent_access_token",name:"Confluent access token",category:"credential",example:"kkat92sclkukwvr2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"confluent_secret_key",name:"Confluent secret key",category:"credential",example:"64d4ppp37l9fjhadm8vv0awie6wjo4d6ourfcqvi2bcs2tm95x4f0e8gyb8z8usj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"contentful_delivery_api_token",name:"Contentful delivery API token",category:"credential",example:"eumospigka64wiwpavfmmblrq7x1hm6gz84wiiw2ff3",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{43})"},{key:"curl_auth_header",name:"Curl authorization header",category:"credential",example:"curl --header 'Authorization: 5eb4223e-5008-46e5-be67-c7b8f2732305'",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*?|.*?(?:[\\r\\n]{1,2}.*?){1,5})[ \\t\\n\\r](?:-H|--header)(?:=|[ \\t]{0,5})(?:"(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))"|'(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))')(?:(?-u:\\B)|[ \\r\\n\\t\\f\\v]|\\z)`},{key:"curl_auth_user",name:"Curl basic authentication",category:"credential",example:"curl -u elastic:P@ssw0rd$1",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*|.*(?:[\\r\\n]{1,2}.*){1,5})[ \\t\\n\\r](?:-u|--user)(?:=|[ \\t]{0,5})(?:"(:[^"]{3,}|[^:"]{3,}:|[^:"]{3,}:[^"]{3,})"|'(?:[^:']{3,}:[^']{3,})'|(?:(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_\${}@.-]+)))(?:[ \\r\\n\\t\\f\\v]|\\z)`},{key:"databricks_api_token",name:"Databricks API token",category:"credential",example:"dapia2553f815d29a193fd09c2bb55201895",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dapi[a-f0-9]{32}(?:-[0-9])?)"},{key:"datadog_access_token",name:"Datadog access token",category:"credential",example:"ljgbhjnca2hy5yc2nv7cag1ag7ehx2hc6geparov",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"defined_networking_api_token",name:"Defined Networking API token",category:"credential",example:"dnkey-nowf_nwyqhvqt1gi66xnuuf2rb-bfxnr9_qydyxnxn1y8uijvhhp9owllbg-2czoe-7qs5_w5650xei",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})"},{key:"digitalocean_pat",name:"DigitalOcean personal access token",category:"credential",example:"dop_v1_ec8f4a856c1459bd442a275461e2f709506347de30b180851cde71f696e9fcc8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dop_v1_[a-f0-9]{64})"},{key:"digitalocean_access_token",name:"DigitalOcean OAuth access token",category:"credential",example:"doo_v1_42b8ea6c4b0c373f88aff9d3fa87e123ab23b0d3c22ac6d4361a4e9c1e89eaa6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:doo_v1_[a-f0-9]{64})"},{key:"digitalocean_refresh_token",name:"DigitalOcean OAuth refresh token",category:"credential",example:"dor_v1_4d9b3e6fbe65ab472e464dfa6377d702e80164442acdfbeb3ef032d917cb9984",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dor_v1_[a-f0-9]{64})"},{key:"discord_api_token",name:"Discord API token",category:"credential",example:"7eb855d9a40747182d0b0ea74df27aee31d05756a9933a815a3ccb5a46b2d61d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"discord_client_id",name:"Discord client ID",category:"credential",example:"763721114261247538",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{18})"},{key:"discord_client_secret",name:"Discord client secret",category:"credential",example:"13641266018325206246161633988007",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"doppler_api_token",name:"Doppler API token",category:"credential",example:"dp.pt.vgin8wwjy7sx66fyq99tavkm3y5g2jdxmsufh257dhj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dp\\.pt\\.[a-z0-9]{43}"},{key:"dropbox_api_token",name:"Dropbox API token",category:"credential",example:"rdlztoij88rzrsk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{15})"},{key:"droneci_access_token",name:"DroneCI access token",category:"credential",example:"v26gffr903rbti5v7m392ba0u7oarz36",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"duffel_api_token",name:"Duffel API token",category:"credential",example:"duffel_test_-yd6b3pc4jy593pt5kr2l3ynzkb5b_f619dshefiz=v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)duffel_(?:test|live)_[a-z0-9_\\-=]{43}"},{key:"dynatrace_api_token",name:"Dynatrace API token",category:"credential",example:"dt0c01.ben820rdpb1so4kasfx3yn4a.zkje7lawif35udsin5t1mi1m1sne7wdzphlzrmdnu3j69gr4kgf5dwg4x5lb30zg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dt0c01\\.[a-z0-9]{24}\\.[a-z0-9]{64}"},{key:"easypost_api_token",name:"EasyPost API token",category:"credential",example:"EZAKBVScDZwZFv0nJXHBcxPGil7eztnPJOSmDFf2NGKQk6Dn7VqULciSRm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZAK[a-z0-9]{54}(?-u:\\b)"},{key:"easypost_test_api_token",name:"EasyPost test API token",category:"credential",example:"EZTKuxUXVU5HBS1K2iyh165t3VtivpdxMgIf5Y2P1oJxeFeaJGcwzVexds",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZTK[a-z0-9]{54}(?-u:\\b)"},{key:"etsy_access_token",name:"Etsy access token",category:"credential",example:"8ssp35lhprxpb3sjyergcz5z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"facebook_secret",name:"Facebook secret",category:"credential",example:"c41c21ba4fb5ee05398db86ca83f06db",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"facebook_access_token",name:"Facebook access token",category:"credential",example:"911602140448729|AY-lRJZq9BoDLobvAiP25L7RcMg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[0-9]{15,16}(\\||%)[0-9a-z\\-_]{27,40})"},{key:"facebook_page_access_token",name:"Facebook page access token",category:"credential",example:"EAAM9GOnCB9kBO2frzOAWGN2zMnZClQshlWydZCrBNdodesbwimx1mfVJgqZBP5RSpMfUzWhtjTTXHG5I1UlvlwRZCgjm3ZBVGeTYiqAAoxyED6HaUdhpGVNoPUwAuAWWFsi9OvyYBQt22DGLqMIgD7VktuCTTZCWKasz81Q822FPhMTB9VFFyClNzQ0NLZClt9zxpsMMrUZCo1VU1rL3CKavir5QTfBjfCEzHNlWAUDUV2YZD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:EAA[MC][a-z0-9]{50})"},{key:"fastly_api_token",name:"Fastly API token",category:"credential",example:"im7_ux24tyyxz_4y4mvzj22akpid830c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"finicity_client_secret",name:"Finicity client secret",category:"credential",example:"roepymyr0ce7wxhjvgb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"finicity_api_token",name:"Finicity API token",category:"credential",example:'= "cce089057c8b7fe7f2a8474b9a050816',isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"flickr_access_token",name:"Flickr access token",category:"credential",example:"damvt93tudulk6wrfp36sawndc9pa7bb",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"finnhub_access_token",name:"Finnhub access token",category:"credential",example:"x01lnfp13spcbsa0at32",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"flutterwave_public_key",name:"Flutterwave public key",category:"credential",example:"FLWPUBK_TEST-99484d505b4ee5c1181a2884f5fe3852-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWPUBK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_secret_key",name:"Flutterwave secret key",category:"credential",example:"FLWSECK_TEST-66187ac83488c2245f0d7e95fa37e833-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_encryption_key",name:"Flutterwave encryption key",category:"credential",example:"FLWSECK_TEST-6262214a02e7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{12}"},{key:"flyio_access_token",name:"Fly.io access token",category:"credential",example:"fo1_m-HT0NHLBSPwMJ2hIer4v3lxtWEC7grXNidQxJMrVVE",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:fo1_[a-zA-Z0-9_-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{50}))"},{key:"frameio_api_token",name:"Frame.io API token",category:"credential",example:"fio-u-4ov9vjtr2wwj8j1gob-8xrx2-1=z818psmitskgoq4=p-_k77d54034z55xk-lqh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)fio-u-[a-z0-9\\-_=]{64}"},{key:"freshbooks_access_token",name:"FreshBooks access token",category:"credential",example:"gqw118uwne1nddlt4yruvvs4jr9s0vrj5mxaswgb2amacod8lgnmrknsvbovsx1g",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"gocardless_api_token",name:"GoCardless API token",category:"credential",example:"live_-z4lwtrrk6p6=-v1ig_y_4ceplziwek0lw=oz-eu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:live_[a-z0-9\\-_=]{40})"},{key:"gcp_api_key",name:"GCP API key",category:"credential",example:"AIzaYpvGqEzpgB7R353HD9CxN8LuhZ6d6UfuXLL",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:AIza[a-zA-Z0-9_-]{35})"},{key:"github_pat",name:"GitHub personal access token",category:"credential",example:"ghp_t7i9llxuukeb7apn4zlnyeyz5b0007rsfs54",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghp_[0-9a-zA-Z]{36}"},{key:"github_fine_grained_pat",name:"GitHub fine-grained personal access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)github_pat_[a-zA-Z0-9_]{82}"},{key:"github_oauth",name:"GitHub OAuth token",category:"credential",example:"gho_anlrm6zqscqityoqozv503by66dobnem4yxh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gho_[0-9a-zA-Z]{36}"},{key:"github_app_token",name:"GitHub app token",category:"credential",example:"ghs_0zleityj4n1ulz178o9in1w97q1ifw8u3y8h",isUsingLuhnAlgorithm:!1,regexp:"(?:ghu|ghs)_[0-9a-zA-Z]{36}"},{key:"github_refresh_token",name:"GitHub refresh token",category:"credential",example:"ghr_inu1aa7qbgi46cf8nprbgh4kn03d0zk35raj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghr_[0-9a-zA-Z]{36}"},{key:"gitlab_cicd_job_token",name:"GitLab CI/CD job token",category:"credential",example:"glcbt-7h2nr_6jmho0uoqkb1ww431kfl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_-]{20}"},{key:"gitlab_deploy_token",name:"GitLab deploy token",category:"credential",example:"gldt-7a3o70gqa8zkal0zdp4x",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gldt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feature_flag_client_token",name:"GitLab feature flag client token",category:"credential",example:"glffct-dsct62ndnvcj7alw5nas",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glffct-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feed_token",name:"GitLab feed token",category:"credential",example:"glft-13956nvy00289v6xu0di",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glft-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_incoming_mail_token",name:"GitLab incoming mail token",category:"credential",example:"glimt-fcdt1a5jvj01si61jgkse2r20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glimt-[0-9a-zA-Z_\\-]{25}"},{key:"gitlab_kubernetes_agent_token",name:"GitLab Kubernetes agent token",category:"credential",example:"glagent-8wxkulkbbuk7u6r3nvrefswdfw5o0v7vy81y4oky8rnfogm826",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glagent-[0-9a-zA-Z_\\-]{50}"},{key:"gitlab_oauth_app_secret",name:"GitLab OAuth app secret",category:"credential",example:"gloas-vawws2nw5kf6rizn49g41jc3jiy4xqioaihrwm1msltbdt4cbmo4x52tygcic7af",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gloas-[0-9a-zA-Z_\\-]{64}"},{key:"gitlab_pat",name:"GitLab personal access token",category:"credential",example:"glpat-2gl3ku1497ms4gzyv16i",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[a-zA-Z0-9_-]{20}"},{key:"gitlab_pat_routable",name:"GitLab personal access token (routable)",category:"credential",example:"glpat-2hf7vebpux9j56tdcqqsvap7vxc.chvjof35u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[0-9a-zA-Z_-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_ptt",name:"GitLab personal access token (temporary)",category:"credential",example:"glptt-b54e8b7b90cf006b79af110baa9b8d9183fd7048",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glptt-[0-9a-f]{40}"},{key:"gitlab_rrt",name:"GitLab registration token",category:"credential",example:"GR1348941vnauzmn2hj0zncvt0nfe",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)GR1348941[a-zA-Z0-9_-]{20}"},{key:"gitlab_runner_authentication_token",name:"GitLab runner authentication token",category:"credential",example:"glrt-xbd1w7c9clbxm52zdxkm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_runner_authentication_token_routable",name:"GitLab runner authentication token (routable)",category:"credential",example:"glrt-t5_8d8ugbkfzddae0dw06tvm0x7qxc.mwcd1a7cn",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-t[0-9]_[0-9a-zA-Z_\\-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_scim_token",name:"GitLab SCIM token",category:"credential",example:"glsoat-9jb5zk1nvy800c1uqhh0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glsoat-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_session_cookie",name:"GitLab session cookie",category:"credential",example:"_gitlab_session=yjhub6vtrp60djn6rszuemeacsoqox97",isUsingLuhnAlgorithm:!1,regexp:"_gitlab_session=[0-9a-z]{32}"},{key:"gitter_access_token",name:"Gitter access token",category:"credential",example:"uazubes6trcd_1gym09opuf_8gj1rmvj6jwber4a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"grafana_api_key",name:"Grafana API key",category:"credential",example:"eyJrIjoiyl5shjvqja0xkfbu38m24vn5httsipr1h9fgjhodxzlkpravuiy8h7hom5kt8gtwuguh2v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:eyJrIjoi[A-Za-z0-9]{70}={0,3})"},{key:"grafana_cloud_api_token",name:"Grafana cloud API token",category:"credential",example:"glc_cb7p4j2g1qu0sy84me72ufmn1z8mqk8y",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glc_[A-Za-z0-9+/]{32}={0,3})"},{key:"grafana_service_account_token",name:"Grafana service account token",category:"credential",example:"glsa_rm3sadbwl8o2c13v4ipgkz04h66kiy6t_edaea401",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})"},{key:"harness_api_key",name:"Harness API key",category:"credential",example:"pat.vzcxr183pymw194fdq1q0v.qjqjarqkd9ydxqagjmq3f5iq.8nn5nyaow3h5mmgjh053",isUsingLuhnAlgorithm:!1,regexp:"(?:pat|sat)\\.[a-zA-Z0-9_-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}"},{key:"hashicorp_tf_api_token",name:"HashiCorp Terraform API token",category:"credential",example:"984d8033429986.atlasv1.799k5cihj_807yc1e8afvla8ackd1khsb50nfeswbxbr1re54y0wpzs2tjy=",isUsingLuhnAlgorithm:!1,regexp:"[a-z0-9]{14}\\.(?-i:atlasv1)\\.[a-z0-9\\-_=]{60,70}"},{key:"heroku_api_key",name:"Heroku API key",category:"credential",example:"9127f65b-8b3f-c0b7-a336-a4347e71bc51",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"heroku_api_key_v2",name:"Heroku API key v2",category:"credential",example:"HRKU-AAxPYvV6l2R3DvF0w9VJ4m8cz9oaygOHxpQvcw--iD51MszQZeakD9DZsclX",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(HRKU-AA[0-9a-zA-Z_-]{58}))"},{key:"hubspot_api_key",name:"HubSpot API key",category:"credential",example:"86cb6664-b191-db72-95a7-49adebe84b74",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})"},{key:"huggingface_access_token",name:"HuggingFace access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hf_(?i:[a-z]{34}))"},{key:"huggingface_organization_api_token",name:"HuggingFace organization API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:api_org_(?i:[a-z]{34}))"},{key:"intercom_api_key",name:"Intercom API key",category:"credential",example:"zuc5c=ykf5gcwesqvmh2pji6k3extx0rbalsznte3sdo7iu7f-lumol2npfk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{60})"},{key:"intra42_client_secret",name:"Intra42 client secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:s-s4t2(?:ud|af)-[abcdef0123456789]{64})"},{key:"jfrog_api_key",name:"JFrog API key",category:"credential",example:"lj7nrgoo0kr04kw312zvly7l0olsn37vhto5wdn3yqi5srxnc2axstp7a1kewkxi717w295kh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{73})"},{key:"jfrog_identity_token",name:"JFrog identity token",category:"credential",example:"xh0x2upbtkkg1pseg7ezmcyw2c3kt0bt05l5v8ynvkro6wagolhch0f7kppplt8b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"jwt",name:"JSON web token",category:"credential",example:"ey7gzQUpN8Kz7XY6Yin.ey1o36_XrBphAG8WMHQ.",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_-]{10,}={0,2})?)"},{key:"jwt_base64",name:"JSON web token base64",category:"credential",example:"ZXlKNE5YUWpVekkxTmlJNklsUjFUM0pDZVRKT1kxUnNSbE5YZFZvNFMyZzRWemhCYWxGaFoySTBabTVtVURGVGJFdE5Uemd0VTI4aWZRLmV5SnBjM01pT2lKcWIyVWlMQTBLSUNKbGVIQWlPakV6TURBNE1Ua3pPREFzRFFvZ0ltaDBkSEE2THk5bGVHRnRjR3hsTG1OdmJTOXBjMTl5YjI5MElqcDBjblZsZlEuZEJqZnRKZVo0Q1ZQLW1COTJLMjd1aGJVSlUxcDFyX3dXMWdGV0ZPRWpYaw==",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}"},{key:"launchdarkly_access_token",name:"LaunchDarkly access token",category:"credential",example:"ezmej9s6yv4qwk2=yeb4kfi162p33b_2hzm7tr-0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40})"},{key:"linear_api_key",name:"Linear API key",category:"credential",example:"lin_api_0n5n0k26vb4ka9je9dqdcwl1dae5mbpfhb48xio6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)lin_api_[a-z0-9]{40}"},{key:"linear_client_secret",name:"Linear client secret",category:"credential",example:"7b956760f09b81684ed833c524f081de",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"linkedin_client_id",name:"LinkedIn client ID",category:"credential",example:"18u930hak0em0r",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{14})"},{key:"linkedin_client_secret",name:"LinkedIn client secret",category:"credential",example:"uvkxd9rw41ylk1zj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"lob_api_key",name:"Lob API key",category:"credential",example:"test_02efbb923a38370aac769e3bedc4d3398be",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(live|test)_[a-f0-9]{35})"},{key:"lob_pub_api_key",name:"Lob publishable API key",category:"credential",example:"test_pub_df170d9f5be9244959713dfee686c42",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(test|live)_pub_[a-f0-9]{31})"},{key:"mailchimp_api_key",name:"MailChimp API key",category:"credential",example:"81277fbbe2dd9c5e18d5f28cebcc558c-us20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32}-us[0-9][0-9])"},{key:"mailgun_pub_key",name:"Mailgun public validation key",category:"credential",example:"pubkey-5011bae1a4b57dfa83762c24b0e1299d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pubkey-[a-f0-9]{32})"},{key:"mailgun_private_api_token",name:"Mailgun private API token",category:"credential",example:"key-176f7ef066471ac351adab734d2c9fb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:key-[a-f0-9]{32})"},{key:"mailgun_signing_key",name:"Mailgun webhook signing key",category:"credential",example:"24564bd3d54a469601d5ac5daecb9ad2-00001111-22223333",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})"},{key:"mapbox_api_token",name:"MapBox API token",category:"credential",example:"pk.5ko18udoy3cilkpgyedje9limykwj8n7wmhug4967o9wze284mmpuuhjzgig.edjzuv7jwhc6lnv5b3p9nc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})"},{key:"mattermost_access_token",name:"Mattermost access token",category:"credential",example:"rtw2hncbfhpbyyri90d3q2mo1m",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{26})"},{key:"maxmind_license_key",name:"MaxMind license key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)"},{key:"cisco_meraki_api_key",name:"Cisco Meraki API key",category:"credential",example:"acea14a1470f7cf443a031dde64065ce81c77b2b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[0-9a-f]{40})"},{key:"messagebird_api_token",name:"MessageBird API token",category:"credential",example:"448q6im7yxutswabdko1n69ry",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"messagebird_client_id",name:"MessageBird client ID",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"netlify_access_token",name:"Netlify access token",category:"credential",example:"3j1sa0o20v0k-cjbjn3vh_4uqnkvb3w_px5no2in",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40,46})"},{key:"new_relic_user_api_key",name:"New Relic user API key",category:"credential",example:"NRAK-zozcnrh45ornsbl1duyfhell59u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRAK-[a-z0-9]{27})"},{key:"new_relic_user_api_id",name:"New Relic user API ID",category:"credential",example:"k0jze7delork84k8ke1z1dm275yw2aqf5uu2cy7x1uiloll3xab5203hiz9tx9xx",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"new_relic_browser_api_token",name:"New Relic browser API token",category:"credential",example:"NRJS-c7fa1261a97506e4a45",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRJS-[a-f0-9]{19})"},{key:"new_relic_insert_key",name:"New Relic insight insert key",category:"credential",example:"NRII-4168ab7eb2e051f37144ad884d32ab34",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRII-[a-z0-9-]{32})"},{key:"notion_api_token",name:"Notion API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})"},{key:"npm_access_token",name:"npm access token",category:"credential",example:"npm_vz9e7fvsn7o2n2tddg6b01gs7g9wldlys4vm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:npm_[a-z0-9]{36})"},{key:"nytimes_access_token",name:"NYTimes access token",category:"credential",example:"ako7xzi0mx7w15ogdkew7ilq7h13x8rl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"octopus_deploy_api_key",name:"Octopus Deploy API key",category:"credential",example:"API-NFWN6F7X32BYDBU94IGY3V5ZQY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:API-[A-Z0-9]{26})"},{key:"okta_access_token",name:"Okta access token",category:"credential",example:"003cKkRNNMy4ul7V8UDHEjEBGbnsQ6tejSHzfeBtcp",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:00[a-zA-Z0-9_=\\-]{40})"},{key:"openai_api_key",name:"OpenAI API key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})T3BlbkFJ(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})(?-u:\\b)|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})"},{key:"openshift_user_token",name:"OpenShift user token",category:"credential",example:"sha256~OFL-TnR3jyLteu_rAuff3PUYNELVvByMRFYCcAkaJSR",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sha256~[a-zA-Z0-9_-]{43})(?:[^a-zA-Z0-9_-]|\\z)"},{key:"perplexity_api_key",name:"Perplexity API key",category:"credential",example:"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'",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pplx-[a-zA-Z0-9]{48})(?:[`'\" \\r\\n\\t\\f\\v;]|\\\\[nr]|$|(?-u:\\b))"},{key:"plaid_api_token",name:"Plaid API token",category:"credential",example:"access-development-4b0f8c31-83fe-e4c5-3d02-91e487b69d2d",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"plaid_client_id",name:"Plaid client ID",category:"credential",example:"TTPjxpFNiwOct5XLdxjXD0Ta",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"plaid_secret_key",name:"Plaid secret key",category:"credential",example:"ikhqm7a9k76l8f544dl0v8kxvm2w55",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"planetscale_password",name:"PlanetScale password",category:"credential",example:"pscale_pw_9gvu8z79m4b814z0vv8266w70h3i7jlq",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_pw_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_api_token",name:"PlanetScale API token",category:"credential",example:"pscale_tkn_nwy9jkjgnry96ftecsx_=jrxc6pkmmew",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_tkn_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_oauth_token",name:"PlanetScale OAuth token",category:"credential",example:"pscale_oauth_zx8v3gzfnfxbymj__l629i68jnz5gnff",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_oauth_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"postman_api_token",name:"Postman API token",category:"credential",example:"PMAK-525b84aa46e2c588620d8123-06f9ca36c4aad4305baafbe00716b7bc8f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:PMAK-[a-f0-9]{24}\\-[a-f0-9]{34})"},{key:"prefect_api_token",name:"Prefect API token",category:"credential",example:"pnu_kttbffyfgffu2sfbxzxw8mbpgvvtxjljwe1p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pnu_[a-zA-Z0-9]{36})"},{key:"privateai_api_token",name:"PrivateAI API token",category:"credential",example:"iwuxqzqilzbfnccncvjz6px23dnej11h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"private_key",name:"Private key",category:"credential",example:`-----BEGIN PRIVATE KEY-----
24
+ `),this.outputHelp({error:!0}));let o=r||{},i=o.exitCode||1,s=o.code||"commander.error";this._exit(i,s,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in re.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,re.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Wb(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,o.implied[i],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=p=>{let u=p.attributeName(),l=this.getOptionValue(u),g=this.options.find(E=>E.negate&&u===E.attributeName()),y=this.options.find(E=>!E.negate&&u===E.attributeName());return g&&(g.presetArg===void 0&&l===!1||g.presetArg!==void 0&&l===g.presetArg)?g:y||p},i=p=>{let u=o(p),l=u.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},s=`error: ${i(t)} cannot be used with ${i(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let p=s.createHelp().visibleOptions(s).filter(u=>u.long).map(u=>u.long);i=i.concat(p),s=s.parent}while(s&&!s._enablePositionalOptions);r=eu(t,i)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${o} but got ${t.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),r=eu(t,i)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let i=this.createOption(r,o);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${t}
25
+ `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let i=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>zb(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=Ht.basename(t,Ht.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let i=r.formatHelp(this,r);return o.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(t){t=t||{};let r=!!t.error,o,i,s;return r?(o=u=>this._outputConfiguration.writeErr(u),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(o=u=>this._outputConfiguration.writeOut(u),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:r,write:u=>(i||(u=this._outputConfiguration.stripColor(u)),o(u)),hasColors:i,helpWidth:s}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),i={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(p=>p.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:o.error});if(r&&(s=r(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(p=>p.emit("afterAllHelp",i))}helpOption(t,r){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(re.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
26
+ Expecting one of '${o.join("', '")}'`);let i=`${t}Help`;return this.on(i,s=>{let p;typeof r=="function"?p=r({error:s.error,command:s.command}):p=r,p&&s.write(`${p}
27
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function tu(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",i="9229",s;return(s=t.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?i=s[3]:o=s[3]):(s=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],o=s[3],i=s[4]),r&&i!=="0"?`${r}=${o}:${parseInt(i)+1}`:t})}function Cs(){if(re.env.NO_COLOR||re.env.FORCE_COLOR==="0"||re.env.FORCE_COLOR==="false")return!1;if(re.env.FORCE_COLOR||re.env.CLICOLOR_FORCE!==void 0)return!0}Ps.Command=Rs;Ps.useColor=Cs});var au=Lr(It=>{var{Argument:nu}=qi(),{Command:ks}=ru(),{CommanderError:Qb,InvalidArgumentError:ou}=uo(),{Help:Zb}=Ts(),{Option:iu}=bs();It.program=new ks;It.createCommand=e=>new ks(e);It.createOption=(e,t)=>new iu(e,t);It.createArgument=(e,t)=>new nu(e,t);It.Command=ks;It.Option=iu;It.Argument=nu;It.Help=Zb;It.CommanderError=Qb;It.InvalidArgumentError=ou;It.InvalidOptionArgumentError=ou});var su=Vc(au(),1),{program:o1,createCommand:i1,createArgument:a1,createOption:s1,CommanderError:m1,InvalidArgumentError:p1,InvalidOptionArgumentError:c1,Command:mu,Argument:u1,Option:l1,Help:d1}=su.default;function ar(e){throw new Error(`assertUnreachable: ${JSON.stringify(e,null,2)}`)}var f={};yt(f,{Assign:()=>Jb,Clone:()=>fo,Create:()=>eS,Discard:()=>tS,Metrics:()=>xt,Update:()=>rS});var xt={assign:0,create:0,clone:0,discard:0,update:0};function Jb(e,t){return xt.assign+=1,{...e,...t}}var a={};yt(a,{Entries:()=>xO,EntriesRegExp:()=>TO,Every:()=>IO,EveryAll:()=>EO,GraphemeCount:()=>fO,HasPropertyKey:()=>hO,IsArray:()=>Mr,IsAsyncIterator:()=>oO,IsBigInt:()=>lo,IsBoolean:()=>gu,IsClassInstance:()=>lO,IsConstructor:()=>iO,IsDeepEqual:()=>Ms,IsEqual:()=>Q,IsFunction:()=>yu,IsGreaterEqualThan:()=>Eu,IsGreaterThan:()=>pO,IsInteger:()=>Ns,IsIterator:()=>aO,IsLessEqualThan:()=>Iu,IsLessThan:()=>cO,IsMaxLength:()=>gO,IsMinLength:()=>yO,IsMultipleOf:()=>uO,IsNull:()=>zi,IsNumber:()=>Yi,IsObject:()=>wr,IsObjectNotArray:()=>sO,IsString:()=>mr,IsSymbol:()=>mO,IsUndefined:()=>Ls,IsValueLike:()=>dO,Keys:()=>Ki,Symbols:()=>_O,Values:()=>AO});function sr(e,t,r){return e>=t&&e<=r}function pu(e){return sr(e,127462,127487)}function Xb(e){return sr(e,65024,65039)}function eO(e){return sr(e,768,879)||sr(e,6832,6911)||sr(e,7616,7679)||sr(e,65056,65071)}function Hi(e){return e>65535?2:1}function cu(e,t){for(;t<e.length;){let r=e.codePointAt(t);if(eO(r)||Xb(r))t+=Hi(r);else break}return t}function Us(e,t){let r=e.codePointAt(t),o=t+Hi(r);for(o=cu(e,o);o<e.length-1&&e[o]==="\u200D";){let i=e.codePointAt(o+1);o+=1+Hi(i),o=cu(e,o)}return pu(r)&&o<e.length&&pu(e.codePointAt(o))&&(o+=Hi(e.codePointAt(o))),o}function uu(e){return sr(e,55296,56319)||sr(e,768,879)||e===8205}function lu(e){let t=0,r=0;for(;r<e.length;)r=Us(e,r),t++;return t}function tO(e,t){let r=0,o=0;for(;o<e.length;)if(o=Us(e,o),r++,r>=t)return!0;return!1}function rO(e,t){let r=0,o=0;for(;o<e.length;)if(o=Us(e,o),r++,r>t)return!1;return!0}function du(e,t){let r=0;for(;r<e.length;){if(uu(e.charCodeAt(r)))return tO(e,t);if(r++,r>=t)return!0}return!1}function fu(e,t){let r=0;for(;r<e.length;){if(uu(e.charCodeAt(r)))return rO(e,t);if(r++,r>t)return!1}return!0}function Mr(e){return Array.isArray(e)}function oO(e){return wr(e)&&Symbol.asyncIterator in e}function lo(e){return Q(typeof e,"bigint")}function gu(e){return Q(typeof e,"boolean")}function iO(e){if(Ls(e)||!yu(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function yu(e){return Q(typeof e,"function")}function Ns(e){return Number.isInteger(e)}function aO(e){return wr(e)&&Symbol.iterator in e}function zi(e){return Q(e,null)}function Yi(e){return Number.isFinite(e)}function sO(e){return wr(e)&&!Mr(e)}function wr(e){return Q(typeof e,"object")&&!zi(e)}function mr(e){return Q(typeof e,"string")}function mO(e){return Q(typeof e,"symbol")}function Ls(e){return Q(e,void 0)}function Q(e,t){return e===t}function pO(e,t){return e>t}function cO(e,t){return e<t}function Iu(e,t){return e<=t}function Eu(e,t){return e>=t}function uO(e,t){if(lo(e)||lo(t))return BigInt(e)%BigInt(t)===0n;let r=1e-10;if(!Yi(e)||Ns(e)&&1/t%1===0)return!0;let o=e%t;return Math.min(Math.abs(o),Math.abs(o-t))<r}function lO(e){if(!wr(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return zi(t)?!1:Q(typeof t.constructor,"function")&&!(Q(t.constructor,globalThis.Object)||Q(t.constructor.name,"Object"))}function dO(e){return lo(e)||gu(e)||zi(e)||Yi(e)||mr(e)||Ls(e)}function fO(e){return lu(e)}function gO(e,t){return fu(e,t)}function yO(e,t){return du(e,t)}function IO(e,t,r){for(let o=t;o<e.length;o++)if(!r(e[o],o))return!1;return!0}function EO(e,t,r){let o=!0;for(let i=t;i<e.length;i++)r(e[i],i)||(o=!1);return o}function hO(e,t){return Q(t,"__proto__")||Q(t,"constructor")?Object.prototype.hasOwnProperty.call(e,t):t in e}function TO(e){return Ki(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function xO(e){return Object.entries(e)}function Ki(e){return Object.getOwnPropertyNames(e)}function _O(e){return Object.getOwnPropertySymbols(e)}function AO(e){return Object.values(e)}function bO(e,t){if(!wr(t))return!1;let r=Ki(e);return Q(r.length,Ki(t).length)&&r.every(o=>Ms(e[o],t[o]))}function OO(e,t){return Mr(t)&&Q(e.length,t.length)&&e.every((r,o)=>Ms(e[o],t[o]))}function Ms(e,t){return Mr(e)?OO(e,t):wr(e)?bO(e,t):Q(e,t)}var Ye={};yt(Ye,{IsBigInt64Array:()=>vO,IsBigUint64Array:()=>jO,IsBoolean:()=>SO,IsDate:()=>qO,IsFloat32Array:()=>DO,IsFloat64Array:()=>GO,IsInt16Array:()=>LO,IsInt32Array:()=>wO,IsInt8Array:()=>kO,IsMap:()=>HO,IsNumber:()=>RO,IsRegExp:()=>FO,IsSet:()=>BO,IsString:()=>CO,IsTypeArray:()=>PO,IsUint16Array:()=>MO,IsUint32Array:()=>$O,IsUint8Array:()=>UO,IsUint8ClampedArray:()=>NO});function SO(e){return e instanceof Boolean}function RO(e){return e instanceof Number}function CO(e){return e instanceof String}function PO(e){return globalThis.ArrayBuffer.isView(e)}function kO(e){return e instanceof globalThis.Int8Array}function UO(e){return e instanceof globalThis.Uint8Array}function NO(e){return e instanceof globalThis.Uint8ClampedArray}function LO(e){return e instanceof globalThis.Int16Array}function MO(e){return e instanceof globalThis.Uint16Array}function wO(e){return e instanceof globalThis.Int32Array}function $O(e){return e instanceof globalThis.Uint32Array}function DO(e){return e instanceof globalThis.Float32Array}function GO(e){return e instanceof globalThis.Float64Array}function vO(e){return e instanceof globalThis.BigInt64Array}function jO(e){return e instanceof globalThis.BigUint64Array}function FO(e){return e instanceof globalThis.RegExp}function qO(e){return e instanceof globalThis.Date}function BO(e){return e instanceof globalThis.Set}function HO(e){return e instanceof globalThis.Map}function zO(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~guard")}function YO(e){return e.map(t=>ws(t))}function VO(e){let t={},r=Object.getOwnPropertyDescriptors(e);for(let o of Object.keys(r)){let i=r[o];a.HasPropertyKey(i,"value")&&Object.defineProperty(t,o,{...i,value:ws(i.value)})}return t}function WO(e){return new RegExp(e.source,e.flags)}function ws(e){return e instanceof RegExp?WO(e):zO(e)?e:a.IsArray(e)?YO(e):a.IsObject(e)?VO(e):e}function fo(e){return xt.clone+=1,ws(e)}var ut={};yt(ut,{Get:()=>JO,Reset:()=>QO,Set:()=>ZO});var $r={immutableTypes:!1,maxErrors:8,useEval:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1};function QO(){$r.immutableTypes=!1,$r.maxErrors=8,$r.useEval=!0,$r.exactOptionalPropertyTypes=!1,$r.enumerableKind=!1}function ZO(e){for(let t of a.Keys(e)){let r=e[t];r!==void 0&&Object.defineProperty($r,t,{value:r})}}function JO(){return $r}function XO(e,t,r={}){for(let o of Object.keys(t))Object.defineProperty(e,o,{configurable:!0,writable:!0,enumerable:!1,value:t[o]});return e}function hu(e,t){return{...e,...t}}function eS(e,t,r={}){xt.create+=1;let o=ut.Get(),i=hu(t,r),s=o.enumerableKind?hu(i,e):XO(i,e);return o.immutableTypes?Object.freeze(s):s}function tS(e,t){xt.discard+=1;let r={},o=Object.getOwnPropertyDescriptors(fo(e)),i=new Set(t);for(let s of Object.keys(o))i.has(s)||Object.defineProperty(r,s,o[s]);return r}function rS(e,t,r){xt.update+=1;let o=ut.Get(),i=fo(e);for(let s of Object.keys(t))Object.defineProperty(i,s,{configurable:!0,writable:!0,enumerable:o.enumerableKind,value:t[s]});for(let s of Object.keys(r))Object.defineProperty(i,s,{configurable:!0,enumerable:!0,writable:!0,value:r[s]});return i}function T(e,t){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.IsEqual(e["~kind"],t)}function _(e){return a.IsObject(e)}function Tu(e){return f.Create({"~kind":"OptionalAddAction"},{type:e},{})}function xu(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"OptionalAddAction")&&_(e.type)}function _u(e){return f.Create({"~kind":"OptionalRemoveAction"},{type:e},{})}function Au(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"OptionalRemoveAction")&&_(e.type)}function bu(e){return f.Create({"~kind":"ReadonlyAddAction"},{type:e},{})}function Ou(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"ReadonlyAddAction")&&_(e.type)}function Su(e){return f.Create({"~kind":"ReadonlyRemoveAction"},{type:e},{})}function Ru(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"ReadonlyRemoveAction")&&_(e.type)}function R(e,t,r){return f.Create({"~kind":"Deferred"},{action:e,parameters:t,options:r},{})}function Cu(e){return T(e,"Deferred")}function $s(e){return f.Update(e,{"~immutable":!0},{})}function pr(e){return $s(e)}function Dr(e){return _(e)&&a.HasPropertyKey(e,"~immutable")}function En(e){return f.Discard(e,["~optional"])}function Xe(e){return f.Update(e,{"~optional":!0},{})}function Vi(e){return Xe(e)}function Re(e){return _(e)&&a.HasPropertyKey(e,"~optional")}function Wi(e){return f.Discard(e,["~readonly"])}function et(e){return f.Update(e,{"~readonly":!0},{})}function Qi(e){return et(e)}function Gr(e){return _(e)&&a.HasPropertyKey(e,"~readonly")}function _t(e,t){return f.Create({"~kind":"Array"},{type:"array",items:e},t)}function Z(e){return T(e,"Array")}function Zi(e){return f.Discard(e,["~kind","type","items"])}function Ct(e,t){return f.Create({"~kind":"AsyncIterator"},{type:"asyncIterator",iteratorItems:e},t)}function Ke(e){return T(e,"AsyncIterator")}function Pu(e){return f.Discard(e,["~kind","type","iteratorItems"])}function ku(e){return{enumerable:ut.Get().enumerableKind,writable:!1,configurable:!1,value:e}}var Ji=class{constructor(){globalThis.Object.defineProperty(this,"~kind",ku("Base")),globalThis.Object.defineProperty(this,"~guard",ku({check:t=>this.Check(t),errors:t=>this.Errors(t)}))}Check(t){return!0}Errors(t){return[]}Convert(t){return t}Clean(t){return t}Default(t){return t}Create(){throw new Error("Create not implemented")}Clone(){throw Error("Clone not implemented")}};function lt(e){return T(e,"Base")}function cr(e,t,r={}){return f.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},r)}function Ce(e){return T(e,"Constructor")}function Uu(e){return f.Discard(e,["~kind","type","parameters","instanceType"])}function ur(e,t,r={}){return f.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},r)}function Pe(e){return T(e,"Function")}function Nu(e){return f.Discard(e,["~kind","type","parameters","returnType"])}function _e(e,t){return f.Create({"~kind":"Ref"},{$ref:e},t)}function oe(e){return T(e,"Ref")}function lr(e,t){return f.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function hn(e){return T(e,"Generic")}var Lu="(?!)";function z(e){return f.Create({"~kind":"Never"},{not:{}},e)}function Kt(e){return T(e,"Never")}function nS(){return["(not-resolvable)",z()]}function oS(){return["(not-generic)",z()]}function iS(e,t,r){return[e,lr(t,r)]}function aS(e,t,r){return t in e?Mu(e,t,e[t],r):nS()}function Mu(e,t,r,o){return hn(r)?iS(t,r.parameters,r.expression):oe(r)?aS(e,r.$ref,o):oS()}function wu(e,t,r){return Mu(e,"(anonymous)",t,r)}function Pt(e,t,r){let o=a.Keys(e).reduce((i,s)=>({...i,[s]:f.Update(e[s],{},{$id:s})}),{});return f.Create({"~kind":"Cyclic"},{$defs:o,$ref:t},r)}function ie(e){return T(e,"Cyclic")}var ee={};yt(ee,{Match:()=>sS});function sS(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}function Ge(e){return f.Create({"~kind":"Unknown"},{},e)}function tt(e){return T(e,"Unknown")}function go(...e){let[t,r]=ee.Match(e,{2:(o,i)=>[o,i,i],1:o=>[o,Ge(),Ge()]});return f.Create({"~kind":"Infer"},{type:"infer",name:t,extends:r},{})}function ye(e){return T(e,"Infer")}function Tn(e){return f.Create({"~kind":"Any"},{},e)}function Ve(e){return T(e,"Any")}function $u(e){return a.IsObjectNotArray(e)}function Du(e){return a.Keys(e).filter(r=>isNaN(r)).reduce((r,o)=>[...r,e[o]],[])}function Gu(e,t){let r=$u(e)?Du(e):e;return f.Create({"~kind":"Enum"},{enum:r},t)}function Ie(e){return T(e,"Enum")}function dt(e,t={}){return f.Create({"~kind":"Intersect"},{allOf:e},t)}function P(e){return T(e,"Intersect")}function vu(e){return f.Discard(e,["~kind","allOf"])}function j(){throw new Error("Unreachable")}var fr={};yt(fr,{Hash:()=>OS,HashCode:()=>zu});function mS(e){let t=new Set,r=e;for(;r&&r!==Object.prototype;){for(let o of Reflect.ownKeys(r))o!=="constructor"&&typeof o!="symbol"&&t.add(o);r=Object.getPrototypeOf(r)}return[...t]}function pS(e){return typeof e=="number"}var We;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(We||(We={}));var xn=BigInt("14695981039346656037"),[cS,uS]=[BigInt("1099511628211"),BigInt("18446744073709551616")],lS=Array.from({length:256}).map((e,t)=>BigInt(t)),Bu=new Float64Array(1),Hu=new DataView(Bu.buffer),Ku=new Uint8Array(Bu.buffer);function ve(e){xn=xn^lS[e],xn=xn*cS%uS}function dS(e){ve(We.Array);for(let t of e)dr(t)}function fS(e){ve(We.BigInt),Hu.setBigInt64(0,e);for(let t of Ku)ve(t)}function Fu(e){ve(We.Boolean),ve(e?1:0)}function gS(e){ve(We.Constructor),dr(e.toString())}function yS(e){ve(We.Date),dr(e.getTime())}function IS(e){ve(We.Function),dr(e.toString())}function ES(e){ve(We.Null)}function qu(e){ve(We.Number),Hu.setFloat64(0,e,!0);for(let t of Ku)ve(t)}function hS(e){ve(We.Object);for(let t of mS(e).sort())dr(t),dr(e[t])}function TS(e){ve(We.RegExp),Ds(e.toString())}var xS=new TextEncoder;function Ds(e){ve(We.String);for(let t of xS.encode(e))ve(t)}function _S(e){ve(We.Symbol),dr(e.toString())}function AS(e){ve(We.TypeArray);let t=new Uint8Array(e.buffer);for(let r=0;r<t.length;r++)ve(t[r])}function bS(e){return ve(We.Undefined)}function dr(e){return Ye.IsTypeArray(e)?AS(e):Ye.IsDate(e)?yS(e):Ye.IsRegExp(e)?TS(e):Ye.IsBoolean(e)?Fu(e.valueOf()):Ye.IsString(e)?Ds(e.valueOf()):Ye.IsNumber(e)?qu(e.valueOf()):pS(e)?qu(e):a.IsArray(e)?dS(e):a.IsBoolean(e)?Fu(e):a.IsBigInt(e)?fS(e):a.IsConstructor(e)?gS(e):a.IsNull(e)?ES(e):a.IsObject(e)?hS(e):a.IsString(e)?Ds(e):a.IsSymbol(e)?_S(e):a.IsUndefined(e)?bS(e):a.IsFunction(e)?IS(e):j()}function zu(e){return xn=BigInt("14695981039346656037"),dr(e),xn}function OS(e){return zu(e).toString(16).padStart(16,"0")}function Yu(e){switch(e.keyword){case"additionalProperties":return"must not have additional properties";case"anyOf":return"must match a schema in anyOf";case"boolean":return"schema is false";case"const":return"must be equal to constant";case"contains":return"must contain at least 1 valid item";case"dependencies":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"dependentRequired":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"enum":return"must be equal to one of the allowed values";case"exclusiveMaximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"exclusiveMinimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"format":return`must match format "${e.params.format}"`;case"if":return`must match "${e.params.failingKeyword}" schema`;case"maxItems":return`must not have more than ${e.params.limit} items`;case"maxLength":return`must not have more than ${e.params.limit} characters`;case"maxProperties":return`must not have more than ${e.params.limit} properties`;case"maximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"minItems":return`must not have fewer than ${e.params.limit} items`;case"minLength":return`must not have fewer than ${e.params.limit} characters`;case"minProperties":return`must not have fewer than ${e.params.limit} properties`;case"minimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"multipleOf":return`must be multiple of ${e.params.multipleOf}`;case"not":return"must not be valid";case"oneOf":return"must match exactly one schema in oneOf";case"pattern":return`must match pattern "${e.params.pattern}"`;case"propertyNames":return`property names ${e.params.propertyNames.join(", ")} are invalid`;case"required":return`must have required properties ${e.params.requiredProperties.join(", ")}`;case"type":return typeof e.params.type=="string"?`must be ${e.params.type}`:`must be either ${e.params.type.join(" or ")}`;case"unevaluatedItems":return"must not have unevaluated items";case"unevaluatedProperties":return"must not have unevaluated properties";case"uniqueItems":return"must not have duplicate items";case"~guard":return"must match check function";case"~refine":return e.params.message;default:return"an unknown validation error occurred"}}var SS=Yu;function Vu(){return SS}var yo=class{constructor(t,r){this.type=t,this.decode=r}Encode(t){let r=this.type,o=vr(r)?p=>this.decode(r["~codec"].decode(p)):this.decode,i=vr(r)?p=>r["~codec"].encode(t(p)):t,s={decode:o,encode:i};return f.Update(this.type,{"~codec":s},{})}},Io=class{constructor(t){this.type=t}Decode(t){return new yo(this.type,t)}};function Xi(e){return new Io(e)}function Qu(e,t){return Xi(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function Zu(e,t){return Xi(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function vr(e){return _(e)&&a.HasPropertyKey(e,"~codec")&&a.IsObject(e["~codec"])&&a.HasPropertyKey(e["~codec"],"encode")&&a.HasPropertyKey(e["~codec"],"decode")}function CS(e,t){let r=ea(e)?[...e["~refine"],t]:[t];return f.Update(e,{"~refine":r},{})}function Ju(e,t,r="error"){return CS(e,{refine:t,message:r})}function ea(e){return _(e)&&a.HasPropertyKey(e,"~refine")}var Xu="-?(?:0|[1-9][0-9]*)n";function Eo(e){return f.Create({"~kind":"BigInt"},{type:"bigint"},e)}function at(e){return T(e,"BigInt")}function ta(e){return f.Create({"~kind":"Boolean"},{type:"boolean"},e)}function Qe(e){return T(e,"Boolean")}function ho(e){return f.Create({"~kind":"Identifier"},{name:e})}function el(e){return T(e,"Identifier")}var ra="-?(?:0|[1-9][0-9]*)";function jr(e){return f.Create({"~kind":"Integer"},{type:"integer"},e)}function Le(e){return T(e,"Integer")}function kt(e,t){return f.Create({"~kind":"Iterator"},{type:"iterator",iteratorItems:e},t)}function ze(e){return T(e,"Iterator")}function tl(e){return f.Discard(e,["~kind","type","iteratorItems"])}var Gs=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function PS(e){return a.IsBigInt(e)?"bigint":a.IsBoolean(e)?"boolean":a.IsNumber(e)?"number":a.IsString(e)?"string":(()=>{throw new Gs(e)})()}function q(e,t){return f.Create({"~kind":"Literal"},{type:PS(e),const:e},t)}function na(e){return a.IsBigInt(e)||a.IsBoolean(e)||a.IsNumber(e)||a.IsString(e)}function rl(e){return Y(e)&&a.IsBigInt(e.const)}function nl(e){return Y(e)&&a.IsBoolean(e.const)}function _n(e){return Y(e)&&a.IsNumber(e.const)}function An(e){return Y(e)&&a.IsString(e.const)}function Y(e){return T(e,"Literal")}function gr(e){return f.Create({"~kind":"Null"},{type:"null"},e)}function Ut(e){return T(e,"Null")}var oa="-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?";function ft(e){return f.Create({"~kind":"Number"},{type:"number"},e)}function ue(e){return T(e,"Number")}function bn(e){return f.Create({"~kind":"Symbol"},{type:"symbol"},e)}function Nt(e){return T(e,"Symbol")}function ol(e){return a.Keys(e).filter(t=>!Re(e[t]))}function il(e){return a.Keys(e)}function ia(e){return a.Values(e)}function kS(e,t={}){let r=ol(e),o=r.length>0?{required:r}:{};return f.Create({"~kind":"Object"},{type:"object",...o,properties:e},t)}var k=kS;function L(e){return T(e,"Object")}function al(e){return f.Discard(e,["~kind","type","properties","required"])}function Fr(...e){let[t,r,o]=ee.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[i,s,s],1:i=>[i,Ge(),Ge()]});return f.Create({"~kind":"Parameter"},{name:t,extends:r,equals:o},{})}function sl(e){return T(e,"Parameter")}function Lt(e,t){return f.Create({"~kind":"Promise"},{type:"promise",item:e},t)}function je(e){return T(e,"Promise")}function ml(e){return f.Discard(e,["~kind","type","item"])}var aa=".*";function rt(e){return f.Create({"~kind":"String"},{type:"string"},e)}function Ae(e){return T(e,"String")}function nt(e,t){let r="object",o={[e]:t};return f.Create({"~kind":"Record"},{type:r,patternProperties:o})}var On=`^${ra}$`,Sn=`^${oa}$`,Mt=`^${aa}$`;function To(e,t,r={}){return R("Record",[e,t],r)}function US(e,t,r={}){return S({},To(e,t,r))}function sa(e,t,r={}){return US(e,t,r)}function pl(e,t){return nt(e,t)}function st(e){return a.Keys(e.patternProperties)[0]}function Rn(e){let t=st(e);return a.IsEqual(t,On)?jr():a.IsEqual(t,Sn)?ft():rt()}function Fe(e){return e.patternProperties[st(e)]}function le(e){return T(e,"Record")}function qr(e){return f.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function yr(e){return T(e,"Rest")}function ma(e){return f.Create({"~kind":"This"},{$ref:"#"},e)}function cl(e){return T(e,"This")}function Me(e,t={}){let[r,o,i]=[e,e.length,!1];return f.Create({"~kind":"Tuple"},{type:"array",additionalItems:i,items:r,minItems:o},t)}function B(e){return T(e,"Tuple")}function ul(e){return f.Discard(e,["~kind","type","items","minItems","additionalItems"])}function Cn(e){return f.Create({"~kind":"Undefined"},{type:"undefined"},e)}function wt(e){return T(e,"Undefined")}function G(e,t={}){return f.Create({"~kind":"Union"},{anyOf:e},t)}function x(e){return T(e,"Union")}function ll(e){return f.Discard(e,["~kind","anyOf"])}function dl(e){return f.Create({"~kind":"Unsafe"},{},e)}function fl(e){return T(e,"Unsafe")}function pa(e){return f.Create({"~kind":"Void"},{type:"void"},e)}function mt(e){return T(e,"Void")}function LS(e,t){return a.IsEqual(e,"Array")?_t(t[0]):a.IsEqual(e,"AsyncIterator")?Ct(t[0]):a.IsEqual(e,"Iterator")?kt(t[0]):a.IsEqual(e,"Promise")?Lt(t[0]):a.IsEqual(e,"Awaited")?vo(t[0]):a.IsEqual(e,"Capitalize")?_o(t[0]):a.IsEqual(e,"ConstructorParameters")?Ro(t[0]):a.IsEqual(e,"Evaluate")?js(t[0]):a.IsEqual(e,"Exclude")?Co(t[0],t[1]):a.IsEqual(e,"Extract")?Po(t[0],t[1]):a.IsEqual(e,"Index")?Un(t[0],t[1]):a.IsEqual(e,"InstanceType")?ko(t[0]):a.IsEqual(e,"Lowercase")?Ao(t[0]):a.IsEqual(e,"NonNullable")?Uo(t[0]):a.IsEqual(e,"Omit")?No(t[0],t[1]):a.IsEqual(e,"Options")?Ln(t[0],t[1]):a.IsEqual(e,"Parameters")?Lo(t[0]):a.IsEqual(e,"Partial")?Mo(t[0]):a.IsEqual(e,"Pick")?wo(t[0],t[1]):a.IsEqual(e,"Readonly")?$o(t[0]):a.IsEqual(e,"KeyOf")?Nn(t[0]):a.IsEqual(e,"Record")?To(t[0],t[1]):a.IsEqual(e,"Required")?Do(t[0]):a.IsEqual(e,"ReturnType")?Go(t[0]):a.IsEqual(e,"Uncapitalize")?bo(t[0]):a.IsEqual(e,"Uppercase")?Oo(t[0]):ca(_e(e),t)}function Br(){throw Error("Unreachable")}var MS=(e,t=[])=>e.reduce((r,o)=>a.IsArray(o)&&a.IsEqual(o.length,2)?[...r,o[0]]:[...r,o],[]),zt=e=>{let[t,r]=e;return MS([...t,...r])};function hl(e){return Fr(e[0],e[2],e[4])}function Tl(e){return Fr(e[0],e[2],e[2])}function xl(e){return Fr(e[0],Ge(),e[2])}function _l(e){return Fr(e,Ge(),Ge())}function Al(e){return zt(e)}function bl(e){return e[1]}function Ol(e){return zt(e)}function Sl(e){return e[1]}function Rl(e){return LS(e[0],e[1])}function Cl(e){return null}function Pl(e){return rt()}function kl(e){return ft()}function Ul(e){return ta()}function Nl(e){return Cn()}function Ll(e){return gr()}function Ml(e){return jr()}function wl(e){return Eo()}function $l(e){return Ge()}function Dl(e){return Tn()}function Gl(e){return k({})}function vl(e){return z()}function jl(e){return bn()}function Fl(e){return pa()}function ql(e){return ma()}function Bl(e){return e[1]}function Hl(e){return q(e)}function Kl(e){return a.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function zl(e){return e[1]}function Yl(e){return xo(e)}function Vl(e){return q(BigInt(e))}function Wl(e){return q(a.IsEqual(e,"true"))}function Ql(e){return q(parseFloat(e))}function Zl(e){return q(e)}function Jl(e){return e.length>0}function Xl(e){return e.reduce((t,r)=>a.IsEqual(r.length,3)?[...t,[r[1]]]:[...t,[]],[])}function ed(e){return a.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function td(e){return a.IsArray(e)&&a.IsEqual(e.length,3)?e[1]:e}var gl=(e,t)=>t.reduceRight((r,o)=>{let i=o;return a.IsEqual(i.length,1)?Un(r,i[0]):a.IsEqual(i.length,0)?_t(r):Br()},e),yl=(e,t)=>a.IsEqual(t.length,3)?So(e,t[0],t[1],t[2]):e;function rd(e){let[t,r,o,i]=e;return yl(t?Nn(gl(r,o)):gl(r,o),i)}function vs(e,t){return a.IsEqual(t.length,3)?(()=>{let[r,o,i]=t,s=vs(o,i);if(a.IsEqual(r,"&"))return P(s)?dt([e,...s.allOf]):dt([e,s]);if(a.IsEqual(r,"|"))return x(s)?G([e,...s.anyOf]):G([e,s]);Br()})():e}function nd(e){let[t,r]=e;return vs(t,r)}function od(e){let[t,r]=e;return vs(t,r)}function id(e){return $s(e[1])}function ad(e){return e[1]}function sd(e){return lr(e[0],e[2])}function md(e){return a.IsEqual(e.length,4)?go(e[1],e[3]):a.IsEqual(e.length,2)?go(e[1],Ge()):Br()}function pd(e){return`${e}`}function cd(e){return Le(e[3])?On:ue(e[3])?Sn:Nt(e[3])?Mt:Ae(e[3])?Mt:Br()}function ud(e){return e.length>0}function ld(e){return e.length>0}function dd(e){let[t,r,o,i,s]=e;return{[r]:t&&o?et(Xe(s)):t&&!o?et(s):!t&&o?Xe(s):s}}function fd(e){return zt(e)}function gd(e){return e.reduce((t,r)=>a.HasPropertyKey(r,On)||a.HasPropertyKey(r,Sn)||a.HasPropertyKey(r,Mt)?[t[0],f.Assign(t[1],r)]:[f.Assign(t[0],r),t[1]],[{},{}])}function yd(e){return gd(e[1])}function Id(e){let[t,r]=e,o=a.IsEqual(a.Keys(r).length,0)?{}:{patternProperties:r};return k(t,o)}function Ed(e){return a.IsEqual(e.length,5)?et(Xe(e[4])):a.IsEqual(e.length,3)?e[2]:a.IsEqual(e.length,4)?a.IsEqual(e[2],"readonly")?et(e[3]):Xe(e[3]):Br()}function hd(e){return et(Xe(e[1]))}function Td(e){return et(e[1])}function xd(e){return Xe(e[0])}function _d(e){return a.IsEqual(e.length,2)?qr(e[1]):a.IsEqual(e.length,1)?e[0]:Br()}function Ad(e){return zt(e)}function bd(e){return Me(e[1])}function Od(e){return et(Xe(e[4]))}function Sd(e){return et(e[3])}function Rd(e){return Xe(e[3])}function Cd(e){return e[2]}function Pd(e){return a.IsEqual(e.length,2)?qr(e[1]):a.IsEqual(e.length,1)?e[0]:Br()}function kd(e){return zt(e)}function Ud(e){return ur(e[1],e[4])}function Nd(e){return cr(e[2],e[5])}function Il(e,t){return a.IsEqual(e,"remove")?Su(t):a.IsEqual(e,"add")?bu(t):t}function Ld(e){return a.IsEqual(e.length,2)&&a.IsEqual(e[0],"-")?"remove":a.IsEqual(e.length,2)&&a.IsEqual(e[0],"+")||a.IsEqual(e.length,1)?"add":"none"}function El(e,t){return a.IsEqual(e,"remove")?_u(t):a.IsEqual(e,"add")?Tu(t):t}function Md(e){return a.IsEqual(e.length,2)&&a.IsEqual(e[0],"-")?"remove":a.IsEqual(e.length,2)&&a.IsEqual(e[0],"+")||a.IsEqual(e.length,1)?"add":"none"}function wd(e){return a.IsEqual(e.length,2)?[e[1]]:[]}function $d(e){return a.IsArray(e[6])&&a.IsEqual(e[6].length,1)?Pn(ho(e[3]),e[5],e[6][0],Il(e[1],El(e[8],e[10]))):Pn(ho(e[3]),e[5],_e(e[3]),Il(e[1],El(e[8],e[10])))}function Dd(e){return _e(e)}function Gd(e){return Ln(e[2],e[4])}function vd(e){return parseFloat(e)}function jd(e){return a.IsEqual(e,"true")}function Fd(e){return null}function qd(e){return{[e[0]]:e[2]}}function Bd(e){return zt(e)}function wS(e){return e.reduce((t,r)=>f.Assign(t,r),{})}function Hd(e){return wS(e[1])}function Kd(e){return zt(e)}function zd(e){return e[1]}function Yd(e){return Eo()}function Vd(e){return rt()}function Wd(e){return ft()}function Qd(e){return jr()}function Zd(e){return z()}function Jd(e){return q(e)}function Xd(e){return G(e[1])}function ef(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function tf(e){return[e[0],...e[1]]}function rf(e){return e[1]}function nf(e){return zt(e)}function of(e){return a.IsEqual(e.length,2)?e[1]:[]}function af(e){let t=e[2],r=e[3],[o,i]=e[4],s=a.IsEqual(a.Keys(i).length,0)?{}:{patternProperties:i};return{[e[1]]:lr(t,kn(r,o,s))}}function sf(e){let t=e[2],[r,o]=e[3],i=a.IsEqual(a.Keys(o).length,0)?{}:{patternProperties:o};return{[e[1]]:kn(t,r,i)}}function mf(e){return{[e[1]]:lr(e[2],e[4])}}function pf(e){return{[e[1]]:e[3]}}function cf(e){return null}function uf(e){return gd(zt(e))}function lf(e){return e[1]}function df(e){let t=e[0],r=e[1];return Fs(f.Assign(t,r[0]))}function te(e){return Mr(e)&&Q(e.length,2)}function GS(e,t){return Q(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function ke(e,t){let[r,...o]=e;return mr(r)?(()=>{let i=GS(r,t);return Q(i.length,2)?i:ke(o,t)})():[]}function qs(e,t){return Array.from({length:t-e+1},(r,o)=>String.fromCharCode(e+o))}var ff=[...qs(97,122),...qs(65,90)],Bs="0",Hs=qs(49,57),Mn=[Bs,...Hs],gf=" ",wn=`
28
+ `;var Ir="_",ua=".",yf="$",la="-";var If="//",Ef="/*",jS="*/";function hf(e){let t=e.indexOf(jS);return Q(t,-1)?"":e.slice(t+2)}function Tf(e){let t=e.indexOf(wn);return Q(t,-1)?"":e.slice(t)}function FS(e){return e.replace(/^[ \t\r\f\v]+/,"")}function da(e){let t=FS(e);return t.startsWith(Ef)?da(hf(t.slice(2))):t.startsWith(If)?da(Tf(t.slice(2))):t}function ot(e){let t=e.trimStart();return t.startsWith(Ef)?ot(hf(t.slice(2))):t.startsWith(If)?ot(Tf(t.slice(2))):t}function qS(e,t){return e.includes(t)}function $n(e,t,r,o=""){let i=ke(e,r);return te(i)?qS(t,i[0])?$n(e,t,i[1],o):$n(e,t,i[1],`${o}${i[0]}`):[o,r]}function fa(e,t){let r=ke([e],t);return te(r)?r:["",t]}function BS(e){return fa(la,e)}function HS(e){return ke(Hs,e)}var KS=[...Mn,Ir];function zS(e){return $n(KS,[Ir],e)}function YS(e){let t=BS(e);return te(t)?(()=>{let r=ke([Bs],t[1]);return te(r)?[`${t[0]}${r[0]}`,r[1]]:(()=>{let o=HS(t[1]);return te(o)?(()=>{let i=zS(o[1]);return te(i)?[`${t[0]}${o[0]}${i[0]}`,i[1]]:[]})():[]})()})():[]}function ga(e){return YS(ot(e))}function VS(e){let t=ga(e);return te(t)?(()=>{let r=ke(["n"],t[1]);return te(r)?[`${t[0]}`,r[1]]:[]})():[]}function xf(e){return VS(e)}function Ks(e,t){return ke([e],t)}function I(e,t){return Q(e,"")?["",t]:e.startsWith(wn)?Ks(e,da(t)):e.startsWith(gf)?Ks(e,t):Ks(e,ot(t))}var _f=[...ff,Ir,yf];function WS(e){return ke(_f,e)}var QS=[..._f,...Mn];function Af(e,t=""){let r=ke(QS,e);return te(r)?Af(r[1],`${t}${r[0]}`):[t,e]}function ZS(e){let t=WS(e);return te(t)?(()=>{let r=Af(t[1]);return te(r)?[`${t[0]}${r[0]}`,r[1]]:[]})():[]}function de(e){return ZS(ot(e))}var JS=[...Mn,Ir];function XS(e){return fa(la,e)}function eR(e){return te(ke([ua],e))}function bf(e){let t=$n(JS,[Ir],e);return te(t)?Q(t[0],"")?[]:[t[0],t[1]]:[]}function tR(e,t){let r=ke([ua],t);return te(r)?(()=>{let o=bf(r[1]);return te(o)?[`${e}0${r[0]}${o[0]}`,o[1]]:[]})():[]}function rR(e,t){let r=ga(t);return te(r)?(()=>{let o=ke([ua],r[1]);return te(o)?(()=>{let i=bf(o[1]);return te(i)?[`${e}${r[0]}${o[0]}${i[0]}`,i[1]]:[`${e}${r[0]}`,o[1]]})():[`${e}${r[0]}`,r[1]]})():[]}function nR(e){let t=XS(e);return te(t)?eR(t[1])?tR(t[0],t[1]):rR(t[0],t[1]):[]}function ya(e){return nR(ot(e))}function Of(e,t){let[r,...o]=e;return mr(r)?t.startsWith(r)?!0:Of(o,t):!1}function Er(e,t,r=""){return Q(t,"")?[]:Of(e,t)?[r,t]:(()=>{let[o,i]=[t.slice(0,1),t.slice(1)];return Er(e,i,`${r}${o}`)})()}function oR(e,t,r){return r.startsWith(e)?(()=>{let o=Er([t],r.slice(e.length));return te(o)?o[1].startsWith(t)?[`${o[0]}`,o[1].slice(t.length)]:[]:[]})():[]}function iR(e,t,r){return r.startsWith(e)?(()=>{let o=Er([wn,t],r.slice(e.length));return te(o)?o[1].startsWith(t)?[`${o[0]}`,o[1].slice(t.length)]:[]:[]})():[]}function Sf(e,t,r,o){return r?oR(e,t,ot(o)):iR(e,t,ot(o))}function aR(e,t){return ke(e,t)}function sR(e,t){return Sf(e,e,!1,t)}function mR(e,t){let r=aR(e,t);return te(r)?sR(r[0],`${r[0]}${r[1]}`):[]}function Ia(e,t){return mR(e,ot(t))}function Rf(e,t){let r=Er(e,t);return te(r)?Q(r[0],"")?[]:r:[]}var m=(e,t,r=()=>[])=>e.length===2?t(e):r(),cR=e=>m(m(de(e),([t,r])=>m(I("extends",r),([o,i])=>m(V(i),([s,p])=>m(I("=",p),([u,l])=>m(V(l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[hl(t),r]),uR=e=>m(m(de(e),([t,r])=>m(I("extends",r),([o,i])=>m(V(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[Tl(t),r]),lR=e=>m(m(de(e),([t,r])=>m(I("=",r),([o,i])=>m(V(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[xl(t),r]),dR=e=>m(de(e),([t,r])=>[_l(t),r]),kf=e=>m(m(cR(e),([t,r])=>[t,r],()=>m(uR(e),([t,r])=>[t,r],()=>m(lR(e),([t,r])=>[t,r],()=>m(dR(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),Uf=(e,t=[])=>m(m(kf(e),([r,o])=>m(I(",",o),([i,s])=>[[r,i],s])),([r,o])=>Uf(o,[...t,r]),()=>[t,e]),fR=e=>m(m(Uf(e),([t,r])=>m(m(m(kf(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Al(t),r]),Vs=e=>m(m(I("<",e),([t,r])=>m(fR(r),([o,i])=>m(I(">",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[bl(t),r]),Nf=(e,t=[])=>m(m(V(e),([r,o])=>m(I(",",o),([i,s])=>[[r,i],s])),([r,o])=>Nf(o,[...t,r]),()=>[t,e]),gR=e=>m(m(Nf(e),([t,r])=>m(m(m(V(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Ol(t),r]),yR=e=>m(m(I("<",e),([t,r])=>m(gR(r),([o,i])=>m(I(">",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[Sl(t),r]),IR=e=>m(m(de(e),([t,r])=>m(yR(r),([o,i])=>[[t,o],i])),([t,r])=>[Rl(t),r]),Lf=e=>m(m(m(I(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Cl(t),r]),Mf=e=>m(I("string",e),([t,r])=>[Pl(t),r]),wf=e=>m(I("number",e),([t,r])=>[kl(t),r]),ER=e=>m(I("boolean",e),([t,r])=>[Ul(t),r]),hR=e=>m(I("undefined",e),([t,r])=>[Nl(t),r]),TR=e=>m(I("null",e),([t,r])=>[Ll(t),r]),$f=e=>m(I("integer",e),([t,r])=>[Ml(t),r]),xR=e=>m(I("bigint",e),([t,r])=>[wl(t),r]),_R=e=>m(I("unknown",e),([t,r])=>[$l(t),r]),AR=e=>m(I("any",e),([t,r])=>[Dl(t),r]),bR=e=>m(I("object",e),([t,r])=>[Gl(t),r]),OR=e=>m(I("never",e),([t,r])=>[vl(t),r]),Df=e=>m(I("symbol",e),([t,r])=>[jl(t),r]),SR=e=>m(I("void",e),([t,r])=>[Fl(t),r]),RR=e=>m(I("this",e),([t,r])=>[ql(t),r]),CR=e=>m(m(Mf(e),([t,r])=>[t,r],()=>m(wf(e),([t,r])=>[t,r],()=>m(ER(e),([t,r])=>[t,r],()=>m(hR(e),([t,r])=>[t,r],()=>m(TR(e),([t,r])=>[t,r],()=>m($f(e),([t,r])=>[t,r],()=>m(xR(e),([t,r])=>[t,r],()=>m(_R(e),([t,r])=>[t,r],()=>m(AR(e),([t,r])=>[t,r],()=>m(bR(e),([t,r])=>[t,r],()=>m(OR(e),([t,r])=>[t,r],()=>m(Df(e),([t,r])=>[t,r],()=>m(SR(e),([t,r])=>[t,r],()=>m(RR(e),([t,r])=>[t,r],()=>[])))))))))))))),([t,r])=>[t,r]),PR=e=>m(m(I("${",e),([t,r])=>m(V(r),([o,i])=>m(I("}",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[Bl(t),r]),zs=e=>m(Er(["${","`"],e),([t,r])=>[Hl(t),r]),Gf=e=>m(m(m(zs(e),([t,r])=>m(PR(r),([o,i])=>m(Gf(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[t,r],()=>m(m(zs(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m(zs(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[Kl(t),r]),Ws=e=>m(m(I("`",e),([t,r])=>m(Gf(r),([o,i])=>m(I("`",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[zl(t),r]),kR=e=>m(Ws(e),([t,r])=>[Yl(t),r]),UR=e=>m(xf(e),([t,r])=>[Vl(t),r]),NR=e=>m(m(I("true",e),([t,r])=>[t,r],()=>m(I("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[Wl(t),r]),LR=e=>m(ya(e),([t,r])=>[Ql(t),r]),MR=e=>m(Ia(["'",'"'],e),([t,r])=>[Zl(t),r]),wR=e=>m(m(UR(e),([t,r])=>[t,r],()=>m(NR(e),([t,r])=>[t,r],()=>m(LR(e),([t,r])=>[t,r],()=>m(MR(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),$R=e=>m(m(m(I("keyof",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Jl(t),r]),vf=(e,t=[])=>m(m(m(I("[",e),([r,o])=>m(V(o),([i,s])=>m(I("]",s),([p,u])=>[[r,i,p],u]))),([r,o])=>[r,o],()=>m(m(I("[",e),([r,o])=>m(I("]",o),([i,s])=>[[r,i],s])),([r,o])=>[r,o],()=>[])),([r,o])=>vf(o,[...t,r]),()=>[t,e]),DR=e=>m(vf(e),([t,r])=>[Xl(t),r]),GR=e=>m(m(m(I("extends",e),([t,r])=>m(V(r),([o,i])=>m(I("?",i),([s,p])=>m(V(p),([u,l])=>m(I(":",l),([g,y])=>m(V(y),([E,O])=>[[t,o,s,u,g,E],O])))))),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[ed(t),r]),vR=e=>m(m(m(I("(",e),([t,r])=>m(V(r),([o,i])=>m(I(")",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[t,r],()=>m(CR(e),([t,r])=>[t,r],()=>m(ZR(e),([t,r])=>[t,r],()=>m(nC(e),([t,r])=>[t,r],()=>m(kR(e),([t,r])=>[t,r],()=>m(wR(e),([t,r])=>[t,r],()=>m(pC(e),([t,r])=>[t,r],()=>m(mC(e),([t,r])=>[t,r],()=>m(dC(e),([t,r])=>[t,r],()=>m(gC(e),([t,r])=>[t,r],()=>m(IR(e),([t,r])=>[t,r],()=>m(fC(e),([t,r])=>[t,r],()=>[])))))))))))),([t,r])=>[td(t),r]),jf=e=>m(m($R(e),([t,r])=>m(vR(r),([o,i])=>m(DR(i),([s,p])=>m(GR(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[rd(t),r]),Ff=e=>m(m(m(I("&",e),([t,r])=>m(jf(r),([o,i])=>m(Ff(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),qf=e=>m(m(jf(e),([t,r])=>m(Ff(r),([o,i])=>[[t,o],i])),([t,r])=>[nd(t),r]),Bf=e=>m(m(m(I("|",e),([t,r])=>m(qf(r),([o,i])=>m(Bf(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Ea=e=>m(m(qf(e),([t,r])=>m(Bf(r),([o,i])=>[[t,o],i])),([t,r])=>[od(t),r]),jR=e=>m(m(I("readonly",e),([t,r])=>m(Ea(r),([o,i])=>[[t,o],i])),([t,r])=>[id(t),r]),FR=e=>m(m(I("|",e),([t,r])=>m(Ea(r),([o,i])=>[[t,o],i])),([t,r])=>[ad(t),r]),qR=e=>m(m(Vs(e),([t,r])=>m(I("=",r),([o,i])=>m(V(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[sd(t),r]),BR=e=>m(m(m(I("infer",e),([t,r])=>m(de(r),([o,i])=>m(I("extends",i),([s,p])=>m(Ea(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[t,r],()=>m(m(I("infer",e),([t,r])=>m(de(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>[])),([t,r])=>[md(t),r]),V=e=>m(m(BR(e),([t,r])=>[t,r],()=>m(FR(e),([t,r])=>[t,r],()=>m(jR(e),([t,r])=>[t,r],()=>m(Ea(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),HR=e=>m(ya(e),([t,r])=>[pd(t),r]),KR=e=>m(de(e),([t,r])=>[t,r]),zR=e=>m(Ia(["'",'"'],e),([t,r])=>[t,r]),YR=e=>m(m(I("[",e),([t,r])=>m(de(r),([o,i])=>m(I(":",i),([s,p])=>m(m($f(p),([u,l])=>[u,l],()=>m(wf(p),([u,l])=>[u,l],()=>m(Mf(p),([u,l])=>[u,l],()=>m(Df(p),([u,l])=>[u,l],()=>[])))),([u,l])=>m(I("]",l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[cd(t),r]),Hf=e=>m(m(HR(e),([t,r])=>[t,r],()=>m(KR(e),([t,r])=>[t,r],()=>m(zR(e),([t,r])=>[t,r],()=>m(YR(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),VR=e=>m(m(m(I("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[ud(t),r]),WR=e=>m(m(m(I("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[ld(t),r]),Kf=e=>m(m(VR(e),([t,r])=>m(Hf(r),([o,i])=>m(WR(i),([s,p])=>m(I(":",p),([u,l])=>m(V(l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[dd(t),r]),zf=e=>m(m(m(I(",",e),([t,r])=>m(I(`
29
+ `,r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(I(";",e),([t,r])=>m(I(`
30
+ `,r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(I(",",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m(I(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m(I(`
31
+ `,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),Yf=(e,t=[])=>m(m(Kf(e),([r,o])=>m(zf(o),([i,s])=>[[r,i],s])),([r,o])=>Yf(o,[...t,r]),()=>[t,e]),QR=e=>m(m(Yf(e),([t,r])=>m(m(m(Kf(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[fd(t),r]),Qs=e=>m(m(I("{",e),([t,r])=>m(QR(r),([o,i])=>m(I("}",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[yd(t),r]),ZR=e=>m(Qs(e),([t,r])=>[Id(t),r]),JR=e=>m(m(m(de(e),([t,r])=>m(I("?",r),([o,i])=>m(I(":",i),([s,p])=>m(I("readonly",p),([u,l])=>m(V(l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[t,r],()=>m(m(de(e),([t,r])=>m(I(":",r),([o,i])=>m(I("readonly",i),([s,p])=>m(V(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[t,r],()=>m(m(de(e),([t,r])=>m(I("?",r),([o,i])=>m(I(":",i),([s,p])=>m(V(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[t,r],()=>m(m(de(e),([t,r])=>m(I(":",r),([o,i])=>m(V(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[t,r],()=>[])))),([t,r])=>[Ed(t),r]),XR=e=>m(m(I("readonly",e),([t,r])=>m(V(r),([o,i])=>m(I("?",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[hd(t),r]),eC=e=>m(m(I("readonly",e),([t,r])=>m(V(r),([o,i])=>[[t,o],i])),([t,r])=>[Td(t),r]),tC=e=>m(m(V(e),([t,r])=>m(I("?",r),([o,i])=>[[t,o],i])),([t,r])=>[xd(t),r]),Cf=e=>m(m(JR(e),([t,r])=>[t,r],()=>m(XR(e),([t,r])=>[t,r],()=>m(eC(e),([t,r])=>[t,r],()=>m(tC(e),([t,r])=>[t,r],()=>m(V(e),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),Vf=e=>m(m(m(I("...",e),([t,r])=>m(Cf(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(Cf(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[_d(t),r]),Wf=(e,t=[])=>m(m(Vf(e),([r,o])=>m(I(",",o),([i,s])=>[[r,i],s])),([r,o])=>Wf(o,[...t,r]),()=>[t,e]),rC=e=>m(m(Wf(e),([t,r])=>m(m(m(Vf(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Ad(t),r]),nC=e=>m(m(I("[",e),([t,r])=>m(rC(r),([o,i])=>m(I("]",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[bd(t),r]),oC=e=>m(m(de(e),([t,r])=>m(I("?",r),([o,i])=>m(I(":",i),([s,p])=>m(I("readonly",p),([u,l])=>m(V(l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[Od(t),r]),iC=e=>m(m(de(e),([t,r])=>m(I(":",r),([o,i])=>m(I("readonly",i),([s,p])=>m(V(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[Sd(t),r]),aC=e=>m(m(de(e),([t,r])=>m(I("?",r),([o,i])=>m(I(":",i),([s,p])=>m(V(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[Rd(t),r]),sC=e=>m(m(de(e),([t,r])=>m(I(":",r),([o,i])=>m(V(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[Cd(t),r]),Pf=e=>m(m(oC(e),([t,r])=>[t,r],()=>m(iC(e),([t,r])=>[t,r],()=>m(aC(e),([t,r])=>[t,r],()=>m(sC(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),Qf=e=>m(m(m(I("...",e),([t,r])=>m(Pf(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(Pf(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[Pd(t),r]),Zf=(e,t=[])=>m(m(Qf(e),([r,o])=>m(I(",",o),([i,s])=>[[r,i],s])),([r,o])=>Zf(o,[...t,r]),()=>[t,e]),Jf=e=>m(m(Zf(e),([t,r])=>m(m(m(Qf(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[kd(t),r]),mC=e=>m(m(I("(",e),([t,r])=>m(Jf(r),([o,i])=>m(I(")",i),([s,p])=>m(I("=>",p),([u,l])=>m(V(l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[Ud(t),r]),pC=e=>m(m(I("new",e),([t,r])=>m(I("(",r),([o,i])=>m(Jf(i),([s,p])=>m(I(")",p),([u,l])=>m(I("=>",l),([g,y])=>m(V(y),([E,O])=>[[t,o,s,u,g,E],O])))))),([t,r])=>[Nd(t),r]),cC=e=>m(m(m(I("+",e),([t,r])=>m(I("readonly",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(I("-",e),([t,r])=>m(I("readonly",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(I("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[Ld(t),r]),uC=e=>m(m(m(I("+",e),([t,r])=>m(I("?",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(I("-",e),([t,r])=>m(I("?",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(I("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[Md(t),r]),lC=e=>m(m(m(I("as",e),([t,r])=>m(V(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[wd(t),r]),dC=e=>m(m(I("{",e),([t,r])=>m(cC(r),([o,i])=>m(I("[",i),([s,p])=>m(de(p),([u,l])=>m(I("in",l),([g,y])=>m(V(y),([E,O])=>m(lC(O),([Ne,it])=>m(I("]",it),([co,Tb])=>m(uC(Tb),([xb,_b])=>m(I(":",_b),([Ab,bb])=>m(V(bb),([Ob,Sb])=>m(Lf(Sb),([Rb,Cb])=>m(I("}",Cb),([Pb,kb])=>[[t,o,s,u,g,E,Ne,co,xb,Ab,Ob,Rb,Pb],kb]))))))))))))),([t,r])=>[$d(t),r]),fC=e=>m(de(e),([t,r])=>[Dd(t),r]),gC=e=>m(m(I("Options",e),([t,r])=>m(I("<",r),([o,i])=>m(V(i),([s,p])=>m(I(",",p),([u,l])=>m(tg(l),([g,y])=>m(I(">",y),([E,O])=>[[t,o,s,u,g,E],O])))))),([t,r])=>[Gd(t),r]),yC=e=>m(ya(e),([t,r])=>[vd(t),r]),IC=e=>m(m(I("true",e),([t,r])=>[t,r],()=>m(I("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[jd(t),r]),EC=e=>m(Ia(['"',"'"],e),([t,r])=>[t,r]),hC=e=>m(I("null",e),([t,r])=>[Fd(t),r]),Xf=e=>m(m(Hf(e),([t,r])=>m(I(":",r),([o,i])=>m(Zs(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[qd(t),r]),eg=(e,t=[])=>m(m(Xf(e),([r,o])=>m(zf(o),([i,s])=>[[r,i],s])),([r,o])=>eg(o,[...t,r]),()=>[t,e]),TC=e=>m(m(eg(e),([t,r])=>m(m(m(Xf(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Bd(t),r]),tg=e=>m(m(I("{",e),([t,r])=>m(TC(r),([o,i])=>m(I("}",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[Hd(t),r]),rg=(e,t=[])=>m(m(Zs(e),([r,o])=>m(I(",",o),([i,s])=>[[r,i],s])),([r,o])=>rg(o,[...t,r]),()=>[t,e]),xC=e=>m(m(rg(e),([t,r])=>m(m(m(Zs(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Kd(t),r]),_C=e=>m(m(I("[",e),([t,r])=>m(xC(r),([o,i])=>m(I("]",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[zd(t),r]),Zs=e=>m(m(yC(e),([t,r])=>[t,r],()=>m(IC(e),([t,r])=>[t,r],()=>m(EC(e),([t,r])=>[t,r],()=>m(hC(e),([t,r])=>[t,r],()=>m(tg(e),([t,r])=>[t,r],()=>m(_C(e),([t,r])=>[t,r],()=>[])))))),([t,r])=>[t,r]),AC=e=>m(I("-?(?:0|[1-9][0-9]*)n",e),([t,r])=>[Yd(t),r]),bC=e=>m(I(".*",e),([t,r])=>[Vd(t),r]),OC=e=>m(I("-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?",e),([t,r])=>[Wd(t),r]),SC=e=>m(I("-?(?:0|[1-9][0-9]*)",e),([t,r])=>[Qd(t),r]),RC=e=>m(I("(?!)",e),([t,r])=>[Zd(t),r]),CC=e=>m(Rf(["-?(?:0|[1-9][0-9]*)n",".*","-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?","-?(?:0|[1-9][0-9]*)","(?!)","(",")","$","|"],e),([t,r])=>[Jd(t),r]),PC=e=>m(m(AC(e),([t,r])=>[t,r],()=>m(bC(e),([t,r])=>[t,r],()=>m(OC(e),([t,r])=>[t,r],()=>m(SC(e),([t,r])=>[t,r],()=>m(RC(e),([t,r])=>[t,r],()=>m(kC(e),([t,r])=>[t,r],()=>m(CC(e),([t,r])=>[t,r],()=>[]))))))),([t,r])=>[t,r]),kC=e=>m(m(I("(",e),([t,r])=>m(Js(r),([o,i])=>m(I(")",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[Xd(t),r]),ng=e=>m(m(m(Ys(e),([t,r])=>m(I("|",r),([o,i])=>m(ng(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[t,r],()=>m(m(Ys(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[]))),([t,r])=>[ef(t),r]),Ys=e=>m(m(PC(e),([t,r])=>m(Js(r),([o,i])=>[[t,o],i])),([t,r])=>[tf(t),r]),Js=e=>m(m(ng(e),([t,r])=>[t,r],()=>m(Ys(e),([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),og=e=>m(m(I("^",e),([t,r])=>m(Js(r),([o,i])=>m(I("$",i),([s,p])=>[[t,o,s],p]))),([t,r])=>[rf(t),r]),ig=(e,t=[])=>m(m(V(e),([r,o])=>m(I(",",o),([i,s])=>[[r,i],s])),([r,o])=>ig(o,[...t,r]),()=>[t,e]),UC=e=>m(m(ig(e),([t,r])=>m(m(m(V(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[nf(t),r]),ag=e=>m(m(m(I("extends",e),([t,r])=>m(UC(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[of(t),r]),NC=e=>m(m(I("interface",e),([t,r])=>m(de(r),([o,i])=>m(Vs(i),([s,p])=>m(ag(p),([u,l])=>m(Qs(l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[af(t),r]),LC=e=>m(m(I("interface",e),([t,r])=>m(de(r),([o,i])=>m(ag(i),([s,p])=>m(Qs(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[sf(t),r]),MC=e=>m(m(I("type",e),([t,r])=>m(de(r),([o,i])=>m(Vs(i),([s,p])=>m(I("=",p),([u,l])=>m(V(l),([g,y])=>[[t,o,s,u,g],y]))))),([t,r])=>[mf(t),r]),wC=e=>m(m(I("type",e),([t,r])=>m(de(r),([o,i])=>m(I("=",i),([s,p])=>m(V(p),([u,l])=>[[t,o,s,u],l])))),([t,r])=>[pf(t),r]),$C=e=>m(m(m(I("export",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[cf(t),r]),DC=e=>m(m(m(I(";",e),([t,r])=>m(I(`
32
+ `,r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>m(m(I(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>m(m(I(`
33
+ `,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]),sg=(e,t=[])=>m(m(Xs(e),([r,o])=>m(DC(o),([i,s])=>[[r,i],s])),([r,o])=>sg(o,[...t,r]),()=>[t,e]),GC=e=>m(m(sg(e),([t,r])=>m(m(m(Xs(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>m([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[uf(t),r]),Xs=e=>m(m($C(e),([t,r])=>m(m(NC(r),([o,i])=>[o,i],()=>m(LC(r),([o,i])=>[o,i],()=>m(MC(r),([o,i])=>[o,i],()=>m(wC(r),([o,i])=>[o,i],()=>[])))),([o,i])=>m(Lf(i),([s,p])=>[[t,o,s],p]))),([t,r])=>[lf(t),r]),vC=e=>m(m(Xs(e),([t,r])=>m(GC(r),([o,i])=>[[t,o],i])),([t,r])=>[df(t),r]),mg=e=>m(m(vC(e),([t,r])=>[t,r],()=>m(qR(e),([t,r])=>[t,r],()=>m(V(e),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]);function pg(e){let t=Ws(`\`${e}\``);return a.IsEqual(t.length,2)?t[0]:j()}function xo(e,t={}){return R("TemplateLiteral",[e],t)}function cg(e){return S({},xo(e,{}))}function FC(e){let t=pg(e);return cg(t)}function ug(e,t={}){let r=a.IsString(e)?FC(e):cg(e);return f.Update(r,{},t)}function Ee(e){return T(e,"TemplateLiteral")}var U={};yt(U,{ExtendsFalse:()=>v,ExtendsTrue:()=>A,ExtendsUnion:()=>em,IsExtendsFalse:()=>qC,IsExtendsTrue:()=>dg,IsExtendsTrueLike:()=>fe,IsExtendsUnion:()=>lg});function em(e){return f.Create({"~kind":"ExtendsUnion"},{inferred:e})}function lg(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"inferred")&&a.IsEqual(e["~kind"],"ExtendsUnion")&&a.IsObject(e.inferred)}function A(e){return f.Create({"~kind":"ExtendsTrue"},{inferred:e})}function dg(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"inferred")&&a.IsEqual(e["~kind"],"ExtendsTrue")&&a.IsObject(e.inferred)}function v(){return f.Create({"~kind":"ExtendsFalse"},{})}function qC(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.IsEqual(e["~kind"],"ExtendsFalse")}function fe(e){return lg(e)||dg(e)}function ha(e){let t=og(e);return a.IsEqual(t.length,2)?t[0]:j()}function BC(e){return!0}function fg(e){let[t,...r]=e;return _(t)?HC(t)?fg(r):!1:!0}function gg(e){return a.IsEqual(e.length,0)?!1:fg(e)}function HC(e){return x(e)?gg(e.anyOf):Y(e)?BC(e.const):!1}function Ta(e){return gg(e)}function yg(e,t,r=[]){let[o,...i]=e;return a.IsString(o)?yg(i,t,[...r,`${o}${t}`]):r}function KC(e,t){return a.IsEqual(e.length,0)?[`${t}`]:yg(e,t)}function Ig(e,t,r=[]){let[o,...i]=t;return _(o)?Ig(e,i,[...r,...Eg(e,o)]):r}function Eg(e,t){return x(t)?Ig(e,t.anyOf):Y(t)?KC(e,t.const):j()}function hg(e,t){let[r,...o]=t;return _(r)?hg(Eg(e,r),o):e}function zC(e){return e.map(t=>q(t))}function YC(e){let t=hg([],e),r=zC(t);return G(r)}function VC(e){return a.IsEqual(e.length,0)?j():a.IsEqual(e.length,1)&&Y(e[0])?e[0]:YC(e)}function qe(e){let t=ha(e);return Ta(t)?VC(t):rt()}function WC(e){return a.IsString(e)||a.IsNumber(e)?q(e):a.IsNull(e)?gr():z()}function At(e){return e.map(r=>WC(r))}function jo(e){let t=At(e);return G(t)}function Hr(e){return jo(e.enum)}function QC(e,t,r,o){let i=J(e,r,o);return fe(i)?A(f.Assign(f.Assign(e,i.inferred),{[t]:r})):v()}function ZC(e,t){return A(e)}function JC(e,t,r){let o=jo(r);return J(e,t,o)}function Tg(e,t,r){let[o,...i]=r;return _(o)?(()=>{let s=J(e,t,o);return fe(s)?Tg(s.inferred,t,i):v()})():A(e)}function XC(e,t,r){let o=qe(r);return J(e,t,o)}function xg(e,t,r){let[o,...i]=r;return _(o)?(()=>{let s=J(e,t,o);return fe(s)?A(s.inferred):xg(e,t,i)})():v()}function F(e,t,r){return Ve(r)?ZC(e,t):Ie(r)?JC(e,t,r.enum):ye(r)?QC(e,r.name,t,r.extends):P(r)?Tg(e,t,r.allOf):Ee(r)?XC(e,t,r.pattern):x(r)?xg(e,t,r.anyOf):tt(r)?A(e):v()}function _g(e,t,r){return ye(r)?F(e,t,r):Ve(r)?A(e):tt(r)?A(e):em(e)}function eP(e,t){let r=Dr(e),o=Dr(t);return r&&o||!r&&o?!0:!(r&&!o)}function Ag(e,t,r,o){return Z(o)?eP(t,o)?J(e,r,o.items):v():F(e,t,o)}function bg(e,t,r){return Ke(r)?J(e,t,r.iteratorItems):F(e,Ct(t),r)}function Og(e,t,r){return at(r)?A(e):F(e,t,r)}function Sg(e,t,r){return Qe(r)?A(e):F(e,t,r)}function tP(e,t,r,o,i){let s=ye(o)?t:o,p=ye(o)?o:t,u=Re(t),l=Re(o),g=J(e,s,p);return!u&&l?v():fe(g)?Fo(g.inferred,r,i):v()}function rP(e,t,r,o){let[i,...s]=o;return _(i)?tP(e,t,r,i,s):Re(t)?A(e):v()}function nP(e,t,r){let[o,...i]=t;return _(o)?rP(e,o,i,r):A(e)}function Fo(e,t,r){return nP(e,t,r)}function xa(e,t,r){return mt(r)?A(e):J(e,t,r)}function Rg(e,t,r,o){return Ce(o)?(()=>{let i=Fo(e,t,o.parameters);return fe(i)?xa(i.inferred,r,o.instanceType):v()})():v()}function Cg(e,t,r){return J(e,Hr(t),r)}function Pg(e,t,r,o){return Pe(o)?(()=>{let i=Fo(e,t,o.parameters);return fe(i)?xa(i.inferred,r,o.returnType):v()})():v()}function kg(e,t,r){return Le(r)?A(e):ue(r)?A(e):F(e,t,r)}var qo="equal",oP="disjoint",Bo="left-inside",Ho="right-inside";function Ko(e,t){let r=[tt(e)?U.ExtendsFalse():He({},e,t),tt(e)?U.ExtendsTrue({}):He({},t,e)];return U.IsExtendsTrueLike(r[0])&&U.IsExtendsTrueLike(r[1])?qo:U.IsExtendsTrueLike(r[0])&&U.IsExtendsFalse(r[1])?Bo:U.IsExtendsFalse(r[0])&&U.IsExtendsTrueLike(r[1])?Ho:oP}function iP(e){return x(e)?$t(e.anyOf):[e]}function $t(e){return e.reduce((t,r)=>[...t,...iP(r)],[])}function tm(e){return e.reduceRight((r,o,i)=>({[i]:o,...r}),{})}function Ug(e){let t=tm(e.items);return k(t)}function aP(e,t){return Gr(e)?!!Gr(t):!1}function sP(e,t){return Re(e)?!!Re(t):!1}function mP(e,t){let r=aP(e,t),o=sP(e,t),i=he([e,t]),s=Wi(En(i));return r&&o?et(Xe(s)):r&&!o?et(s):!r&&o?Xe(s):s}function pP(e,t,r){return r in e?r in t?mP(e[r],t[r]):e[r]:r in t?t[r]:z()}function cP(e,t){return[...new Set([...a.Keys(t),...a.Keys(e)])].reduce((o,i)=>({...o,[i]:pP(e,t,i)}),{})}function Ng(e){return L(e)?e.properties:B(e)?tm(e.items):j()}function Lg(e,t){let r=Ng(e),o=Ng(t),i=cP(r,o);return k(i)}function Mg(e,t){let r=Ko(e,t);return a.IsEqual(r,Bo)?e:a.IsEqual(r,Ho)||a.IsEqual(r,qo)?t:z()}function wg(e){return L(e)||B(e)}function $g(e){return P(e)?he(e.allOf):e}function uP(e,t){let r=$g(e),o=$g(t),i=wg(r),s=wg(o);return i&&s?Lg(hr(r),o):i&&!s?hr(r):!i&&s?o:Mg(hr(r),o)}function Dg(e,t,r=[]){let[o,...i]=t;return a.IsUndefined(o)?r.length===0?[e]:r:Dg(e,i,[...r,uP(e,o)])}function Gg(e,t,r=[]){let[o,...i]=e;return _(o)?Gg(i,t,[...r,...zo([o],t)]):r}function zo(e,t=[]){let[r,...o]=e;return _(r)?x(r)?zo(o,Gg(r.anyOf,t)):zo(o,Dg(r,t)):t}function he(e){let t=zo(e);return rm(t)}function Yt(e){return rm(e)}function hr(e){return P(e)?he(e.allOf):x(e)?Yt(e.anyOf):e}function Kr(e){return a.IsEqual(e.length,1)?e[0]:a.IsEqual(e.length,0)?z():G(e)}function lP(e,t){return t.filter(r=>Ko(e,r)!==Ho)}function dP(e,t){let r=t.some(o=>{let i=Ko(e,o);return a.IsEqual(i,Bo)||a.IsEqual(i,qo)});return a.IsEqual(r,!1)}function fP(e,t){let r=hr(e);return Ve(r)?[r]:dP(r,t)?[...lP(r,t),r]:t}function nm(e,t=[]){let[r,...o]=e;return _(r)?L(r)?nm(o,[...t,r]):nm(o,fP(r,t)):t}function rm(e){let t=nm(e),r=$t(t);return r.length===0?z():r.length===1?r[0]:G(r)}function gP(e,t,r,o){let i=h(e,t,r);return f.Update(hr(i),{},o)}function vg(e,t,r,o){return gP(e,t,r,o)}function jg(e,t,r){let o=he(t);return J(e,o,r)}function Fg(e,t,r){return ze(r)?J(e,t,r.iteratorItems):F(e,kt(t),r)}function _a(e,t,r){return t===r?A(e):v()}function yP(e,t,r){return Y(r)?_a(e,t,r.const):at(r)?A(e):F(e,q(t),r)}function IP(e,t,r){return Y(r)?_a(e,t,r.const):Qe(r)?A(e):F(e,q(t),r)}function EP(e,t,r){return Y(r)?_a(e,t,r.const):ue(r)?A(e):F(e,q(t),r)}function hP(e,t,r){return Y(r)?_a(e,t,r.const):Ae(r)?A(e):F(e,q(t),r)}function qg(e,t,r){return a.IsBigInt(t.const)?yP(e,t.const,r):a.IsBoolean(t.const)?IP(e,t.const,r):a.IsNumber(t.const)?EP(e,t.const,r):a.IsString(t.const)?hP(e,t.const,r):j()}function Bg(e,t,r){return ye(r)?F(e,t,r):A(e)}function Hg(e,t,r){return Ut(r)?A(e):F(e,t,r)}function Kg(e,t,r){return ue(r)?A(e):F(e,t,r)}function TP(e,t,r){return Re(t)?Re(r)?A(e):v():A(e)}function xP(e,t,r){return ye(r)&&Kt(r.extends)?v():(()=>{let o=J(e,t,r);return fe(o)?TP(o.inferred,t,r):v()})()}function _P(e,t){return e.reduce((r,o)=>o in t?fe(t[o])?{...r,...t[o].inferred}:j():j(),{})}function AP(e,t,r){let o={};for(let p of a.Keys(r))o[p]=p in t?xP({},t[p],r[p]):Re(r[p])?ye(r[p])?A(f.Assign(e,{[r[p].name]:r[p].extends})):A(e):v();let i=a.Values(o).every(p=>fe(p)),s=i?_P(a.Keys(o),o):{};return i?A(s):v()}function bP(e,t,r){let o=AP(e,t,r);return fe(o)?A(f.Assign(e,o.inferred)):v()}function OP(e,t,r){return bP(e,t,r)}function zg(e,t,r){return L(r)?OP(e,t,r.properties):F(e,k(t),r)}function Yg(e,t,r){return je(r)?J(e,t,r.item):F(e,Lt(t),r)}function Vg(e,t,r){return Ae(r)?A(e):F(e,t,r)}function Wg(e,t,r){return Nt(r)?A(e):F(e,t,r)}function Qg(e,t,r){let o=qe(t);return J(e,o,r)}function om(e,t){return f.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function Yo(e){return a.IsObject(e)&&a.HasPropertyKey(e,"~kind")&&a.HasPropertyKey(e,"name")&&a.HasPropertyKey(e,"type")&&a.IsEqual(e["~kind"],"Inferrable")&&a.IsString(e.name)&&a.IsObject(e.type)}function im(e){return yr(e)?ye(e.items)?Z(e.items.extends)?om(e.items.name,e.items.extends.items):tt(e.items.extends)?om(e.items.name,e.items.extends):void 0:j():void 0}function Aa(e){return ye(e)?om(e.name,e.extends):void 0}function am(e,t,r=[]){let[o,...i]=e;return _(o)?(()=>{let s=J({},o,t);return fe(s)?am(i,t,[...r,o]):void 0})():r}function Zg(e,t,r,o){let i=am(r,o);return a.IsArray(i)?A(f.Assign(e,{[t]:Me(i)})):v()}function ba(e,t,r,o){let i=am(r,o);return a.IsArray(i)?A(f.Assign(e,{[t]:G(i)})):v()}function SP(e){return[...e].reverse()}function sm(e,t){return t?SP(e):e}function RP(e){let t=e.length>0?e[0]:void 0,r=_(t)?im(t):void 0;return _(r)}function CP(e,t,r,o,i,s){let p=J(e,r,i);return fe(p)?Jg(p.inferred,t,o,s):v()}function PP(e,t,r,o,i){let s=im(o);return Yo(s)?Zg(e,s.name,sm(r,t),s.type):(()=>{let[p,...u]=r;return _(p)?CP(e,t,p,u,o,i):v()})()}function kP(e,t,r,o){let[i,...s]=o;return _(i)?PP(e,t,r,i,s):a.IsEqual(r.length,0)?A(e):v()}function Jg(e,t,r,o){return kP(e,t,r,o)}function UP(e,t,r){let o=Oa(e,{callstack:[]},r),i=RP(o);return Jg(e,i,sm(t,i),sm(o,i))}function Xg(e,t,r){let o=Aa(r);return Yo(o)?ba(e,o.name,t,o.type):(()=>{let[i,...s]=t;return _(i)?(()=>{let p=J(e,i,r);return fe(p)?Xg(p.inferred,s,r):v()})():A(e)})()}function ey(e,t,r){let o=Oa(e,{callstack:[]},t);return B(r)?UP(e,o,r.items):Z(r)?Xg(e,o,r.items):F(e,Me(o),r)}function ty(e,t,r){return mt(r)?A(e):wt(r)?A(e):F(e,t,r)}function ry(e,t,r){let[o,...i]=r;return _(o)?(()=>{let s=J(e,t,o);return fe(s)?A(s.inferred):ry(e,t,i)})():v()}function mm(e,t,r){let[o,...i]=t;return _(o)?(()=>{let s=ry(e,o,r);return fe(s)?mm(s.inferred,i,r):v()})():A(e)}function ny(e,t,r){let o=Aa(r);return Yo(o)?ba(e,o.name,t,o.type):x(r)?mm(e,t,r.anyOf):mm(e,t,[r])}function oy(e,t,r){return ye(r)?F(e,t,r):Ve(r)?A(e):tt(r)?A(e):v()}function iy(e,t,r){return mt(r)?A(e):F(e,t,r)}function J(e,t,r){return Ve(t)?_g(e,t,r):Z(t)?Ag(e,t,t.items,r):Ke(t)?bg(e,t.iteratorItems,r):at(t)?Og(e,t,r):Qe(t)?Sg(e,t,r):Ce(t)?Rg(e,t.parameters,t.instanceType,r):Ie(t)?Cg(e,t,r):Pe(t)?Pg(e,t.parameters,t.returnType,r):Le(t)?kg(e,t,r):P(t)?jg(e,t.allOf,r):ze(t)?Fg(e,t.iteratorItems,r):Y(t)?qg(e,t,r):Kt(t)?Bg(e,t,r):Ut(t)?Hg(e,t,r):ue(t)?Kg(e,t,r):L(t)?zg(e,t.properties,r):je(t)?Yg(e,t.item,r):Ae(t)?Vg(e,t,r):Nt(t)?Wg(e,t,r):Ee(t)?Qg(e,t.pattern,r):B(t)?ey(e,t.items,r):wt(t)?ty(e,t,r):x(t)?ny(e,t.anyOf,r):tt(t)?oy(e,t,r):mt(t)?iy(e,t,r):v()}function kn(e,t,r={}){return R("Interface",[e,t],r)}function Dn(e){return _(e)&&a.HasPropertyKey(e,"action")&&a.IsEqual(e.action,"Interface")}function ay(e,t,r={}){return S({},kn(e,t,r))}function NP(e,t,r){return e.includes(r)?!0:Tr([...e,r],t,t[r])}function sy(e,t,r){let o=ia(r);return zr(e,t,o)}function zr(e,t,r){let[o,...i]=r;return _(o)?Tr(e,t,o)?!0:zr(e,t,i):!1}function Tr(e,t,r){return oe(r)?NP(e,t,r.$ref):Z(r)?Tr(e,t,r.items):Ke(r)?Tr(e,t,r.iteratorItems):Ce(r)?zr(e,t,[...r.parameters,r.instanceType]):Pe(r)?zr(e,t,[...r.parameters,r.returnType]):Dn(r)?sy(e,t,r.parameters[1]):P(r)?zr(e,t,r.allOf):ze(r)?Tr(e,t,r.iteratorItems):L(r)?sy(e,t,r.properties):je(r)?Tr(e,t,r.item):x(r)?zr(e,t,r.anyOf):B(r)?zr(e,t,r.items):le(r)?Tr(e,t,Fe(r)):!1}function Sa(e,t,r){return Tr(e,t,r)}function LP(e,t){return t.reduce((r,o)=>o in e?Sa([o],e,e[o])?[...r,o]:r:j(),[])}function my(e){let t=il(e);return LP(e,t)}function MP(e,t,r){return r.includes(t)?r:t in e?xr(e,e[t],[...r,t]):j()}function py(e,t,r){let o=ia(t);return Gn(e,o,r)}function Gn(e,t,r){return t.reduce((o,i)=>xr(e,i,o),r)}function xr(e,t,r){return oe(t)?MP(e,t.$ref,r):Z(t)?xr(e,t.items,r):Ke(t)?xr(e,t.iteratorItems,r):Ce(t)?Gn(e,[...t.parameters,t.instanceType],r):Pe(t)?Gn(e,[...t.parameters,t.returnType],r):Dn(t)?py(e,t.parameters[1],r):P(t)?Gn(e,t.allOf,r):ze(t)?xr(e,t.iteratorItems,r):L(t)?py(e,t.properties,r):je(t)?xr(e,t.item,r):x(t)?Gn(e,t.anyOf,r):B(t)?Gn(e,t.items,r):le(t)?xr(e,Fe(t),r):r}function cy(e,t,r){return xr(e,r,[t])}function wP(e){return Tn()}function $P(e){return a.Keys(e).reduce((t,r)=>({...t,[r]:Dt(e[r])}),{})}function Vo(e){return e.reduce((t,r)=>[...t,Dt(r)],[])}function Dt(e){return oe(e)?wP(e.$ref):Z(e)?_t(Dt(e.items),Zi(e)):Ke(e)?Ct(Dt(e.iteratorItems)):Ce(e)?cr(Vo(e.parameters),Dt(e.instanceType)):Pe(e)?ur(Vo(e.parameters),Dt(e.returnType)):P(e)?dt(Vo(e.allOf)):ze(e)?kt(Dt(e.iteratorItems)):L(e)?k($P(e.properties)):je(e)?Lt(Dt(e.item)):le(e)?sa(Rn(e),Dt(Fe(e))):x(e)?G(Vo(e.anyOf)):B(e)?Me(Vo(e.items)):e}function DP(e,t){return t in e?Dt(e[t]):Ge()}function uy(e){return DP(e.$defs,e.$ref)}function GP(e,t,r){let o=pt(e,{callstack:[]},t),i=Wo({},{callstack:[]},r);return he([...o,k(i)])}function vP(e,t){return a.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>{let s=e[i],p=Dn(s)?GP(e,s.parameters[0],s.parameters[1]):s;return{...o,[i]:p}},{})}function ly(e,t,r){let o=cy(e,t,r),i=vP(e,o);return Pt(i,t)}function dy(e,t){return t in e?oe(e[t])?dy(e,e[t].$ref):e[t]:z()}function Gt(e,t){return dy(e,t)}function fy(e){return ie(e)?uy(e):e}function He(e,t,r){let o=fy(t),i=fy(r);return J(e,o,i)}function jP(e,t,r){if(ye(t)||vn(t)||U.IsExtendsTrueLike(He({},t,r)))return;let o={parameter:e,extends:r,received:t};throw new Error("Generic argument does not satify constraint",{cause:o})}function gy(e,t,r,o,i){let s=h(e,t,i);return jP(r,s,o),f.Assign(e,{[r]:s})}function FP(e,t,r,o,i){let s=h(e,t,r.extends),p=h(e,t,r.equals),[u,...l]=i;return _(u)?pm(gy(e,t,r.name,s,u),t,o,l):pm(gy(e,t,r.name,s,p),t,o,[])}function pm(e,t,r,o){let[i,...s]=r;return _(i)?FP(e,t,i,s,o):e}function yy(e,t,r,o){return pm(e,t,r,o)}function qP(e){return a.IsGreaterThan(e.length,0)?e[0]:""}function Iy(e,t,r,o){let i=pt(e,t,o);return ca(r,i)}function BP(e,t,r,o){return Iy(e,t,_e(r),o)}function HP(e,t,r,o,i,s){let p=pt(e,t,s),u=yy(e,t,o,p),l=h(u,{callstack:[...t.callstack,r]},i);return h(e,t,l)}function Ra(e,t,r,o){let[i,s]=wu(e,r,o);return hn(s)?a.IsEqual(qP(t.callstack),i)?BP(e,t,i,o):HP(e,t,i,s.parameters,s.expression,o):Iy(e,t,r,o)}function ca(e,t){return f.Create({"~kind":"Call"},{target:e,arguments:t},{})}function Ey(e,t){return Ra({},{callstack:[]},e,t)}function vn(e){return T(e,"Call")}function hy(e){return je(e)?hy(e.item):e}function KP(e,t,r,o){let i=h(e,t,r);return f.Update(hy(i),{},o)}function Ty(e,t,r,o){return N(e,[r])?KP(e,t,r,o):vo(r,o)}function xy(e,t){return e(t)}function _y(e,t){return a.IsString(t)?q(xy(e,t)):q(t)}function Ay(e,t){let r=qe(t);return Vt(e,r)}function by(e,t){let r=t.map(o=>Vt(e,o));return G(r)}function Vt(e,t){return Y(t)?_y(e,t.const):Ee(t)?Ay(e,t.pattern):x(t)?by(e,t.anyOf):t}function _o(e,t={}){return R("Capitalize",[e],t)}function Oy(e,t={}){return S({},_o(e,t))}function Ao(e,t={}){return R("Lowercase",[e],t)}function Sy(e,t={}){return S({},Ao(e,t))}function bo(e,t={}){return R("Uncapitalize",[e],t)}function Ry(e,t={}){return S({},bo(e,t))}function Oo(e,t={}){return R("Uppercase",[e],t)}function Cy(e,t={}){return S({},Oo(e,t))}var zP=e=>e[0].toUpperCase()+e.slice(1),YP=e=>e.toLowerCase(),VP=e=>e[0].toLowerCase()+e.slice(1),WP=e=>e.toUpperCase();function QP(e,t,r,o){let i=h(e,t,r);return f.Update(Vt(zP,i),{},o)}function Py(e,t,r,o){return N(e,[r])?QP(e,t,r,o):_o(r,o)}function ZP(e,t,r,o){let i=h(e,t,r);return f.Update(Vt(YP,i),{},o)}function ky(e,t,r,o){return N(e,[r])?ZP(e,t,r,o):Ao(r,o)}function JP(e,t,r,o){let i=h(e,t,r);return f.Update(Vt(VP,i),{},o)}function Uy(e,t,r,o){return N(e,[r])?JP(e,t,r,o):bo(r,o)}function XP(e,t,r,o){let i=h(e,t,r);return f.Update(Vt(WP,i),{},o)}function Ny(e,t,r,o){return N(e,[r])?XP(e,t,r,o):Oo(r,o)}function So(e,t,r,o,i={}){return R("Conditional",[e,t,r,o],i)}function Ly(e,t,r,o,i={}){return S({},So(e,t,r,o,i))}function ek(e,t,r,o,i,s,p){let u=h(e,t,r),l=h(e,t,o),g=He(e,u,l);return f.Update(U.IsExtendsUnion(g)?G([h(g.inferred,t,i),h(e,t,s)]):U.IsExtendsTrue(g)?h(g.inferred,t,i):h(e,t,s),{},p)}function My(e,t,r,o,i,s,p){return N(e,[r,o])?ek(e,t,r,o,i,s,p):So(r,o,i,s,p)}function Ro(e,t={}){return R("ConstructorParameters",[e],t)}function wy(e,t={}){return S({},Ro(e,t))}function tk(e){return Ce(e)?h({},{callstack:[]},Me(e.parameters)):z()}function rk(e,t,r,o){let i=h(e,t,r);return f.Update(tk(i),{},o)}function $y(e,t,r,o){return N(e,[r])?rk(e,t,r,o):Ro(r,o)}function Co(e,t,r={}){return R("Exclude",[e,t],r)}function Dy(e,t,r={}){return S({},Co(e,t,r))}function Gy(e,t){return e.reduce((r,o)=>[...r,...vy(o,t)],[])}function vy(e,t){let r=He({},e,t);return U.IsExtendsTrueLike(r)?[]:[e]}function nk(e,t){let r=Ie(e)?Gy(At(e.enum),t):x(e)?Gy($t(e.anyOf),t):vy(e,t);return Yt(r)}function ok(e,t,r,o,i){let s=h(e,t,r),p=h(e,t,o);return f.Update(nk(s,p),{},i)}function Ca(e,t,r,o,i){return N(e,[r,o])?ok(e,t,r,o,i):Co(r,o,i)}function Po(e,t,r={}){return R("Extract",[e,t],r)}function jy(e,t,r={}){return S({},Po(e,t,r))}function Fy(e,t){return e.reduce((r,o)=>[...r,...qy(o,t)],[])}function qy(e,t){let r=He({},e,t);return U.IsExtendsTrueLike(r)?[e]:[]}function ik(e,t){let r=Ie(e)?Fy(At(e.enum),t):x(e)?Fy($t(e.anyOf),t):qy(e,t);return Yt(r)}function ak(e,t,r,o,i){let s=h(e,t,r),p=h(e,t,o);return f.Update(ik(s,p),{},i)}function By(e,t,r,o,i){return N(e,[r,o])?ak(e,t,r,o,i):Po(r,o,i)}var sk=new RegExp("^(?:0|[1-9][0-9]*)$");function jn(e){let t=`${e}`;return sk.test(t)?parseInt(t):e}function mk(e){return q(jn(e))}function Hy(e){return e.map(t=>Ky(t))}function Ky(e){return P(e)?dt(Hy(e.allOf)):x(e)?G(Hy(e.anyOf)):Y(e)?mk(e.const):e}function zy(e,t){let r=Ky(t),o=He({},r,ft());return U.IsExtendsTrueLike(o)?e:z()}function Yy(e,t){let r=Gt(e,t);return vt(r)}function Pa(e){return e.reduce((t,r)=>[...t,...vt(r)],[])}function Vy(e){let t=At(e);return Pa(t)}function Wy(e){let t=he(e);return vt(t)}function Qy(e){return[`${e}`]}function Zy(e){let t=qe(e);return vt(t)}function vt(e){return ie(e)?Yy(e.$defs,e.$ref):Ie(e)?Vy(e.enum):P(e)?Wy(e.allOf):Y(e)?Qy(e.const):Ee(e)?Zy(e.pattern):x(e)?Pa(e.anyOf):[]}function Fn(e){return vt(e)}function pk(e,t){return t in e?[e[t]]:[]}function ck(e,t){return t.reduce((r,o)=>[...r,...pk(e,o)],[])}function Jy(e,t){let r=Fn(t),o=ck(e,r);return Yt(o)}function uk(e){return q(jn(e))}function Xy(e){return e.map(t=>cm(t))}function cm(e){return P(e)?dt(Xy(e.allOf)):x(e)?G(Xy(e.anyOf)):Y(e)?uk(e.const):e}function lk(e,t){return e.reduceRight((r,o,i)=>{let s=He({},q(i),t);return U.IsExtendsTrueLike(s)?[o,...r]:r},[])}function dk(e,t){let r=cm(t),o=lk(e,r);return Kr(o)}function fk(e){return Kr(e)}function eI(e,t){return ue(t)||Le(t)?fk(e):dk(e,t)}function gk(e){return e.reduce((t,r)=>na(r)?[...t,q(r)]:t,[])}function qn(e){let t=gk(e);return G(t)}function Un(e,t,r={}){return R("Index",[e,t],r)}function tI(e,t,r={}){let o=a.IsArray(t)?qn(t):t;return S({},Un(e,o,r))}function rI(e,t){let r=Gt(e,t);return bt(r)}function yk(e,t){let r=a.Keys(e).filter(y=>!a.HasPropertyKey(t,y)),o=a.Keys(t).filter(y=>!a.HasPropertyKey(e,y)),i=a.Keys(e).filter(y=>a.HasPropertyKey(t,y)),s=r.reduce((y,E)=>({...y,[E]:e[E]}),{}),p=o.reduce((y,E)=>({...y,[E]:t[E]}),{}),u=i.reduce((y,E)=>({...y,[E]:he([e[E],t[E]])}),{}),l=f.Assign(s,p);return f.Assign(l,u)}function nI(e){return e.reduce((t,r)=>yk(t,bt(r)),{})}function oI(e){let t=Ug(Me(e));return bt(t)}function Ik(e,t){return a.Keys(e).filter(i=>i in t).reduce((i,s)=>({...i,[s]:Yt([e[s],t[s]])}),{})}function iI(e,t){let[r,...o]=e;return _(r)?iI(o,Ik(t,bt(r))):t}function aI(e){let[t,...r]=e;return _(t)?iI(r,bt(t)):j()}function bt(e){return ie(e)?rI(e.$defs,e.$ref):P(e)?nI(e.allOf):x(e)?aI(e.anyOf):B(e)?oI(e.items):L(e)?e.properties:{}}function Bn(e){let t=bt(e);return k(t)}function Ek(e){return ie(e)||P(e)||x(e)?Bn(e):e}function hk(e,t){let r=Ek(e);return Z(r)?zy(r.items,t):L(r)?Jy(r.properties,t):B(r)?eI(r.items,t):z()}function Tk(e,t,r,o,i){let s=h(e,t,r),p=h(e,t,o);return f.Update(hk(s,p),{},i)}function sI(e,t,r,o,i){return N(e,[r,o])?Tk(e,t,r,o,i):Un(r,o,i)}function ko(e,t={}){return R("InstanceType",[e],t)}function mI(e,t={}){return S({},ko(e,t))}function xk(e){return Ce(e)?e.instanceType:z()}function _k(e,t,r,o){let i=h(e,t,r);return f.Update(xk(i),{},o)}function pI(e,t,r,o={}){return N(e,[r])?_k(e,t,r,o):ko(r,o)}function Ak(e,t,r,o,i){let s=pt(e,{callstack:[]},r),p=Wo(e,{callstack:[]},o),u=he([...s,k(p)]);return f.Update(u,{},i)}function cI(e,t,r,o,i){return N(e,r)?Ak(e,t,r,o,i):kn(r,o,i)}function Nn(e,t={}){return R("KeyOf",[e],t)}function uI(e,t={}){return S({},Nn(e,t))}function lI(){return G([ft(),rt(),bn()])}function dI(e){return ft()}function bk(e){return e.reduce((r,o)=>na(o)?[...r,q(jn(o))]:j(),[])}function fI(e){let t=a.Keys(e),r=bk(t);return Kr(r)}function gI(e){return Rn(e)}function yI(e){let t=e.map((r,o)=>q(o));return Kr(t)}function Ok(e){return ie(e)||P(e)||x(e)?Bn(e):e}function Sk(e){let t=Ok(e);return Ve(t)?lI():Z(t)?dI(t.items):L(t)?fI(t.properties):le(t)?gI(t):B(t)?yI(t.items):z()}function Rk(e,t,r,o){let i=h(e,t,r);return f.Update(Sk(i),{},o)}function II(e,t,r,o){return N(e,[r])?Rk(e,t,r,o):Nn(r,o)}function Ck(e){let t=qe(e);return um(t)}function EI(e){return e.reduce((t,r)=>[...t,...um(r)],[])}function um(e){return Ie(e)?EI(At(e.enum)):An(e)||_n(e)?[e]:Ee(e)?Ck(e.pattern):x(e)?EI(e.anyOf):[]}function hI(e){return um(e)}function Pn(e,t,r,o,i={}){return R("Mapped",[e,t,r,o],i)}function TI(e,t,r,o,i={}){return S({},Pn(e,t,r,o,i))}function Pk(e,t,r,o,i){let s=f.Assign(e,{[r.name]:o}),p=h(s,t,i);return Ee(p)?qe(p.pattern):p}function kk(e,t,r,o,i){let s=f.Assign(e,{[r.name]:o});return h(s,t,i)}function Uk(e,t,r,o,i,s){let p=kk(e,t,r,o,s),u=Pk(e,t,r,o,i);return An(u)||_n(u)?{[u.const]:p}:{}}function Nk(e,t,r,o,i,s){return o.reduce((p,u)=>({...p,...Uk(e,t,r,u,i,s)}),{})}function Lk(e,t,r,o,i,s){let p=hI(o),u=Nk(e,t,r,p,i,s);return k(u)}function Mk(e,t,r,o,i,s,p){let u=h(e,t,o);return f.Update(Lk(e,t,r,u,i,s),{},p)}function xI(e,t,r,o,i,s,p){return N(e,[o])?Mk(e,t,r,o,i,s,p):Pn(r,o,i,s,p)}function wk(e,t){return a.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>({...o,[i]:ly(e,i,e[i])}),{})}function $k(e,t){return a.Keys(e).filter(o=>!t.includes(o)).reduce((o,i)=>({...o,[i]:h(e,{callstack:[]},e[i])}),{})}function Dk(e,t){let r=my(e),o=wk(e,r),i=$k(e,r),s={...o,...i};return f.Update(s,{},t)}function _I(e,t,r,o){let i=f.Assign(e,r);return Dk(i,o)}function Uo(e,t={}){return R("NonNullable",[e],t)}function AI(e,t={}){return S({},Uo(e,t))}function Gk(e){let t=G([gr(),Cn()]);return Ca({},{callstack:[]},e,t,{})}function vk(e,t,r,o){let i=h(e,t,r);return f.Update(Gk(i),{},o)}function bI(e,t,r,o){return N(e,[r])?vk(e,t,r,o):Uo(r,o)}function ka(e){let t=Bn(e);return L(t)?t.properties:j()}function No(e,t,r={}){return R("Omit",[e,t],r)}function OI(e,t,r={}){let o=a.IsArray(t)?qn(t):t;return S({},No(e,o,r))}function jk(e,t){return a.Keys(e).reduce((o,i)=>t.includes(i)?o:{...o,[i]:e[i]},{})}function Fk(e,t){let r=ka(e),o=Fn(t),i=jk(r,o);return k(i)}function qk(e,t,r,o,i){let s=h(e,t,r),p=h(e,t,o);return f.Update(Fk(s,p),{},i)}function SI(e,t,r,o,i){return N(e,[r,o])?qk(e,t,r,o,i):No(r,o,i)}function Ln(e,t){return R("Options",[e,t],{})}function Ua(e,t){return S({},Ln(e,t))}function Bk(e,t,r,o){let i=h(e,t,r);return f.Update(i,{},o)}function RI(e,t,r,o){return N(e,[r])?Bk(e,t,r,o):Ln(r,o)}function Lo(e,t={}){return R("Parameters",[e],t)}function CI(e,t={}){return S({},Lo(e,t))}function Hk(e){return Pe(e)?h({},{callstack:[]},Me(e.parameters)):z()}function Kk(e,t,r,o){let i=h(e,t,r);return f.Update(Hk(i),{},o)}function PI(e,t,r,o){return N(e,[r])?Kk(e,t,r,o):Lo(r,o)}function Mo(e,t={}){return R("Partial",[e],t)}function kI(e,t={}){return S({},Mo(e,t))}function UI(e,t){let r=Gt(e,t),o=_r(r);return Pt(f.Assign(e,{[t]:o}),t)}function NI(e){let t=e.map(r=>_r(r));return he(t)}function LI(e){let t=e.map(r=>_r(r));return G(t)}function MI(e){let t=a.Keys(e).reduce((o,i)=>({...o,[i]:Vi(e[i])}),{});return k(t)}function _r(e){return ie(e)?UI(e.$defs,e.$ref):P(e)?NI(e.allOf):x(e)?LI(e.anyOf):L(e)?MI(e.properties):k({})}function zk(e,t,r,o){let i=h(e,t,r);return f.Update(_r(i),{},o)}function wI(e,t,r,o){return N(e,[r])?zk(e,t,r,o):Mo(r,o)}function wo(e,t,r={}){return R("Pick",[e,t],r)}function $I(e,t,r={}){let o=a.IsArray(t)?qn(t):t;return S({},wo(e,o,r))}function Yk(e,t){return a.Keys(e).reduce((o,i)=>t.includes(i)?f.Assign(o,{[i]:e[i]}):o,{})}function Vk(e,t){let r=ka(e),o=Fn(t),i=Yk(r,o);return k(i)}function Wk(e,t,r,o,i){let s=h(e,t,r),p=h(e,t,o);return f.Update(Vk(s,p),{},i)}function DI(e,t,r,o,i){return N(e,[r,o])?Wk(e,t,r,o,i):wo(r,o,i)}function $o(e,t={}){return R("ReadonlyType",[e],t)}function GI(e,t={}){return S({},$o(e,t))}function vI(e){return pr(_t(e))}function jI(e,t){let r=Gt(e,t),o=Ar(r);return Pt(f.Assign(e,{[t]:o}),t)}function FI(e){let t=e.map(r=>Ar(r));return he(t)}function qI(e){let t=a.Keys(e).reduce((o,i)=>({...o,[i]:Qi(e[i])}),{});return k(t)}function BI(e){return pr(Me(e))}function HI(e){let t=e.map(r=>Ar(r));return G(t)}function Ar(e){return Z(e)?vI(e.items):ie(e)?jI(e.$defs,e.$ref):P(e)?FI(e.allOf):L(e)?qI(e.properties):B(e)?BI(e.items):x(e)?HI(e.anyOf):e}function Qk(e,t,r,o){let i=h(e,t,r);return f.Update(Ar(i),{},o)}function KI(e,t,r,o){return N(e,[r])?Qk(e,t,r,o):$o(r,o)}function zI(e){return nt(Mt,e)}function YI(e){return k({true:e,false:e})}function VI(e,t){let r=jo(e);return br(r,t)}function WI(e,t){return nt(On,t)}function QI(e,t){let r=he(e);return br(r,t)}function ZI(e,t){return a.IsString(e)||a.IsNumber(e)?k({[e]:t}):a.IsEqual(e,!1)?k({false:t}):a.IsEqual(e,!0)?k({true:t}):k({})}function JI(e,t){return nt(Sn,t)}function XI(e,t){return a.HasPropertyKey(e,"pattern")&&(a.IsString(e.pattern)||e.pattern instanceof RegExp)?nt(e.pattern.toString(),t):nt(Mt,t)}function eE(e,t){let r=ha(e);return Ta(r)?br(qe(e),t):nt(e,t)}function Zk(e){return e.some(t=>Ae(t)||ue(t)||Le(t))}function Jk(e,t){return a.IsEqual(Zk(e),!0)?nt(Mt,t):void 0}function Xk(e,t){return e.reduce((r,o)=>Y(o)&&(a.IsString(o.const)||a.IsNumber(o.const))?{...r,[o.const]:t}:r,{})}function e0(e,t){let r=Xk(e,t);return k(r)}function tE(e,t){let r=$t(e),o=Jk(r,t);return _(o)?o:e0(r,t)}function br(e,t){return Ve(e)?zI(t):Qe(e)?YI(t):Ie(e)?VI(e.enum,t):Le(e)?WI(e,t):P(e)?QI(e.allOf,t):Y(e)?ZI(e.const,t):ue(e)?JI(e,t):x(e)?tE(e.anyOf,t):Ae(e)?XI(e,t):Ee(e)?eE(e.pattern,t):k({})}function t0(e,t,r,o,i){let s=h(e,t,r),p=h(e,t,o);return f.Update(br(s,p),{},i)}function rE(e,t,r,o,i){return N(e,[r])?t0(e,t,r,o,i):To(r,o,i)}function nE(e,t,r){return r in e?Sa([r],e,e[r])?_e(r):h(e,t,e[r]):_e(r)}function oE(e,t){let r=Gt(e,t),o=Or(r);return Pt(f.Assign(e,{[t]:o}),t)}function iE(e){let t=e.map(r=>Or(r));return he(t)}function aE(e){let t=e.map(r=>Or(r));return G(t)}function sE(e){let t=a.Keys(e).reduce((o,i)=>({...o,[i]:En(e[i])}),{});return k(t)}function Or(e){return ie(e)?oE(e.$defs,e.$ref):P(e)?iE(e.allOf):x(e)?aE(e.anyOf):L(e)?sE(e.properties):k({})}function Do(e,t={}){return R("Required",[e],t)}function mE(e,t={}){return S({},Do(e,t))}function r0(e,t,r,o){let i=h(e,t,r);return f.Update(Or(i),{},o)}function pE(e,t,r,o){return N(e,[r])?r0(e,t,r,o):Do(r,o)}function Go(e,t={}){return R("ReturnType",[e],t)}function cE(e,t={}){return S({},Go(e,t))}function n0(e){return Pe(e)?e.returnType:z()}function o0(e,t,r,o){let i=h(e,t,r);return f.Update(n0(i),{},o)}function uE(e,t,r,o){return N(e,[r])?o0(e,t,r,o):Go(r,o)}function lE(e){return f.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function i0(e){return e.join("|")}function a0(e){return e.slice(1,e.length-1)}function s0(e,t,r){return Sr(t,`${r}${e}`)}function m0(e,t){return Sr(e,`${t}${Xu}`)}function p0(e,t){return Sr(e,`${t}${ra}`)}function c0(e,t){return Sr(e,`${t}${oa}`)}function u0(e,t){return dm(G([q("false"),q("true")]),e,t)}function l0(e,t){return Sr(e,`${t}${aa}`)}function d0(e,t,r){return Sr(t,`${r}${a0(e)}`)}function f0(e,t,r,o=[]){let i=At(e);return lm(i,t,r)}function lm(e,t,r,o=[]){let[i,...s]=e;return _(i)?lm(s,t,r,[...o,dm(i,[],"")]):Sr(t,`${r}(${i0(o)})`)}function dm(e,t,r){return Ie(e)?f0(e.enum,t,r):Le(e)?p0(t,r):Y(e)?s0(e.const,t,r):at(e)?m0(t,r):Qe(e)?u0(t,r):ue(e)?c0(t,r):Ae(e)?l0(t,r):Ee(e)?d0(e.pattern,t,r):x(e)?lm(e.anyOf,t,r):Lu}function Sr(e,t){let[r,...o]=e;return _(r)?dm(r,o,t):t}function g0(e){return`^${Sr(e,"")}$`}function dE(e){let t=g0(e);return lE(t)}function y0(e,t,r,o){let i=pt(e,t,r);return f.Update(dE(i),{},o)}function fE(e,t,r,o){return N(e,r)?y0(e,t,r,o):xo(r,o)}function I0(e){return yr(e)?B(e.items)?fm(e.items.items):ye(e.items)?[e]:oe(e.items)?[e]:[z()]:[e]}function fm(e){return e.reduce((r,o)=>[...r,...I0(o)],[])}function E0(e,t){return t in e}function h0(e,t){return P(t)?N(e,t.allOf):x(t)?N(e,t.anyOf):oe(t)?E0(e,t.$ref):!0}function N(e,t){let[r,...o]=t;return _(r)?h0(e,r)?N(e,o):!1:!0}function Qo(e,t,r){return Ru(e)?Qo(e.type,"remove",r):Au(e)?Qo(e.type,t,"remove"):Ou(e)?Qo(e.type,"add",r):xu(e)?Qo(e.type,t,"add"):[e,t,r]}function T0(e,t){return a.IsEqual(e,"remove")?Wi(t):a.IsEqual(e,"add")?et(t):t}function x0(e,t){return a.IsEqual(e,"remove")?En(t):a.IsEqual(e,"add")?Xe(t):t}function Wo(e,t,r){return a.Keys(r).reduce((o,i)=>({...o,[i]:h(e,t,r[i])}),{})}function Oa(e,t,r){let o=pt(e,t,r);return fm(o)}function pt(e,t,r){return r.map(o=>h(e,t,o))}function _0(e,t,r,o,i){return a.IsEqual(r,"Awaited")?Ty(e,t,o[0],i):a.IsEqual(r,"Capitalize")?Py(e,t,o[0],i):a.IsEqual(r,"Conditional")?My(e,t,o[0],o[1],o[2],o[3],i):a.IsEqual(r,"ConstructorParameters")?$y(e,t,o[0],i):a.IsEqual(r,"Evaluate")?vg(e,t,o[0],i):a.IsEqual(r,"Exclude")?Ca(e,t,o[0],o[1],i):a.IsEqual(r,"Extract")?By(e,t,o[0],o[1],i):a.IsEqual(r,"Index")?sI(e,t,o[0],o[1],i):a.IsEqual(r,"InstanceType")?pI(e,t,o[0],i):a.IsEqual(r,"Interface")?cI(e,t,o[0],o[1],i):a.IsEqual(r,"KeyOf")?II(e,t,o[0],i):a.IsEqual(r,"Lowercase")?ky(e,t,o[0],i):a.IsEqual(r,"Mapped")?xI(e,t,o[0],o[1],o[2],o[3],i):a.IsEqual(r,"Module")?_I(e,t,o[0],i):a.IsEqual(r,"NonNullable")?bI(e,t,o[0],i):a.IsEqual(r,"Pick")?DI(e,t,o[0],o[1],i):a.IsEqual(r,"Options")?RI(e,t,o[0],o[1]):a.IsEqual(r,"Parameters")?PI(e,t,o[0],i):a.IsEqual(r,"Partial")?wI(e,t,o[0],i):a.IsEqual(r,"Omit")?SI(e,t,o[0],o[1],i):a.IsEqual(r,"ReadonlyType")?KI(e,t,o[0],i):a.IsEqual(r,"Record")?rE(e,t,o[0],o[1],i):a.IsEqual(r,"Required")?pE(e,t,o[0],i):a.IsEqual(r,"ReturnType")?uE(e,t,o[0],i):a.IsEqual(r,"TemplateLiteral")?fE(e,t,o[0],i):a.IsEqual(r,"Uncapitalize")?Uy(e,t,o[0],i):a.IsEqual(r,"Uppercase")?Ny(e,t,o[0],i):R(r,o,i)}function h(e,t,r){let o=Dr(r),i=Qo(r,Gr(r)?"add":"none",Re(r)?"add":"none"),s=lt(i[0])?i[0].Clone():i[0],p=oe(s)?nE(e,t,s.$ref):Z(s)?_t(h(e,t,s.items),Zi(s)):Ke(s)?Ct(h(e,t,s.iteratorItems),Pu(s)):vn(s)?Ra(e,t,s.target,s.arguments):Ce(s)?cr(pt(e,t,s.parameters),h(e,t,s.instanceType),Uu(s)):Cu(s)?_0(e,t,s.action,s.parameters,s.options):Pe(s)?ur(pt(e,t,s.parameters),h(e,t,s.returnType),Nu(s)):P(s)?dt(pt(e,t,s.allOf),vu(s)):ze(s)?kt(h(e,t,s.iteratorItems),tl(s)):L(s)?k(Wo(e,t,s.properties),al(s)):je(s)?Lt(h(e,t,s.item),ml(s)):le(s)?pl(st(s),h(e,t,Fe(s))):yr(s)?qr(h(e,t,s.items)):B(s)?Me(Oa(e,t,s.items),ul(s)):x(s)?G(pt(e,t,s.anyOf),ll(s)):s,u=o?pr(p):p;return T0(i[1],x0(i[2],u))}function S(e,t){return h(e,{callstack:[]},t)}function vo(e,t={}){return R("Awaited",[e],t)}function gE(e,t={}){return S({},vo(e,t))}function js(e,t={}){return R("Evaluate",[e],t)}function Ot(e,t={}){return S({},js(e,t))}function Fs(e,t={}){return R("Module",[e],t)}function yE(e,t={}){return S({},Fs(e,t))}function IE(...e){let[t,r,o]=ee.Match(e,{2:(p,u)=>a.IsString(p)?[{},p,u]:[p,u,{}],3:(p,u,l)=>[p,u,l],1:p=>[{},p,{}]}),i=mg(r),s=a.IsArray(i)&&a.IsEqual(i.length,2)?h(t,{callstack:[]},i[0]):z();return f.Update(s,{},o)}var n={};yt(n,{Any:()=>Tn,Array:()=>_t,AsyncIterator:()=>Ct,Awaited:()=>gE,Base:()=>Ji,BigInt:()=>Eo,Boolean:()=>ta,Call:()=>Ey,Capitalize:()=>Oy,Codec:()=>Xi,Conditional:()=>Ly,Constructor:()=>cr,ConstructorParameters:()=>wy,Cyclic:()=>Pt,Decode:()=>Qu,DecodeBuilder:()=>Io,Encode:()=>Zu,EncodeBuilder:()=>yo,Enum:()=>Gu,Evaluate:()=>Ot,Exclude:()=>Dy,Extends:()=>He,ExtendsResult:()=>U,Extract:()=>jy,Function:()=>ur,Generic:()=>lr,Identifier:()=>ho,Immutable:()=>pr,Index:()=>tI,Infer:()=>go,InstanceType:()=>mI,Instantiate:()=>S,Integer:()=>jr,Interface:()=>ay,Intersect:()=>dt,IsAny:()=>Ve,IsArray:()=>Z,IsAsyncIterator:()=>Ke,IsBase:()=>lt,IsBigInt:()=>at,IsBoolean:()=>Qe,IsCall:()=>vn,IsCodec:()=>vr,IsConstructor:()=>Ce,IsCyclic:()=>ie,IsEnum:()=>Ie,IsFunction:()=>Pe,IsGeneric:()=>hn,IsIdentifier:()=>el,IsImmutable:()=>Dr,IsInfer:()=>ye,IsInteger:()=>Le,IsIntersect:()=>P,IsIterator:()=>ze,IsKind:()=>T,IsLiteral:()=>Y,IsNever:()=>Kt,IsNull:()=>Ut,IsNumber:()=>ue,IsObject:()=>L,IsOptional:()=>Re,IsParameter:()=>sl,IsPromise:()=>je,IsReadonly:()=>Gr,IsRecord:()=>le,IsRef:()=>oe,IsRefine:()=>ea,IsRest:()=>yr,IsSchema:()=>_,IsString:()=>Ae,IsSymbol:()=>Nt,IsTemplateLiteral:()=>Ee,IsThis:()=>cl,IsTuple:()=>B,IsUndefined:()=>wt,IsUnion:()=>x,IsUnknown:()=>tt,IsUnsafe:()=>fl,IsVoid:()=>mt,Iterator:()=>kt,KeyOf:()=>uI,Literal:()=>q,Lowercase:()=>Sy,Mapped:()=>TI,Module:()=>yE,Never:()=>z,NonNullable:()=>AI,Null:()=>gr,Number:()=>ft,Object:()=>k,Omit:()=>OI,Optional:()=>Vi,Options:()=>Ua,Parameter:()=>Fr,Parameters:()=>CI,Partial:()=>kI,Pick:()=>$I,Promise:()=>Lt,Readonly:()=>Qi,ReadonlyType:()=>GI,Record:()=>sa,RecordKey:()=>Rn,RecordKeyAsPattern:()=>st,RecordValue:()=>Fe,Ref:()=>_e,Refine:()=>Ju,Required:()=>mE,Rest:()=>qr,ReturnType:()=>cE,Script:()=>IE,String:()=>rt,Symbol:()=>bn,TemplateLiteral:()=>ug,This:()=>ma,Tuple:()=>Me,Uncapitalize:()=>Ry,Undefined:()=>Cn,Union:()=>G,Unknown:()=>Ge,Unsafe:()=>dl,Uppercase:()=>Cy,Void:()=>pa});var gm=["CLUSTER_DB_QUERY_INVALID_CONNECTION_PARAMS","CLUSTER_DB_QUERY_INVALID_CREDENTIALS","CLUSTER_DB_QUERY_PERMISSION_DENIED","CLUSTER_DB_QUERY_QUERY_SYNTAX_ERROR","CLUSTER_DB_QUERY_DATABASE_UNREACHABLE","CLUSTER_DB_QUERY_CONNECTION_FAILED","CLUSTER_DB_QUERY_QUERY_EXECUTION_FAILED","CLUSTER_DB_QUERY_QUERY_TIMEOUT"],pie=n.Enum(gm),A0=["CLUSTER_AGGREGATION_STRUCTURE"],cie=n.Object({code:n.Enum(gm),message:n.String()}),EE=[...gm,...A0,"ABORT_ERROR","BAD_REQUEST","DUPLICATE_KEY_VIOLATION","FOREIGN_KEY_VIOLATION","FST_ERR_VALIDATION","INVALID_INPUT","FORBIDDEN","MISSING_PERMISSION","PRIVILEGE_ESCALATION","ORG_NOT_FOUND_AUTHENTICATION_ERROR","RATE_LIMITED","RESERVED_TAG_POLICY_ERROR","RESOURCE_NOT_FOUND","INVALID_INVITATION","TAG_POLICY_ALREADY_EXISTS_ERROR","TAG_POLICY_VALIDATION_ERROR","UNAUTHORIZED","URL_NOT_FOUND"],hE=["INTERNAL_ERROR","INVALID_QUERY_TO_CLUSTER"];var b0=["NETWORK_ERROR","RESPONSE_PARSE_ERROR"],O0=[...EE,...hE,...b0],uie=n.Object({code:n.Optional(n.Enum(O0,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ErrorResponse",description:"Standard envelope for API errors"}),lie=n.Object({code:n.Optional(n.Enum(EE,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ClientErrorResponse",description:"Standard envelope for client (4XX) API errors"}),die=n.Object({code:n.Optional(n.Enum(hE,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ServerErrorResponse",description:"Standard envelope for server (5XX) API errors"}),fie=n.Object({requestId:n.String({description:"Identifier used to trace the lifecycle of this API request"}),error:n.Ref("ClientErrorResponse")},{$id:"ClientErrorEnvelope",description:"Standard envelope wrapping all client (4XX) error responses"}),gie=n.Object({requestId:n.String({description:"Identifier used to trace the lifecycle of this API request"}),error:n.Ref("ServerErrorResponse")},{$id:"ServerErrorEnvelope",description:"Standard envelope wrapping all server (5XX) error responses"});var TE="lowercase-email",ym="iana-timezone",Im="simple-time",Em="simple-date-time";var S0=(e,t)=>RegExp(`^${e.source}(${t.source}${e.source})*$`),R0=/[a-zA-Z0-9-_]+/,C0=/\./,Iie=S0(R0,C0);var xE="lowercase-domain";var P0=new Set;function $(e,t,r={}){let o=t.map(i=>{let s=i;return s.$id?(P0.add(i),n.Ref(s.$id)):i});return n.Unsafe({...r,type:"object",discriminator:{propertyName:e},required:[e],oneOf:o})}var Te={limit:n.Optional(n.Integer({minimum:1,maximum:1e3})),offset:n.Optional(n.Integer({minimum:0}))},k0=n.Object({totalCount:n.Integer({minimum:0,description:"The total number of items matching the query"}),pageCount:n.Integer({minimum:0,description:"The total number of pages available"})}),_ie=n.Object({pagination:k0},{$id:"ResponseMetadata"});function b(){return n.Unsafe({type:"string",format:"date-time"})}function c({allowEmpty:e=!0,type:t="short",description:r}={}){let o=e?0:1;switch(t){case"email":return n.String({format:TE,minLength:o,maxLength:254,description:r,errorMessage:"Must be a valid lowercase email address."});case"lowercase-domain":return n.String({format:xE,minLength:o,maxLength:250,description:r});case"tsuga-query":return n.String({format:"tsuga-query",minLength:o,maxLength:1e4,description:r});case"tags-query":return n.String({format:"tags-query",minLength:o,maxLength:1e4,description:r,errorMessage:"Must be a valid tags query: only tag:value searches (no wildcards), boolean operators, and parentheses are supported. The query you provided is invalid: ${0}"});case"date-time":return n.String({format:"date-time",description:r});case"uri":return n.String({format:"uri",description:r});case"user-password":return n.String({format:"user-password",minLength:12,maxLength:250,description:r});case"long":return n.String({minLength:o,maxLength:5e4,description:r});case"short":return n.String({minLength:o,maxLength:250,description:r});case"tsuga-formula":return n.String({format:"tsuga-formula",minLength:o,maxLength:250,description:r,errorMessage:"Must be a simple mathematical formula, and all variables in it should refer to queries (q1, q2, etc.). The formula you provided is invalid: ${0}"});case"time":return n.String({format:"time",description:r});default:ar(t)}}function d({body:e,description:t,method:r,operationId:o,params:i,tags:s,query:p,paginated:u,response:l,url:g}){return i?{body:e,buildUrl:E=>g.replace(/:[a-zA-Z_]+/g,O=>E[O.slice(1)]),description:t,method:r,operationId:o,params:i,query:p,paginated:u,response:l,tags:s,templateUrl:g}:{body:e,description:t,method:r,operationId:o,query:p,paginated:u,response:l,tags:s,url:g,templateUrl:g}}function _E(e,t){if(!t||typeof t!="object")return e;let r=new URLSearchParams;return Object.entries(t).forEach(([o,i])=>{Array.isArray(i)?i.length>0&&i.forEach(s=>{s!==void 0&&(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&r.append(o,String(s))}):(typeof i=="boolean"||typeof i=="string"||typeof i=="number")&&r.append(o,String(i))}),`${e}?${r.toString()}`}var U0="x-tsuga-session-id",hm="x-tsuga-source",Tm="x-tsuga-source-version",xm="x-tsuga-source-commit",_m="x-tsuga-source-date",N0="x-request-id",Nie={[U0]:"Session identifier for request correlation",[hm]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[Tm]:"SDK version",[xm]:"SDK commit hash",[_m]:"SDK commit date",[N0]:"Unique identifier for this API request, useful for debugging and support"};var Hn=class e extends Error{constructor(r,o,i,s){super(r);this.statusCode=o;this.code=i;this.requestId=s;this.name="CliError"}static fromErrorResponse(r,o){return new e(r.message,r.statusCode,r.code,o)}};function AE(e){if(e instanceof Hn){let t=[`Error: ${e.message}`];return e.code&&t.push(`Code: ${e.code}`),e.statusCode&&t.push(`Status: ${e.statusCode}`),e.requestId&&t.push(`Request ID: ${e.requestId}`),t.join(`
34
+ `)}return e instanceof Error?`Error: ${e.message}`:String(e)}function bE(e,t){return async function(o,i={}){let{body:s,params:p,query:u}=i,l;if("url"in o)l=o.url;else{if(!p)throw new Hn("Internal error: params required for this endpoint");l=o.buildUrl(p)}let g=_E(`${e}${l}`,u),y={Accept:"application/json",Authorization:`Bearer ${t}`,[hm]:"cli",[Tm]:"1.0.7",[xm]:"85c8dfc",[_m]:"2026-04-24T11:17:21.793Z"};s&&(y["Content-Type"]="application/json");let O=await(await fetch(g,{method:o.method,headers:y,body:s?JSON.stringify(s):void 0})).json();if(O.error)throw Hn.fromErrorResponse(O.error,O.requestId);return O.data}}var OE=`/${"v1"}/docs`,SE=n.Object({path:n.String(),title:n.String(),content:n.String({description:"Raw markdown content of the documentation page"})},{$id:"DocPage",description:"A documentation page with its raw markdown content"}),L0={path:"getting-started/send-your-first-logs",title:"Send your first logs",content:`# Send your first logs
35
+ ...`};Object.assign(SE,{examples:[L0]});var RE=n.Object({path:n.String(),title:n.String(),score:n.Number({description:"Relevance score between 0 and 1 (higher is more relevant)"}),excerpt:n.String({description:"Short snippet of matching content"}),link:n.String({description:"URL to the documentation page in the Tsuga app"})},{$id:"DocSearchResult",description:"A documentation search result"}),M0={path:"getting-started/send-your-first-logs",title:"Send your first logs",score:.9,excerpt:"...send your first logs to Tsuga using the ingestion API...",link:"https://www.app.tsuga.com/documentation/getting-started/send-your-first-logs"};Object.assign(RE,{examples:[M0]});var CE=d({description:"Retrieve the raw markdown content of a documentation page by its path",operationId:"getDocPage",tags:["docs"],url:OE,method:"GET",query:n.Object({path:c({allowEmpty:!1})}),response:SE}),PE=d({description:"Full-text search across documentation pages",operationId:"searchDocs",tags:["docs"],url:`${OE}/search`,method:"GET",query:n.Object({query:c({allowEmpty:!1})}),response:n.Array(RE)});var kE=Vc(require("node:fs"));function Zo(e){if(e.file){let t=kE.default.readFileSync(e.file==="-"?0:e.file,"utf-8");return JSON.parse(t)}if(e.data)return JSON.parse(e.data);throw new Error("Provide a request body with -f <file> or -d <json>. Use --generate-skeleton to get a template.")}function xe(e){process.stdout.write(`${JSON.stringify(e,null,2)}
36
+ `)}function UE(e,t){let r=e.command("docs").description("Browse and search documentation");r.command("get <path>").description("Get a documentation page by path (e.g. 'getting-started/send-your-first-logs')").action(async o=>{let i=await t()(CE,{query:{path:o}});xe(i)}),r.command("search <query>").description("Search documentation pages").action(async o=>{let i=await t()(PE,{query:{query:o}});xe(i)})}var W="context";var Wie=`${W}.team`,Qie=`${W}.env`,Zie=`${W}.api_key_id`,Jie=`${W}.service.name`,Xie=`${W}.service.version`,w0=`${W}.host.name`,$0=`${W}.instance`,D0=`${W}.instanceid`,G0=`${W}.instance_name`,eae=`${W}.telemetry.sdk.language`,tae=`${W}.k8s.cluster.name`,rae=`${W}.k8s.cluster.uid`,nae=`${W}.k8s.namespace.name`,oae=`${W}.k8s.pod.name`,iae=`${W}.k8s.pod.uid`,aae=`${W}.k8s.container.name`,sae=`${W}.k8s.node.name`,mae=`${W}.k8s.node.uid`,pae=`${W}.k8s.deployment.name`,cae=`${W}.k8s.deployment.uid`,uae=`${W}.k8s.replicaset.name`,lae=`${W}.k8s.replicaset.uid`,dae=`${W}.k8s.statefulset.name`,fae=`${W}.k8s.statefulset.uid`,gae=`${W}.k8s.daemonset.name`,yae=`${W}.k8s.daemonset.uid`,Iae=`${W}.k8s.job.name`,Eae=`${W}.k8s.job.uid`,hae=`${W}.k8s.cronjob.name`,Tae=`${W}.k8s.cronjob.uid`;var xae={name:"tsuga.internal.processing_tag_policy_violations_total",attributes:{tagPolicyId:`${W}.tag_policy_id`,dataSource:`${W}.data_source`}},_ae={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${W}.batch_kind`,batchKindMetricsFilter:`${W}.batch_kind:metrics`,sourceApiKeyId:`${W}.source_api_key_id`,sourceEnv:`${W}.source_env`,sourceTeam:`${W}.source_team`}};var LE=1456444800,ME=4927737600,v0=LE*1e3,j0=ME*1e3,Na=1704067200,Am=Na*1e3,wE={title:"TimeRange",description:"Time range to query",examples:[{from:Na,to:Na}]},F0={title:"TimeRange",description:"Time range to query",examples:[{from:Am,to:Am}]},La=e=>n.Integer({description:e,examples:[Na],minimum:LE,maximum:ME,format:"int64"}),NE=e=>n.Integer({description:e,examples:[Am],minimum:v0,maximum:j0,format:"int64"}),ct=n.Object({from:n.Optional(La("Start timestamp in seconds")),to:n.Optional(La("End timestamp in seconds"))},wE),Et=n.Object({from:La("Start timestamp in seconds"),to:La("End timestamp in seconds")},wE),$E=n.Object({from:NE("Start timestamp in milliseconds"),to:NE("End timestamp in milliseconds")},F0);var Yr="/v0/service-catalog";var DE=n.Object({team:n.String(),lastSeenAt:b()}),q0=n.Object({ingestionApiKey:n.String(),lastSeenAt:b()}),GE=n.Object({version:n.String(),firstSeenAt:b(),lastSeenAt:b(),faulty:n.Optional(n.Boolean())}),B0=n.Object({language:n.String(),lastSeenAt:b()}),Ma=n.Object({id:n.String(),serviceName:n.String(),serviceNamespace:n.Optional(n.String()),env:n.Optional(n.String()),teams:n.Array(DE),ingestionApiKeys:n.Array(q0),versions:n.Array(GE),languages:n.Array(B0),lastSeenAt:b(),firstSeenAt:b(),sources:n.Array(n.String()),additionalUserFields:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),logsCount24h:n.Number(),errorLogsCount24h:n.Number(),tracesCount24h:n.Number(),errorTracesCount24h:n.Number(),createdAt:b(),updatedAt:b()}),Uae=d({tags:["service-catalog"],query:n.Object({...Te,clusterId:n.Optional(c())}),method:"GET",paginated:!0,url:`${Yr}/services`,response:n.Array(Ma)}),Nae=d({tags:["service-catalog"],method:"GET",url:`${Yr}/services/:serviceId`,params:n.Object({serviceId:c()}),response:Ma}),H0=n.Object({id:n.String(),endpointName:n.String(),serviceName:n.String(),serviceNamespace:n.Optional(n.String()),env:n.Optional(n.String()),teams:n.Array(DE),versions:n.Array(GE),lastSeenAt:b(),firstSeenAt:b(),sources:n.Array(n.String()),additionalUserFields:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),createdAt:b(),updatedAt:b()}),Lae=d({tags:["service-catalog"],method:"GET",url:`${Yr}/endpoints`,response:n.Array(H0)}),K0=["otel_kube","otel_host_kube","otel_host","prometheus","aws_ec2","gcp_compute_engine"];var vE=n.Object({id:n.String(),hostName:n.String(),env:n.Optional(n.String()),cpuUtilizationAverage:n.Number(),hostType:n.Enum(K0),teams:n.Array(n.String()),tags:n.Array(n.String()),firstSeenAt:b(),lastSeenAt:b(),clusterId:n.String()}),Mae=d({tags:["service-catalog"],method:"GET",url:`${Yr}/hosts`,response:n.Array(vE)}),wae=d({tags:["service-catalog"],method:"GET",url:`${Yr}/hosts/:hostId`,params:n.Object({hostId:c()}),response:vE}),z0=n.Object({serviceName:n.String()}),Y0=n.Object({from:n.String(),to:n.String(),count:n.Number()}),$ae=d({tags:["service-catalog"],url:`${Yr}/services/:serviceId/graph`,method:"GET",params:n.Object({serviceId:c()}),query:n.Object({...ct.properties,query:n.Optional(c({type:"tsuga-query"}))}),response:n.Object({nodes:n.Array(z0),edges:n.Array(Y0)})}),Dae=d({tags:["service-catalog"],method:"GET",url:`${Yr}/services/by-api-keys`,response:n.Record(n.String(),n.Array(n.Object({serviceName:n.String(),serviceNamespace:n.Optional(n.String())})))});var bm=`/${"v1"}/services`,Om=n.Pick(Ma,["id","serviceName","serviceNamespace","env","teams","versions","languages","lastSeenAt","firstSeenAt","sources","logsCount24h","errorLogsCount24h","tracesCount24h","errorTracesCount24h"],{$id:"Service",description:"Observed telemetry service with metadata, activity stats and version signals"}),V0={id:"123-456-abc",serviceName:"api-gateway",serviceNamespace:"platform",env:"production",teams:[{team:"platform",lastSeenAt:"2024-01-15T12:34:56.000Z"}],versions:[{version:"1.2.3",firstSeenAt:"2024-01-01T08:00:00.000Z",lastSeenAt:"2024-01-15T12:34:56.000Z",faulty:!1}],languages:[{language:"go",lastSeenAt:"2024-01-15T12:34:56.000Z"}],lastSeenAt:"2024-01-15T12:34:56.000Z",firstSeenAt:"2024-01-01T08:00:00.000Z",sources:["logs","metrics","traces"],logsCount24h:12e3,errorLogsCount24h:42,tracesCount24h:8500,errorTracesCount24h:17};Object.assign(Om,{examples:[V0]});var jE=d({description:"Retrieve all services",operationId:"listServices",tags:["services"],url:bm,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(Om)}),FE=d({description:"Retrieve a service by its id",operationId:"getService",tags:["services"],url:`${bm}/:serviceId`,method:"GET",params:n.Object({serviceId:c({allowEmpty:!1})}),response:Om}),qE=d({description:"Retrieve the dependency graph for a service, showing which services call each other",operationId:"getServiceGraph",tags:["services"],url:`${bm}/:serviceId/graph`,method:"GET",params:n.Object({serviceId:c({allowEmpty:!1})}),query:n.Object({...ct.properties,query:n.Optional(c({type:"tsuga-query"}))}),response:n.Object({nodes:n.Array(n.Object({serviceName:n.String()})),edges:n.Array(n.Object({from:n.String(),to:n.String(),count:n.Number()}))})});var Yae=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z"));var nse=60*1e3;var vse=1/1e6,eU=1e3,tU=60*eU,rU=60*tU,$a=24*rU,jse=7*$a,Fse=30*$a;var Rm=["past-5-minutes","past-15-minutes","past-30-minutes","past-1-hour","past-2-hours","past-4-hours","past-6-hours","past-12-hours","past-24-hours","past-2-days","past-3-days","past-7-days","past-30-days","past-3-months","current-day","current-week","current-month","current-year","previous-day","previous-week","previous-month","previous-3-months","previous-year"];var nU={s:1,m:60,h:3600,d:86400};function HE(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<48||r>57)return!1}return!0}function KE(){return Math.floor(Date.now()/1e3)}function Da(e){if(typeof e=="number")return e;if(e==="now")return KE();if(e.startsWith("-")&&e.length>=3){let r=e.at(-1),o=r?nU[r]:void 0;if(o){let i=e.slice(1,-1);if(i.length>0&&HE(i))return KE()-parseInt(i,10)*o}}if(HE(e)&&e.length>0)return parseInt(e,10);let t=Date.parse(e);if(!Number.isNaN(t))return Math.floor(t/1e3);throw new Error(`Invalid time value: ${e}. Use unix seconds, relative (-30m, -1h), 'now', or ISO 8601.`)}var Wt=require("node:fs"),zE=require("node:os"),Cm=require("node:path"),YE=(0,Cm.join)((0,zE.homedir)(),".config","tsuga"),Kn=(0,Cm.join)(YE,"config.json"),oU="https://api.tsuga.com";function Vr(){if(!(0,Wt.existsSync)(Kn))return{};try{return JSON.parse((0,Wt.readFileSync)(Kn,"utf-8"))}catch{throw new Error(`Config file corrupted: ${Kn}
37
+ Re-run: tsuga auth <token>`)}}function Pm(e){(0,Wt.mkdirSync)(YE,{recursive:!0,mode:448}),(0,Wt.writeFileSync)(Kn,`${JSON.stringify(e,null,2)}
38
+ `,{mode:384})}function km(e){let t=Vr(),r=e.apiToken??process.env.TSUGA_OPERATION_API_KEY??t.operationApiKey;return{apiUrl:oU,apiToken:r}}function Um(e){let t={};try{t=Vr()}catch{}Pm({...t,...e})}function VE(){return(0,Wt.existsSync)(Kn)||!!process.env.TSUGA_OPERATION_API_KEY}function Nm(){return Kn}var Lm={from:"-30m",to:"now",query:"*","max-results":"100"};function WE(){return Vr().defaults??{}}function Qt(e){return(Vr().defaults??{})[e]??Lm[e]}function QE(e,t){let r={};try{r=Vr()}catch{}let o={...r.defaults??{},[e]:t};Pm({...r,defaults:o})}function ZE(){let e={};try{e=Vr()}catch{}let{defaults:t,...r}=e;Pm(r)}function JE(){return Vr().lastUpdateCheck}function XE(e){Um({lastUpdateCheck:e})}function eh(e,t){let r=t??Qt(e);return r===void 0?void 0:Da(r)}function Mm(e){let t=Qt(e);return t===void 0?"":` (default: ${t})`}function th(e,t){e.command("service-graph").description("Inspect service dependency graphs").command("get <serviceId>").description("Retrieve the dependency graph for a service").option("--from <timestamp>",`Start of time range${Mm("from")}`).option("--to <timestamp>",`End of time range${Mm("to")}`).option("--query <query>",`Search query${Mm("query")}`).action(async(o,i)=>{let s={},p=eh("from",i.from),u=eh("to",i.to);p!==void 0&&(s.from=p),u!==void 0&&(s.to=u),i.query!==void 0&&(s.query=i.query);let l=await t()(qE,{params:{serviceId:o},query:s});xe(l)})}var rh=n.Object({type:n.Literal("number"),number:n.String()}),iU=n.Object({type:n.Literal("string"),string:n.String()}),aU=n.Object({type:n.Literal("timestamp"),timestamp:n.String()}),wm=$("type",[rh,iU,aU]),sU=n.Object({by:n.Record(n.String(),wm),computed:n.Record(n.String(),rh)}),mU=n.Object({type:n.Literal("buckets"),buckets:n.Array(sU)}),pU=n.Object({type:n.Literal("distribution"),bounds:n.Array(n.Number()),buckets:n.Array(n.Object({timestamp:n.Number(),counts:n.Array(n.Number())})),percentiles:n.Optional(n.Array(n.Number()))}),nh=$("type",[mU,pU]);var cU="/v0/aggregation",uU=n.Union([n.Literal("a"),n.Literal("d"),n.Literal("q"),n.Literal("w")]),lU=n.Object({parallelism:n.Number(),engine:uU,recordBatchCache:n.Optional(n.Boolean()),includeNullGroups:n.Optional(n.Boolean()),restartAwareGaugeSum:n.Optional(n.Boolean())}),St=["logs","metrics","traces"],dU={logs:"Logs",metrics:"Metrics",traces:"Traces"},fU=[...St,"connections"],mme={...dU,connections:"Connections"},oh=n.Enum(fU,{description:"Data source being queried"}),Jo=n.Enum(St,{description:"Data source being queried for this aggregation"}),Wr=c({description:"Attribute containing the values to aggregate"}),ih=$("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(Wr)},{$id:"AggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:Wr},{$id:"AggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:Wr},{$id:"AggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:Wr},{$id:"AggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:Wr},{$id:"AggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:Wr},{$id:"AggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:Wr,percentile:n.Number()},{$id:"AggregatePercentile",title:"Percentile"})],{title:"Aggregate"}),$m=[n.Object({type:n.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),n.Object({type:n.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),n.Object({type:n.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),n.Object({type:n.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),n.Object({type:n.Literal("increase",{description:"`Increase` is designed for cumulative metrics. It computes the increase of cumulative metrics by automatically handling counter resets. When used with an aggregation such as `sum` it combines all series without requiring an explicit group-by."})},{$id:"FunctionIncrease",title:"Increase"}),n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:c({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"FunctionRolling",title:"Rolling"}),n.Object({type:n.Literal("log",{description:"Applies a logarithm transformation to the values"}),base:n.Integer({description:"The base of the logarithm",minimum:2})},{$id:"FunctionLog",title:"Log"}),n.Object({type:n.Literal("power",{description:"Raises values to a specified power"}),exponent:n.Integer({description:"The exponent to raise values to"})},{$id:"FunctionPower",title:"Power"}),n.Object({type:n.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"})],gU=$("type",[...$m],{title:"MonitorFunction"}),pme=new Set($m.map(e=>e.properties.type.const)),yU=$("type",[...$m,n.Object({type:n.Literal("last",{description:"Takes the last value of the metric for the selected time frame"})},{$id:"FunctionLast",title:"Last"}),n.Object({type:n.Literal("time-offset",{description:"Shifts a query's data backward by a specified duration for easy comparison over different periods of time."}),seconds:n.Integer({description:"Number of seconds to offset",minimum:1})},{$id:"FunctionTimeOffset",title:"TimeOffset"})],{title:"Function"});var IU=$("type",[n.Object({type:n.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),n.Object({type:n.Literal("timeseries"),aggregationWindow:c({description:'Time bucket size for aggregation (e.g. "10s", "60s", "1m")'})},{title:"Timeseries",description:"Returns a time series"})]),Dm=15,EU=["zero","null"],hU=n.Enum(EU),ah=n.Object({mode:n.Object({type:hU})}),TU={aggregate:ih,functions:n.Optional(n.Array(yU,{maxItems:10,description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(ah)},sh={maxItems:Dm,description:"Aggregations that may be combined together in the same query"},Xo=n.Array(n.Object({...TU,filter:n.Optional(c({type:"tsuga-query",description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),sh),zn=n.Array(n.Object({aggregate:ih,functions:n.Optional(n.Array(gU,{maxItems:10,description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(ah),filter:c({type:"tsuga-query"})},{title:"MonitorAggregationQuery"}),sh);var ei=c({type:"tsuga-formula",description:"Formula referencing query outputs (e.g. q1+q2) to compute derived series"}),xU=n.Object({fields:n.Array(c(),{maxItems:1}),limit:n.Number()},{title:"AggregationGroupBy"}),_U=7,Yn=n.Array(xU,{maxItems:_U,description:"Fields used to group the results"}),cme=d({tags:["aggregation"],url:`${cU}/multi-query`,method:"POST",body:n.Object({timeRange:$E,queries:Xo,groupBy:n.Optional(Yn),returnType:IU,dataSource:Jo,formula:ei,executionOptions:lU,triggeredBy:n.Optional(n.Literal("refresh")),shouldStreamResults:n.Optional(n.Boolean()),clusterId:n.Optional(c({allowEmpty:!1}))}),response:nh}),AU=["per-second","per-minute","per-hour","rate"],Qr=n.Enum(AU),ume=$("type",[n.Object({type:n.Literal("count"),count:n.Object({field:n.Optional(c()),timeNormalization:n.Optional(Qr)})}),n.Object({type:n.Literal("average"),average:n.Object({field:c(),timeNormalization:n.Optional(Qr)})}),n.Object({type:n.Literal("min"),min:n.Object({field:c(),timeNormalization:n.Optional(Qr)})}),n.Object({type:n.Literal("max"),max:n.Object({field:c(),timeNormalization:n.Optional(Qr)})}),n.Object({type:n.Literal("sum"),sum:n.Object({field:c(),timeNormalization:n.Optional(Qr)})}),n.Object({type:n.Literal("percentile"),percentile:n.Object({field:c(),percentile:n.Number(),timeNormalization:n.Optional(Qr)})}),n.Object({type:n.Literal("uniqueCount"),uniqueCount:n.Object({field:c(),timeNormalization:n.Optional(Qr)})})]),bU=n.Object({type:n.Literal("time"),time:n.Object({interval:c()})}),OU=n.Object({type:n.Literal("histogram"),histogram:n.Object({field:c(),interval:n.Number(),bounds:n.Optional(n.Object({min:n.Number(),max:n.Number()}))})}),SU=n.Object({type:n.Literal("topList"),topList:n.Object({field:c(),size:n.Number(),orderBy:n.Optional(n.Object({computeRef:c(),order:n.Union([n.Literal("asc"),n.Literal("desc")])}))})}),lme=$("type",[bU,OU,SU]);var Gm=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],vm=["light","dark"];var RU={light:{red:{text:"foreground.red",background:"avatar.background.red"},orange:{text:"foreground.orange",background:"avatar.background.orange"},amber:{text:"foreground.amber",background:"avatar.background.amber"},yellow:{text:"foreground.yellow",background:"avatar.background.yellow"},green:{text:"foreground.green",background:"avatar.background.green"},emerald:{text:"foreground.emerald",background:"avatar.background.emerald"},teal:{text:"foreground.teal",background:"avatar.background.teal"},cyan:{text:"foreground.cyan",background:"avatar.background.cyan"},sky:{text:"foreground.sky",background:"avatar.background.sky"},blue:{text:"foreground.blue",background:"avatar.background.blue"},indigo:{text:"foreground.indigo",background:"avatar.background.indigo"},purple:{text:"foreground.purple",background:"avatar.background.purple"},pink:{text:"foreground.pink",background:"avatar.background.pink"}},dark:{red:{text:"avatar.foreground.foreground",background:"avatar.solid-background.red"},orange:{text:"avatar.foreground.foreground",background:"avatar.solid-background.orange"},amber:{text:"avatar.foreground.foreground",background:"avatar.solid-background.amber"},yellow:{text:"avatar.foreground.foreground",background:"avatar.solid-background.yellow"},green:{text:"avatar.foreground.foreground",background:"avatar.solid-background.green"},emerald:{text:"avatar.foreground.foreground",background:"avatar.solid-background.emerald"},teal:{text:"avatar.foreground.foreground",background:"avatar.solid-background.teal"},cyan:{text:"avatar.foreground.foreground",background:"avatar.solid-background.cyan"},sky:{text:"avatar.foreground.foreground",background:"avatar.solid-background.sky"},blue:{text:"avatar.foreground.foreground",background:"avatar.solid-background.blue"},indigo:{text:"avatar.foreground.foreground",background:"avatar.solid-background.indigo"},purple:{text:"avatar.foreground.foreground",background:"avatar.solid-background.purple"},pink:{text:"avatar.foreground.foreground",background:"avatar.solid-background.pink"}},gradient:{red:"var(--chakra-colors-gradient-red)",orange:"var(--chakra-colors-gradient-orange)",amber:"var(--chakra-colors-gradient-amber)",yellow:"var(--chakra-colors-gradient-yellow)",green:"var(--chakra-colors-gradient-green)",emerald:"var(--chakra-colors-gradient-emerald)",teal:"var(--chakra-colors-gradient-teal)",cyan:"var(--chakra-colors-gradient-cyan)",sky:"var(--chakra-colors-gradient-sky)",blue:"var(--chakra-colors-gradient-blue)",indigo:"var(--chakra-colors-gradient-indigo)",purple:"var(--chakra-colors-gradient-purple)",pink:"var(--chakra-colors-gradient-pink)"}},mh=["activity-heart","activity","airplay","airpods","alarm-clock","anchor","annotation-dots","annotation-heart","annotation-question","annotation","announcement-03","asterisk-01","atom-01","atom-02","award-03","award-04","award-05","backpack","bank-note-01","bank-note-02","bank-note-03","battery-charging-01","beaker-01","beaker-02","bell-03","bell-04","bell-ringing-03","bell-ringing-04","bluetooth-connect","bluetooth-on","book-closed","book-open-01","book-open-02","bookmark","briefcase-01","briefcase-02","brush-01","brush-02","brush-03","building-01","building-02","building-03","building-08","bus","calculator","calendar-check-01","calendar-date","calendar-heart-01","calendar","camera-01","camera-lens","car-01","certificate-01","certificate-02","check-heart","clipboard-attachment","clipboard-check","clipboard-download","clipboard","clock-snooze","clock-stopwatch","cloud-01","cloud-lightning","cloud-moon","cloud-raining-01","cloud-raining-03","cloud-raining-05","cloud-raining-06","cloud-snowing-01","cloud-sun-01","cloud-sun-02","cloud-sun-03","code-browser","code-circle-01","code-circle-02","code-circle-03","code-square-01","code-square-02","coins-hand","coins-stacked-01","colors","compass-01","compass-02","compass-03","compass","credit-card-01","credit-card-02","cube-02","cube-04","cube-outline","currency-bitcoin-circle","currency-dollar-circle","currency-ethereum-circle","currency-euro-circle","currency-pound-circle","currency-ruble-circle","currency-rupee-circle","currency-yen-circle","cursor-click-01","cursor-click-02","diamond-01","diamond-02","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","disc-01","disc-02","droplets-01","droplets-02","droplets-03","dropper","face-content","face-frown","face-happy","face-neutral","face-sad","face-smile","face-wink","feather","file-02","file-05","file-06","file-heart-01","file-heart-02","file-search-01","file-search-02","file-search-03","film-01","film-02","fingerprint-03","fingerprint-04","flag-01","flag-04","flash-off","flash","gaming-pad-01","gaming-pad-02","gift-01","glasses-01","glasses-02","globe-03","globe-04","globe-05","globe-06","globe-slated-01","globe-slated-02","graduation-hat-01","graduation-hat-02","hash-01","hash-02","headphones-01","headphones-02","heart-circle","heart-hand","heart-hexagon","heart-octagon","heart-rounded","heart-square","hearts","hexagon-01","hexagon-02","home-03","home-smile","hourglass-01","hourglass-02","hourglass-03","hurricane-01","hurricane-02","hurricane-03","image-01","image-02","image-03","image-04","image-05","keyboard-01","laptop-01","life-buoy-01","life-buoy-02","lightbulb-02","lightbulb-03","lightbulb-04","lock-keyhole-circle","lock-keyhole-square","luggage-01","luggage-02","luggage-03","magic-wand-01","magic-wand-02","map-01","map-02","mark","marker-pin-01","marker-pin-04","marker-pin-05","marker-pin-06","medical-circle","medical-cross","medical-square","message-chat-square","message-notification-square","message-smile-square","message-text-square-02","microphone-01","microphone-02","microscope","modem-01","modem-02","monitor-03","monitor-04","monitor-05","moon-01","moon-eclipse","moon-star","music-note-01","music-note-02","music-note-plus","octagon","palette","paperclip","pentagon","phone-01","phone-02","phone-call-01","phone","piggy-bank-01","pin-01","pin-02","plane","play-circle","play-square","podcast","power-02","presentation-chart-01","printer","receipt","recording-01","recording-02","recording-03","rocket-01","rocket-02","roller-brush","rss-01","rss-02","ruler","scales-01","scales-02","server-06","shield-01","shield-02","shield-03","shield-dollar","shield-zap","shopping-bag-01","shopping-cart-01","signal-01","signal-02","signal-03","simcard","sliders-01","sliders-02","snowflake-01","snowflake-02","speaker-01","speaker-02","speaker-03","speedometer-01","speedometer-02","speedometer-03","speedometer-04","square","stand","star-03","star-07","sticker-circle","sticker-square","sun-setting-01","sun-setting-02","sun-setting-03","sun","sunrise","sunset","tablet-01","tag-01","tag-02","tag-03","target-01","target-02","target-03","target-04","target-05","terminal-browser","terminal-circle","terminal-square","thermometer-02","thermometer-03","thermometer-cold","thermometer-warm","thumbs-down","thumbs-up","ticket-01","tool-01","tool-02","train","tram","translate-01","triangle","trophy-01","trophy-02","truck-01","truck-02","tv-02","umbrella-01","umbrella-02","umbrella-03","virus","voicemail","wallet-01","wallet-02","wallet-05","watch-circle","watch-square","waves","webcam-01","webcam-02","wind-01","wind-02","wind-03","youtube","zap-circle","zap-fast","zap"];var fme=RU.light.red.background;var H=n.Object({success:n.Literal(!0,{description:"Indicates the resource was deleted successfully"})},{$id:"DeleteResponse",example:{success:!0}});var CU=["asset-change","cluster-integration-config","explorer-saved-view","crawler-integration-config","inventory","saml-config","sensitive-data-scanner-rule","service","team-remap-config","user-data","user-self","monitor-alert","monitor-debugging","retention-policy","org","custom-usage-tag"],PU=["ingestion-api-key","operation-api-key","audit-log","dashboard","dashboard-report","inventory-settings","log-route","monitor","notification-integration","notification-rule","notification-silence","quality-report","tag-policy","team","team-members","user-invitation","user-permissions"],kU=["log","metric","trace"],UU=[...PU,...kU],_me=[...CU,...UU];var ph=["admin","public_editor","public_viewer","teams_only"],Vn=["admin","editor","viewer"];var Zr="/v0/team-membership",jm=n.Object({id:n.String(),userId:n.String(),teamId:n.String(),roleKey:n.Enum(Vn)}),ch=n.Object({userId:c({allowEmpty:!1}),teamId:c({allowEmpty:!1}),roleKey:n.Enum(Vn)}),NU=n.Object({userId:c({allowEmpty:!1}),teamId:c({allowEmpty:!1})}),LU=n.Optional(n.Object({userId:n.Optional(c({allowEmpty:!1})),teamId:n.Optional(c({allowEmpty:!1}))})),Ame=d({tags:["access-control"],url:Zr,method:"GET",query:LU,response:n.Array(jm)}),bme=d({tags:["access-control"],url:Zr,method:"POST",body:ch,response:jm}),Ome=d({tags:["access-control"],url:Zr,method:"PUT",body:ch,response:jm}),Sme=d({tags:["access-control"],url:Zr,method:"DELETE",body:NU,response:H}),Ga=500,MU=n.Object({teamId:c({allowEmpty:!1}),members:n.Array(n.Object({userId:n.Optional(c({allowEmpty:!1})),userEmail:n.Optional(c({allowEmpty:!1,type:"email"})),roleKey:n.Enum(Vn)},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:Ga})}),wU=n.Object({results:n.Array(n.Object({userId:n.String(),status:n.Enum(["added","already_member","user_not_found"])}))}),Rme=d({tags:["access-control"],url:`${Zr}/bulk-add`,method:"POST",body:MU,response:wU}),Cme=d({tags:["access-control"],url:`${Zr}/bulk-update-user-roles`,method:"PUT",body:n.Object({userIds:n.Array(c({allowEmpty:!1}),{minItems:1,maxItems:Ga}),teamId:c({allowEmpty:!1}),role:n.Enum(Vn)}),response:n.Object({})}),$U=n.Object({teamId:c({allowEmpty:!1}),userIds:n.Optional(n.Array(c({allowEmpty:!1}),{minItems:1,maxItems:Ga})),userEmails:n.Optional(n.Array(c({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:Ga}))},{oneOf:[{required:["userIds"]},{required:["userEmails"]}]}),DU=n.Object({results:n.Array(n.Object({userId:n.String(),status:n.Enum(["removed","not_member","user_not_found"])}))}),Pme=d({tags:["access-control"],url:`${Zr}/bulk-remove`,method:"DELETE",body:$U,response:DU});var GU="^\\S(.*\\S)?$",vU=n.Object({key:n.String({maxLength:128}),value:n.String({maxLength:256,pattern:GU})},{title:"Tag"}),va=n.Array(vU,{title:"Tags",maxItems:50,description:"List of key/value tags applied to the resource"}),be=n.Optional(va);var Rr="/v0/teams",Fa=["public","private"],ja={NAME:"name",CREATED_AT:"createdAt",MEMBER_COUNT:"memberCount",VISIBILITY:"visibility"},jU=n.Enum([ja.NAME,ja.CREATED_AT,ja.MEMBER_COUNT,ja.VISIBILITY]),uh=n.Object({color:n.Enum(Gm),mode:n.Enum(vm),iconName:n.Enum(mh)}),Fm=n.Object({color:n.Enum(Gm),mode:n.Enum(vm)}),FU=100,qU=250,Wn=n.Object({id:n.String({description:"Identifier of the team"}),name:n.String({description:"Human readable team name displayed throughout the app"}),description:n.Optional(n.String()),visibility:n.Enum(Fa,{description:"Controls whether the resources of the team are discoverable by users"}),tags:be,createdAt:b(),updatedAt:b(),memberCount:n.Optional(n.Number({description:"Number of members currently in the team"})),avatar:n.Optional(uh)}),qa=n.Object({name:n.String({minLength:1,maxLength:FU,description:"Name to assign to the team"}),description:n.Optional(n.String({maxLength:qU})),visibility:n.Enum(Fa,{description:"Controls whether the resources of the team are discoverable by users"}),tags:be,avatar:n.Optional(uh)}),BU=n.Object({id:n.String(),name:n.String(),email:n.String(),role:n.Enum(Vn),joinedTeamAt:b(),orgRole:n.Enum(ph),avatar:n.Optional(Fm)}),jme=d({tags:["teams"],url:Rr,method:"GET",paginated:!0,response:n.Array(Wn),query:n.Object({...Te,includeMemberCount:n.Optional(n.Boolean()),searchQuery:n.Optional(c()),visibility:n.Optional(n.Enum(Fa)),myTeamsOnly:n.Optional(n.Boolean()),sortBy:n.Optional(jU),sortDirection:n.Optional(n.Enum(["asc","desc"]))})}),Fme=d({tags:["teams"],url:`${Rr}/:id`,method:"GET",params:n.Object({id:c()}),response:Wn}),qme=d({tags:["teams"],url:`${Rr}/:id/members`,method:"GET",params:n.Object({id:c()}),response:n.Array(BU)}),Bme=d({tags:["teams"],url:`${Rr}/:id/assets`,method:"GET",params:n.Object({id:c()}),response:n.Object({apiKeyCount:n.Number(),logRouteCount:n.Number(),monitorCount:n.Number(),notificationRuleCount:n.Number(),dashboardCount:n.Number()})}),Hme=d({tags:["teams"],url:Rr,method:"POST",body:qa,response:Wn}),Kme=d({tags:["teams"],url:`${Rr}/:id`,method:"PUT",params:n.Object({id:c()}),body:qa,response:Wn}),zme=d({tags:["teams"],url:`${Rr}/bulk-update`,method:"POST",body:n.Object({teamIds:n.Array(c(),{maxItems:100}),config:n.Object({visibility:n.Enum(Fa)})}),response:n.Object({})}),Yme=d({tags:["teams"],url:`${Rr}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H});var HU=n.Enum(["terraform-provider","web-frontend","mcp-server","cli"]),Oe=$("type",[n.Object({type:n.Literal("user"),id:n.String(),name:n.String(),avatar:n.Optional(Fm)}),n.Object({type:n.Literal("operation-api-key"),id:n.String(),name:n.String(),source:n.Optional(HU)})]);var Xr="/v0/dashboards",KU=["white","gray.100","amber.200","lime.200","emerald.200","cyan.200","blue.200","violet.200","fuchsia.200","pink.200","red.200"],zU=["timeseries","top-list","pie","query-value","bar","list","table"],spe=[...zU,"note"],YU=["ns","us","ms","s","m","h","days"];var VU=["B","KB","MB","GB","TB","PB"];var Jr=$("type",[n.Object({type:n.Literal("duration",{description:"Normalizes values as durations using standard time units"}),unit:n.Enum(YU,{description:"Time unit used to present the normalized values"})},{$id:"DataNormalizerDuration",title:"Duration"}),n.Object({type:n.Literal("data",{description:"Normalizes values as data sizes using byte units"}),unit:n.Enum(VU,{description:"Data size unit used to present the normalized values"})},{$id:"DataNormalizerData",title:"Data"}),n.Object({type:n.Literal("percent",{description:"Format values as percentages"})},{$id:"DataNormalizerPercent",title:"Percent"}),n.Object({type:n.Literal("date",{description:"Formats values as calendar dates"})},{$id:"DataNormalizerDate",title:"Date"}),n.Object({type:n.Literal("level",{description:"Displays values using their log level name"})},{$id:"DataNormalizerLevel",title:"Level"}),n.Object({type:n.Literal("custom",{description:"Normalizes values using a custom unit label"}),unit:n.String({description:"Text label describing the custom unit"})},{$id:"DataNormalizerCustom",title:"Custom"})],{title:"Normalizer"}),WU=n.Object({attribute:n.String({description:"Attribute displayed as a column in the log list"}),normalizer:n.Optional(Jr)},{title:"WidgetListColumn"}),QU=["background","no-background"],ZU=["table","legend-only","no-legend"];var JU=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"],Eh=["alert","warning","success"],lh=n.Object({operator:n.Enum(JU,{description:"Comparator used to evaluate the metric value"}),value:n.Number({description:"Threshold value used when evaluating the operator"}),color:n.Enum(Eh,{description:"Color applied when the condition is met"})},{title:"ConditionalFormatting"}),XU=n.Object({value:n.Number({description:"Y-axis value where the threshold marker is placed"}),level:n.Enum(Eh,{description:"Level applied to the threshold marker"})},{title:"ThresholdMarker"}),eN=["sec","min","hour","day"],dh=n.Object({time:n.Number({description:"Number of units that make up each bar bucket"}),metric:n.Enum(eN,{description:"Unit used to measure the bucket width"})});var fh=n.Enum(["flex-start","center","flex-end"],{description:"Flex alignment keyword used for widget layout"}),tN=n.Object({formula:n.Optional(c({type:"short",description:"Optional alias for formula (only used for display in the UI)"})),queries:n.Optional(n.Record(n.String(),c({type:"short",description:"Optional alias for a query (only used for display in the UI)"})))}),qm={source:oh,queries:Xo,formula:n.Optional(ei),aliases:n.Optional(tN),visibleSeries:n.Optional(n.Array(n.Boolean(),{description:"Flags indicating whether each query or formula series is visible"}))},Ba={...qm,groupBy:n.Optional(Yn)},Ha=n.Enum(ZU,{description:"Controls whether and how the widget displays legend or series details (e.g. table, legend-only, or no legend)"}),Qn=n.Optional(n.Number({description:"Number of decimal places to display in the value"})),gh=n.Optional(n.Array(XU,{description:"Threshold markers displayed on the chart"})),rN=n.Object({name:c({description:"Display name of the table column"}),...qm,source:Jo,normalizer:n.Optional(Jr),precision:Qn},{title:"TableColumn"}),nN=n.Array(n.Object({id:c({description:"ID of the column to sort by"}),desc:n.Boolean({description:"Whether the sort is descending"})},{title:"TableDefaultSorting"})),oN=n.Object({type:n.Literal("list",{description:"Displays matching logs or database rows in a tabular list"}),source:n.Union([n.Literal("logs",{description:"Indicates that the widget queries logs"}),n.Literal("connections",{description:"Indicates that the widget queries connections like PostgreSQL, BigQuery, etc."})]),query:c({type:"long",description:"Query that selects logs or database rows for the list"}),listColumns:n.Optional(n.Array(WU,{description:"Custom columns to display for each log or database row"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"}))),connectionId:n.Optional(c({description:"Identifier of the connection to query"}))}),iN=n.Unsafe({...oN,$id:"GraphVisualizationList",title:"List"}),yh=$("type",[n.Object({type:n.Literal("auto")}),n.Object({type:n.Literal("number"),value:n.Number()})]),Ih=n.Object({min:yh,max:yh,scale:$("type",[n.Object({type:n.Literal("pow"),exponent:n.Number({minimum:0})}),n.Object({type:n.Enum(["linear","log","sqrt"])})]),alwaysIncludeZero:n.Boolean()});var aN=$("type",[n.Object({type:n.Literal("timeseries",{description:"Displays the aggregation as a time series chart"}),...Ba,timeBucket:n.Optional(dh),normalizer:n.Optional(Jr),precision:Qn,legendMode:n.Optional(Ha),thresholds:gh,yAxisSettings:n.Optional(Ih)},{$id:"GraphVisualizationTimeseries",title:"Timeseries"}),n.Object({type:n.Literal("top-list",{description:"Displays the aggregation as a ranked list of top results"}),...Ba,normalizer:n.Optional(Jr),precision:Qn,conditions:n.Optional(n.Array(lh,{description:"Conditional formatting rules applied to the displayed value"}))},{$id:"GraphVisualizationTopList",title:"TopList"}),n.Object({type:n.Literal("pie",{description:"Displays the aggregation as a pie chart"}),...Ba,normalizer:n.Optional(Jr),precision:Qn,legendMode:n.Optional(Ha)},{$id:"GraphVisualizationPie",title:"Pie"}),n.Object({type:n.Literal("query-value",{description:"Displays the aggregation as a single value"}),...qm,backgroundMode:n.Optional(n.Enum(QU,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(lh,{description:"Conditional formatting rules applied to the displayed value"})),precision:Qn,normalizer:n.Optional(Jr),legendMode:n.Optional(Ha)},{$id:"GraphVisualizationQueryValue",title:"QueryValue"}),n.Object({type:n.Literal("bar",{description:"Displays the aggregation as a bar chart"}),...Ba,timeBucket:n.Optional(dh),precision:Qn,normalizer:n.Optional(Jr),thresholds:gh,legendMode:n.Optional(Ha),yAxisSettings:n.Optional(Ih)},{$id:"GraphVisualizationBar",title:"Bar"}),n.Object({type:n.Literal("table",{description:"Displays the aggregation as a table with multi-level grouping"}),columns:n.Array(rN,{minItems:1,description:"Each column defines an independent aggregation displayed as a table column"}),groupBy:n.Optional(Yn),defaultSorting:n.Optional(nN)},{$id:"GraphVisualizationTable",title:"Table"}),iN,n.Object({type:n.Literal("note",{description:"Displays static text on the dashboard"}),note:n.Optional(c({type:"long",description:"Markdown-compatible text shown in the note"})),noteColor:n.Optional(n.Enum(KU,{description:"Background color used to render the note"})),noteAlign:n.Optional(fh),noteJustifyContent:n.Optional(fh)},{$id:"GraphVisualizationNote",title:"Note"})]),hh=n.Object({id:c({description:"Identifier of the graph widget"}),name:n.Optional(c({description:"Display name of the graph widget"})),description:n.Optional(n.String({minLength:1,maxLength:800,description:"Description of the graph widget"})),visualization:aN,layout:n.Optional(n.Object({x:n.Number({description:"Horizontal grid position of the widget"}),y:n.Number({description:"Vertical grid position of the widget"}),w:n.Number({description:"Width of the widget in grid units"}),h:n.Number({description:"Height of the widget in grid units"})},{description:"Grid layout coordinates for this widget"}))},{title:"Graph"}),sN=10,Th=n.Array(n.Object({key:c({description:"Filter key"}),values:n.Array(c({description:"Filter value"}))}),{maxItems:sN,description:"Filters applied to every widget on the dashboard"}),Zn=n.Object({id:n.String({description:"Identifier of the dashboard"}),name:n.String({description:"Display name of the dashboard"}),owner:n.String({description:"Team ID that owns and manages the dashboard"}),graphs:n.Array(hh,{description:"Ordered widgets that compose the dashboard"}),filters:n.Optional(Th),createdAt:b(),updatedAt:b(),creator:n.Optional(Oe),updater:n.Optional(Oe),tags:be,timePreset:n.Optional(n.Enum(Rm))}),Ka=n.Object({name:c({description:"Display name of the dashboard"}),owner:c({allowEmpty:!1,description:"Team ID that owns and manages the dashboard"}),graphs:n.Array(hh,{description:"Ordered widgets that compose the dashboard"}),filters:n.Optional(Th),tags:be,timePreset:n.Optional(n.Enum(Rm))}),Bm=n.Object({...Te,owners:n.Optional(n.Array(c({allowEmpty:!1}),{description:"Filter by owner team IDs"}))}),mpe=d({tags:["dashboards"],url:Xr,method:"GET",query:Bm,paginated:!0,response:n.Array(Zn)}),ppe=d({tags:["dashboards"],url:`${Xr}/:id`,method:"GET",params:n.Object({id:c()}),response:Zn}),cpe=d({tags:["dashboards"],url:Xr,method:"POST",body:Ka,response:Zn}),upe=d({tags:["dashboards"],url:`${Xr}/:id`,method:"PUT",params:n.Object({id:c()}),body:n.Partial(Ka),response:Zn}),lpe=d({tags:["dashboards"],url:`${Xr}/bulk-update`,method:"PUT",body:n.Object({dashboardIds:n.Array(c()),owner:c({allowEmpty:!1})}),response:n.Object({})}),dpe=d({tags:["dashboards"],url:`${Xr}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),fpe=d({tags:["dashboards"],url:`${Xr}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(c())}),response:n.Object({})});var ti=`/${"v1"}/dashboards`,ri=n.Pick(Zn,["id","name","owner","graphs","filters","tags","timePreset"],{$id:"Dashboard",description:"Visualization of telemetry data with customizable graphs and filters"}),mN={id:"123-456-abc",name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(ri,{examples:[mN]});var pN=n.Pick(Bm,["limit","offset","owners"]),xh=d({description:"Retrieve all dashboards",operationId:"listDashboards",tags:["dashboards"],url:ti,method:"GET",paginated:!0,query:pN,response:n.Array(ri)}),_h=d({description:"Retrieve a dashboard by its id",operationId:"getDashboard",tags:["dashboards"],url:`${ti}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:ri}),Hm=n.Pick(Ka,["name","owner","graphs","filters","tags","timePreset"]),cN={name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(Hm,{examples:[cN]});var Ah=d({description:"Create a new dashboard",operationId:"createDashboard",tags:["dashboards"],url:ti,method:"POST",body:Hm,response:ri}),bh=d({description:"Update a dashboard by its id",operationId:"updateDashboard",tags:["dashboards"],url:`${ti}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:n.Partial(Hm),response:ri}),uN=n.Object({id:c({allowEmpty:!1,description:"The dashboard ID to delete"})}),Oh=d({description:"Delete a dashboard by its id",operationId:"deleteDashboard",tags:["dashboards"],url:`${ti}/:id`,method:"DELETE",params:uN,response:H});var lN=100,dN=3,Jn=n.Object({id:n.String(),name:n.String(),keyLastCharacters:n.String(),owner:n.String(),tags:va,teamOverrideFields:n.Optional(n.Array(n.String())),updatedAt:b(),createdAt:b(),creator:n.Optional(Oe),updater:n.Optional(Oe),assetUpdatedAt:b()}),ni=n.Object({name:n.String({minLength:1,maxLength:lN}),owner:c({allowEmpty:!1}),tags:va,teamOverrideFields:n.Optional(n.Array(c({allowEmpty:!1}),{minItems:1,maxItems:dN}))}),oi="/v0/ingestion-api-keys",Ppe=d({tags:["ingestion-api-keys"],url:oi,method:"POST",body:ni,response:n.Intersect([Jn,n.Object({key:n.String()})])}),kpe=d({tags:["ingestion-api-keys"],url:oi,method:"GET",response:n.Array(Jn)}),Upe=d({tags:["ingestion-api-keys"],url:`${oi}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:Jn}),Npe=d({tags:["ingestion-api-keys"],url:`${oi}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:ni,response:Jn}),Lpe=d({tags:["ingestion-api-keys"],url:`${oi}/:id`,method:"DELETE",params:n.Object({id:c({allowEmpty:!1})}),response:H});var ii=`/${"v1"}/ingestion-api-keys`,ai=n.Pick(Jn,["id","name","owner","tags","teamOverrideFields","keyLastCharacters"],{$id:"IngestionApiKey",description:"API key used to send telemetry data to Tsuga"}),Sh={id:"123-456-abc",name:"Production Logs Ingestion",keyLastCharacters:"x7Qm",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(ai,{examples:[Sh]});var Rh=n.Pick(ni,["name","owner","tags","teamOverrideFields"],{$id:"CreateIngestionApiKeyRequest"}),Ch=n.Pick(ni,["name","owner","tags","teamOverrideFields"],{$id:"UpdateIngestionApiKeyRequest"}),Ph={name:"Production Logs Ingestion",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(Rh,{examples:[Ph]});Object.assign(Ch,{examples:[Ph]});var fN={...Sh,key:"tsuga_in:v1:abc123xyx7Qm"},kh=d({description:"Retrieve all ingestion API keys",operationId:"listIngestionApiKeys",tags:["ingestion-api-keys"],url:ii,method:"GET",response:n.Array(ai)}),Fpe=d({description:"Retrieve an ingestion API key by its id",operationId:"getIngestionApiKey",tags:["ingestion-api-keys"],url:`${ii}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:ai}),gN=n.Intersect([n.Pick(ai,["id","name","keyLastCharacters","owner","tags","teamOverrideFields"]),n.Object({key:n.String({description:"The full API key value, returned only at creation time"})})],{title:"IngestionApiKeyCreated",example:fN}),Uh=d({description:"Create a new ingestion API key",operationId:"createIngestionApiKey",tags:["ingestion-api-keys"],url:ii,method:"POST",body:Rh,response:gN}),Nh=d({description:"Update an ingestion API key by its id",operationId:"updateIngestionApiKey",tags:["ingestion-api-keys"],url:`${ii}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:Ch,response:ai}),Lh=d({description:"Delete an ingestion API key by its id",operationId:"deleteIngestionApiKey",tags:["ingestion-api-keys"],url:`${ii}/:id`,method:"DELETE",params:n.Object({id:c({allowEmpty:!1})}),response:H});var yN={"ingestion-api-key":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"audit-log":{read:["public_viewer","public_editor","admin"],write:[]},"custom-usage-tag":{read:["public_viewer","public_editor","admin"],write:["admin"]},"cluster-integration-config":{read:["admin"],write:["admin"]},"crawler-integration-config":{read:["admin"],write:["admin"]},"explorer-saved-view":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]},"operation-api-key":{read:["public_viewer","public_editor","admin"],write:["admin"]},"asset-change":{read:["public_viewer","public_editor","admin"],write:[]},"inventory-settings":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},dashboard:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},inventory:{read:["public_viewer","public_editor","admin"],write:[]},log:{read:["public_viewer","public_editor","admin"],write:[]},"log-route":{read:["public_viewer","public_editor","admin"],write:["admin","public_editor"]},metric:{read:["public_viewer","public_editor","admin"],write:[]},trace:{read:["public_viewer","public_editor","admin"],write:[]},monitor:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"monitor-alert":{read:["public_viewer","public_editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-rule":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-silence":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"saml-config":{read:["admin"],write:["admin"]},org:{read:["public_viewer","public_editor","admin"],write:["admin"]},"quality-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"sensitive-data-scanner-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},"retention-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},service:{read:["public_viewer","public_editor","admin"],write:[]},"tag-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},team:{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-members":{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-remap-config":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-data":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-invitation":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-permissions":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-self":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]}},IN={"ingestion-api-key":{read:["viewer","editor","admin"],write:["editor","admin"]},"audit-log":{read:["viewer","editor","admin"],write:[]},"asset-change":{read:["viewer","editor","admin"],write:[]},"custom-usage-tag":{read:[],write:[]},"cluster-integration-config":{read:[],write:[]},"crawler-integration-config":{read:[],write:[]},"explorer-saved-view":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"operation-api-key":{read:["viewer","editor","admin"],write:["admin"]},"inventory-settings":{read:["viewer","editor","admin"],write:["editor","admin"]},dashboard:{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-report":{read:["viewer","editor","admin"],write:[]},inventory:{read:["viewer","editor","admin"],write:[]},log:{read:["viewer","editor","admin"],write:[]},"log-route":{read:["viewer","editor","admin"],write:["editor","admin"]},metric:{read:["viewer","editor","admin"],write:[]},trace:{read:["viewer","editor","admin"],write:[]},monitor:{read:["viewer","editor","admin"],write:["editor","admin"]},"monitor-alert":{read:["viewer","editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-rule":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-silence":{read:["viewer","editor","admin"],write:["editor","admin"]},"saml-config":{read:["admin"],write:[]},org:{read:["viewer","editor","admin"],write:[]},"quality-report":{read:["viewer","editor","admin"],write:["editor","admin"]},"sensitive-data-scanner-rule":{read:["viewer","editor","admin"],write:[]},"retention-policy":{read:[],write:[]},service:{read:["viewer","editor","admin"],write:[]},"tag-policy":{read:[],write:[]},team:{read:["viewer","editor","admin"],write:["admin"]},"team-members":{read:["viewer","editor","admin"],write:["admin"]},"team-remap-config":{read:[],write:[]},"user-data":{read:["viewer","editor","admin"],write:["admin"]},"user-invitation":{read:["viewer","editor","admin"],write:["admin"]},"user-permissions":{read:["viewer","editor","admin"],write:[]},"user-self":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]}},EN={user:yN,team:IN};function Km(e){return Mh(e,"team")}function zm(e){return Mh(e,"user")}function Mh(e,t){let r=[],o=EN[t];for(let[i,s]of Object.entries(o))for(let[p,u]of Object.entries(s))u.includes(e)&&r.push({actionType:p,resourceType:i});return r}var Ype={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:zm("admin"),roleKey:"admin"},public_editor:{name:"Public editor",description:"Can view and edit assets in public teams, but not access private teams or critical settings.",permissions:zm("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:zm("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access data and assets in their own teams.",permissions:[],roleKey:"teams_only"}},Vpe={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:Km("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, monitors).",permissions:Km("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:Km("viewer"),roleKey:"viewer"}};var wh=[{key:"amex15_digits",name:"American Express card (1x15 digits)",category:"financial-data",example:"378282246310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex4443_digits",name:"American Express card (4+4+4+3 digits)",category:"financial-data",example:"3782 8224 6310 005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex465_digits",name:"American Express card (4+6+5 digits)",category:"financial-data",example:"3782 822463 10005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex87_digits",name:"American Express card (8+7 digits)",category:"financial-data",example:"37828224 6310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card14_digits",name:"Diners card (1x14 digits)",category:"financial-data",example:"30569309025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card4442_digits",name:"Diners card (4+4+4+2 digits)",category:"financial-data",example:"3056 9309 0259 04",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card464_digits",name:"Diners card (4+6+4 digits)",category:"financial-data",example:"3056 930902 5904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card86_digits",name:"Diners card (8+6 digits)",category:"financial-data",example:"30569309 025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card16_digits",name:"Discover card (1x16 digits)",category:"financial-data",example:"6011111111111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card88_digits",name:"Discover card (2x8 digits)",category:"financial-data",example:"60111111 11111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card4444_digits",name:"Discover card (4x4 digits)",category:"financial-data",example:"6011 1111 1111 1117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card16_digits",name:"JCB card (1x16 digits)",category:"financial-data",example:"3530111333300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card88_digits",name:"JCB card (2x8 digits)",category:"financial-data",example:"35301113 33300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card4444_digits",name:"JCB card (4x4 digits)",category:"financial-data",example:"3530 1113 3330 0000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card16_digits",name:"Maestro card (1x16 digits)",category:"financial-data",example:"6759649826438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card88_digits",name:"Maestro card (2x8 digits)",category:"financial-data",example:"67596498 26438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card4444_digits",name:"Maestro card (4x4 digits)",category:"financial-data",example:"6759 6498 2643 8453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard16_digits",name:"Mastercard (1x16 digits)",category:"financial-data",example:"5555555555554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard88_digits",name:"MasterCard (2x8 digits)",category:"financial-data",example:"55555555 55554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard4444_digits",name:"MasterCard (4x4 digits)",category:"financial-data",example:"5555 5555 5555 4444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa16_digits",name:"Visa (1x16 digits)",category:"financial-data",example:"4111111111111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa19_digits",name:"Visa (1x19 digits)",category:"financial-data",example:"4111111111111111151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa88_digits",name:"Visa (2x8 digits)",category:"financial-data",example:"41111111 11111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa883_digits",name:"Visa (8+8+3 digits)",category:"financial-data",example:"41111111 11111111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa4444_digits",name:"Visa (4x4 digits)",category:"financial-data",example:"4111 1111 1111 1111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa44443_digits",name:"Visa (4+4+4+4+3 digits)",category:"financial-data",example:"4111 1111 1111 1111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"dropbox_long_lived_api_token",name:"Dropbox long lived API token",category:"credential",example:"767cb868836AAAAAAAAAAszri2cnmzu5tr0yf-nvclmwfyiswl67qyqw-uzn-scg",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})"},{key:"dropbox_short_lived_api_token",name:"Dropbox short lived API token",category:"credential",example:"sl.nu0yvsrposcjeyjcpmbfrmqygllrxpahrgbt8flml9xroifbic",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:sl\\.[a-z0-9\\-=_]{50})"},{key:"french_nirpp",name:"French social security number (NIRPP)",category:"personal-information",example:"188073512757119",isUsingLuhnAlgorithm:!1,regexp:"([12])\\s*[0-9]{2}\\s*(0[1-9]|1[0-2])\\s*(2[AB]|[0-9]{2})\\s*([0-9]{3})\\s*([0-9]{3})(\\s*[0-9]{2})?"},{key:"ip_address",name:"IP address",category:"device-identifier",example:"81.55.13.53",isUsingLuhnAlgorithm:!1,regexp:""},{key:"social_security_number",name:"Social security number",category:"personal-information",example:"437-02-2223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])[-\\s]*(?:0[1-9]|[1-9]0|[1-9][1-9])[-\\s]*(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"email",name:"Email",category:"credential",example:"admin@tsuga.com",isUsingLuhnAlgorithm:!1,regexp:"[a-zA-Z0-9-_.]*[a-zA-Z0-9_](@[a-zA-Z0-9_]+)(\\.[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?[a-zA-Z])(?-u:\\b)"},{key:"one_password_secret_key",name:"1Password secret key",category:"credential",example:"A3-O28NKC-F58GULWCN72-4NIKS-KGY7V-U7FAT",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)A3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}(?-u:\\b)"},{key:"one_password_service_account_token",name:"1Password service account token",category:"credential",example:"ops_eyJdAZ/FoIyz0jAXpEQOrRdIE8ydVaYfAXeZXGFqHWfBOjnE/Vgf5kHIbwrNAp2WeFNPeFiVJPlLv1hmaTVums0ldq1Kv8JEglMqP3f0ATBuX/WRbKqXYS3Z1wSzxg6S0krW4df7ZplvK04+JhJimejyTEH5dYaxqsYDBSLxjeEq7JWsmHEuXj6WP5qQi7FB+5s+CwhWPWY/jDhUMB3fdowXbfv5VnWri3iYrfBh+bFeRe9KURhXGHRDE9hgs",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ops_eyJ[a-zA-Z0-9+/]{50}"},{key:"adafruit_api_key",name:"Adafruit API key",category:"credential",example:"jb9pb4unb2bhe7xqepmgwtl2jg7ti101",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{32})"},{key:"adobe_client_id",name:"Adobe client ID",category:"credential",example:"c4166853dfd2897ebe706d49ef13fe63",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"adobe_client_secret",name:"Adobe client secret",category:"credential",example:"p8e-bb6e1614324ae48e507d33af176db3b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:p8e-[a-z0-9]{32})"},{key:"age_secret_key",name:"Age secret key",category:"credential",example:"AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}"},{key:"airtable_api_key",name:"Airtable API key",category:"credential",example:"19b73hbi0tc5cdy4w",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{17})"},{key:"algolia_api_key",name:"Algolia API key",category:"credential",example:"346155deb68d31c4018d73de73452947",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"alibaba_access_key_id",name:"Alibaba Cloud AccessKey ID",category:"credential",example:"LTAI7cc6804e4c2155cd52bd",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:LTAI[a-z0-9]{20})"},{key:"alibaba_secret_key",name:"Alibaba Cloud secret key",category:"credential",example:"suwixirhh10xhnko9bv0vfg2971u9p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"anthropic_admin_api_key",name:"Anthropic admin API key",category:"credential",example:"sk-ant-admin01-abc12fake-456def789ghij-klmnopqrstuvwx-3456yza789bcde-12fakehijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-admin01-[a-zA-Z0-9_-]{93}AA)"},{key:"anthropic_api_key",name:"Anthropic API key",category:"credential",example:"sk-ant-api03-abc123xyz-456def789ghij-klmnopqrstuvwx-3456yza789bcde-1234fghijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-api03-[a-zA-Z0-9_-]{93}AA)"},{key:"artifactory_api_key",name:"Artifactory API key",category:"credential",example:"AKCpt771klpkqllt647fdf36fq43radbz2w2nyetvx4l90qyeef8kbgkmke63ul5vf6mqsy82",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AKCp[A-Za-z0-9]{69}(?-u:\\b)"},{key:"artifactory_reference_token",name:"Artifactory reference token",category:"credential",example:"cmVmdc6i6888t9viuobfd88e46pdonjjsvmme6np82qti7wzbj7l9m1ygtyl9wik",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)cmVmd[A-Za-z0-9]{59}(?-u:\\b)"},{key:"asana_client_id",name:"Asana client ID",category:"credential",example:"9760134337886314",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{16})"},{key:"asana_client_secret",name:"Asana client secret",category:"credential",example:"tcnc8mjrf5bad359nnz3j1z90gow67ji",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"atlassian_api_token",name:"Atlassian API token",category:"credential",example:"fdo4scsa4kh53jnenkfp5fbe",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{20}[a-f0-9]{4})|(?-u:\\b)(?:ATATT3[A-Za-z0-9_-=]{50})"},{key:"authress_service_client_access_key",name:"Authress service client access key",category:"credential",example:"sc_scmz00n9xj.0ykp.acc_2k5vtnrec4.55vc9459s-gc5qlia7a67jvzm0bobn3g0ezimd3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\\.[a-z0-9]{4,6}\\.(?-i:acc)[_-][a-z0-9-]{10,32}\\.[a-z0-9+/_=-]{30})"},{key:"aws_access_token",name:"AWS access token",category:"credential",example:"AKIALALEMEL33243OLIB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})(?-u:\\b)"},{key:"azure_ad_client_secret",name:"Azure AD client secret",category:"credential",example:"bP88Q~rcBcYjzzOhg1Hnn76Wm3jGgakZiZ.8vMgR",isUsingLuhnAlgorithm:!1,regexp:"(?:^|[\\\\'\"` \\r\\n\\t\\f\\v>=:(?:,)])(?:[a-zA-Z0-9_~.]{3}[0-9]Q~[a-zA-Z0-9_~.-]{31,34})(?:$|[\\\\'\"` \\r\\n\\t\\f\\v<),])"},{key:"bitbucket_client_id",name:"Bitbucket client ID",category:"credential",example:"yyxmjnl3kahirvct7sat2082pzqdyf09",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"bitbucket_client_secret",name:"Bitbucket client secret",category:"credential",example:"fylw1pominwz91e5guqjiugw6srutpl64vzch5rnt8xnt31ka7so9va73fscz836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{64})"},{key:"beamer_api_token",name:"Beamer API token",category:"credential",example:"b_zhy-phuoqk13asco6az4u_0yhtklgswm4umkv95nv4gu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:b_[a-z0-9=_\\-]{44})"},{key:"codecov_access_token",name:"Codecov access token",category:"credential",example:"r93iopllonuphk41qglet20y8cb83thm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"clickhouse_cloud_api_secret_key",name:"ClickHouse Cloud API secret key",category:"credential",example:"4b1dbRdW3rOcB7xLthrM4BTBGK1qPLkHigpN1bXD6z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:4b1d[A-Za-z0-9]{38})(?-u:\\b)"},{key:"clojars_api_token",name:"Clojars API token",category:"credential",example:"CLOJARS_d1vd7t0blxaarzx25dxoda4hm5ox86st6o5ww7tnzsfz07wvu223bf0fmgim",isUsingLuhnAlgorithm:!1,regexp:"CLOJARS_[a-z0-9]{60}"},{key:"cloudflare_api_key",name:"Cloudflare API key",category:"credential",example:"ckg0h_dzkxnl627gy3nskpq9wzm4d5hc_vxk272h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"cloudflare_global_api_key",name:"Cloudflare global API key",category:"credential",example:"1d003bb65ec73ad2691fb76631b6496e3c9d9",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{37})"},{key:"cloudflare_origin_ca_key",name:"Cloudflare Origin CA key",category:"credential",example:"v1.0-aaa334dc886f30631ba0a610-0d98ef66290d7e50aac7c27b5986c99e6f3f1084c881d8ac0eae5de1d1aa0644076ff57022069b3237d19afe60ad045f207ef2b16387ee37b749441b2ae2e9ebe5b4606e846475d4a5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:v1\\.0-[a-f0-9]{24}-[a-f0-9]{50})"},{key:"cohere_api_token",name:"Cohere API token",category:"credential",example:"lpn59BQ4FNUabVJh1vCpIqZpQbaViELQrTa14p9D",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-zA-Z0-9]{40})"},{key:"confluent_access_token",name:"Confluent access token",category:"credential",example:"kkat92sclkukwvr2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"confluent_secret_key",name:"Confluent secret key",category:"credential",example:"64d4ppp37l9fjhadm8vv0awie6wjo4d6ourfcqvi2bcs2tm95x4f0e8gyb8z8usj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"contentful_delivery_api_token",name:"Contentful delivery API token",category:"credential",example:"eumospigka64wiwpavfmmblrq7x1hm6gz84wiiw2ff3",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{43})"},{key:"curl_auth_header",name:"Curl authorization header",category:"credential",example:"curl --header 'Authorization: 5eb4223e-5008-46e5-be67-c7b8f2732305'",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*?|.*?(?:[\\r\\n]{1,2}.*?){1,5})[ \\t\\n\\r](?:-H|--header)(?:=|[ \\t]{0,5})(?:"(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))"|'(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))')(?:(?-u:\\B)|[ \\r\\n\\t\\f\\v]|\\z)`},{key:"curl_auth_user",name:"Curl basic authentication",category:"credential",example:"curl -u elastic:P@ssw0rd$1",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*|.*(?:[\\r\\n]{1,2}.*){1,5})[ \\t\\n\\r](?:-u|--user)(?:=|[ \\t]{0,5})(?:"(:[^"]{3,}|[^:"]{3,}:|[^:"]{3,}:[^"]{3,})"|'(?:[^:']{3,}:[^']{3,})'|(?:(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_\${}@.-]+)))(?:[ \\r\\n\\t\\f\\v]|\\z)`},{key:"databricks_api_token",name:"Databricks API token",category:"credential",example:"dapia2553f815d29a193fd09c2bb55201895",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dapi[a-f0-9]{32}(?:-[0-9])?)"},{key:"datadog_access_token",name:"Datadog access token",category:"credential",example:"ljgbhjnca2hy5yc2nv7cag1ag7ehx2hc6geparov",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"defined_networking_api_token",name:"Defined Networking API token",category:"credential",example:"dnkey-nowf_nwyqhvqt1gi66xnuuf2rb-bfxnr9_qydyxnxn1y8uijvhhp9owllbg-2czoe-7qs5_w5650xei",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})"},{key:"digitalocean_pat",name:"DigitalOcean personal access token",category:"credential",example:"dop_v1_ec8f4a856c1459bd442a275461e2f709506347de30b180851cde71f696e9fcc8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dop_v1_[a-f0-9]{64})"},{key:"digitalocean_access_token",name:"DigitalOcean OAuth access token",category:"credential",example:"doo_v1_42b8ea6c4b0c373f88aff9d3fa87e123ab23b0d3c22ac6d4361a4e9c1e89eaa6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:doo_v1_[a-f0-9]{64})"},{key:"digitalocean_refresh_token",name:"DigitalOcean OAuth refresh token",category:"credential",example:"dor_v1_4d9b3e6fbe65ab472e464dfa6377d702e80164442acdfbeb3ef032d917cb9984",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dor_v1_[a-f0-9]{64})"},{key:"discord_api_token",name:"Discord API token",category:"credential",example:"7eb855d9a40747182d0b0ea74df27aee31d05756a9933a815a3ccb5a46b2d61d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"discord_client_id",name:"Discord client ID",category:"credential",example:"763721114261247538",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{18})"},{key:"discord_client_secret",name:"Discord client secret",category:"credential",example:"13641266018325206246161633988007",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"doppler_api_token",name:"Doppler API token",category:"credential",example:"dp.pt.vgin8wwjy7sx66fyq99tavkm3y5g2jdxmsufh257dhj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dp\\.pt\\.[a-z0-9]{43}"},{key:"dropbox_api_token",name:"Dropbox API token",category:"credential",example:"rdlztoij88rzrsk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{15})"},{key:"droneci_access_token",name:"DroneCI access token",category:"credential",example:"v26gffr903rbti5v7m392ba0u7oarz36",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"duffel_api_token",name:"Duffel API token",category:"credential",example:"duffel_test_-yd6b3pc4jy593pt5kr2l3ynzkb5b_f619dshefiz=v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)duffel_(?:test|live)_[a-z0-9_\\-=]{43}"},{key:"dynatrace_api_token",name:"Dynatrace API token",category:"credential",example:"dt0c01.ben820rdpb1so4kasfx3yn4a.zkje7lawif35udsin5t1mi1m1sne7wdzphlzrmdnu3j69gr4kgf5dwg4x5lb30zg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dt0c01\\.[a-z0-9]{24}\\.[a-z0-9]{64}"},{key:"easypost_api_token",name:"EasyPost API token",category:"credential",example:"EZAKBVScDZwZFv0nJXHBcxPGil7eztnPJOSmDFf2NGKQk6Dn7VqULciSRm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZAK[a-z0-9]{54}(?-u:\\b)"},{key:"easypost_test_api_token",name:"EasyPost test API token",category:"credential",example:"EZTKuxUXVU5HBS1K2iyh165t3VtivpdxMgIf5Y2P1oJxeFeaJGcwzVexds",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZTK[a-z0-9]{54}(?-u:\\b)"},{key:"etsy_access_token",name:"Etsy access token",category:"credential",example:"8ssp35lhprxpb3sjyergcz5z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"facebook_secret",name:"Facebook secret",category:"credential",example:"c41c21ba4fb5ee05398db86ca83f06db",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"facebook_access_token",name:"Facebook access token",category:"credential",example:"911602140448729|AY-lRJZq9BoDLobvAiP25L7RcMg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[0-9]{15,16}(\\||%)[0-9a-z\\-_]{27,40})"},{key:"facebook_page_access_token",name:"Facebook page access token",category:"credential",example:"EAAM9GOnCB9kBO2frzOAWGN2zMnZClQshlWydZCrBNdodesbwimx1mfVJgqZBP5RSpMfUzWhtjTTXHG5I1UlvlwRZCgjm3ZBVGeTYiqAAoxyED6HaUdhpGVNoPUwAuAWWFsi9OvyYBQt22DGLqMIgD7VktuCTTZCWKasz81Q822FPhMTB9VFFyClNzQ0NLZClt9zxpsMMrUZCo1VU1rL3CKavir5QTfBjfCEzHNlWAUDUV2YZD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:EAA[MC][a-z0-9]{50})"},{key:"fastly_api_token",name:"Fastly API token",category:"credential",example:"im7_ux24tyyxz_4y4mvzj22akpid830c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"finicity_client_secret",name:"Finicity client secret",category:"credential",example:"roepymyr0ce7wxhjvgb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"finicity_api_token",name:"Finicity API token",category:"credential",example:'= "cce089057c8b7fe7f2a8474b9a050816',isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"flickr_access_token",name:"Flickr access token",category:"credential",example:"damvt93tudulk6wrfp36sawndc9pa7bb",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"finnhub_access_token",name:"Finnhub access token",category:"credential",example:"x01lnfp13spcbsa0at32",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"flutterwave_public_key",name:"Flutterwave public key",category:"credential",example:"FLWPUBK_TEST-99484d505b4ee5c1181a2884f5fe3852-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWPUBK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_secret_key",name:"Flutterwave secret key",category:"credential",example:"FLWSECK_TEST-66187ac83488c2245f0d7e95fa37e833-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_encryption_key",name:"Flutterwave encryption key",category:"credential",example:"FLWSECK_TEST-6262214a02e7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{12}"},{key:"flyio_access_token",name:"Fly.io access token",category:"credential",example:"fo1_m-HT0NHLBSPwMJ2hIer4v3lxtWEC7grXNidQxJMrVVE",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:fo1_[a-zA-Z0-9_-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{50}))"},{key:"frameio_api_token",name:"Frame.io API token",category:"credential",example:"fio-u-4ov9vjtr2wwj8j1gob-8xrx2-1=z818psmitskgoq4=p-_k77d54034z55xk-lqh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)fio-u-[a-z0-9\\-_=]{64}"},{key:"freshbooks_access_token",name:"FreshBooks access token",category:"credential",example:"gqw118uwne1nddlt4yruvvs4jr9s0vrj5mxaswgb2amacod8lgnmrknsvbovsx1g",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"gocardless_api_token",name:"GoCardless API token",category:"credential",example:"live_-z4lwtrrk6p6=-v1ig_y_4ceplziwek0lw=oz-eu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:live_[a-z0-9\\-_=]{40})"},{key:"gcp_api_key",name:"GCP API key",category:"credential",example:"AIzaYpvGqEzpgB7R353HD9CxN8LuhZ6d6UfuXLL",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:AIza[a-zA-Z0-9_-]{35})"},{key:"github_pat",name:"GitHub personal access token",category:"credential",example:"ghp_t7i9llxuukeb7apn4zlnyeyz5b0007rsfs54",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghp_[0-9a-zA-Z]{36}"},{key:"github_fine_grained_pat",name:"GitHub fine-grained personal access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)github_pat_[a-zA-Z0-9_]{82}"},{key:"github_oauth",name:"GitHub OAuth token",category:"credential",example:"gho_anlrm6zqscqityoqozv503by66dobnem4yxh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gho_[0-9a-zA-Z]{36}"},{key:"github_app_token",name:"GitHub app token",category:"credential",example:"ghs_0zleityj4n1ulz178o9in1w97q1ifw8u3y8h",isUsingLuhnAlgorithm:!1,regexp:"(?:ghu|ghs)_[0-9a-zA-Z]{36}"},{key:"github_refresh_token",name:"GitHub refresh token",category:"credential",example:"ghr_inu1aa7qbgi46cf8nprbgh4kn03d0zk35raj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghr_[0-9a-zA-Z]{36}"},{key:"gitlab_cicd_job_token",name:"GitLab CI/CD job token",category:"credential",example:"glcbt-7h2nr_6jmho0uoqkb1ww431kfl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_-]{20}"},{key:"gitlab_deploy_token",name:"GitLab deploy token",category:"credential",example:"gldt-7a3o70gqa8zkal0zdp4x",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gldt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feature_flag_client_token",name:"GitLab feature flag client token",category:"credential",example:"glffct-dsct62ndnvcj7alw5nas",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glffct-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feed_token",name:"GitLab feed token",category:"credential",example:"glft-13956nvy00289v6xu0di",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glft-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_incoming_mail_token",name:"GitLab incoming mail token",category:"credential",example:"glimt-fcdt1a5jvj01si61jgkse2r20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glimt-[0-9a-zA-Z_\\-]{25}"},{key:"gitlab_kubernetes_agent_token",name:"GitLab Kubernetes agent token",category:"credential",example:"glagent-8wxkulkbbuk7u6r3nvrefswdfw5o0v7vy81y4oky8rnfogm826",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glagent-[0-9a-zA-Z_\\-]{50}"},{key:"gitlab_oauth_app_secret",name:"GitLab OAuth app secret",category:"credential",example:"gloas-vawws2nw5kf6rizn49g41jc3jiy4xqioaihrwm1msltbdt4cbmo4x52tygcic7af",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gloas-[0-9a-zA-Z_\\-]{64}"},{key:"gitlab_pat",name:"GitLab personal access token",category:"credential",example:"glpat-2gl3ku1497ms4gzyv16i",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[a-zA-Z0-9_-]{20}"},{key:"gitlab_pat_routable",name:"GitLab personal access token (routable)",category:"credential",example:"glpat-2hf7vebpux9j56tdcqqsvap7vxc.chvjof35u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[0-9a-zA-Z_-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_ptt",name:"GitLab personal access token (temporary)",category:"credential",example:"glptt-b54e8b7b90cf006b79af110baa9b8d9183fd7048",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glptt-[0-9a-f]{40}"},{key:"gitlab_rrt",name:"GitLab registration token",category:"credential",example:"GR1348941vnauzmn2hj0zncvt0nfe",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)GR1348941[a-zA-Z0-9_-]{20}"},{key:"gitlab_runner_authentication_token",name:"GitLab runner authentication token",category:"credential",example:"glrt-xbd1w7c9clbxm52zdxkm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_runner_authentication_token_routable",name:"GitLab runner authentication token (routable)",category:"credential",example:"glrt-t5_8d8ugbkfzddae0dw06tvm0x7qxc.mwcd1a7cn",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-t[0-9]_[0-9a-zA-Z_\\-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_scim_token",name:"GitLab SCIM token",category:"credential",example:"glsoat-9jb5zk1nvy800c1uqhh0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glsoat-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_session_cookie",name:"GitLab session cookie",category:"credential",example:"_gitlab_session=yjhub6vtrp60djn6rszuemeacsoqox97",isUsingLuhnAlgorithm:!1,regexp:"_gitlab_session=[0-9a-z]{32}"},{key:"gitter_access_token",name:"Gitter access token",category:"credential",example:"uazubes6trcd_1gym09opuf_8gj1rmvj6jwber4a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"grafana_api_key",name:"Grafana API key",category:"credential",example:"eyJrIjoiyl5shjvqja0xkfbu38m24vn5httsipr1h9fgjhodxzlkpravuiy8h7hom5kt8gtwuguh2v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:eyJrIjoi[A-Za-z0-9]{70}={0,3})"},{key:"grafana_cloud_api_token",name:"Grafana cloud API token",category:"credential",example:"glc_cb7p4j2g1qu0sy84me72ufmn1z8mqk8y",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glc_[A-Za-z0-9+/]{32}={0,3})"},{key:"grafana_service_account_token",name:"Grafana service account token",category:"credential",example:"glsa_rm3sadbwl8o2c13v4ipgkz04h66kiy6t_edaea401",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})"},{key:"harness_api_key",name:"Harness API key",category:"credential",example:"pat.vzcxr183pymw194fdq1q0v.qjqjarqkd9ydxqagjmq3f5iq.8nn5nyaow3h5mmgjh053",isUsingLuhnAlgorithm:!1,regexp:"(?:pat|sat)\\.[a-zA-Z0-9_-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}"},{key:"hashicorp_tf_api_token",name:"HashiCorp Terraform API token",category:"credential",example:"984d8033429986.atlasv1.799k5cihj_807yc1e8afvla8ackd1khsb50nfeswbxbr1re54y0wpzs2tjy=",isUsingLuhnAlgorithm:!1,regexp:"[a-z0-9]{14}\\.(?-i:atlasv1)\\.[a-z0-9\\-_=]{60,70}"},{key:"heroku_api_key",name:"Heroku API key",category:"credential",example:"9127f65b-8b3f-c0b7-a336-a4347e71bc51",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"heroku_api_key_v2",name:"Heroku API key v2",category:"credential",example:"HRKU-AAxPYvV6l2R3DvF0w9VJ4m8cz9oaygOHxpQvcw--iD51MszQZeakD9DZsclX",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(HRKU-AA[0-9a-zA-Z_-]{58}))"},{key:"hubspot_api_key",name:"HubSpot API key",category:"credential",example:"86cb6664-b191-db72-95a7-49adebe84b74",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})"},{key:"huggingface_access_token",name:"HuggingFace access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hf_(?i:[a-z]{34}))"},{key:"huggingface_organization_api_token",name:"HuggingFace organization API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:api_org_(?i:[a-z]{34}))"},{key:"intercom_api_key",name:"Intercom API key",category:"credential",example:"zuc5c=ykf5gcwesqvmh2pji6k3extx0rbalsznte3sdo7iu7f-lumol2npfk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{60})"},{key:"intra42_client_secret",name:"Intra42 client secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:s-s4t2(?:ud|af)-[abcdef0123456789]{64})"},{key:"jfrog_api_key",name:"JFrog API key",category:"credential",example:"lj7nrgoo0kr04kw312zvly7l0olsn37vhto5wdn3yqi5srxnc2axstp7a1kewkxi717w295kh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{73})"},{key:"jfrog_identity_token",name:"JFrog identity token",category:"credential",example:"xh0x2upbtkkg1pseg7ezmcyw2c3kt0bt05l5v8ynvkro6wagolhch0f7kppplt8b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"jwt",name:"JSON web token",category:"credential",example:"ey7gzQUpN8Kz7XY6Yin.ey1o36_XrBphAG8WMHQ.",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_-]{10,}={0,2})?)"},{key:"jwt_base64",name:"JSON web token base64",category:"credential",example:"ZXlKNE5YUWpVekkxTmlJNklsUjFUM0pDZVRKT1kxUnNSbE5YZFZvNFMyZzRWemhCYWxGaFoySTBabTVtVURGVGJFdE5Uemd0VTI4aWZRLmV5SnBjM01pT2lKcWIyVWlMQTBLSUNKbGVIQWlPakV6TURBNE1Ua3pPREFzRFFvZ0ltaDBkSEE2THk5bGVHRnRjR3hsTG1OdmJTOXBjMTl5YjI5MElqcDBjblZsZlEuZEJqZnRKZVo0Q1ZQLW1COTJLMjd1aGJVSlUxcDFyX3dXMWdGV0ZPRWpYaw==",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}"},{key:"launchdarkly_access_token",name:"LaunchDarkly access token",category:"credential",example:"ezmej9s6yv4qwk2=yeb4kfi162p33b_2hzm7tr-0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40})"},{key:"linear_api_key",name:"Linear API key",category:"credential",example:"lin_api_0n5n0k26vb4ka9je9dqdcwl1dae5mbpfhb48xio6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)lin_api_[a-z0-9]{40}"},{key:"linear_client_secret",name:"Linear client secret",category:"credential",example:"7b956760f09b81684ed833c524f081de",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"linkedin_client_id",name:"LinkedIn client ID",category:"credential",example:"18u930hak0em0r",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{14})"},{key:"linkedin_client_secret",name:"LinkedIn client secret",category:"credential",example:"uvkxd9rw41ylk1zj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"lob_api_key",name:"Lob API key",category:"credential",example:"test_02efbb923a38370aac769e3bedc4d3398be",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(live|test)_[a-f0-9]{35})"},{key:"lob_pub_api_key",name:"Lob publishable API key",category:"credential",example:"test_pub_df170d9f5be9244959713dfee686c42",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(test|live)_pub_[a-f0-9]{31})"},{key:"mailchimp_api_key",name:"MailChimp API key",category:"credential",example:"81277fbbe2dd9c5e18d5f28cebcc558c-us20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32}-us[0-9][0-9])"},{key:"mailgun_pub_key",name:"Mailgun public validation key",category:"credential",example:"pubkey-5011bae1a4b57dfa83762c24b0e1299d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pubkey-[a-f0-9]{32})"},{key:"mailgun_private_api_token",name:"Mailgun private API token",category:"credential",example:"key-176f7ef066471ac351adab734d2c9fb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:key-[a-f0-9]{32})"},{key:"mailgun_signing_key",name:"Mailgun webhook signing key",category:"credential",example:"24564bd3d54a469601d5ac5daecb9ad2-00001111-22223333",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})"},{key:"mapbox_api_token",name:"MapBox API token",category:"credential",example:"pk.5ko18udoy3cilkpgyedje9limykwj8n7wmhug4967o9wze284mmpuuhjzgig.edjzuv7jwhc6lnv5b3p9nc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})"},{key:"mattermost_access_token",name:"Mattermost access token",category:"credential",example:"rtw2hncbfhpbyyri90d3q2mo1m",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{26})"},{key:"maxmind_license_key",name:"MaxMind license key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)"},{key:"cisco_meraki_api_key",name:"Cisco Meraki API key",category:"credential",example:"acea14a1470f7cf443a031dde64065ce81c77b2b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[0-9a-f]{40})"},{key:"messagebird_api_token",name:"MessageBird API token",category:"credential",example:"448q6im7yxutswabdko1n69ry",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"messagebird_client_id",name:"MessageBird client ID",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"netlify_access_token",name:"Netlify access token",category:"credential",example:"3j1sa0o20v0k-cjbjn3vh_4uqnkvb3w_px5no2in",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40,46})"},{key:"new_relic_user_api_key",name:"New Relic user API key",category:"credential",example:"NRAK-zozcnrh45ornsbl1duyfhell59u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRAK-[a-z0-9]{27})"},{key:"new_relic_user_api_id",name:"New Relic user API ID",category:"credential",example:"k0jze7delork84k8ke1z1dm275yw2aqf5uu2cy7x1uiloll3xab5203hiz9tx9xx",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"new_relic_browser_api_token",name:"New Relic browser API token",category:"credential",example:"NRJS-c7fa1261a97506e4a45",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRJS-[a-f0-9]{19})"},{key:"new_relic_insert_key",name:"New Relic insight insert key",category:"credential",example:"NRII-4168ab7eb2e051f37144ad884d32ab34",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRII-[a-z0-9-]{32})"},{key:"notion_api_token",name:"Notion API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})"},{key:"npm_access_token",name:"npm access token",category:"credential",example:"npm_vz9e7fvsn7o2n2tddg6b01gs7g9wldlys4vm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:npm_[a-z0-9]{36})"},{key:"nytimes_access_token",name:"NYTimes access token",category:"credential",example:"ako7xzi0mx7w15ogdkew7ilq7h13x8rl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"octopus_deploy_api_key",name:"Octopus Deploy API key",category:"credential",example:"API-NFWN6F7X32BYDBU94IGY3V5ZQY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:API-[A-Z0-9]{26})"},{key:"okta_access_token",name:"Okta access token",category:"credential",example:"003cKkRNNMy4ul7V8UDHEjEBGbnsQ6tejSHzfeBtcp",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:00[a-zA-Z0-9_=\\-]{40})"},{key:"openai_api_key",name:"OpenAI API key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})T3BlbkFJ(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})(?-u:\\b)|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})"},{key:"openshift_user_token",name:"OpenShift user token",category:"credential",example:"sha256~OFL-TnR3jyLteu_rAuff3PUYNELVvByMRFYCcAkaJSR",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sha256~[a-zA-Z0-9_-]{43})(?:[^a-zA-Z0-9_-]|\\z)"},{key:"perplexity_api_key",name:"Perplexity API key",category:"credential",example:"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'",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pplx-[a-zA-Z0-9]{48})(?:[`'\" \\r\\n\\t\\f\\v;]|\\\\[nr]|$|(?-u:\\b))"},{key:"plaid_api_token",name:"Plaid API token",category:"credential",example:"access-development-4b0f8c31-83fe-e4c5-3d02-91e487b69d2d",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"plaid_client_id",name:"Plaid client ID",category:"credential",example:"TTPjxpFNiwOct5XLdxjXD0Ta",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"plaid_secret_key",name:"Plaid secret key",category:"credential",example:"ikhqm7a9k76l8f544dl0v8kxvm2w55",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"planetscale_password",name:"PlanetScale password",category:"credential",example:"pscale_pw_9gvu8z79m4b814z0vv8266w70h3i7jlq",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_pw_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_api_token",name:"PlanetScale API token",category:"credential",example:"pscale_tkn_nwy9jkjgnry96ftecsx_=jrxc6pkmmew",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_tkn_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_oauth_token",name:"PlanetScale OAuth token",category:"credential",example:"pscale_oauth_zx8v3gzfnfxbymj__l629i68jnz5gnff",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_oauth_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"postman_api_token",name:"Postman API token",category:"credential",example:"PMAK-525b84aa46e2c588620d8123-06f9ca36c4aad4305baafbe00716b7bc8f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:PMAK-[a-f0-9]{24}\\-[a-f0-9]{34})"},{key:"prefect_api_token",name:"Prefect API token",category:"credential",example:"pnu_kttbffyfgffu2sfbxzxw8mbpgvvtxjljwe1p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pnu_[a-zA-Z0-9]{36})"},{key:"privateai_api_token",name:"PrivateAI API token",category:"credential",example:"iwuxqzqilzbfnccncvjz6px23dnej11h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"private_key",name:"Private key",category:"credential",example:`-----BEGIN PRIVATE KEY-----
34
39
  MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAC4AWkdwKYSd8
35
40
  Ks14IReLcYgADhoXk56ZzXI=
36
- -----END PRIVATE KEY-----`,isUsingLuhnAlgorithm:!1,regexp:"-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY(?: BLOCK)?-----[ \\r\\n\\t\\f\\v\\S-]{64,}?KEY(?: BLOCK)?-----"},{key:"pulumi_api_token",name:"Pulumi API token",category:"credential",example:"pul-b77e6bff9fddebbc2bb8eca94e3f29a41f6da70a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pul-[a-f0-9]{40})"},{key:"pypi_upload_token",name:"PyPI upload token",category:"credential",example:"pypi-AgEIcHlwaS5vcmc128fd9e0b47dde39cfecad3a997273458e6392f6aac649ae38864bdd7ff12836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)pypi-AgEIcHlwaS5vcmc[a-zA-Z0-9_-]{50}"},{key:"rapidapi_access_token",name:"RapidAPI access token",category:"credential",example:"g4x40h94pi_-zlklfz3-qvhiiu5zankyrqqwmsl60decihbqvl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{50})"},{key:"readme_api_token",name:"ReadMe API token",category:"credential",example:"rdme_k38kau741xa5lw03mdkvcd4vn6s6hdhvhg1wxa4ls7dp8h58r0yxq65nsqwndn056pxsc4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rdme_[a-z0-9]{70})"},{key:"rubygems_api_token",name:"RubyGems API token",category:"credential",example:"rubygems_7790aaa8102395704a64594a11f6de4941a27f86bc3fc9d4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rubygems_[a-f0-9]{48})"},{key:"scalingo_api_token",name:"Scalingo API token",category:"credential",example:"tk-us-4fhmqrg-rl4416b3oij_qx3q284wbhbqpk7r3te4r14lafou",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:tk-us-[a-zA-Z0-9_-]{48})"},{key:"sendbird_access_id",name:"SendBird access ID",category:"credential",example:"7e7801fd-c25d-50ab-a723-01b94c8d6c5f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sendbird_access_token",name:"SendBird access token",category:"credential",example:"305f75f04e3afa65360c25d9944fdae91138328d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{40})"},{key:"sendgrid_api_token",name:"SendGrid API token",category:"credential",example:"SG.--ed-fvdeffijnle7575jp1sh24wq_9y9hcjua5w3dnqh5-wyegkpzenziy1_qr=hf",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:SG\\.[a-z0-9=_\\-\\.]{66})"},{key:"sendinblue_api_token",name:"Sendinblue API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:xkeysib-[a-f0-9]{64}\\-[a-z0-9]{16})"},{key:"sentry_access_token",name:"Sentry access token",category:"credential",example:"1ad463398f40a52bb94a3795762f4003d51b03b8a788cba55e3a81de81c72940",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"sentry_org_token",name:"Sentry org token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)sntrys_eyJpYXQiO[a-zA-Z0-9+/]{10}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|\\z)"},{key:"sentry_user_token",name:"Sentry user token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sntryu_[a-f0-9]{64})"},{key:"settlemint_application_access_token",name:"Settlemint application access token",category:"credential",example:"sm_aat_gshgzsv353m5yb9s",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_aat_[a-zA-Z0-9]{16})"},{key:"settlemint_personal_access_token",name:"Settlemint personal access token",category:"credential",example:"sm_pat_1yhza49gsle0trg8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_pat_[a-zA-Z0-9]{16})"},{key:"settlemint_service_access_token",name:"Settlemint service access token",category:"credential",example:"sm_sat_cha543e6lb19llli",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_sat_[a-zA-Z0-9]{16})"},{key:"shippo_api_token",name:"Shippo API token",category:"credential",example:"shippo_live_1d0f80d04e7788c1edb8fc2b8076bbf8f59b84b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:shippo_(?:live|test)_[a-fA-F0-9]{40})"},{key:"shopify_access_token",name:"Shopify access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpat_[a-fA-F0-9]{32}"},{key:"shopify_custom_access_token",name:"Shopify custom access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpca_[a-fA-F0-9]{32}"},{key:"shopify_private_app_access_token",name:"Shopify private app access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shppa_[a-fA-F0-9]{32}"},{key:"shopify_shared_secret",name:"Shopify shared secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpss_[a-fA-F0-9]{32}"},{key:"sidekiq_secret",name:"Sidekiq secret",category:"credential",example:"aa8d3915:64fb5cb5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{8}:[a-f0-9]{8})"},{key:"sidekiq_sensitive_url",name:"Sidekiq sensitive URL",category:"credential",example:"https://cafebabe:deadbeef@gems.contribsys.com/",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https?://(?:[a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)"},{key:"slack_bot_token",name:"Slack bot token",category:"credential",example:"xoxb-781236542736-2364535789652-GkwFDQoHqzXDVsC6GzqYUypD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*"},{key:"slack_user_token",name:"Slack user token",category:"credential",example:"xoxp-41684372915-1320496754-45609968301-e708ba56e1517a99f6b5fb07349476ef",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}"},{key:"slack_app_token",name:"Slack app token",category:"credential",example:"xapp-1-A052FGTS2DL-5171572773297-610b6a11f4b7eb819e87b767d80e6575a3634791acb9a9ead051da879eb5b55e",isUsingLuhnAlgorithm:!1,regexp:"xapp-[0-9]-[A-Z0-9]+-[0-9]+-[a-z0-9]+"},{key:"slack_config_access_token",name:"Slack config access token",category:"credential",example:"xoxe.xoxp-1-Mi0yLTM0MTQwNDE0MDE3Ni0zNjU5NDY0Njg4MTctNTE4MjA3NTQ5NjA4MC01NDEyOTYyODY5NzUxLThhMTBjZmI1ZWIzMGIwNTg0ZDdmMDI5Y2UxNzVlZWVhYzU2ZWQyZTZiODNjNDZiMGUxMzRlNmNjNDEwYmQxMjQ",isUsingLuhnAlgorithm:!1,regexp:"xoxe.xox[bp]-[0-9]-[A-Z0-9]{50}"},{key:"slack_config_refresh_token",name:"Slack config refresh token",category:"credential",example:"xoxe-1-My0xLTMxNzcwMjQ0MTcxMy01MTU4MTUyNjkxNzE0LTUxODE4NDI0MDY3MzYtMjA5MGFkOTFlZThkZWE2OGFlZDYwYWJjODNhYzAxYjA5ZjVmODBhYjgzN2QyNDdjOTNlOGY5NTg2YWM1OGM4Mg",isUsingLuhnAlgorithm:!1,regexp:"xoxe-[0-9]-[A-Z0-9]{50}"},{key:"slack_legacy_bot_token",name:"Slack legacy bot token",category:"credential",example:"xoxb-263594206564-FGqddMF8t08v8N7Oq4i57vs1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}"},{key:"slack_legacy_workspace_token",name:"Slack legacy workspace token",category:"credential",example:"xoxa-2-511111111-31111111111-3111111111111-e039d02840a0b9379c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[ar]-(?:[0-9]-)?[0-9a-zA-Z]{8,48}"},{key:"slack_legacy_token",name:"Slack legacy token",category:"credential",example:"xoxs-416843729158-132049654-5609968301-e708ba56e1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[os]-[0-9]+-[0-9]+-[0-9]+-[a-fA-F0-9]+"},{key:"slack_webhook_url",name:"Slack webhook URL",category:"credential",example:"hooks.slack.com/services/z6cvbfngk3h7i0vts4akmbxidtb8o3b4pq2sbbd6o86g",isUsingLuhnAlgorithm:!1,regexp:"(?:https?://)?hooks.slack.com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}"},{key:"snyk_api_token",name:"Snyk API token",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sonar_api_token",name:"Sonar API token",category:"credential",example:"12345678ABCDEFH1234567890ABCDEFH12345678",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:(?:squ_|sqp_|sqa_)?[a-z0-9=_-]{40})"},{key:"stripe_access_token",name:"Stripe access token",category:"credential",example:"sk_test_cyge9m4s1kxiqdkszz0a57nyx6wk73",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})"},{key:"square_access_token",name:"Square access token",category:"credential",example:"sq0atp-OQUxovdrj3tfFpSd66r3sY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:EAAA|sq0atp-)[a-zA-Z0-9_-]{22,60})"},{key:"squarespace_access_token",name:"Squarespace access token",category:"credential",example:"86447eab-140f-2563-3572-bb016dafd692",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sumologic_access_id",name:"SumoLogic access ID",category:"credential",example:"suJS4ZsaD5bQTt",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:su[a-zA-Z0-9]{12})"},{key:"sumologic_access_token",name:"SumoLogic access token",category:"credential",example:"1xohkwr8lpvm4osygkpe5zbd16c3376ver2qed1bssuko4uy4tij1bnf4dnwy7o4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"microsoft_teams_webhook",name:"Microsoft Teams webhook URL",category:"credential",example:"https://mycompany.webhook.office.com/webhookb2/767lrnj6-okh8-dnh8-jey2-y2iteohrwz75@6igi6oz6-ud9w-wior-2zva-5vx0wp6wuiqk/IncomingWebhook/o1zox92ssprrppjtnvcjqq0q09k2wnc3/qwox5p9d-x4zr-3yis-t1on-s67zj50tmyht",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}"},{key:"telegram_bot_api_token",name:"Telegram bot API token",category:"credential",example:"59015865:A12o5wu6f78zofs0udypf9ti23u82g-qkfz",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{5,16}:(?-i:A)[a-z0-9_\\-]{34})"},{key:"travisci_access_token",name:"Travis CI access token",category:"credential",example:"zjgfo5fhshd5c60hpz22wh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{22})"},{key:"twilio_api_key",name:"Twilio API key",category:"credential",example:"SKa585fd034fcd16cdd741f7df9b57fb3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)SK[0-9a-fA-F]{32}"},{key:"twitch_api_token",name:"Twitch API token",category:"credential",example:"1hm9gcychlkpf93jdjnwdu0uaamu6d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"twitter_api_key",name:"Twitter API key",category:"credential",example:"m8zqu4etx07bjt7tyeacc6pox",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"twitter_api_secret",name:"Twitter API secret",category:"credential",example:"7f4gxkubw9qs346ik99zk3z8b6kk3d7g8toi7zujgvgbt8q0yv",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{50})"},{key:"twitter_access_token",name:"Twitter access token",category:"credential",example:"465616696186918-96B1NCD5CH0uyi7zUHiS",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{15,25}-[a-zA-Z0-9]{20,40})"},{key:"twitter_access_secret",name:"Twitter access secret",category:"credential",example:"vyuo5peybdzznr7z0ua5wamhogusans4m29uzi25w4jgj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{45})"},{key:"twitter_bearer_token",name:"Twitter bearer token",category:"credential",example:"AAAAAAAAAAAAAAAAAAAAAAWRGWFGlfwyqNrrIa3pewqNNLX0jQMj2sR6M2cZUfBdqXDtkt7Nsb56F4tCz7Pt8ujbosrLxnRqYgwI0b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:A{22}[a-zA-Z0-9%]{80})"},{key:"typeform_api_token",name:"Typeform API token",category:"credential",example:"tfp_o-nsn=6eg2ios=4g652xhf933qor4jj7ort2qh_uw_5jdsuffp31ln=e-2a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:tfp_[a-z0-9\\-_\\.=]{59})"},{key:"vault_batch_token",name:"Vault batch token",category:"credential",example:"hvb.x84j4cl53mzvhvb1nfc3mfi721gh5i-92f96lt0gns5lpksfu5f0199j-gw4ycxg6au4ser86mczcr_nx6ur2elbpazfrybo80fxjv3bghxshml3g261l6qi03yrz03qup84jk-fc2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hvb\\.[a-zA-Z0-9_-]{50})"},{key:"vault_service_token",name:"Vault service token",category:"credential",example:"s.8QH9knZV94f0IjBZismfOPD0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:hvs\\.[a-zA-Z0-9_-]{90}|s\\.(?i:[a-z0-9]{24})))"},{key:"yandex_api_key",name:"Yandex API key",category:"credential",example:"AQVN9wiAh8pyz3lmB5WTo_KUuPDXlxtzkA5-YFG",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:AQVN[A-Za-z0-9_\\-]{35,38})"},{key:"yandex_aws_access_token",name:"Yandex AWS access token",category:"credential",example:"YCZ6DHVrZONPNtgwWLZPrIGyviSrudRVSr8w0b1S",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:YC[a-zA-Z0-9_\\-]{38})"},{key:"yandex_access_token",name:"Yandex access token",category:"credential",example:"t1.L=.WJ9CYVI5eeLkTOrMM_dgaPgdmpen48R8RYsL4VJqelVKDmrqYsSHkH6QyVVhJkuHSQFTd0NOhClEDyCz7eEbh5=",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:t1\\.[A-Z0-9a-z_-]+[=]{0,2}\\.[A-Z0-9a-z_-]{86}[=]{0,2})"},{key:"zendesk_secret_key",name:"Zendesk secret key",category:"credential",example:"iydgm2jofftb2xu7niv55qnfxdwbwmqt2s561bgc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"infracost_api_token",name:"Infracost API token",category:"credential",example:"ico-fNZw8jjy6TugMUHKWX4l9iSP3i95SPNH",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ico-[a-zA-Z0-9]{32})"},{key:"iban",name:"Iban",category:"financial-data",example:"FR7630006000011234567890189",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{11,30}(?-u:\\b)"},{key:"aikido_token",name:"Aikido token",category:"credential",example:"AIK_SECRET_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_SECRET_[A-Za-z0-9]{64}"},{key:"aikido_ci_token",name:"Aikido CI secret",category:"credential",example:"AIK_CI_US_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_CI_(US_|ME_)?[A-Za-z0-9]{64}"}],$0=EE.map(e=>e.key),iie=new Set($0),aie=EE.map(e=>e.key);var v0=["CLUSTER_DB_QUERY_INVALID_CONNECTION_PARAMS","CLUSTER_DB_QUERY_INVALID_CREDENTIALS","CLUSTER_DB_QUERY_PERMISSION_DENIED","CLUSTER_DB_QUERY_QUERY_SYNTAX_ERROR","CLUSTER_DB_QUERY_DATABASE_UNREACHABLE","CLUSTER_DB_QUERY_CONNECTION_FAILED","CLUSTER_DB_QUERY_QUERY_EXECUTION_FAILED","CLUSTER_DB_QUERY_QUERY_TIMEOUT"],hE=[...v0,"ABORT_ERROR","BAD_REQUEST","DUPLICATE_KEY_VIOLATION","FOREIGN_KEY_VIOLATION","FST_ERR_VALIDATION","INVALID_INPUT","MISSING_PERMISSION","PRIVILEGE_ESCALATION","ORG_NOT_FOUND_AUTHENTICATION_ERROR","RATE_LIMITED","RESERVED_TAG_POLICY_ERROR","RESOURCE_NOT_FOUND","INVALID_INVITATION","TAG_POLICY_ALREADY_EXISTS_ERROR","TAG_POLICY_VALIDATION_ERROR","URL_NOT_FOUND"],TE=["INTERNAL_ERROR","INVALID_QUERY_TO_CLUSTER"];var G0=["NETWORK_ERROR","RESPONSE_PARSE_ERROR"],D0=[...hE,...TE,...G0],mae=o.Object({code:o.Optional(o.Enum(D0,{description:"Machine readable error code describing what went wrong"})),message:o.String({description:"Human readable explanation of the error"}),statusCode:o.Number({description:"HTTP status code that was returned"})},{$id:"ErrorResponse",description:"Standard envelope for API errors"}),pae=o.Object({code:o.Optional(o.Enum(hE,{description:"Machine readable error code describing what went wrong"})),message:o.String({description:"Human readable explanation of the error"}),statusCode:o.Number({description:"HTTP status code that was returned"})},{$id:"ClientErrorResponse",description:"Standard envelope for client (4XX) API errors"}),cae=o.Object({code:o.Optional(o.Enum(TE,{description:"Machine readable error code describing what went wrong"})),message:o.String({description:"Human readable explanation of the error"}),statusCode:o.Number({description:"HTTP status code that was returned"})},{$id:"ServerErrorResponse",description:"Standard envelope for server (5XX) API errors"}),uae=o.Object({requestId:o.String({description:"Identifier used to trace the lifecycle of this API request"}),error:o.Ref("ClientErrorResponse")},{$id:"ClientErrorEnvelope",description:"Standard envelope wrapping all client (4XX) error responses"}),lae=o.Object({requestId:o.String({description:"Identifier used to trace the lifecycle of this API request"}),error:o.Ref("ServerErrorResponse")},{$id:"ServerErrorEnvelope",description:"Standard envelope wrapping all server (5XX) error responses"});function f({body:e,description:t,method:r,operationId:n,params:i,tags:s,query:p,response:c,url:l}){return i?{body:e,buildUrl:y=>l.replace(/:[a-zA-Z_]+/g,E=>y[E.slice(1)]),description:t,method:r,operationId:n,params:i,query:p,response:c,tags:s,templateUrl:l}:{body:e,description:t,method:r,operationId:n,query:p,response:c,tags:s,url:l,templateUrl:l}}function xE(e,t){if(!t||typeof t!="object")return e;let r=new URLSearchParams;return Object.entries(t).forEach(([n,i])=>{Array.isArray(i)?i.length>0&&i.forEach(s=>{s!==void 0&&(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&r.append(n,String(s))}):(typeof i=="boolean"||typeof i=="string"||typeof i=="number")&&r.append(n,String(i))}),`${e}?${r.toString()}`}var j0="x-tsuga-session-id",fm="x-tsuga-source",gm="x-tsuga-source-version",ym="x-tsuga-source-commit",Im="x-tsuga-source-date",F0="x-request-id",_ae={[j0]:"Session identifier for request correlation",[fm]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[gm]:"SDK version",[ym]:"SDK commit hash",[Im]:"SDK commit date",[F0]:"Unique identifier for this API request, useful for debugging and support"};var qn=class e extends Error{constructor(r,n,i,s){super(r);this.statusCode=n;this.code=i;this.requestId=s;this.name="CliError"}static fromErrorResponse(r,n){return new e(r.message,r.statusCode,r.code,n)}};function _E(e){if(e instanceof qn){let t=[`Error: ${e.message}`];return e.code&&t.push(`Code: ${e.code}`),e.statusCode&&t.push(`Status: ${e.statusCode}`),e.requestId&&t.push(`Request ID: ${e.requestId}`),t.join(`
37
- `)}return e instanceof Error?`Error: ${e.message}`:String(e)}function AE(e,t){return async function(n,i={}){let{body:s,params:p,query:c}=i,l;if("url"in n)l=n.url;else{if(!p)throw new qn("Internal error: params required for this endpoint");l=n.buildUrl(p)}let g=xE(`${e}${l}`,c),y={Accept:"application/json",Authorization:`Bearer ${t}`,[fm]:"cli",[gm]:"1.0.5",[ym]:"e88ccf5",[Im]:"2026-03-26T10:02:23.235Z"};s&&(y["Content-Type"]="application/json");let C=await(await fetch(g,{method:n.method,headers:y,body:s?JSON.stringify(s):void 0})).json();if(C.error)throw qn.fromErrorResponse(C.error,C.requestId);return C.data}}var q0=1e3,B0=60*q0,H0=60*B0,Na=24*H0,kae=7*Na,Uae=30*Na;var Em=["past-5-minutes","past-15-minutes","past-30-minutes","past-1-hour","past-2-hours","past-4-hours","past-6-hours","past-12-hours","past-24-hours","past-2-days","past-3-days","past-7-days","past-30-days","past-3-months","current-day","current-week","current-month","current-year","previous-day","previous-week","previous-month","previous-3-months","previous-year"];var K0="^\\S(.*\\S)?$",z0=o.Object({key:o.String({maxLength:128}),value:o.String({maxLength:256,pattern:K0})},{title:"Tag"}),V0=o.Array(z0,{title:"Tags",maxItems:50,description:"List of key/value tags applied to the resource"}),ce=o.Optional(V0);var Ar="/v0/teams",hm=["public","private"],bE=o.Object({color:o.Enum(lm),mode:o.Enum(dm),iconName:o.Enum(IE)}),Tm=o.Object({color:o.Enum(lm),mode:o.Enum(dm)}),Y0=100,W0=250,Bn=o.Object({id:o.String({description:"Identifier of the team"}),name:o.String({description:"Human readable team name displayed throughout the app"}),description:o.Optional(o.String()),visibility:o.Enum(hm,{description:"Controls whether the resources of the team are discoverable by users"}),tags:ce,createdAt:A(),updatedAt:A(),memberCount:o.Optional(o.Number({description:"Number of members currently in the team"})),avatar:o.Optional(bE)}),Ma=o.Object({name:o.String({minLength:1,maxLength:Y0,description:"Name to assign to the team"}),description:o.Optional(o.String({maxLength:W0})),visibility:o.Enum(hm,{description:"Controls whether the resources of the team are discoverable by users"}),tags:ce,avatar:o.Optional(bE)}),Q0=o.Object({id:o.String(),name:o.String(),email:o.String(),role:o.Enum(Dn),joinedTeamAt:A(),orgRole:o.Enum(oE),avatar:o.Optional(Tm)}),qae=f({tags:["teams"],url:Ar,method:"GET",response:o.Array(Bn),query:o.Optional(o.Object({includeMemberCount:o.Optional(o.Boolean())}))}),Bae=f({tags:["teams"],url:`${Ar}/:id`,method:"GET",params:o.Object({id:u()}),response:Bn}),Hae=f({tags:["teams"],url:`${Ar}/:id/members`,method:"GET",params:o.Object({id:u()}),response:o.Array(Q0)}),Kae=f({tags:["teams"],url:`${Ar}/:id/assets`,method:"GET",params:o.Object({id:u()}),response:o.Object({apiKeyCount:o.Number(),logRouteCount:o.Number(),monitorCount:o.Number(),notificationRuleCount:o.Number(),dashboardCount:o.Number()})}),zae=f({tags:["teams"],url:Ar,method:"POST",body:Ma,response:Bn}),Vae=f({tags:["teams"],url:`${Ar}/:id`,method:"PUT",params:o.Object({id:u()}),body:Ma,response:Bn}),Yae=f({tags:["teams"],url:`${Ar}/bulk-update`,method:"POST",body:o.Object({teamIds:o.Array(u(),{maxItems:100}),config:o.Object({visibility:o.Enum(hm)})}),response:o.Object({})}),Wae=f({tags:["teams"],url:`${Ar}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H});var Z0=o.Enum(["terraform-provider","web-frontend","mcp-server","cli"]),_e=F("type",[o.Object({type:o.Literal("user"),id:o.String(),name:o.String(),avatar:o.Optional(Tm)}),o.Object({type:o.Literal("operation-api-key"),id:o.String(),name:o.String(),source:o.Optional(Z0)})]);var Vr="/v0/dashboards",J0=["white","gray.100","amber.200","lime.200","emerald.200","cyan.200","blue.200","violet.200","fuchsia.200","pink.200","red.200"],X0=["timeseries","top-list","pie","query-value","bar","list"],pse=[...X0,"note"],eU=["ns","us","ms","s","m","h","days"];var tU=["B","KB","MB","GB","TB","PB"];var Hn=F("type",[o.Object({type:o.Literal("duration",{description:"Normalizes values as durations using standard time units"}),unit:o.Enum(eU,{description:"Time unit used to present the normalized values"})},{$id:"DataNormalizerDuration",title:"Duration"}),o.Object({type:o.Literal("data",{description:"Normalizes values as data sizes using byte units"}),unit:o.Enum(tU,{description:"Data size unit used to present the normalized values"})},{$id:"DataNormalizerData",title:"Data"}),o.Object({type:o.Literal("percent",{description:"Format values as percentages"})},{$id:"DataNormalizerPercent",title:"Percent"}),o.Object({type:o.Literal("date",{description:"Formats values as calendar dates"})},{$id:"DataNormalizerDate",title:"Date"}),o.Object({type:o.Literal("level",{description:"Displays values using their log level name"})},{$id:"DataNormalizerLevel",title:"Level"}),o.Object({type:o.Literal("custom",{description:"Normalizes values using a custom unit label"}),unit:o.String({description:"Text label describing the custom unit"})},{$id:"DataNormalizerCustom",title:"Custom"})],{title:"Normalizer"}),rU=o.Object({attribute:o.String({description:"Attribute displayed as a column in the log list"}),normalizer:o.Optional(Hn)},{title:"WidgetListColumn"}),nU=["background","no-background"],oU=["table","legend-only","no-legend"];var iU=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"],CE=["alert","warning","success"],aU=o.Object({operator:o.Enum(iU,{description:"Comparator used to evaluate the metric value"}),value:o.Number({description:"Threshold value used when evaluating the operator"}),color:o.Enum(CE,{description:"Color applied when the condition is met"})},{title:"ConditionalFormatting"}),sU=o.Object({value:o.Number({description:"Y-axis value where the threshold marker is placed"}),level:o.Enum(CE,{description:"Level applied to the threshold marker"})},{title:"ThresholdMarker"}),mU=["sec","min","hour","day"],OE=o.Object({time:o.Number({description:"Number of units that make up each bar bucket"}),metric:o.Enum(mU,{description:"Unit used to measure the bucket width"})});var SE=o.Enum(["flex-start","center","flex-end"],{description:"Flex alignment keyword used for widget layout"}),PE={source:fE,queries:Vo,formula:o.Optional(Yo),visibleSeries:o.Optional(o.Array(o.Boolean(),{description:"Flags indicating whether each query or formula series is visible"}))},wa={...PE,groupBy:o.Optional(Wo)},$a=o.Enum(oU,{description:"Controls whether and how the widget displays legend or series details (e.g. table, legend-only, or no legend)"}),Qo=o.Optional(o.Number({description:"Number of decimal places to display in the value"})),RE=o.Optional(o.Array(sU,{description:"Threshold markers displayed on the chart"})),pU=o.Object({type:o.Literal("list",{description:"Displays matching logs or database rows in a tabular list"}),source:o.Union([o.Literal("logs",{description:"Indicates that the widget queries logs"}),o.Literal("connections",{description:"Indicates that the widget queries connections like PostgreSQL, BigQuery, etc."})]),query:u({type:"long",description:"Query that selects logs or database rows for the list"}),listColumns:o.Optional(o.Array(rU,{description:"Custom columns to display for each log or database row"})),connectionId:o.Optional(u({description:"Identifier of the connection to query"}))}),cU=o.Unsafe({...pU,$id:"GraphVisualizationList",title:"List"}),uU=F("type",[o.Object({type:o.Literal("timeseries",{description:"Displays the aggregation as a time series chart"}),...wa,timeBucket:o.Optional(OE),normalizer:o.Optional(Hn),precision:Qo,legendMode:o.Optional($a),thresholds:RE},{$id:"GraphVisualizationTimeseries",title:"Timeseries"}),o.Object({type:o.Literal("top-list",{description:"Displays the aggregation as a ranked list of top results"}),...wa,normalizer:o.Optional(Hn),precision:Qo},{$id:"GraphVisualizationTopList",title:"TopList"}),o.Object({type:o.Literal("pie",{description:"Displays the aggregation as a pie chart"}),...wa,normalizer:o.Optional(Hn),precision:Qo,legendMode:o.Optional($a)},{$id:"GraphVisualizationPie",title:"Pie"}),o.Object({type:o.Literal("query-value",{description:"Displays the aggregation as a single value"}),...PE,backgroundMode:o.Optional(o.Enum(nU,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:o.Optional(o.Array(aU,{description:"Conditional formatting rules applied to the displayed value"})),precision:Qo,normalizer:o.Optional(Hn),legendMode:o.Optional($a)},{$id:"GraphVisualizationQueryValue",title:"QueryValue"}),o.Object({type:o.Literal("bar",{description:"Displays the aggregation as a bar chart"}),...wa,timeBucket:o.Optional(OE),precision:Qo,normalizer:o.Optional(Hn),thresholds:RE,legendMode:o.Optional($a)},{$id:"GraphVisualizationBar",title:"Bar"}),cU,o.Object({type:o.Literal("note",{description:"Displays static text on the dashboard"}),note:o.Optional(u({type:"long",description:"Markdown-compatible text shown in the note"})),noteColor:o.Optional(o.Enum(J0,{description:"Background color used to render the note"})),noteAlign:o.Optional(SE),noteJustifyContent:o.Optional(SE)},{$id:"GraphVisualizationNote",title:"Note"})]),kE=o.Object({id:u({description:"Identifier of the graph widget"}),name:o.Optional(u({description:"Display name of the graph widget"})),description:o.Optional(o.String({minLength:1,maxLength:800,description:"Description of the graph widget"})),visualization:uU,layout:o.Optional(o.Object({x:o.Number({description:"Horizontal grid position of the widget"}),y:o.Number({description:"Vertical grid position of the widget"}),w:o.Number({description:"Width of the widget in grid units"}),h:o.Number({description:"Height of the widget in grid units"})},{description:"Grid layout coordinates for this widget"}))},{title:"Graph"}),lU=10,UE=o.Array(o.Object({key:u({description:"Filter key"}),values:o.Array(u({description:"Filter value"}))}),{maxItems:lU,description:"Filters applied to every widget on the dashboard"}),Kn=o.Object({id:o.String({description:"Identifier of the dashboard"}),name:o.String({description:"Display name of the dashboard"}),owner:o.String({description:"Team ID that owns and manages the dashboard"}),graphs:o.Array(kE,{description:"Ordered widgets that compose the dashboard"}),filters:o.Optional(UE),createdAt:A(),updatedAt:A(),creator:o.Optional(_e),updater:o.Optional(_e),tags:ce,timePreset:o.Optional(o.Enum(Em))}),va=o.Object({name:u({description:"Display name of the dashboard"}),owner:u({allowEmpty:!1,description:"Team ID that owns and manages the dashboard"}),graphs:o.Array(kE,{description:"Ordered widgets that compose the dashboard"}),filters:o.Optional(UE),tags:ce,timePreset:o.Optional(o.Enum(Em))}),xm=o.Object({owners:o.Optional(o.Array(u({allowEmpty:!1}),{description:"Filter by owner team IDs"}))}),cse=f({tags:["dashboards"],url:Vr,method:"GET",query:xm,response:o.Array(Kn)}),use=f({tags:["dashboards"],url:`${Vr}/:id`,method:"GET",params:o.Object({id:u()}),response:Kn}),lse=f({tags:["dashboards"],url:Vr,method:"POST",body:va,response:Kn}),dse=f({tags:["dashboards"],url:`${Vr}/:id`,method:"PUT",params:o.Object({id:u()}),body:o.Partial(va),response:Kn}),fse=f({tags:["dashboards"],url:`${Vr}/bulk-update`,method:"PUT",body:o.Object({dashboardIds:o.Array(u()),owner:u({allowEmpty:!1})}),response:o.Object({})}),gse=f({tags:["dashboards"],url:`${Vr}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H}),yse=f({tags:["dashboards"],url:`${Vr}/bulk-delete`,method:"DELETE",body:o.Object({ids:o.Array(u())}),response:o.Object({})});var Zo=`/${"v1"}/dashboards`,Jo=o.Pick(Kn,["id","name","owner","graphs","filters","tags","timePreset"],{$id:"Dashboard",description:"Visualization of telemetry data with customizable graphs and filters"}),dU={id:"123-456-abc",name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(Jo,{examples:[dU]});var fU=o.Pick(xm,["owners"]),LE=f({description:"Retrieve all dashboards",operationId:"listDashboards",tags:["dashboards"],url:Zo,method:"GET",query:fU,response:o.Array(Jo)}),NE=f({description:"Retrieve a dashboard by its id",operationId:"getDashboard",tags:["dashboards"],url:`${Zo}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:Jo}),_m=o.Pick(va,["name","owner","graphs","filters","tags","timePreset"]),gU={name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(_m,{examples:[gU]});var ME=f({description:"Create a new dashboard",operationId:"createDashboard",tags:["dashboards"],url:Zo,method:"POST",body:_m,response:Jo}),wE=f({description:"Update a dashboard by its id",operationId:"updateDashboard",tags:["dashboards"],url:`${Zo}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:o.Partial(_m),response:Jo}),$E=f({description:"Delete a dashboard by its id",operationId:"deleteDashboard",tags:["dashboards"],url:`${Zo}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var yU=100,IU=3,zn=o.Object({id:o.String(),name:o.String(),keyLastCharacters:o.String(),owner:o.String(),tags:ce,teamOverrideFields:o.Optional(o.Array(o.String())),updatedAt:A(),createdAt:A(),creator:o.Optional(_e),updater:o.Optional(_e),lastSyncedAt:o.Optional(A()),assetUpdatedAt:A()}),Xo=o.Object({name:o.String({minLength:1,maxLength:yU}),owner:u({allowEmpty:!1}),tags:ce,teamOverrideFields:o.Optional(o.Array(u({allowEmpty:!1}),{minItems:1,maxItems:IU}))}),ei="/v0/ingestion-api-keys",Lse=f({tags:["ingestion-api-keys"],url:ei,method:"POST",body:Xo,response:o.Intersect([zn,o.Object({key:o.String()})])}),Nse=f({tags:["ingestion-api-keys"],url:ei,method:"GET",response:o.Array(zn)}),Mse=f({tags:["ingestion-api-keys"],url:`${ei}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:zn}),wse=f({tags:["ingestion-api-keys"],url:`${ei}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:Xo,response:zn}),$se=f({tags:["ingestion-api-keys"],url:`${ei}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var ti=`/${"v1"}/ingestion-api-keys`,ri=o.Pick(zn,["id","name","owner","tags","teamOverrideFields","keyLastCharacters"],{$id:"IngestionApiKey",description:"API key used to send telemetry data to Tsuga"}),vE={id:"123-456-abc",name:"Production Logs Ingestion",keyLastCharacters:"x7Qm",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(ri,{examples:[vE]});var GE=o.Pick(Xo,["name","owner","tags","teamOverrideFields"],{$id:"CreateIngestionApiKeyRequest"}),DE=o.Pick(Xo,["name","owner","tags","teamOverrideFields"],{$id:"UpdateIngestionApiKeyRequest"}),jE={name:"Production Logs Ingestion",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(GE,{examples:[jE]});Object.assign(DE,{examples:[jE]});var EU={...vE,key:"tsuga_in:v1:abc123xyx7Qm"},FE=f({description:"Retrieve all ingestion API keys",operationId:"listIngestionApiKeys",tags:["ingestion-api-keys"],url:ti,method:"GET",response:o.Array(ri)}),Hse=f({description:"Retrieve an ingestion API key by its id",operationId:"getIngestionApiKey",tags:["ingestion-api-keys"],url:`${ti}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:ri}),hU=o.Intersect([o.Pick(ri,["id","name","keyLastCharacters","owner","tags","teamOverrideFields"]),o.Object({key:o.String({description:"The full API key value, returned only at creation time"})})],{title:"IngestionApiKeyCreated",example:EU}),qE=f({description:"Create a new ingestion API key",operationId:"createIngestionApiKey",tags:["ingestion-api-keys"],url:ti,method:"POST",body:GE,response:hU}),BE=f({description:"Update an ingestion API key by its id",operationId:"updateIngestionApiKey",tags:["ingestion-api-keys"],url:`${ti}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:DE,response:ri}),HE=f({description:"Delete an ingestion API key by its id",operationId:"deleteIngestionApiKey",tags:["ingestion-api-keys"],url:`${ti}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var TU=["all","owning-team-and-public","owning-team-only"],Am=o.Enum(TU,{description:"This controls which data the resource can see"});var Ot="/v0/monitors",bm=["alert","resolve","keep_last_status","consider_zero"],KE=["alert","resolve","keep_last_status"];var xU=["no_aggregation","all","any","each","proportion"],_U=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"];var AU=o.Object({formula:u({type:"math-formula"}),operator:o.Enum(_U),threshold:o.Number()}),Om=o.Array(AU),zE=o.Object({formula:u({type:"math-formula"}),conditionType:o.Enum(["rate","error","cpu","general","to_be_set"])}),ome=o.Enum(["rate","error","cpu","general"]),Gt=[1,2,3,4,5];var ni={timeframe:o.Number({description:"Timeframe of the monitor in minutes"}),groupByFields:o.Array(o.Object({fields:o.Array(u(),{description:"Fields used by the monitor group by."}),limit:o.Number({description:"Configured limit for this group by. Warning! This setting is currently ignored. Monitor evaluation will instead apply a fixed limit of 100 groups per field."})}),{maxItems:1,description:"Monitor group by configuration. Warning! Note that the limit setting is currently ignored."}),aggregationAlertLogic:o.Optional(o.Enum(xU)),proportionAlertThreshold:o.Optional(o.Integer({minimum:1,maximum:99}))},Sm=o.Object({type:o.Literal("metric"),conditions:Om,noDataBehavior:o.Enum(bm),...ni,queries:Fn},{$id:"MonitorConfigurationMetric"}),Rm=o.Object({type:o.Literal("log"),conditions:Om,noDataBehavior:o.Enum(bm),...ni,queries:Fn},{$id:"MonitorConfigurationLog"}),VE=o.Object({type:o.Literal("trace"),conditions:Om,noDataBehavior:o.Enum(bm),...ni,queries:Fn},{$id:"MonitorConfigurationTrace"}),Cm=o.Object({type:o.Literal("anomaly-log"),condition:zE,noDataBehavior:o.Enum(KE),...ni,queries:Fn},{$id:"MonitorConfigurationAnomalyLog"}),Pm=o.Object({type:o.Literal("anomaly-metric"),condition:zE,noDataBehavior:o.Enum(KE),...ni,queries:Fn},{$id:"MonitorConfigurationAnomalyMetric"}),YE=o.Object({type:o.Literal("certificate-expiry"),warnBeforeInDays:o.Integer({minimum:1,maximum:365}),cloudAccounts:o.Optional(o.Array(o.String(),{minItems:1})),aggregationAlertLogic:o.Literal("each"),noDataBehavior:o.Literal("resolve")},{$id:"MonitorConfigurationCertificateExpiry"}),bU=o.Object({type:o.Literal("log-error-pattern"),aggregationAlertLogic:o.Literal("each"),noDataBehavior:o.Literal("keep_last_status"),filter:o.Object({teamIds:o.Array(o.String()),env:o.String(),service:o.Optional(o.String())})},{$id:"MonitorConfigurationLogErrorPattern"}),WE=F("type",[Sm,Rm,VE,Cm,Pm,bU,YE]);var Vt=o.Object({id:o.String({description:"Identifier of the monitor"}),name:o.String({description:"Display name of the monitor"}),owner:o.String({description:"Team ID that owns and manages the monitor"}),message:o.Optional(o.String({description:"Message to be displayed if a notification is triggered"})),tags:ce,configuration:WE,priority:o.Enum(Gt,{description:"Priority of the monitor"}),permissions:Am,dashboardId:o.Optional(o.String({description:"Identifier of a dashboard related to the monitor"})),pauseUntil:o.Optional(A()),creator:o.Optional(_e),updater:o.Optional(_e),createdAt:A(),updatedAt:A(),lastSyncedAt:o.Optional(A()),assetUpdatedAt:A(),clusterIds:o.Array(o.String())},{title:"Monitor"}),OU=F("type",[Sm,Rm,VE,Cm,Pm,YE]),ime=o.Object({...Vt.properties,configuration:OU},{title:"Monitor"}),ame=o.Object({...Vt.properties,configuration:F("type",[Sm,Rm,Cm,Pm])},{title:"Monitor"}),oi=o.Object({name:u(),message:o.Optional(u({type:"long"})),tags:ce,configuration:WE,priority:o.Enum(Gt),owner:u({allowEmpty:!1}),dashboardId:o.Optional(u()),pauseUntil:o.Optional(u({allowEmpty:!1,type:"date-time"})),permissions:Am,clusterIds:o.Optional(o.Array(u({allowEmpty:!1})))});var sme=f({tags:["monitors"],url:Ot,method:"GET",response:o.Array(Vt),query:o.Optional(o.Object({owners:o.Optional(o.Array(u({allowEmpty:!1})))}))}),mme=f({tags:["monitors"],url:`${Ot}/:id`,method:"GET",params:o.Object({id:u()}),response:Vt}),pme=f({tags:["monitors"],url:Ot,method:"POST",body:oi,response:Vt}),cme=f({tags:["monitors"],url:`${Ot}/:id`,method:"PUT",params:o.Object({id:u()}),body:oi,response:Vt}),ume=f({tags:["monitors"],url:`${Ot}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H}),lme=f({tags:["monitors"],url:`${Ot}/:id/snooze`,method:"POST",params:o.Object({id:u()}),body:o.Object({pauseUntil:u({allowEmpty:!1,type:"date-time"})}),response:Vt}),SU=["alert","ok","alert_consider_zero","ok_consider_zero","alert_no_data","ok_no_data","keep_last_status_ok","keep_last_status_alert"],Yr=o.Enum(SU),RU=F("type",[o.Object({type:o.Literal("each"),subStates:o.Record(o.String(),o.Object({stateValue:o.Union([Yr,o.Null()]),lastChangedAt:A()}))}),o.Object({type:o.Literal("no_aggregation"),stateValue:o.Optional(Yr)}),o.Object({type:o.Literal("any"),stateValue:o.Optional(Yr)}),o.Object({type:o.Literal("all"),stateValue:o.Optional(Yr)}),o.Object({type:o.Literal("proportion"),stateValue:o.Optional(Yr)})]),CU=o.Object({monitorId:o.String(),currentState:RU,lastChangedAt:o.Optional(A())}),dme=f({tags:["monitors"],url:`${Ot}/states/:id`,method:"GET",params:o.Object({id:u()}),response:CU}),fme=f({tags:["monitors"],url:`${Ot}/:id/transitions`,method:"GET",params:o.Object({id:u()}),query:o.Object({from:o.Number(),to:o.Number()}),response:o.Array(o.Object({id:o.String(),createdAt:A(),fromState:o.Optional(Yr),toState:o.Optional(Yr),dimension:o.Optional(o.String())}))}),PU=["unprocessed","processed","failed-to-process"],gme=f({tags:["monitors"],url:`${Ot}/:id/results`,method:"GET",params:o.Object({id:u()}),query:o.Object({from:o.Number(),to:o.Number()}),response:o.Object({isTruncated:o.Boolean(),results:o.Array(o.Object({id:o.String(),evaluationAt:A(),formulaResult:o.Object({groups:o.Array(o.Object({groupKey:o.Record(o.String(),mm),results:o.Array(o.Union([o.Number(),o.Null()])),conditionMet:o.Enum(["true","false","nan-no-data"])}))}),createdAt:A(),status:o.Enum(PU)}))})});var ii=`/${"v1"}/monitors`,ai=o.Pick(Vt,["id","name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],{$id:"Monitor",description:"Monitor allowing to send alerts based on telemetry data"}),kU={id:"123-456-abc",name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},UU={id:"456-789-def",name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(ai,{examples:[kU,UU]});var QE=f({description:"Retrieve all monitors",operationId:"listMonitors",tags:["monitors"],url:ii,method:"GET",response:o.Array(ai)}),ZE=f({description:"Retrieve a monitor by its id",operationId:"getMonitor",tags:["monitors"],url:`${ii}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:ai}),JE=["name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],XE=o.Pick(oi,JE,{$id:"CreateMonitorRequest"}),eh=o.Pick(oi,JE,{$id:"UpdateMonitorRequest"}),th={name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},rh={name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(XE,{examples:[th,rh]});Object.assign(eh,{examples:[th,rh]});var nh=f({description:"Create a new monitor",operationId:"createMonitor",tags:["monitors"],url:ii,method:"POST",body:XE,response:ai}),oh=f({description:"Update a monitor by its id",operationId:"updateMonitor",tags:["monitors"],url:`${ii}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:eh,response:ai}),ih=f({description:"Delete a monitor by its id",operationId:"deleteMonitor",tags:["monitors"],url:`${ii}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var si="/v0/notifications",Qr=`${si}/rules`,ah=`${si}/slack/setup`,Ga=`${si}/integrations`,Wr=["triggered","resolved","no-data"],LU=["sent","stale","pending","rate-limited","failed","silenced"],sh=o.Optional(o.Object({maxMessages:o.Integer({minimum:1,description:"Maximum number of messages allowed during the rate-limiting window"}),minutes:o.Integer({minimum:1,description:"Length of the rate-limiting window in minutes"})},{description:"Per-target rate-limiting configuration"})),mh=o.Optional(o.Object({mode:o.Literal("each"),renotificationStates:o.Array(o.Enum(["alert","alert_no_data"]),{description:"Alert states that will trigger a renotification"}),renotifyIntervalMinutes:o.Integer({minimum:1,description:"Minimum number of minutes to wait before renotifying"})},{description:"Configuration for repeating notifications over time"})),NU=o.Object({id:u({description:"Identifier of the notification target"}),rateLimit:sh,config:F("type",[o.Object({type:o.Literal("slack"),channel:u({description:"Slack channel ID that receives the notification"}),integrationId:u({description:"Slack workspace ID that receives the notification"})},{$id:"RuleTargetInputSlack"}),o.Object({type:o.Literal("incident-io"),integrationId:u({description:"Identifier of the incident.io integration to use"})},{$id:"RuleTargetInputIncidentIo"}),o.Object({type:o.Literal("pagerduty"),integrationId:u({description:"Identifier of the PagerDuty integration to use"})},{$id:"RuleTargetInputPagerDuty"}),o.Object({type:o.Literal("email"),addresses:o.Array(u({type:"email"}),{minItems:1,maxItems:20,description:"Email addresses that will receive the alert"})},{$id:"RuleTargetInputEmail"}),o.Object({type:o.Literal("grafana-irm"),integrationId:u({description:"Identifier of the Grafana IRM integration to use"})},{$id:"RuleTargetInputGrafanaIrm"}),o.Object({type:o.Literal("microsoft-teams"),integrationId:u({description:"Identifier of the Microsoft Teams integration to use"})},{$id:"RuleTargetInputMicrosoftTeams"}),o.Object({type:o.Literal("webhook"),integrationId:u({description:"Identifier of the webhook integration to use"})},{$id:"RuleTargetInputWebhook"}),o.Object({type:o.Literal("servicenow"),integrationId:u({description:"Identifier of the ServiceNow integration to use"})},{$id:"RuleTargetInputServiceNow"}),o.Object({type:o.Literal("google-chat"),integrationId:u({description:"Identifier of the Google Chat integration to use"})},{$id:"RuleTargetInputGoogleChat"}),o.Object({type:o.Literal("squadcast"),integrationId:u({description:"Identifier of the Squadcast integration to use"})},{$id:"RuleTargetInputSquadcast"})],{description:"Configuration describing how the alert should be delivered"}),renotifyConfig:mh}),MU=o.Object({id:o.String({description:"Identifier of the notification target"}),rateLimit:sh,renotifyConfig:mh,config:F("type",[o.Object({type:o.Literal("slack"),channel:o.String({description:"Slack channel ID that receives the notification"}),integrationId:o.String({description:"Slack workspace ID that receives the notification"}),integrationName:o.String({description:"Human readable name of the Slack integration"})},{$id:"RuleTargetConfigSlack"}),o.Object({type:o.Literal("incident-io"),integrationId:o.String({description:"Identifier of the incident.io integration to use"}),integrationName:o.String({description:"Human readable name of the incident.io integration"})},{$id:"RuleTargetConfigIncidentIo"}),o.Object({type:o.Literal("email"),addresses:o.Array(o.String({format:"email"}),{description:"Email addresses that will receive the alert"})},{$id:"RuleTargetConfigEmail"}),o.Object({type:o.Literal("grafana-irm"),integrationId:o.String({description:"Identifier of the Grafana IRM integration to use"}),integrationName:o.String({description:"Human readable name of the Grafana IRM integration"})},{$id:"RuleTargetConfigGrafanaIrm"}),o.Object({type:o.Literal("pagerduty"),integrationId:o.String({description:"Identifier of the PagerDuty integration to use"}),integrationName:o.String({description:"Human readable name of the PagerDuty integration"})},{$id:"RuleTargetConfigPagerDuty"}),o.Object({type:o.Literal("microsoft-teams"),integrationId:o.String({description:"Identifier of the Microsoft Teams integration to use"}),integrationName:o.String({description:"Human readable name of the Microsoft Teams integration"})},{$id:"RuleTargetConfigMicrosoftTeams"}),o.Object({type:o.Literal("webhook"),integrationId:o.String({description:"Identifier of the webhook integration to use"}),integrationName:o.String({description:"Human readable name of the webhook integration"})},{$id:"RuleTargetConfigWebhook"}),o.Object({type:o.Literal("servicenow"),integrationId:o.String({description:"Identifier of the ServiceNow integration to use"}),integrationName:o.String({description:"Human readable name of the ServiceNow integration"})},{$id:"RuleTargetConfigServiceNow"}),o.Object({type:o.Literal("google-chat"),integrationId:o.String({description:"Identifier of the Google Chat integration to use"}),integrationName:o.String({description:"Human readable name of the Google Chat integration"})},{$id:"RuleTargetConfigGoogleChat"}),o.Object({type:o.Literal("squadcast"),integrationId:o.String({description:"Identifier of the Squadcast integration to use"}),integrationName:o.String({description:"Human readable name of the Squadcast integration"})},{$id:"RuleTargetConfigSquadcast"})],{description:"Configuration describing how the alert was delivered"})}),km=F("type",[o.Object({type:o.Literal("specific-teams"),teams:o.Array(u(),{minItems:1,maxItems:100,description:"Team IDs to select"})}),o.Object({type:o.Literal("all-teams")}),o.Object({type:o.Literal("all-public-teams")})]),mi=o.Object({name:u({description:"Display name of the notification rule"}),queryString:o.Optional(u({type:"tags-query",description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:km,prioritiesFilter:o.Array(o.Enum(Gt),{maxItems:Gt.length,description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:o.Array(o.Enum(Wr),{maxItems:Wr.length,description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:o.Optional(o.Array(u({allowEmpty:!1}),{description:"Cluster IDs that can trigger a notification"})),owner:u({allowEmpty:!1,description:"Team ID that owns and manages the rule"}),tags:ce,isActive:o.Boolean(),targets:o.Array(NU,{minItems:1,description:"Notification targets that can receive notifications when the rule matches"})}),Um=F("type",[o.Object({type:o.Literal("specific-teams"),teams:o.Array(o.String(),{description:"Team IDs to select"})}),o.Object({type:o.Literal("all-teams")}),o.Object({type:o.Literal("all-public-teams")})]),Vn=o.Object({id:o.String({description:"Identifier of the notification rule"}),name:o.String({description:"Display name of the notification rule"}),queryString:o.Optional(o.String({description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:Um,prioritiesFilter:o.Array(o.Enum(Gt),{description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:o.Array(o.Enum(Wr),{description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:o.Array(o.String(),{description:"Cluster IDs that can trigger a notification"}),owner:o.String({description:"Team ID that owns and manages the rule"}),createdAt:A(),updatedAt:A(),isActive:o.Boolean(),tags:ce,targets:o.Array(MU,{description:"Notification targets that can receive notifications when the rule matches"}),creator:o.Optional(_e),updater:o.Optional(_e)}),Ume=f({tags:["notification-rules"],url:Qr,method:"GET",response:o.Array(Vn)}),Lme=f({tags:["notification-rules"],url:`${Qr}/:id`,params:o.Object({id:u()}),method:"GET",response:Vn}),Nme=f({tags:["notification-rules"],url:Qr,method:"POST",body:mi,response:Vn}),Mme=f({tags:["notification-rules"],url:`${Qr}/:id`,method:"PUT",params:o.Object({id:u()}),body:mi,response:Vn}),wme=f({tags:["notification-rules"],url:`${Qr}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H}),$me=f({tags:["notification-integrations"],url:`${ah}/start`,method:"POST",response:o.Object({redirectUrl:o.String()})}),wU=o.Object({id:o.String(),name:o.String(),type:o.Enum(["slack","incident-io","grafana-irm","pagerduty","microsoft-teams","webhook","servicenow","google-chat","squadcast"]),createdAt:A(),ruleCount:o.Number(),creator:o.Optional(_e)}),vme=f({tags:["notification-integrations"],url:`${Qr}/integrations`,method:"GET",response:o.Array(wU)}),Gme=f({tags:["notification-integrations"],url:`${ah}/callback`,method:"GET",query:o.Object({code:u()}),response:o.Object({success:o.Boolean()})}),Lm=["POST","PUT"],$U=o.Record(o.String(),o.String()),vU=o.Record(o.String(),o.Unknown()),GU=o.Record(o.String(),o.Union([o.String(),o.Number(),o.Boolean(),o.Null(),o.Array(o.Union([o.String(),o.Number(),o.Boolean()]))])),DU=F("type",[o.Object({type:o.Literal("json"),value:vU}),o.Object({type:o.Literal("form"),value:GU})]),jU=o.Object({ok:o.String(),alert:o.String()}),Nm=o.Object({id:o.String(),name:o.String(),setting:F("type",[o.Object({type:o.Literal("incident-io"),alertSourceConfigId:o.String(),tokenLastChars:o.String()}),o.Object({type:o.Literal("grafana-irm"),urlLastChars:o.String()}),o.Object({type:o.Literal("pagerduty"),integrationKeyLastChars:o.String()}),o.Object({type:o.Literal("microsoft-teams"),webhookUrlLastChars:o.String()}),o.Object({type:o.Literal("webhook"),urlLastChars:o.String(),method:o.Enum(Lm),authentication:F("type",[o.Object({type:o.Literal("bearer"),tokenLastChars:o.String()}),o.Object({type:o.Literal("basic"),username:o.String(),passwordLastChars:o.String()}),o.Object({type:o.Literal("custom-header"),key:o.String(),valueLastChars:o.String()}),o.Object({type:o.Literal("none")})]),customHeaders:o.Optional($U),payloadTemplate:DU,eventNameMapping:o.Optional(jU)}),o.Object({type:o.Literal("servicenow"),instanceName:o.String(),username:o.String(),passwordLastChars:o.String()}),o.Object({type:o.Literal("google-chat"),webhookUrlLastChars:o.String()}),o.Object({type:o.Literal("squadcast"),webhookUrlLastChars:o.String()})]),tags:ce}),FU=o.Object({type:o.Literal("webhook"),url:u({type:"uri"}),method:o.Enum(Lm),authentication:F("type",[o.Object({type:o.Literal("bearer"),token:u({allowEmpty:!1})}),o.Object({type:o.Literal("basic"),username:u({allowEmpty:!1}),password:u({allowEmpty:!1})}),o.Object({type:o.Literal("custom-header"),key:u({allowEmpty:!1}),value:u({allowEmpty:!1})}),o.Object({type:o.Literal("none")})]),customHeaders:o.Record(u({allowEmpty:!1}),u()),payloadTemplate:F("type",[o.Object({type:o.Literal("json"),value:o.Record(u({allowEmpty:!1}),o.Unknown())}),o.Object({type:o.Literal("form"),value:o.Record(u({allowEmpty:!1}),o.Union([o.String(),o.Number(),o.Boolean(),o.Null(),o.Array(o.Union([o.String(),o.Number(),o.Boolean()]))]))})]),eventNameMapping:o.Optional(o.Object({ok:u({allowEmpty:!1}),alert:u({allowEmpty:!1})}))}),ph=o.Object({type:o.Literal("incident-io"),alertSourceConfigId:u(),token:u()}),ch=o.Object({type:o.Literal("grafana-irm"),url:u({type:"uri"})}),uh=o.Object({type:o.Literal("pagerduty"),integrationKey:u()}),lh=o.Object({type:o.Literal("microsoft-teams"),webhookUrl:u({type:"uri"})}),qU=o.Object({type:o.Literal("servicenow"),instanceName:u({allowEmpty:!1,description:'Instance name of the ServiceNow instance. This corresponds to the subdomain part of the instance URL, like "my-instance" in "my-instance.service-now.com"'}),username:u({allowEmpty:!1}),password:u({allowEmpty:!1})}),BU=o.Object({type:o.Literal("google-chat"),webhookUrl:u({type:"uri"})}),HU=o.Object({type:o.Literal("squadcast"),webhookUrl:u({type:"uri"})}),KU=o.Object({name:u(),setting:F("type",[ph,ch,uh,lh,FU,qU,BU,HU]),tags:ce}),zU=o.Object({type:o.Literal("webhook"),url:o.Optional(u({type:"uri"})),method:o.Optional(o.Enum(Lm)),authentication:o.Optional(F("type",[o.Object({type:o.Literal("bearer"),token:o.Optional(u({allowEmpty:!1}))}),o.Object({type:o.Literal("basic"),username:o.Optional(u({allowEmpty:!1})),password:o.Optional(u({allowEmpty:!1}))}),o.Object({type:o.Literal("custom-header"),key:o.Optional(u({allowEmpty:!1})),value:o.Optional(u({allowEmpty:!1}))}),o.Object({type:o.Literal("none")})])),customHeaders:o.Optional(o.Record(u({allowEmpty:!1}),u())),payloadTemplate:o.Optional(F("type",[o.Object({type:o.Literal("json"),value:o.Record(u({allowEmpty:!1}),o.Unknown())}),o.Object({type:o.Literal("form"),value:o.Record(u({allowEmpty:!1}),o.Union([o.String(),o.Number(),o.Boolean(),o.Null(),o.Array(o.Union([o.String(),o.Number(),o.Boolean()]))]))})])),eventNameMapping:o.Optional(o.Object({ok:o.Optional(u({allowEmpty:!1})),alert:o.Optional(u({allowEmpty:!1}))}))}),VU=o.Object({type:o.Literal("servicenow"),instanceName:o.Optional(u({allowEmpty:!1})),username:o.Optional(u({allowEmpty:!1})),password:o.Optional(u({allowEmpty:!1}))}),YU=o.Object({type:o.Literal("google-chat"),webhookUrl:u({type:"uri"})}),WU=o.Object({type:o.Literal("squadcast"),webhookUrl:u({type:"uri"})}),QU=o.Object({name:o.Optional(u()),setting:o.Optional(F("type",[ph,ch,uh,lh,zU,VU,YU,WU]))}),Dme=f({tags:["notification-integrations"],url:Ga,method:"POST",body:KU,response:Nm}),jme=f({tags:["notification-integrations"],url:`${Ga}/:id`,method:"GET",params:o.Object({id:u()}),response:Nm}),Fme=f({tags:["notification-integrations"],url:`${Ga}/:id`,method:"PUT",params:o.Object({id:u()}),body:QU,response:Nm}),qme=f({tags:["notification-integrations"],url:`${Ga}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H}),Bme=f({tags:["notification-rules"],url:`${Ot}/:id/notifications`,method:"GET",params:o.Object({id:u()}),query:o.Optional(o.Object({from:o.Optional(o.Number()),to:o.Optional(o.Number())})),response:o.Object({notifications:o.Array(o.Object({id:o.String(),monitorId:o.String(),monitorResultId:o.String(),ruleId:o.Optional(o.String()),targetId:o.Optional(o.String()),status:o.Enum(LU),tryCount:o.Number(),nextTryAt:A(),createdAt:A(),updatedAt:A(),sentAt:o.Optional(A())})),isTruncated:o.Boolean()})}),ZU=["slack","incident-io","pagerduty","email","grafana-irm","microsoft-teams","webhook","servicenow","google-chat","squadcast"],Hme=f({tags:["notification-rules"],url:`${Qr}/test`,method:"POST",body:o.Object({notificationRule:mi,targetIds:o.Optional(o.Array(u({allowEmpty:!1}),{description:"Target IDs to test specific targets",minItems:1,maxItems:10}))}),response:F("success",[o.Object({success:o.Literal(!1),overallMessage:o.String({description:"Message when there is an overall error"})}),o.Object({success:o.Boolean(),results:o.Array(o.Object({targetId:o.String({description:"The ID of the target that was tested"}),targetType:o.Enum(ZU,{description:"The type of the target (e.g., slack, webhook)"}),status:o.Enum(["success","failure"],{description:"Whether the test notification was sent successfully"}),message:o.Optional(o.String({description:"Message if the notification failed for this specific target"}))}))})])});var pi=`/${"v1"}/notification-rules`,ci=o.Pick(Vn,["id","name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","isActive","tags","targets"],{$id:"Rule",description:"Rules to trigger notifications to targets based on alert events"}),JU={id:"123-456-abc",name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(ci,{examples:[JU]});var dh=f({description:"Retrieve all notification rules",operationId:"listNotificationRules",tags:["notification-rules"],url:pi,method:"GET",response:o.Array(ci)}),fh=f({description:"Retrieve a notification rule by its id",operationId:"getNotificationRule",tags:["notification-rules"],url:`${pi}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:ci}),Mm=o.Pick(mi,["name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","tags","isActive","targets"]),XU={name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(Mm,{examples:[XU]});var gh=f({description:"Create a new notification rule",operationId:"createNotificationRule",tags:["notification-rules"],url:pi,method:"POST",body:Mm,response:ci}),yh=f({description:"Update a notification rule by its id",operationId:"updateNotificationRule",tags:["notification-rules"],url:`${pi}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:Mm,response:ci}),Ih=f({description:"Delete a notification rule by its id",operationId:"deleteNotificationRule",tags:["notification-rules"],url:`${pi}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var ui=`${si}/silences`,eL=o.Partial(o.Record(o.Union([o.Literal("monday"),o.Literal("tuesday"),o.Literal("wednesday"),o.Literal("thursday"),o.Literal("friday"),o.Literal("saturday"),o.Literal("sunday")]),o.Array(o.Object({startTime:o.String({format:"time"}),endTime:o.String({format:"time"})},{title:"SilenceTimeRange"}),{minItems:1,description:"Time ranges for this day"}),{description:"Weekly schedule mapping day of week to time ranges"})),Eh=F("type",[o.Object({type:o.Literal("one-time"),startTime:o.String({format:"date-time"}),endTime:o.String({format:"date-time"})},{$id:"SilenceScheduleOneTime",description:"One-time silence schedule with specific start and end times"}),o.Object({type:o.Literal("recurring"),weeklySchedule:eL},{$id:"SilenceScheduleRecurring",description:"Recurring weekly silence schedule"})],{description:"Schedule defining when the silence is active"}),Da=o.Object({name:u({description:"Display name of the silence"}),reason:u({allowEmpty:!1,description:"Reason for the silence"}),owner:u({allowEmpty:!1,description:"Team ID that owns and manages the silence"}),tags:ce,isActive:o.Boolean({description:"Whether the silence is currently enabled"}),schedule:Eh,notificationRuleIds:o.Optional(o.Array(u(),{description:"Notification rule IDs this silence applies to"})),queryString:o.Optional(u({type:"tags-query",description:"Query string to filter which alerts this silence applies to"})),teamsFilter:km,prioritiesFilter:o.Array(o.Enum(Gt),{maxItems:Gt.length,description:"Monitor priorities to filter which alerts this silence applies to"}),transitionTypesFilter:o.Array(o.Enum(Wr),{maxItems:Wr.length,description:"Transition types to filter which alerts this silence applies to"})}),Yn=o.Object({id:o.String({description:"Unique identifier of the silence"}),name:o.String({description:"Display name of the silence"}),reason:o.String({description:"Reason for the silence"}),owner:o.String({description:"Team ID that owns and manages the silence"}),tags:ce,isActive:o.Boolean({description:"Whether the silence is currently enabled"}),schedule:Eh,notificationRuleIds:o.Optional(o.Array(o.String(),{description:"Notification rule IDs this silence applies to"})),queryString:o.Optional(o.String({description:"Query string filtering which alerts this silence applies to"})),teamsFilter:Um,prioritiesFilter:o.Array(o.Enum(Gt),{description:"Monitor priorities filtering which alerts this silence applies to"}),transitionTypesFilter:o.Array(o.Enum(Wr),{description:"Transition types filtering which alerts this silence applies to"}),createdAt:A(),updatedAt:A(),creator:o.Optional(_e),updater:o.Optional(_e)}),spe=f({tags:["notification-silences"],url:ui,method:"GET",response:o.Array(Yn)}),mpe=f({tags:["notification-silences"],url:`${ui}/:id`,params:o.Object({id:u()}),method:"GET",response:Yn}),ppe=f({tags:["notification-silences"],url:ui,method:"POST",body:Da,response:Yn}),cpe=f({tags:["notification-silences"],url:`${ui}/:id`,method:"PUT",params:o.Object({id:u()}),body:Da,response:Yn}),upe=f({tags:["notification-silences"],url:`${ui}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H});var li=`/${"v1"}/notification-silences`,ja=o.Pick(Yn,["id","name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"],{$id:"NotificationSilence",description:"Silences to suppress notifications based on schedules and filters"}),hh=f({description:"Retrieve all notification silences",operationId:"listNotificationSilences",tags:["notification-silences"],url:li,method:"GET",response:o.Array(ja)}),Th=f({description:"Retrieve a notification silence by its id",operationId:"getNotificationSilence",tags:["notification-silences"],url:`${li}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:ja}),xh=o.Pick(Da,["name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"]),_h=f({description:"Create a new notification silence",operationId:"createNotificationSilence",tags:["notification-silences"],url:li,method:"POST",body:xh,response:ja}),Ah=f({description:"Update a notification silence by its id",operationId:"updateNotificationSilence",tags:["notification-silences"],url:`${li}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:xh,response:ja}),bh=f({description:"Delete a notification silence by its id",operationId:"deleteNotificationSilence",tags:["notification-silences"],url:`${li}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var tL=["passed","failed","ignored"],rL=o.Enum(tL),Oh=["unrouted-logs","team-has-route","service-name-present","no-orphan-spans","metric-unit-consistency","host-name-present","no-casing-drift","no-duplicate-attr-values","no-debug-logs-in-prod","no-multiline-logs","no-empty-dashboards","monitor-has-notification","no-future-dated-logs","metric-usage","no-stale-dashboards","no-unused-dashboards","no-orphan-monitors","no-flapping-monitors","no-noisy-group-monitors","no-long-alert-monitors"],nL=o.Enum(Oh),oL=["log","metric","resource","span"],iL=["team","global"],wm=o.Object({key:o.Enum(Oh),title:o.String(),summary:o.String(),rationale:o.String(),objectType:o.Enum(oL),category:o.Enum(["hygiene","routing","integrity","consistency","redundancy","cost"]),impact:o.Object({label:o.Enum(["critical","important","normal"]),weight:o.Number({minimum:0})}),recommendation:o.String(),scope:o.Optional(o.Enum(iL))}),$m=o.Intersect([wm,o.Object({status:rL,normalizedScore:o.Number({minimum:0,maximum:1}),details:o.Optional(o.Record(o.String(),o.Unknown())),recommendation:o.Optional(o.String()),examples:o.Optional(o.Array(o.Object({type:o.String(),label:o.String(),link:o.Object({to:o.String(),search:o.Optional(o.Unknown()),params:o.Optional(o.Unknown())})})))})]),aL=o.Object({teamId:o.String(),teamName:o.String(),teamWeight:o.Number({minimum:0}),score:o.Number({minimum:0,maximum:1}),weightedScore:o.Number({minimum:0}),totalWeight:o.Number({minimum:0}),ruleResults:o.Array($m)}),sL=o.Object({score:o.Optional(o.Number({minimum:0,maximum:1})),ruleResults:o.Array($m)}),Fa=o.Object({generatedAt:o.String({format:"date-time"}),overallScore:o.Optional(o.Number({minimum:0,maximum:1})),rules:o.Array(wm),teamResults:o.Array(aL),globalResults:o.Optional(sL)}),Ape=f({tags:["quality-reports"],url:"/v0/quality-reports",method:"POST",response:Fa}),bpe=f({tags:["quality-reports"],url:"/v0/quality-reports/latest",method:"GET",query:o.Object({clusterId:o.Optional(u({allowEmpty:!1}))}),response:o.Object({report:o.Optional(Fa)})}),Ope=f({tags:["quality-reports"],url:"/v0/quality-reports/preview",method:"POST",body:o.Object({ruleKey:nL,teamId:u(),lookbackMinutes:o.Optional(o.Integer({minimum:1,maximum:60})),clusterId:o.Optional(u({allowEmpty:!1}))}),response:o.Object({rule:wm,result:$m,teamId:o.String(),teamName:o.String()})});var mL=`/${"v1"}/quality-reports`,Sh=o.Pick(Fa,["generatedAt","overallScore","rules","teamResults","globalResults"],{$id:"QualityReport",description:"Aggregated quality report with per-team rule evaluations and scores"}),pL={generatedAt:"2026-02-26T12:00:00.000Z",overallScore:.85,rules:[{key:"team-has-route",title:"\u22651 route per team",summary:"Each team owns at least one active route.",rationale:"Provides clear governance boundaries for routing and enrichment.",objectType:"resource",category:"routing",impact:{label:"important",weight:2},recommendation:"Ensure every team manages a dedicated route scoped to its context.team value."}],teamResults:[{teamId:"abc-123-def",teamName:"platform",teamWeight:1,score:.85,weightedScore:.85,totalWeight:2,ruleResults:[{key:"team-has-route",title:"\u22651 route per team",summary:"Each team owns at least one active route.",rationale:"Provides clear governance boundaries for routing and enrichment.",objectType:"resource",category:"routing",impact:{label:"important",weight:2},recommendation:"Ensure every team manages a dedicated route scoped to its context.team value.",status:"passed",normalizedScore:1}]}]};Object.assign(Sh,{examples:[pL]});var Rh=f({description:"Retrieve the latest quality report",operationId:"getLatestQualityReport",tags:["quality-reports"],url:`${mL}/latest`,method:"GET",query:o.Object({clusterId:o.Optional(u({allowEmpty:!1}))}),response:o.Object({report:o.Optional(Sh)})});var di="/v0/admin-center";var Dt=`${di}/retention-policies`,vm=["1-day","3-days","15-days","30-days","60-days","90-days","120-days","180-days","360-days","10-years"],Yt=o.Object({id:o.String(),env:o.Optional(o.String()),teamId:o.Optional(o.String()),dataSource:o.Enum(bt),durationDays:o.Enum(vm),isEnabled:o.Boolean(),createdAt:A(),updatedAt:A()}),qa=o.Object({env:o.Optional(u()),teamId:o.Optional(u()),dataSource:o.Enum(bt),durationDays:o.Enum(vm),isEnabled:o.Boolean()}),Ch=o.Array(o.Object({env:u(),dataSource:o.Enum(bt),durationDays:o.Enum([...vm,"default"]),isEnabled:o.Boolean()})),Ph=o.Object({inserted:o.Array(Yt),updated:o.Array(Yt),deleted:o.Array(Yt)}),jpe=f({tags:["retention-policies"],url:Dt,method:"POST",body:qa,response:Yt}),Fpe=f({tags:["retention-policies"],url:Dt,method:"GET",response:o.Array(Yt)}),qpe=f({tags:["retention-policies"],url:`${Dt}/:id`,method:"GET",params:o.Object({id:u()}),response:Yt}),Bpe=f({tags:["retention-policies"],url:`${Dt}/:id`,method:"PUT",params:o.Object({id:u()}),body:qa,response:Yt}),Hpe=f({tags:["retention-policies"],url:`${Dt}/bulk-update`,method:"POST",body:Ch,response:Ph}),Kpe=f({tags:["retention-policies"],url:`${Dt}/bulk-update-for-team`,method:"POST",body:o.Object({teamId:u(),policies:Ch}),response:Ph}),zpe=f({tags:["retention-policies"],url:`${Dt}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H}),fi=["past-24-hours","past-7-days","past-30-days"],Vpe=f({tags:["retention-policies"],url:`${Dt}/requested-history-percentile/:teamId`,method:"POST",params:o.Object({teamId:u()}),body:o.Object({percentile:o.Number({minimum:0,maximum:1}),observationWindow:o.Enum(fi),dataSource:o.Enum(bt)}),response:o.Object({percentile:o.Number({minimum:0,maximum:1}),observationWindow:o.Enum(fi),dataSource:o.Enum(bt),teamId:o.String(),requestedHistoryDays:o.Number()})}),cL=["1-day","3-days","7-days","1-month","6-months","more-than-6-months"];var uL=o.Array(o.Object({bucket:o.Enum(cL),count:o.Number()})),Ype=f({tags:["retention-policies"],url:`${Dt}/requested-history-histogram/:teamId`,method:"POST",params:o.Object({teamId:u()}),body:o.Object({observationWindow:o.Enum(fi),dataSource:o.Enum(bt)}),response:o.Object({observationWindow:o.Enum(fi),dataSource:o.Enum(bt),teamId:o.String(),histogram:uL})}),Wpe=f({tags:["retention-policies"],url:`${Dt}/top-teams-with-retention-surplus`,method:"POST",body:o.Object({dataSource:o.Enum(bt),observationWindow:o.Enum(fi),percentile:o.Number({minimum:0,maximum:1}),topN:o.Optional(o.Number({minimum:1,maximum:20}))}),response:o.Array(o.Object({teamId:o.String(),retentionSurplusDays:o.Number()}))});var gi=`/${"v1"}/retention-policies`,yi=o.Pick(Yt,["id","env","teamId","dataSource","durationDays","isEnabled"],{$id:"RetentionPolicy",description:"Data retention rule for a data source within an environment"}),lL={id:"123-456-abc",env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:"30-days",isEnabled:!0};Object.assign(yi,{examples:[lL]});var kh=f({description:"Retrieve all retention policies",operationId:"listRetentionPolicies",tags:["retention-policies"],url:gi,method:"GET",response:o.Array(yi)}),Uh=f({description:"Retrieve a retention policy by its id",operationId:"getRetentionPolicy",tags:["retention-policies"],url:`${gi}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:yi}),Gm=o.Pick(qa,["env","teamId","dataSource","durationDays","isEnabled"]),dL={env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:"30-days",isEnabled:!0};Object.assign(Gm,{examples:[dL]});var Lh=f({description:"Create a new retention policy",operationId:"createRetentionPolicy",tags:["retention-policies"],url:gi,method:"POST",body:Gm,response:yi}),Nh=f({description:"Update a retention policy by its id",operationId:"updateRetentionPolicy",tags:["retention-policies"],url:`${gi}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:Gm,response:yi}),Mh=f({description:"Delete a retention policy by its id",operationId:"deleteRetentionPolicy",tags:["retention-policies"],url:`${gi}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var Ba={id:u({allowEmpty:!1,description:"Identifier of the processor"}),description:o.Optional(u({type:"long"})),tags:ce,updatedAt:o.Optional(A())},fL={...Ba,type:o.Literal("creator")},gL=F("subtype",[o.Object({targetAttribute:u({allowEmpty:!1,description:"Attribute that will receive the formatted value"}),formatString:u({allowEmpty:!1,type:"long",description:"Template string used to build the target attribute value"}),overrideTarget:o.Optional(o.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:o.Literal("format-string"),replaceMissingByEmpty:o.Optional(o.Boolean())},{$id:"ProcessorParamsCreatorFormatString"}),o.Object({targetAttribute:u({allowEmpty:!1,description:"Attribute that will receive the computed value"}),formula:u({allowEmpty:!1,type:"long",description:"Mathematical formula evaluated to populate the target attribute"}),overrideTarget:o.Optional(o.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:o.Literal("math-formula"),replaceMissingBy0:o.Optional(o.Boolean())},{$id:"ProcessorParamsCreatorMathFormula"})]),yL=o.Object({...fL,params:gL}),IL={...Ba,type:o.Literal("mapper")},EL=F("subtype",[o.Object({attributes:o.Array(o.Object({originAttribute:u({allowEmpty:!1,description:"Attribute name to map to the target attribute"}),keepOrigin:o.Optional(o.Boolean({description:"Preserve the source attribute after mapping (defaults to false)"})),overrideTarget:o.Optional(o.Boolean({description:"Overwrite the target attribute when it already exists (defaults to true)"})),targetAttribute:u({allowEmpty:!1,description:"Attribute name that will receive the mapped value"})}),{minItems:1,maxItems:50,description:"Mappings that map individual attributes to new targets"}),subtype:o.Literal("map-attributes")},{$id:"ProcessorParamsMapperMapAttributes"}),o.Object({attributeName:u({allowEmpty:!1,description:"Attribute whose value will determine the log level"}),subtype:o.Literal("map-level")},{$id:"ProcessorParamsMapperMapLevel"}),o.Object({attributeName:u({allowEmpty:!1,description:"Attribute whose value will determine the log timestamp"}),subtype:o.Literal("map-timestamp")},{$id:"ProcessorParamsMapperMapTimestamp"})]),hL=o.Object({...IL,params:EL}),TL={...Ba,type:o.Literal("parse-attribute")},xL=5,_L=F("subtype",[o.Object({attributeName:u({allowEmpty:!1,description:"Attribute whose value will be parsed with Grok rules"}),rules:o.Array(u({allowEmpty:!1,type:"long",description:"Grok rule applied to parse text"}),{minItems:1,maxItems:5,description:"Ordered Grok rules evaluated until one matches"}),samples:o.Optional(o.Array(u({type:"long"}),{maxItems:xL,description:"Example log lines for validation"})),subtype:o.Literal("grok")}),o.Object({sourceAttribute:u({allowEmpty:!1,description:"Attribute containing the URL to parse"}),subtype:o.Literal("url")}),o.Object({sourceAttribute:u({allowEmpty:!1,description:"Attribute containing the user agent string to parse"}),subtype:o.Literal("user-agent")}),o.Object({sourceAttribute:u({allowEmpty:!1,description:"Attribute containing the key/value string segment to parse"}),targetAttribute:u({description:"Attribute prefix where extracted key/value pairs will be written"}),keyValueSplitter:u({allowEmpty:!1,description:"Delimiter separating keys from values in the source string"}),pairsSplitter:u({allowEmpty:!0,description:"Delimiter separating each key/value pair. Will default to whitespace if not set."}),acceptStandaloneKey:o.Boolean(),subtype:o.Literal("key-value")})]),AL=o.Object({...TL,params:_L}),bL=11,Dm=o.Cyclic({Processor:o.Union([hL,AL,yL,o.Object({...Ba,params:o.Object({items:o.Array(o.Object({query:u({type:"tsuga-query",description:"Query that determines whether logs enter this branch"}),processors:o.Array(o.Ref("Processor"),{maxItems:50,description:"Processors executed when the branch query matches"})}),{minItems:2,maxItems:bL,description:"Conditional branches evaluated in order before falling back to the default"})}),type:o.Literal("split")})])},"Processor",{description:"Processing step executed sequentially on route logs"});var OL="/v0/logs",br=`${OL}/routes`,Zr=o.Object({id:o.String({description:"Identifier of the log route"}),name:o.String({description:"Human readable name shown for the route"}),description:o.Optional(o.String()),isEnabled:o.Boolean(),query:o.String({description:"Query that selects which logs should enter the route"}),rank:o.Number(),tags:ce,owner:o.String({description:"Team ID owning and managing the route"}),processors:o.Array(Dm,{description:"Ordered processors applied to logs that match the route"}),creator:o.Optional(_e),updater:o.Optional(_e),updatedAt:A(),createdAt:A(),assetUpdatedAt:A(),lastSyncedAt:o.Optional(A())},{title:"Route"}),Ii=o.Object({name:u({allowEmpty:!1,description:"Human readable name shown for the route"}),description:o.Optional(u({type:"long"})),isEnabled:o.Boolean(),query:u({type:"tsuga-query",description:"Query that selects which logs should enter the route"}),tags:ce,owner:u({allowEmpty:!1,description:"Team ID owning and managing the route"}),processors:o.Array(Dm,{maxItems:50,description:"Ordered processors applied to logs that match the route"})}),yce=f({tags:["routes"],url:br,method:"GET",response:o.Array(Zr)}),Ice=f({tags:["routes"],url:`${br}/:id`,params:o.Object({id:u()}),method:"GET",response:Zr}),Ece=f({tags:["routes"],url:br,method:"POST",body:Ii,response:Zr}),hce=f({tags:["routes"],url:`${br}/:id`,method:"PUT",body:Ii,params:o.Object({id:u()}),response:Zr}),Tce=f({tags:["routes"],url:`${br}/:id/clone`,method:"POST",params:o.Object({id:u()}),body:Ii,response:Zr}),xce=f({tags:["routes"],url:`${br}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H}),_ce=f({tags:["routes"],url:`${br}/:id/modify-ranking`,method:"PUT",params:o.Object({id:u()}),body:o.Object({rank:o.Number()}),response:o.Object({})}),Ace=f({tags:["routes"],url:`${br}/:id/enable`,method:"PUT",params:o.Object({id:u()}),body:o.Object({enable:o.Boolean()}),response:o.Object({})});var Ei=`/${"v1"}/routes`,hi=o.Pick(Zr,["id","name","description","isEnabled","query","tags","owner","processors"],{$id:"Route",description:"Log route allowing to standardize logs and enrich them with additional data"}),SL={id:"123-456-abc",name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(hi,{examples:[SL]});var wh=f({description:"Retrieve all routes",operationId:"listRoutes",tags:["routes"],url:Ei,method:"GET",response:o.Array(hi)}),$h=f({description:"Retrieve a route by its id",operationId:"getRoute",tags:["routes"],url:`${Ei}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:hi}),jm=o.Pick(Ii,["name","description","isEnabled","query","tags","owner","processors"]),RL={name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(jm,{examples:[RL]});var vh=f({description:"Create a new route",operationId:"createRoute",tags:["routes"],url:Ei,method:"POST",body:jm,response:hi}),Gh=f({description:"Update a route by its id",operationId:"updateRoute",tags:["routes"],url:`${Ei}/:id`,method:"PUT",body:jm,params:o.Object({id:u({allowEmpty:!1})}),response:hi}),Dh=f({description:"Delete a route by its id",operationId:"deleteRoute",tags:["routes"],url:`${Ei}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var nt="context",Lce=`${nt}.team`,Nce=`${nt}.env`,Mce=`${nt}.api_key_id`,wce=`${nt}.service.name`,$ce=`${nt}.service.version`,CL=`${nt}.host.name`,PL=`${nt}.instance`,kL=`${nt}.instanceid`,UL=`${nt}.instance_name`,vce=`${nt}.telemetry.sdk.language`;var Gce={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${nt}.batch_kind`,batchKindMetricsFilter:`${nt}.batch_kind:metrics`,sourceApiKeyId:`${nt}.source_api_key_id`,sourceEnv:`${nt}.source_env`,sourceTeam:`${nt}.source_team`}};var Wn="/v0/service-catalog";var jh=o.Object({team:o.String(),lastSeenAt:A()}),LL=o.Object({ingestionApiKey:o.String(),lastSeenAt:A()}),Fh=o.Object({version:o.String(),firstSeenAt:A(),lastSeenAt:A(),faulty:o.Optional(o.Boolean())}),NL=o.Object({language:o.String(),lastSeenAt:A()}),Ha=o.Object({id:o.String(),serviceName:o.String(),serviceNamespace:o.Optional(o.String()),env:o.Optional(o.String()),teams:o.Array(jh),ingestionApiKeys:o.Array(LL),versions:o.Array(Fh),languages:o.Array(NL),lastSeenAt:A(),firstSeenAt:A(),sources:o.Array(o.String()),additionalUserFields:o.Optional(o.Unsafe({type:"object",additionalProperties:!0})),logsCount24h:o.Number(),errorLogsCount24h:o.Number(),tracesCount24h:o.Number(),errorTracesCount24h:o.Number(),createdAt:A(),updatedAt:A()}),Hce=f({tags:["service-catalog"],query:o.Optional(o.Object({clusterId:o.Optional(u())})),method:"GET",url:`${Wn}/services`,response:o.Array(Ha)}),Kce=f({tags:["service-catalog"],method:"GET",url:`${Wn}/services/:serviceId`,params:o.Object({serviceId:u()}),response:Ha}),ML=o.Object({id:o.String(),endpointName:o.String(),serviceName:o.String(),serviceNamespace:o.Optional(o.String()),env:o.Optional(o.String()),teams:o.Array(jh),versions:o.Array(Fh),lastSeenAt:A(),firstSeenAt:A(),sources:o.Array(o.String()),additionalUserFields:o.Optional(o.Unsafe({type:"object",additionalProperties:!0})),createdAt:A(),updatedAt:A()}),zce=f({tags:["service-catalog"],method:"GET",url:`${Wn}/endpoints`,response:o.Array(ML)}),wL=["otel_kube","otel_host_kube","otel_host","prometheus","aws_ec2","gcp_compute_engine"];var qh=o.Object({id:o.String(),hostName:o.String(),env:o.Optional(o.String()),cpuUtilizationAverage:o.Number(),hostType:o.Enum(wL),teams:o.Array(o.String()),tags:o.Array(o.String()),firstSeenAt:A(),lastSeenAt:A(),clusterId:o.String()}),Vce=f({tags:["service-catalog"],method:"GET",url:`${Wn}/hosts`,response:o.Array(qh)}),Yce=f({tags:["service-catalog"],method:"GET",url:`${Wn}/hosts/:hostId`,params:o.Object({hostId:u()}),response:qh}),Wce=f({tags:["service-catalog"],method:"GET",url:`${Wn}/services/by-api-keys`,response:o.Record(o.String(),o.Array(o.Object({serviceName:o.String(),serviceNamespace:o.Optional(o.String())})))});var Bh=`/${"v1"}/services`,Fm=o.Pick(Ha,["id","serviceName","serviceNamespace","env","teams","versions","languages","lastSeenAt","firstSeenAt","sources","logsCount24h","errorLogsCount24h","tracesCount24h","errorTracesCount24h"],{$id:"Service",description:"Observed telemetry service with metadata, activity stats and version signals"}),$L={id:"123-456-abc",serviceName:"api-gateway",serviceNamespace:"platform",env:"production",teams:[{team:"platform",lastSeenAt:"2024-01-15T12:34:56.000Z"}],versions:[{version:"1.2.3",firstSeenAt:"2024-01-01T08:00:00.000Z",lastSeenAt:"2024-01-15T12:34:56.000Z",faulty:!1}],languages:[{language:"go",lastSeenAt:"2024-01-15T12:34:56.000Z"}],lastSeenAt:"2024-01-15T12:34:56.000Z",firstSeenAt:"2024-01-01T08:00:00.000Z",sources:["logs","metrics","traces"],logsCount24h:12e3,errorLogsCount24h:42,tracesCount24h:8500,errorTracesCount24h:17};Object.assign(Fm,{examples:[$L]});var Hh=f({description:"Retrieve all services",operationId:"listServices",tags:["services"],url:Bh,method:"GET",response:o.Array(Fm)}),Kh=f({description:"Retrieve a service by its id",operationId:"getService",tags:["services"],url:`${Bh}/:serviceId`,method:"GET",params:o.Object({serviceId:u({allowEmpty:!1})}),response:Fm});var Jr=`${di}/tag-policies`;var zh=["ingestion-api-key","operation-api-key","dashboard","log-route","monitor","notification-rule","notification-silence"],vL=["logs","metrics","traces"],Vh=o.Array(o.Enum(zh)),Yh=o.Array(o.Enum(vL)),GL=o.Union([Vh,Yh]),Wh=o.Object({teamIds:o.Array(u(),{minItems:1,maxItems:100}),mode:o.Enum(["include","exclude"])}),Qh=F("type",[o.Object({type:o.Literal("telemetry"),assetTypes:Yh,shouldInsertWarning:o.Boolean(),dropSample:o.Optional(o.Number({minimum:0,maximum:100}))}),o.Object({type:o.Literal("tsuga_asset"),assetTypes:Vh})]),Qn=o.Object({id:o.String(),name:o.String(),description:o.Optional(o.String()),isActive:o.Boolean(),tagKey:o.String(),allowedTagValues:o.Array(o.String()),isRequired:o.Boolean(),teamScope:o.Optional(Wh),configuration:Qh,creator:o.Optional(_e),updater:o.Optional(_e),owner:o.Optional(o.String()),createdAt:A(),updatedAt:A(),assetUpdatedAt:A()});var Ti=o.Object({name:u(),description:o.Optional(u()),isActive:o.Boolean(),tagKey:u({allowEmpty:!1}),allowedTagValues:o.Array(u({allowEmpty:!1}),{maxItems:1e3}),isRequired:o.Boolean(),teamScope:o.Optional(Wh),configuration:Qh,owner:u({allowEmpty:!1})}),pue=f({tags:["tag-policies"],url:Jr,method:"GET",query:o.Object({teamIds:o.Optional(o.Array(u(),{maxItems:100})),assetTypes:o.Optional(GL),searchQuery:o.Optional(u())}),response:o.Array(Qn)}),cue=f({tags:["tag-policies"],url:`${Jr}/:id`,method:"GET",params:o.Object({id:u()}),response:Qn}),uue=f({tags:["tag-policies"],url:Jr,method:"POST",body:Ti,response:Qn}),lue=f({tags:["tag-policies"],url:`${Jr}/:id`,method:"PUT",params:o.Object({id:u()}),body:Ti,response:Qn}),due=f({tags:["tag-policies"],url:`${Jr}/:id`,method:"DELETE",params:o.Object({id:u()}),response:H}),fue=f({tags:["tag-policies"],url:`${di}/applicable-tag-rules`,method:"GET",query:o.Object({assetType:o.Enum(zh),teamId:u()}),response:o.Array(o.Object({tagKey:o.String(),allowedTagValues:o.Array(o.String()),isRequired:o.Boolean()}))}),Zh=o.Object({total:o.Number(),totalNonCompliant:o.Number(),idsNonCompliant:o.Array(u())}),Jh=o.Union([o.Literal("ingestion-api-key"),o.Literal("operation-api-key"),o.Literal("dashboard"),o.Literal("log-route"),o.Literal("monitor"),o.Literal("notification-rule"),o.Literal("notification-silence")]),DL=o.Object({total:o.Number(),totalNonCompliant:o.Number(),byAssetType:o.Record(Jh,Zh)}),jL=o.Omit(Zh,["total"]),FL=o.Object({totalNonCompliant:o.Number(),byAssetType:o.Record(Jh,jL)}),Xh=o.Object({totals:DL,byTeam:o.Record(o.String(),FL)}),gue=f({tags:["tag-policies"],url:`${Jr}/:id/stats`,method:"GET",params:o.Object({id:u()}),response:Xh}),yue=f({tags:["tag-policies"],url:`${Jr}/new-policy-stats`,method:"POST",body:Ti,response:Xh});var xi=`/${"v1"}/tag-policies`,Ka=o.Pick(Qn,["id","name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"],{$id:"TagPolicy",description:"Policy that enforces tag requirements on Tsuga assets or telemetry data"}),eT=o.Pick(Ti,["name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"]),tT=f({description:"Retrieve all tag policies",operationId:"listTagPolicies",tags:["tag-policies"],url:xi,method:"GET",response:o.Array(Ka)}),rT=f({description:"Retrieve a tag policy by its id",operationId:"getTagPolicy",tags:["tag-policies"],url:`${xi}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:Ka}),nT=f({description:"Create a new tag policy",operationId:"createTagPolicy",tags:["tag-policies"],url:xi,method:"POST",body:eT,response:Ka}),oT=f({description:"Update a tag policy by its id",operationId:"updateTagPolicy",tags:["tag-policies"],url:`${xi}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:eT,response:Ka}),iT=f({description:"Delete a tag policy by its id",operationId:"deleteTagPolicy",tags:["tag-policies"],url:`${xi}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});var _i=`/${"v1"}/teams`,Ai=o.Pick(Bn,["id","name","description","visibility","tags"],{$id:"Team",description:"Collection of users used to manage ownership and access to resources"}),qL={id:"abc-123-def",name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(Ai,{examples:[qL]});var aT=f({description:"Retrieve all teams",operationId:"listTeams",tags:["teams"],url:_i,method:"GET",response:o.Array(Ai)}),sT=f({description:"Retrieve a team by its id",operationId:"getTeam",tags:["teams"],url:`${_i}/:id`,method:"GET",params:o.Object({id:u({allowEmpty:!1})}),response:Ai}),qm=o.Pick(Ma,["name","description","visibility","tags"]),BL={name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(qm,{examples:[BL]});var mT=f({description:"Create a new team",operationId:"createTeam",tags:["teams"],url:_i,method:"POST",body:qm,response:Ai}),pT=f({description:"Update a team by its id",operationId:"updateTeam",tags:["teams"],url:`${_i}/:id`,method:"PUT",params:o.Object({id:u({allowEmpty:!1})}),body:qm,response:Ai}),cT=f({description:"Delete a team by its id",operationId:"deleteTeam",tags:["teams"],url:`${_i}/:id`,method:"DELETE",params:o.Object({id:u({allowEmpty:!1})}),response:H});function HL(e){return a.IsObject(e)&&a.HasPropertyKey(e,"check")&&a.HasPropertyKey(e,"errors")&&a.IsFunction(e.check)&&a.IsFunction(e.errors)}function Bm(e){return a.HasPropertyKey(e,"~guard")&&HL(e["~guard"])}function Hm(e){return a.HasPropertyKey(e,"~refine")&&a.IsArray(e["~refine"])&&a.Every(e["~refine"],0,t=>a.IsObject(t)&&a.HasPropertyKey(t,"refine")&&a.HasPropertyKey(t,"message")&&a.IsFunction(t.refine)&&a.IsString(t.message))}function Wt(e){return a.IsObject(e)&&!a.IsArray(e)}function za(e){return a.IsBoolean(e)}function $(e){return Wt(e)||za(e)}function Km(e){return a.HasPropertyKey(e,"additionalItems")&&$(e.additionalItems)}function Qt(e){return a.HasPropertyKey(e,"additionalProperties")&&$(e.additionalProperties)}function zm(e){return a.HasPropertyKey(e,"allOf")&&a.IsArray(e.allOf)&&e.allOf.every(t=>$(t))}function bi(e){return a.HasPropertyKey(e,"$anchor")&&a.IsString(e.$anchor)}function Vm(e){return a.HasPropertyKey(e,"anyOf")&&a.IsArray(e.anyOf)&&e.anyOf.every(t=>$(t))}function Ym(e){return a.HasPropertyKey(e,"const")}function Xr(e){return a.HasPropertyKey(e,"contains")&&$(e.contains)}function dt(e){return a.HasPropertyKey(e,"default")}function Wm(e){return a.HasPropertyKey(e,"dependencies")&&a.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>$(t)||a.IsArray(t)&&t.every(r=>a.IsString(r)))}function Qm(e){return a.HasPropertyKey(e,"dependentRequired")&&a.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>a.IsArray(t)&&t.every(r=>a.IsString(r)))}function Zm(e){return a.HasPropertyKey(e,"dependentSchemas")&&a.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>$(t))}function Jm(e){return a.HasPropertyKey(e,"$dynamicAnchor")&&a.IsString(e.$dynamicAnchor)}function Xm(e){return a.HasPropertyKey(e,"else")&&$(e.else)}function ep(e){return a.HasPropertyKey(e,"enum")&&a.IsArray(e.enum)}function tp(e){return a.HasPropertyKey(e,"exclusiveMaximum")&&(a.IsNumber(e.exclusiveMaximum)||a.IsBigInt(e.exclusiveMaximum))}function Zt(e){return a.HasPropertyKey(e,"exclusiveMinimum")&&(a.IsNumber(e.exclusiveMinimum)||a.IsBigInt(e.exclusiveMinimum))}function Oi(e){return a.HasPropertyKey(e,"format")&&a.IsString(e.format)}function en(e){return a.HasPropertyKey(e,"$id")&&a.IsString(e.$id)}function rp(e){return a.HasPropertyKey(e,"if")&&$(e.if)}function Zn(e){return a.HasPropertyKey(e,"items")&&($(e.items)||a.IsArray(e.items)&&e.items.every(t=>$(t)))}function np(e){return Zn(e)&&a.IsArray(e.items)}function op(e){return a.HasPropertyKey(e,"maximum")&&(a.IsNumber(e.maximum)||a.IsBigInt(e.maximum))}function ip(e){return a.HasPropertyKey(e,"maxContains")&&a.IsNumber(e.maxContains)}function Va(e){return a.HasPropertyKey(e,"maxItems")&&a.IsNumber(e.maxItems)}function ap(e){return a.HasPropertyKey(e,"maxLength")&&a.IsNumber(e.maxLength)}function sp(e){return a.HasPropertyKey(e,"maxProperties")&&a.IsNumber(e.maxProperties)}function Jt(e){return a.HasPropertyKey(e,"minimum")&&(a.IsNumber(e.minimum)||a.IsBigInt(e.minimum))}function tn(e){return a.HasPropertyKey(e,"minContains")&&a.IsNumber(e.minContains)}function Jn(e){return a.HasPropertyKey(e,"minItems")&&a.IsNumber(e.minItems)}function Si(e){return a.HasPropertyKey(e,"minLength")&&a.IsNumber(e.minLength)}function Ri(e){return a.HasPropertyKey(e,"minProperties")&&a.IsNumber(e.minProperties)}function mp(e){return a.HasPropertyKey(e,"multipleOf")&&(a.IsNumber(e.multipleOf)||a.IsBigInt(e.multipleOf))}function pp(e){return a.HasPropertyKey(e,"not")&&$(e.not)}function cp(e){return a.HasPropertyKey(e,"oneOf")&&a.IsArray(e.oneOf)&&e.oneOf.every(t=>$(t))}function Ci(e){return a.HasPropertyKey(e,"pattern")&&(a.IsString(e.pattern)||e.pattern instanceof RegExp)}function Pi(e){return a.HasPropertyKey(e,"patternProperties")&&a.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>$(t))}function Xn(e){return a.HasPropertyKey(e,"prefixItems")&&a.IsArray(e.prefixItems)&&e.prefixItems.every(t=>$(t))}function ki(e){return a.HasPropertyKey(e,"properties")&&a.IsObject(e.properties)&&Object.values(e.properties).every(t=>$(t))}function up(e){return a.HasPropertyKey(e,"propertyNames")&&(a.IsObject(e.propertyNames)||$(e.propertyNames))}function KL(e){return a.HasPropertyKey(e,"$recursiveAnchor")&&a.IsBoolean(e.$recursiveAnchor)}function Ya(e){return KL(e)&&a.IsEqual(e.$recursiveAnchor,!0)}function lp(e){return a.HasPropertyKey(e,"$recursiveRef")&&a.IsString(e.$recursiveRef)}function dp(e){return a.HasPropertyKey(e,"$ref")&&a.IsString(e.$ref)}function rn(e){return a.HasPropertyKey(e,"required")&&a.IsArray(e.required)&&e.required.every(t=>a.IsString(t))}function fp(e){return a.HasPropertyKey(e,"then")&&$(e.then)}function gp(e){return a.HasPropertyKey(e,"type")&&(a.IsString(e.type)||a.IsArray(e.type)&&e.type.every(t=>a.IsString(t)))}function eo(e){return a.HasPropertyKey(e,"uniqueItems")&&a.IsBoolean(e.uniqueItems)}function Wa(e){return a.HasPropertyKey(e,"unevaluatedItems")&&$(e.unevaluatedItems)}function Qa(e){return a.HasPropertyKey(e,"unevaluatedProperties")&&$(e.unevaluatedProperties)}var Qe=class{constructor(){this.indices=new Set,this.keys=new Set}AddIndex(t){return this.indices.add(t),!0}AddKey(t){return this.keys.add(t),!0}GetIndices(){return this.indices}GetKeys(){return this.keys}Merge(t){for(let r of t)r.indices.forEach(n=>this.indices.add(n)),r.keys.forEach(n=>this.keys.add(n));return!0}},Ui=class extends Qe{constructor(t){super(),this.callback=t}AddError(t){return this.callback(t),!1}},Le=class extends Ui{constructor(){super(t=>this.errors.push(t)),this.errors=[]}AddError(t){return this.errors.push(t),!1}GetErrors(){return this.errors}};var zL="external_",VL=0,tge={identifier:`${zL}${VL}`,variables:[]};function uT(e,t,r,n){return r["~guard"].check(n)}function lT(e,t,r,n,i,s){return i["~guard"].check(s)||t.AddError({keyword:"~guard",schemaPath:r,instancePath:n,params:{errors:i["~guard"].errors(s)}})}function dT(e,t,r,n){return a.Every(r["~refine"],0,(i,s)=>i.refine(n))}function fT(e,t,r,n,i,s){return a.EveryAll(i["~refine"],0,(p,c)=>p.refine(s)||t.AddError({keyword:"~refine",schemaPath:r,instancePath:n,params:{index:c,message:p.message}}))}function gT(e){return Zn(e)&&a.IsArray(e.items)}function yT(e,t,r,n){return gT(r)?n.every((s,p)=>a.IsLessThan(p,r.items.length)||w(e,t,r.additionalItems,s)&&t.AddIndex(p)):!0}function IT(e,t,r,n,i,s){return gT(i)?s.every((c,l)=>{let g=`${r}/additionalItems`,y=`${n}/${l}`;return a.IsLessThan(l,i.items.length)||K(e,t,g,y,i.additionalItems,c)&&t.AddIndex(l)}):!0}function YL(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function ET(e){let t=[];return Pi(e)&&t.push(...a.Keys(e.patternProperties)),ki(e)&&t.push(...a.Keys(e.properties).map(YL)),a.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function hT(e,t,r,n){let i=new RegExp(ET(r));return a.Every(a.Keys(n),0,(p,c)=>i.test(p)||w(e,t,r.additionalProperties,n[p])&&t.AddKey(p))}function TT(e,t,r,n,i,s){let p=new RegExp(ET(i)),c=[];return a.EveryAll(a.Keys(s),0,(g,y)=>{let E=`${r}/additionalProperties`,C=`${n}/${g}`,Pe=new Le,ot=p.test(g)||K(e,Pe,E,C,i.additionalProperties,s[g])&&t.AddKey(g);return ot||c.push(g),ot})||t.AddError({keyword:"additionalProperties",schemaPath:r,instancePath:n,params:{additionalProperties:c}})}function xT(e,t,r,n){let i=r.allOf.reduce((s,p)=>{let c=new Qe;return w(e,c,p,n)?[...s,c]:s},[]);return a.IsEqual(i.length,r.allOf.length)&&t.Merge(i)}function _T(e,t,r,n,i,s){let p=[],c=i.allOf.reduce((g,y,E)=>{let C=`${r}/allOf/${E}`,Pe=new Le,ot=K(e,Pe,C,n,y,s);return ot||p.push(Pe),ot?[...g,Pe]:g},[]),l=a.IsEqual(c.length,i.allOf.length)&&t.Merge(c);return l||p.forEach(g=>g.GetErrors().forEach(y=>t.AddError(y))),l}function AT(e,t,r,n){let i=r.anyOf.reduce((s,p,c)=>{let l=new Qe;return w(e,l,p,n)?[...s,l]:s},[]);return a.IsGreaterThan(i.length,0)&&t.Merge(i)}function bT(e,t,r,n,i,s){let p=[],c=i.anyOf.reduce((g,y,E)=>{let C=new Le,Pe=`${r}/anyOf/${E}`,ot=K(e,C,Pe,n,y,s);return ot||p.push(C),ot?[...g,C]:g},[]),l=a.IsGreaterThan(c.length,0)&&t.Merge(c);return l||p.forEach(g=>g.GetErrors().forEach(y=>t.AddError(y))),l||t.AddError({keyword:"anyOf",schemaPath:r,instancePath:n,params:{}})}function Ip(e,t,r,n){return r}function OT(e,t,r,n,i,s){return Ip(e,t,i,s)||t.AddError({keyword:"boolean",schemaPath:r,instancePath:n,params:{}})}function Ep(e,t,r,n){return a.IsValueLike(r.const)?a.IsEqual(n,r.const):a.IsDeepEqual(n,r.const)}function ST(e,t,r,n,i,s){return Ep(e,t,i,s)||t.AddError({keyword:"const",schemaPath:r,instancePath:n,params:{allowedValue:i.const}})}function WL(e){return!(tn(e)&&a.IsEqual(e.minContains,0))}function hp(e,t,r,n){return WL(r)?!a.IsEqual(n.length,0)&&n.some(i=>w(e,t,r.contains,i)):!0}function RT(e,t,r,n,i,s){return hp(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:n,params:{minContains:1}})}function CT(e,t,r,n){let i=a.IsEqual(a.Keys(n).length,0),s=a.Every(a.Entries(r.dependencies),0,([p,c])=>!a.HasPropertyKey(n,p)||(a.IsArray(c)?c.every(l=>a.HasPropertyKey(n,l)):w(e,t,c,n)));return i||s}function PT(e,t,r,n,i,s){let p=a.IsEqual(a.Keys(s).length,0),c=a.EveryAll(a.Entries(i.dependencies),0,([l,g])=>{let y=`${r}/dependencies/${l}`;return!a.HasPropertyKey(s,l)||(a.IsArray(g)?g.every(E=>a.HasPropertyKey(s,E)||t.AddError({keyword:"dependencies",schemaPath:r,instancePath:n,params:{property:l,dependencies:g}})):K(e,t,y,n,g,s))});return p||c}function kT(e,t,r,n){let i=a.IsEqual(a.Keys(n).length,0),s=a.Every(a.Entries(r.dependentRequired),0,([p,c])=>!a.HasPropertyKey(n,p)||c.every(l=>a.HasPropertyKey(n,l)));return i||s}function UT(e,t,r,n,i,s){let p=a.IsEqual(a.Keys(s).length,0),c=a.EveryAll(a.Entries(i.dependentRequired),0,([l,g])=>!a.HasPropertyKey(s,l)||a.EveryAll(g,0,y=>a.HasPropertyKey(s,y)||t.AddError({keyword:"dependentRequired",schemaPath:r,instancePath:n,params:{property:l,dependencies:g}})));return p||c}function LT(e,t,r,n){let i=a.IsEqual(a.Keys(n).length,0),s=a.Every(a.Entries(r.dependentSchemas),0,([p,c])=>!a.HasPropertyKey(n,p)||w(e,t,c,n));return i||s}function NT(e,t,r,n,i,s){let p=a.IsEqual(a.Keys(s).length,0),c=a.EveryAll(a.Entries(i.dependentSchemas),0,([l,g])=>{let y=`${r}/dependentSchemas/${l}`;return!a.HasPropertyKey(s,l)||K(e,t,y,n,g,s)});return p||c}function Tp(e,t,r,n){return r.enum.some(i=>a.IsValueLike(i)?a.IsEqual(n,i):a.IsDeepEqual(n,i))}function MT(e,t,r,n,i,s){return Tp(e,t,i,s)||t.AddError({keyword:"enum",schemaPath:r,instancePath:n,params:{allowedValues:i.enum}})}function xp(e,t,r,n){return a.IsLessThan(n,r.exclusiveMaximum)}function wT(e,t,r,n,i,s){return xp(e,t,i,s)||t.AddError({keyword:"exclusiveMaximum",schemaPath:r,instancePath:n,params:{comparison:"<",limit:i.exclusiveMaximum}})}function _p(e,t,r,n){return a.IsGreaterThan(n,r.exclusiveMinimum)}function $T(e,t,r,n,i,s){return _p(e,t,i,s)||t.AddError({keyword:"exclusiveMinimum",schemaPath:r,instancePath:n,params:{comparison:">",limit:i.exclusiveMinimum}})}var ro={};ft(ro,{Clear:()=>GT,Entries:()=>fN,Get:()=>IN,Has:()=>yN,IsDate:()=>Li,IsDateTime:()=>Ap,IsDuration:()=>bp,IsEmail:()=>Op,IsHostname:()=>Sp,IsIPv4:()=>kp,IsIPv6:()=>Up,IsIdnEmail:()=>Rp,IsIdnHostname:()=>Pp,IsIri:()=>Np,IsIriReference:()=>Lp,IsJsonPointer:()=>wp,IsJsonPointerUriFragment:()=>Mp,IsRegex:()=>$p,IsRelativeJsonPointer:()=>vp,IsTime:()=>Ni,IsUri:()=>jp,IsUriReference:()=>Gp,IsUriTemplate:()=>Dp,IsUrl:()=>Fp,IsUuid:()=>qp,Reset:()=>DT,Set:()=>gN,Test:()=>EN});var QL=[0,31,28,31,30,31,30,31,31,30,31,30,31],ZL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function JL(e){return e%4===0&&(e%100!==0||e%400===0)}function Li(e){let t=ZL.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&JL(r)?29:QL[n])}var XL=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function Ni(e,t=!0){let r=XL.exec(e);if(!r)return!1;let n=+r[1],i=+r[2],s=+r[3],p=r[4]==="-"?-1:1,c=+(r[5]||0),l=+(r[6]||0);if(c>23||l>59||t&&!r[4]&&e.toLowerCase().indexOf("z")===-1)return!1;if(n<=23&&i<=59&&s<60)return!0;let g=i-l*p,y=n-c*p-(g<0?1:0);return(y===23||y===-1)&&(g===59||g===-1)&&s<61}function Ap(e,t=!0){let r=e.split(/T/i);return r.length===2&&Li(r[0])&&Ni(r[1],t)}var eN=/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/;function bp(e){return eN.test(e)}var tN=/^(?!.*\.\.)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i;function Op(e){return tN.test(e)}var rN=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;function Sp(e){return rN.test(e)}var nN=/^(?!.*\.\.)[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+(?:\.[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+)*@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?)*$/iu;function Rp(e){return nN.test(e)}function Cp(e){let t=e.codePointAt(0);return t===void 0?!1:t>=12352&&t<=12447||t>=12448&&t<=12543&&t!==12539||t>=19968&&t<=40959}function Pp(e){if(e.length===0||e.includes(" "))return!1;let t=/[\u002E\u3002\uFF0E\uFF61]/g,r=e.normalize("NFC").replace(t,".");if(r.length>253)return!1;let n=r.split(".");if(n.some(i=>i.length===0))return!1;for(let i of n){if(i.length>63||i.startsWith("-")||i.endsWith("-"))return!1;if(/^xn--/i.test(i)){let l=i.slice(4);if(l.length<2||l.includes("---"))return!1;continue}if(/[\u302E\u302F\u3031\u3032\u3033\u3034\u3035\u303B\u0640\u07FA]/.test(i))return!1;let s=i.charAt(0);if(/[\u0903\u0300\u0488]/.test(s))return!1;for(let l=0;l<i.length;l++){let g=i.charAt(l);if(g==="\xB7"){if(l===0||l===i.length-1)return!1;let y=i.charAt(l-1),E=i.charAt(l+1);if(!/^[lL]$/.test(y)||!/^[lL]$/.test(E))return!1}if(g==="\u30FB"){if(i.length===1)return!1;if(l===0){let y=i.charAt(l+1);if(!Cp(y))return!1}else{let y=i.charAt(l-1),E=i.charAt(l+1);if(!Cp(y)||!Cp(E))return!1}}if(g==="\u0375"){if(l===i.length-1)return!1;let y=i.charAt(l+1);if(!/[\u0370-\u03FF]/.test(y))return!1}if(g==="\u05F3"||g==="\u05F4"){if(l===0)return!1;let y=i.charAt(l-1);if(!/[\u05D0-\u05EA]/.test(y))return!1}if(g==="\u200D"&&(l===0||i.charAt(l-1)!=="\u094D"))return!1}let p=!1,c=!1;for(let l=0;l<i.length;l++){let g=i.charAt(l);/[\u0660-\u0669]/.test(g)&&(p=!0),/[\u06F0-\u06F9]/.test(g)&&(c=!0)}if(p&&c)return!1}return!0}var oN=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function kp(e){return oN.test(e)}var iN=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function Up(e){return iN.test(e)}function vT(e){try{return new URL(e,"http://example.com"),!0}catch{return!1}}function Lp(e){if(e.includes(" ")||e.includes("\\")||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e==="")return!0;let t=e.indexOf(":");return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?vT(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:vT(e)}function Np(e){try{return new URL(e),!0}catch{return!1}}var aN=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Mp(e){return aN.test(e)}var sN=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function wp(e){return sN.test(e)}function $p(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var mN=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function vp(e){return mN.test(e)}var pN=/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;function Gp(e){return pN.test(e)}var cN=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function Dp(e){return cN.test(e)}var uN=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i;function jp(e){return uN.test(e)}var lN=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function Fp(e){return lN.test(e)}var dN=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function qp(e){return dN.test(e)}var se=new Map;function GT(){se.clear()}function fN(){return[...se.entries()]}function gN(e,t){se.set(e,t)}function yN(e){return se.has(e)}function IN(e){return se.get(e)}function EN(e,t){return se.get(e)?.(t)??!0}function DT(){GT(),se.set("date-time",Ap),se.set("date",Li),se.set("duration",bp),se.set("email",Op),se.set("hostname",Sp),se.set("idn-email",Rp),se.set("idn-hostname",Pp),se.set("ipv4",kp),se.set("ipv6",Up),se.set("iri-reference",Lp),se.set("iri",Np),se.set("json-pointer-uri-fragment",Mp),se.set("json-pointer",wp),se.set("regex",$p),se.set("relative-json-pointer",vp),se.set("time",Ni),se.set("uri-reference",Gp),se.set("uri-template",Dp),se.set("uri",jp),se.set("url",Fp),se.set("uuid",qp)}DT();function Bp(e,t,r,n){return ro.Test(r.format,n)}function jT(e,t,r,n,i,s){return Bp(e,t,i,s)||t.AddError({keyword:"format",schemaPath:r,instancePath:n,params:{format:i.format}})}function FT(e,t,r,n){let i=fp(r)?r.then:!0,s=Xm(r)?r.else:!0;return w(e,t,r.if,n)?w(e,t,i,n):w(e,t,s,n)}function qT(e,t,r,n,i,s){let p=fp(i)?i.then:!0,c=Xm(i)?i.else:!0,l=new Le,g=K(e,l,`${r}/if`,n,i.if,s)?K(e,l,`${r}/then`,n,p,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:n,params:{failingKeyword:"then"}}):K(e,t,`${r}/else`,n,c,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:n,params:{failingKeyword:"else"}});return g&&t.Merge([l]),g}function hN(e,t,r,n){return a.Every(r.items,0,(i,s)=>a.IsLessEqualThan(n.length,s)||w(e,t,i,n[s])&&t.AddIndex(s))}function TN(e,t,r,n,i,s){return a.EveryAll(i.items,0,(p,c)=>{let l=`${r}/items/${c}`,g=`${n}/${c}`;return a.IsLessEqualThan(s.length,c)||K(e,t,l,g,p,s[c])&&t.AddIndex(c)})}function xN(e,t,r,n){let i=Xn(r)?r.prefixItems.length:0;return a.Every(n,i,(s,p)=>w(e,t,r.items,s)&&t.AddIndex(p))}function _N(e,t,r,n,i,s){let p=Xn(i)?i.prefixItems.length:0;return a.EveryAll(s,p,(c,l)=>{let g=`${r}/items`,y=`${n}/${l}`;return K(e,t,g,y,i.items,c)&&t.AddIndex(l)})}function BT(e,t,r,n){return np(r)?hN(e,t,r,n):xN(e,t,r,n)}function HT(e,t,r,n,i,s){return np(i)?TN(e,t,r,n,i,s):_N(e,t,r,n,i,s)}function AN(e){return Xr(e)}function Hp(e,t,r,n){if(!AN(r))return!0;let i=n.reduce((s,p)=>w(e,t,r.contains,p)?++s:s,0);return a.IsLessEqualThan(i,r.maxContains)}function KT(e,t,r,n,i,s){let p=tn(i)?i.minContains:1;return Hp(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:n,params:{minContains:p,maxContains:i.maxContains}})}function Kp(e,t,r,n){return a.IsLessEqualThan(n,r.maximum)}function zT(e,t,r,n,i,s){return Kp(e,t,i,s)||t.AddError({keyword:"maximum",schemaPath:r,instancePath:n,params:{comparison:"<=",limit:i.maximum}})}function zp(e,t,r,n){return a.IsLessEqualThan(n.length,r.maxItems)}function VT(e,t,r,n,i,s){return zp(e,t,i,s)||t.AddError({keyword:"maxItems",schemaPath:r,instancePath:n,params:{limit:i.maxItems}})}function Vp(e,t,r,n){return a.IsMaxLength(n,r.maxLength)}function YT(e,t,r,n,i,s){return Vp(e,t,i,s)||t.AddError({keyword:"maxLength",schemaPath:r,instancePath:n,params:{limit:i.maxLength}})}function Yp(e,t,r,n){return a.IsLessEqualThan(a.Keys(n).length,r.maxProperties)}function WT(e,t,r,n,i,s){return Yp(e,t,i,s)||t.AddError({keyword:"maxProperties",schemaPath:r,instancePath:n,params:{limit:i.maxProperties}})}function bN(e){return Xr(e)}function Wp(e,t,r,n){if(!bN(r))return!0;let i=n.reduce((s,p)=>w(e,t,r.contains,p)?++s:s,0);return a.IsGreaterEqualThan(i,r.minContains)}function QT(e,t,r,n,i,s){return Wp(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:n,params:{minContains:i.minContains}})}function Qp(e,t,r,n){return a.IsGreaterEqualThan(n,r.minimum)}function ZT(e,t,r,n,i,s){return Qp(e,t,i,s)||t.AddError({keyword:"minimum",schemaPath:r,instancePath:n,params:{comparison:">=",limit:i.minimum}})}function Zp(e,t,r,n){return a.IsGreaterEqualThan(n.length,r.minItems)}function JT(e,t,r,n,i,s){return Zp(e,t,i,s)||t.AddError({keyword:"minItems",schemaPath:r,instancePath:n,params:{limit:i.minItems}})}function Jp(e,t,r,n){return a.IsMinLength(n,r.minLength)}function XT(e,t,r,n,i,s){return Jp(e,t,i,s)||t.AddError({keyword:"minLength",schemaPath:r,instancePath:n,params:{limit:i.minLength}})}function Xp(e,t,r,n){return a.IsGreaterEqualThan(a.Keys(n).length,r.minProperties)}function ex(e,t,r,n,i,s){return Xp(e,t,i,s)||t.AddError({keyword:"minProperties",schemaPath:r,instancePath:n,params:{limit:i.minProperties}})}function ec(e,t,r,n){return a.IsMultipleOf(n,r.multipleOf)}function tx(e,t,r,n,i,s){return ec(e,t,i,s)||t.AddError({keyword:"multipleOf",schemaPath:r,instancePath:n,params:{multipleOf:i.multipleOf}})}function tc(e,t,r,n){let i=new Qe;return!w(e,i,r.not,n)&&t.Merge([i])}function rx(e,t,r,n,i,s){return tc(e,t,i,s)||t.AddError({keyword:"not",schemaPath:r,instancePath:n,params:{}})}function nx(e,t,r,n){let i=r.oneOf.reduce((s,p)=>{let c=new Qe;return w(e,c,p,n)?[...s,c]:s},[]);return a.IsEqual(i.length,1)&&t.Merge(i)}function ox(e,t,r,n,i,s){let p=[],c=[],l=i.oneOf.reduce((y,E,C)=>{let Pe=new Le,ot=`${r}/oneOf/${C}`,ao=K(e,Pe,ot,n,E,s);return ao&&c.push(C),ao||p.push(Pe),ao?[...y,Pe]:y},[]),g=a.IsEqual(l.length,1)&&t.Merge(l);return!g&&a.IsEqual(c.length,0)&&p.forEach(y=>y.GetErrors().forEach(E=>t.AddError(E))),g||t.AddError({keyword:"oneOf",schemaPath:r,instancePath:n,params:{passingSchemas:c}})}function rc(e,t,r,n){return(a.IsString(r.pattern)?new RegExp(r.pattern):r.pattern).test(n)}function ix(e,t,r,n,i,s){return rc(e,t,i,s)||t.AddError({keyword:"pattern",schemaPath:r,instancePath:n,params:{pattern:i.pattern}})}function ax(e,t,r,n){return a.Every(a.Entries(r.patternProperties),0,([i,s])=>{let p=new RegExp(i);return a.Every(a.Entries(n),0,([c,l])=>!p.test(c)||w(e,t,s,l)&&t.AddKey(c))})}function sx(e,t,r,n,i,s){return a.EveryAll(a.Entries(i.patternProperties),0,([p,c])=>{let l=`${r}/patternProperties/${p}`,g=new RegExp(p);return a.EveryAll(a.Entries(s),0,([y,E])=>{let C=`${n}/${y}`;return!g.test(y)||K(e,t,l,C,c,E)&&t.AddKey(y)})})}function mx(e,t,r,n){return a.IsEqual(n.length,0)||a.Every(r.prefixItems,0,(i,s)=>a.IsLessEqualThan(n.length,s)||w(e,t,i,n[s])&&t.AddIndex(s))}function px(e,t,r,n,i,s){return a.IsEqual(s.length,0)||a.EveryAll(i.prefixItems,0,(p,c)=>{let l=`${r}/prefixItems/${c}`,g=`${n}/${c}`;return a.IsLessEqualThan(s.length,c)||K(e,t,l,g,p,s[c])&&t.AddIndex(c)})}function nc(e,t){return e.includes(t)||pt.Get().exactOptionalPropertyTypes}function oc(e,t){return a.IsUndefined(e[t])}function cx(e,t,r,n){let i=rn(r)?r.required:[];return a.Every(a.Entries(r.properties),0,([p,c])=>{let l=!a.HasPropertyKey(n,p)||w(e,t,c,n[p])&&t.AddKey(p);return nc(i,p)?l:oc(n,p)||l})}function ux(e,t,r,n,i,s){let p=rn(i)?i.required:[];return a.EveryAll(a.Entries(i.properties),0,([l,g])=>{let y=`${r}/properties/${l}`,E=`${n}/${l}`,C=()=>!a.HasPropertyKey(s,l)||K(e,t,y,E,g,s[l])&&t.AddKey(l);return nc(p,l)?C():oc(s,l)||C()})}function lx(e,t,r,n){return a.Every(a.Keys(n),0,(i,s)=>w(e,t,r.propertyNames,i))}function dx(e,t,r,n,i,s){let p=[];return a.EveryAll(a.Keys(s),0,(l,g)=>{let y=`${n}/${l}`,E=`${r}/propertyNames`,C=new Le,Pe=K(e,C,E,y,i.propertyNames,l);return Pe||p.push(l),Pe})||t.AddError({keyword:"propertyNames",schemaPath:r,instancePath:n,params:{propertyNames:p}})}function fx(e,t,r,n){let i=e.RecursiveRef(r.$recursiveRef)??!1;return $(i)&&w(e,t,i,n)}function gx(e,t,r,n,i,s){let p=e.RecursiveRef(i.$recursiveRef)??!1;return $(p)&&K(e,t,"#",n,p,s)}function Ex(e,t,r,n){let i=e.Ref(r.$ref)??!1,s=new Qe,p=$(i)&&w(e,s,i,n);return p&&t.Merge([s]),p}function hx(e,t,r,n,i,s){let p=e.Ref(i.$ref)??!1,c=new Le,l=$(p)&&K(e,c,"#",n,p,s);return l&&t.Merge([c]),l||c.GetErrors().forEach(g=>t.AddError(g)),l}function Tx(e,t,r,n){return a.Every(r.required,0,i=>a.HasPropertyKey(n,i))}function xx(e,t,r,n,i,s){let p=[];return a.EveryAll(i.required,0,l=>{let g=a.HasPropertyKey(s,l);return g||p.push(l),g})||t.AddError({keyword:"required",schemaPath:r,instancePath:n,params:{requiredProperties:p}})}function ic(e,t,r,n,i){return a.IsEqual(r,"object")?a.IsObjectNotArray(i):a.IsEqual(r,"array")?a.IsArray(i):a.IsEqual(r,"boolean")?a.IsBoolean(i):a.IsEqual(r,"integer")?a.IsInteger(i):a.IsEqual(r,"number")?a.IsNumber(i):a.IsEqual(r,"null")?a.IsNull(i):a.IsEqual(r,"string")?a.IsString(i):a.IsEqual(r,"asyncIterator")?a.IsAsyncIterator(i):a.IsEqual(r,"bigint")?a.IsBigInt(i):a.IsEqual(r,"constructor")?a.IsConstructor(i):a.IsEqual(r,"function")?a.IsFunction(i):a.IsEqual(r,"iterator")?a.IsIterator(i):a.IsEqual(r,"symbol")?a.IsSymbol(i):a.IsEqual(r,"undefined")?a.IsUndefined(i):a.IsEqual(r,"void")?a.IsUndefined(i):!0}function _x(e,t,r,n,i){return r.some(s=>ic(e,t,s,n,i))}function Ax(e,t,r,n){return a.IsArray(r.type)?_x(e,t,r.type,r,n):ic(e,t,r.type,r,n)}function bx(e,t,r,n,i,s){return(a.IsArray(i.type)?_x(e,t,i.type,i,s):ic(e,t,i.type,i,s))||t.AddError({keyword:"type",schemaPath:r,instancePath:n,params:{type:i.type}})}function Ox(e,t,r,n){let i=t.GetIndices();return a.Every(n,0,(s,p)=>(i.has(p)||w(e,t,r.unevaluatedItems,s))&&t.AddIndex(p))}function Sx(e,t,r,n,i,s){let p=t.GetIndices(),c=[];return a.EveryAll(s,0,(g,y)=>{let E=new Le,C=(p.has(y)||K(e,E,r,n,i.unevaluatedItems,g))&&t.AddIndex(y);return C||c.push(y),C})||t.AddError({keyword:"unevaluatedItems",schemaPath:r,instancePath:n,params:{unevaluatedItems:c}})}function Rx(e,t,r,n){let i=t.GetKeys();return a.Every(a.Entries(n),0,([s,p])=>i.has(s)||w(e,t,r.unevaluatedProperties,p)&&t.AddKey(s))}function Cx(e,t,r,n,i,s){let p=t.GetKeys(),c=[];return a.EveryAll(a.Entries(s),0,([g,y])=>{let E=new Le,C=p.has(g)||K(e,E,r,n,i.unevaluatedProperties,y)&&t.AddKey(g);return C||c.push(g),C})||t.AddError({keyword:"unevaluatedProperties",schemaPath:r,instancePath:n,params:{unevaluatedProperties:c}})}function Px(e){return!a.IsEqual(e.uniqueItems,!1)}function kx(e,t,r,n){if(!Px(r))return!0;let i=new Set(n.map(pr.Hash)).size,s=n.length;return a.IsEqual(i,s)}function Ux(e,t,r,n,i,s){if(!Px(i))return!0;let p=new Set,c=s.reduce((g,y,E)=>{let C=pr.Hash(y);return p.has(C)?[...g,E]:(p.add(C),g)},[]);return a.IsEqual(c.length,0)||t.AddError({keyword:"uniqueItems",schemaPath:r,instancePath:n,params:{duplicateItems:c}})}function w(e,t,r,n){e.Push(r);let i=za(r)?Ip(e,t,r,n):(!gp(r)||Ax(e,t,r,n))&&(!(a.IsObject(n)&&!a.IsArray(n))||(!rn(r)||Tx(e,t,r,n))&&(!Qt(r)||hT(e,t,r,n))&&(!Wm(r)||CT(e,t,r,n))&&(!Qm(r)||kT(e,t,r,n))&&(!Zm(r)||LT(e,t,r,n))&&(!Pi(r)||ax(e,t,r,n))&&(!ki(r)||cx(e,t,r,n))&&(!up(r)||lx(e,t,r,n))&&(!Ri(r)||Xp(e,t,r,n))&&(!sp(r)||Yp(e,t,r,n)))&&(!a.IsArray(n)||(!Km(r)||yT(e,t,r,n))&&(!Xr(r)||hp(e,t,r,n))&&(!Zn(r)||BT(e,t,r,n))&&(!ip(r)||Hp(e,t,r,n))&&(!Va(r)||zp(e,t,r,n))&&(!tn(r)||Wp(e,t,r,n))&&(!Jn(r)||Zp(e,t,r,n))&&(!Xn(r)||mx(e,t,r,n))&&(!eo(r)||kx(e,t,r,n)))&&(!a.IsString(n)||(!Oi(r)||Bp(e,t,r,n))&&(!ap(r)||Vp(e,t,r,n))&&(!Si(r)||Jp(e,t,r,n))&&(!Ci(r)||rc(e,t,r,n)))&&(!(a.IsNumber(n)||a.IsBigInt(n))||(!tp(r)||xp(e,t,r,n))&&(!Zt(r)||_p(e,t,r,n))&&(!op(r)||Kp(e,t,r,n))&&(!Jt(r)||Qp(e,t,r,n))&&(!mp(r)||ec(e,t,r,n)))&&(!lp(r)||fx(e,t,r,n))&&(!dp(r)||Ex(e,t,r,n))&&(!Bm(r)||uT(e,t,r,n))&&(!Ym(r)||Ep(e,t,r,n))&&(!ep(r)||Tp(e,t,r,n))&&(!rp(r)||FT(e,t,r,n))&&(!pp(r)||tc(e,t,r,n))&&(!zm(r)||xT(e,t,r,n))&&(!Vm(r)||AT(e,t,r,n))&&(!cp(r)||nx(e,t,r,n))&&(!Wa(r)||!a.IsArray(n)||Ox(e,t,r,n))&&(!Qa(r)||!a.IsObject(n)||Rx(e,t,r,n))&&(!Hm(r)||dT(e,t,r,n));return e.Pop(r),i}function K(e,t,r,n,i,s){e.Push(i);let p=za(i)?OT(e,t,r,n,i,s):!!(+(!gp(i)||bx(e,t,r,n,i,s))&+(!(a.IsObject(s)&&!a.IsArray(s))||!!(+(!rn(i)||xx(e,t,r,n,i,s))&+(!Qt(i)||TT(e,t,r,n,i,s))&+(!Wm(i)||PT(e,t,r,n,i,s))&+(!Qm(i)||UT(e,t,r,n,i,s))&+(!Zm(i)||NT(e,t,r,n,i,s))&+(!Pi(i)||sx(e,t,r,n,i,s))&+(!ki(i)||ux(e,t,r,n,i,s))&+(!up(i)||dx(e,t,r,n,i,s))&+(!Ri(i)||ex(e,t,r,n,i,s))&+(!sp(i)||WT(e,t,r,n,i,s))))&+(!a.IsArray(s)||!!(+(!Km(i)||IT(e,t,r,n,i,s))&+(!Xr(i)||RT(e,t,r,n,i,s))&+(!Zn(i)||HT(e,t,r,n,i,s))&+(!ip(i)||KT(e,t,r,n,i,s))&+(!Va(i)||VT(e,t,r,n,i,s))&+(!tn(i)||QT(e,t,r,n,i,s))&+(!Jn(i)||JT(e,t,r,n,i,s))&+(!Xn(i)||px(e,t,r,n,i,s))&+(!eo(i)||Ux(e,t,r,n,i,s))))&+(!a.IsString(s)||!!(+(!Oi(i)||jT(e,t,r,n,i,s))&+(!ap(i)||YT(e,t,r,n,i,s))&+(!Si(i)||XT(e,t,r,n,i,s))&+(!Ci(i)||ix(e,t,r,n,i,s))))&+(!(a.IsNumber(s)||a.IsBigInt(s))||!!(+(!tp(i)||wT(e,t,r,n,i,s))&+(!Zt(i)||$T(e,t,r,n,i,s))&+(!op(i)||zT(e,t,r,n,i,s))&+(!Jt(i)||ZT(e,t,r,n,i,s))&+(!mp(i)||tx(e,t,r,n,i,s))))&+(!lp(i)||gx(e,t,r,n,i,s))&+(!dp(i)||hx(e,t,r,n,i,s))&+(!Bm(i)||lT(e,t,r,n,i,s))&+(!Ym(i)||ST(e,t,r,n,i,s))&+(!ep(i)||MT(e,t,r,n,i,s))&+(!rp(i)||qT(e,t,r,n,i,s))&+(!pp(i)||rx(e,t,r,n,i,s))&+(!zm(i)||_T(e,t,r,n,i,s))&+(!Vm(i)||bT(e,t,r,n,i,s))&+(!cp(i)||ox(e,t,r,n,i,s))&+(!Wa(i)||!a.IsArray(s)||Sx(e,t,r,n,i,s))&+(!Qa(i)||!a.IsObject(s)||Cx(e,t,r,n,i,s)))&&(!Hm(i)||fT(e,t,r,n,i,s));return e.Pop(i),p}var on={};ft(on,{Ref:()=>vN});var Xt={};ft(Xt,{Delete:()=>UN,Get:()=>PN,Has:()=>CN,Indices:()=>Mi,Set:()=>kN});function Lx(e){if(e.length===0)throw Error("Cannot set root")}function Nx(e){if(!a.IsObject(e))throw Error("Cannot set value")}function ON(e){return/^(0|[1-9]\d*)$/.test(e)}function Mx(e){return[e.slice(0,e.length-1),e.slice(e.length-1)[0]]}function SN(e,t){return a.IsObject(t)&&a.HasPropertyKey(t,e)}function RN(e,t){return a.IsObject(t)?t[e]:void 0}function ac(e,t){return e.reduce((r,n)=>RN(n,r),t)}function Mi(e){if(a.IsEqual(e.length,0))return[];let t=e.split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>0&&t[0]===""?t.slice(1):t}function CN(e,t){let r=e;return Mi(t).every(n=>SN(n,r)?(r=r[n],!0):!1)}function PN(e,t){let r=Mi(t);return ac(r,e)}function kN(e,t,r){let n=Mi(t);Lx(n);let[i,s]=Mx(n),p=ac(i,e);return Nx(p),p[s]=r,e}function UN(e,t){let r=Mi(t);Lx(r);let[n,i]=Mx(r),s=ac(n,e);return Nx(s),a.IsArray(s)&&ON(i)?s.splice(+i,1):delete s[i],e}function LN(e,t,r){if(e.$id===r.hash)return e;let n=new URL(e.$id,t.href),i=new URL(r.href,t.href);if(a.IsEqual(n.pathname,i.pathname))return r.hash.startsWith("#")?wx(e,t,r):e}function NN(e,t,r){let n=new URL(`#${e.$anchor}`,t.href),i=new URL(r.href,t.href);if(a.IsEqual(n.href,i.href))return e}function wx(e,t,r){return r.href.endsWith("#")?e:r.hash.startsWith("#")?Xt.Get(e,decodeURIComponent(r.hash.slice(1))):void 0}function MN(e,t,r){if(en(e)){let n=LN(e,t,r);if(!a.IsUndefined(n))return n}if(bi(e)){let n=NN(e,t,r);if(!a.IsUndefined(n))return n}return wx(e,t,r)}function wN(e,t,r){return e.reduce((n,i)=>{let s=sc(i,t,r);return a.IsUndefined(s)?n:s},void 0)}function $N(e,t,r){return a.Keys(e).reduce((n,i)=>{let s=sc(e[i],t,r);return a.IsUndefined(s)?n:s},void 0)}function sc(e,t,r){if(t=Wt(e)&&en(e)?new URL(e.$id,t.href):t,Wt(e)){let n=MN(e,t,r);if(!a.IsUndefined(n))return n}if(a.IsArray(e))return wN(e,t,r);if(a.IsObject(e))return $N(e,t,r)}function vN(e,t){let r=new URL("http://unknown"),n=en(e)?new URL(e.$id,r.href):r,i=new URL(t,n.href);return sc(e,n,i)}var an=class{constructor(t,r){this.context=t,this.schema=r,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((t,r)=>new URL(r.$id,t),new URL("http://unknown"))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(t){Wt(t)&&(en(t)&&this.ids.push(t),bi(t)&&this.anchors.push(t),Ya(t)&&this.recursiveAnchors.push(t),Jm(t)&&this.dynamicAnchors.push(t))}Pop(t){Wt(t)&&(en(t)&&this.ids.pop(),bi(t)&&this.anchors.pop(),Ya(t)&&this.recursiveAnchors.pop(),Jm(t)&&this.dynamicAnchors.pop())}FromContext(t){return a.HasPropertyKey(this.context,t)?this.context[t]:void 0}FromRef(t){return t.startsWith("#")?on.Ref(this.Base(),t):on.Ref(this.schema,t)}Ref(t){return this.FromContext(t)??this.FromRef(t)}RecursiveRef(t){return Ya(this.Base())?on.Ref(this.recursiveAnchors[0],t):on.Ref(this.Base(),t)}};function $x(...e){let[t,r,n]=X.Match(e,{3:(p,c,l)=>[p,c,l],2:(p,c)=>[{},p,c]}),i=new an(t,r),s=new Qe;return w(i,s,r,n)}function vx(...e){let[t,r,n]=X.Match(e,{3:(y,E,C)=>[y,E,C],2:(y,E)=>[{},y,E]}),i=pt.Get(),s=Lu(),p=[],c=new an(t,r),l=new Ui(y=>{if(!a.IsGreaterEqualThan(p.length,i.maxErrors))return p.push({...y,message:s(y)})});return[K(c,l,"#","",r,n),p]}function ie(...e){let[t,r,n]=X.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return $x(t,r,n)}function Sr(...e){let[t,r,n]=X.Match(e,{3:(p,c,l)=>[p,c,l],2:(p,c)=>[{},p,c]}),[i,s]=vx(t,r,n);return s}var Rr=class extends Error{constructor(t,r,n){super(t),Object.defineProperty(this,"cause",{value:{source:t,errors:n,value:r},writable:!1,configurable:!1,enumerable:!1})}};function Gx(e,t,r){return a.IsArray(r)?r.map(n=>Me(e,t.items,n)):r}function Dx(e,t,r){return t.Clean(r)}function jx(e,t,r){return Me({...e,...t.$defs},Te(t.$ref),r)}function DN(e){let t=a.HasPropertyKey(e,"unevaluatedProperties")?{additionalProperties:e.unevaluatedProperties}:{},r=At(e);return N(r)?Pa(r,t):r}function Fx(e,t,r){let n=DN(t);return Me(e,n,r)}function Za(e){return a.HasPropertyKey(e,"additionalProperties")?e.additionalProperties:void 0}function qx(e,t,r){if(!a.IsObject(r)||a.IsArray(r))return r;let n=Za(t);for(let i of a.Keys(r)){if(a.HasPropertyKey(t.properties,i)){r[i]=Me(e,t.properties[i],r[i]);continue}if(a.IsBoolean(n)&&a.IsEqual(n,!0)||_(n)&&ie(e,n,r[i])){r[i]=Me(e,n,r[i]);continue}delete r[i]}return r}function Bx(e,t,r){if(!a.IsObject(r))return r;let n=Za(t),[i,s]=[new RegExp(at(t)),Ge(t)];for(let p of a.Keys(r)){if(i.test(p)){r[p]=Me(e,s,r[p]);continue}if(a.IsBoolean(n)&&a.IsEqual(n,!0)||_(n)&&ie(e,n,r[p])){r[p]=Me(e,n,r[p]);continue}delete r[p]}return r}function Hx(e,t,r){return a.HasPropertyKey(e,t.$ref)?Me(e,e[t.$ref],r):r}function Kx(e,t,r){if(!a.IsArray(r))return r;let n=Math.min(r.length,t.items.length);for(let i=0;i<n;i++)r[i]=Me(e,t.items[i],r[i]);return a.IsGreaterThan(r.length,n)?r.slice(0,n):r}function jN(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=ae(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=ae(e[r]);return t}function FN(e){return a.IsClassInstance(e)?e:jN(e)}function qN(e){return e.map(t=>ae(t))}function BN(e){return e.slice()}function HN(e){return new Map(ae([...e.entries()]))}function KN(e){return new Set(ae([...e.values()]))}function ae(e){return Ke.IsTypeArray(e)?BN(e):Ke.IsMap(e)?HN(e):Ke.IsSet(e)?KN(e):a.IsArray(e)?qN(e):a.IsObject(e)?FN(e):e}function zx(e,t,r){for(let n of t.anyOf){let i=Me(e,n,ae(r));if(ie(e,n,i))return i}return r}function Me(e,t,r){return Q(t)?Gx(e,t,r):ct(t)?Dx(e,t,r):ne(t)?jx(e,t,r):P(t)?Fx(e,t,r):N(t)?qx(e,t,r):le(t)?Bx(e,t,r):re(t)?Hx(e,t,r):B(t)?Kx(e,t,r):x(t)?zx(e,t,r):r}function mn(...e){let[t,r,n]=X.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return Me(t,r,n)}function Vx(e,t,r){return a.IsArray(r)?r.map(n=>Ae(e,t.items,n)):r}function Yx(e,t,r){return t.Convert(r)}var J={};ft(J,{Fail:()=>pn,IsOk:()=>pc,Ok:()=>R,TryBigInt:()=>cc,TryBoolean:()=>cM,TryNull:()=>IM,TryNumber:()=>SM,TryString:()=>NM,TryUndefined:()=>jM});function pc(e){return a.IsObject(e)&&a.HasPropertyKey(e,"value")}function R(e){return{value:e}}function pn(){}function zN(e){return R(e)}function VN(e){return a.IsEqual(e,!0)?R(BigInt(1)):R(BigInt(0))}function YN(e){return R(BigInt(Math.trunc(e)))}function WN(e){return R(BigInt(0))}var QN=/^-?(0|[1-9]\d*)n$/,ZN=/^-?(0|[1-9]\d*)\.\d+$/,JN=/^-?(0|[1-9]\d*)$/;function XN(e){return QN.test(e)}function eM(e){return ZN.test(e)}function tM(e){return JN.test(e)}function rM(e){let t=e.toLowerCase();return XN(e)?R(BigInt(e.slice(0,e.length-1))):eM(e)?R(BigInt(e.split(".")[0])):tM(e)?R(BigInt(e)):a.IsEqual(t,"false")?R(BigInt(0)):a.IsEqual(t,"true")?R(BigInt(1)):void 0}function nM(e){return R(BigInt(0))}function cc(e){return a.IsBigInt(e)?zN(e):a.IsBoolean(e)?VN(e):a.IsNumber(e)?YN(e):a.IsNull(e)?WN(e):a.IsString(e)?rM(e):a.IsUndefined(e)?nM(e):void 0}function oM(e){return a.IsEqual(e,BigInt(0))?R(!1):a.IsEqual(e,BigInt(1))?R(!0):void 0}function iM(e){return R(e)}function aM(e){return a.IsEqual(e,0)?R(!1):a.IsEqual(e,1)?R(!0):void 0}function sM(e){return R(!1)}function mM(e){return a.IsEqual(e.toLowerCase(),"false")?R(!1):a.IsEqual(e.toLowerCase(),"true")?R(!0):a.IsEqual(e,"0")?R(!1):a.IsEqual(e,"1")?R(!0):void 0}function pM(e){return R(!1)}function cM(e){return a.IsBigInt(e)?oM(e):a.IsBoolean(e)?iM(e):a.IsNumber(e)?aM(e):a.IsNull(e)?sM(e):a.IsString(e)?mM(e):a.IsUndefined(e)?pM(e):void 0}function uM(e){return a.IsEqual(e,BigInt(0))?R(null):void 0}function lM(e){return a.IsEqual(e,!1)?R(null):void 0}function dM(e){return a.IsEqual(e,0)?R(null):void 0}function fM(e){return R(null)}function gM(e){let t=e.toLowerCase();return a.IsEqual(t,"undefined")||a.IsEqual(t,"null")||a.IsEqual(e,"")||a.IsEqual(e,"0")?R(null):void 0}function yM(e){return R(null)}function IM(e){return a.IsBigInt(e)?uM(e):a.IsBoolean(e)?lM(e):a.IsNumber(e)?dM(e):a.IsNull(e)?fM(e):a.IsString(e)?gM(e):a.IsUndefined(e)?yM(e):void 0}var EM=BigInt(Number.MAX_SAFE_INTEGER),hM=BigInt(Number.MIN_SAFE_INTEGER);function TM(e){return e<=EM&&e>=hM}function Wx(e){return TM(e)?R(Number(e)):void 0}function xM(e){return e?R(1):R(0)}function _M(e){return R(e)}function AM(e){return R(0)}function bM(e){let t=+e;if(a.IsNumber(t))return R(t);let r=e.toLowerCase();if(a.IsEqual(r,"false"))return R(0);if(a.IsEqual(r,"true"))return R(1);let n=cc(e);return pc(n)?Wx(n.value):void 0}function OM(e){return R(0)}function SM(e){return a.IsBigInt(e)?Wx(e):a.IsBoolean(e)?xM(e):a.IsNumber(e)?_M(e):a.IsNull(e)?AM(e):a.IsString(e)?bM(e):a.IsUndefined(e)?OM(e):void 0}function RM(e){return R(e.toString())}function CM(e){return R(e.toString())}function PM(e){return R(e.toString())}function kM(e){return R("null")}function UM(e){return R(e)}function LM(e){return R("")}function NM(e){return a.IsBigInt(e)?RM(e):a.IsBoolean(e)?CM(e):a.IsNumber(e)?PM(e):a.IsNull(e)?kM(e):a.IsString(e)?UM(e):a.IsUndefined(e)?LM(e):void 0}function MM(e){return a.IsEqual(e,BigInt(0))?R(void 0):void 0}function wM(e){return a.IsEqual(e,!1)?R(void 0):void 0}function $M(e){return a.IsEqual(e,0)?R(void 0):void 0}function vM(e){return R(void 0)}function GM(e){let t=e.toLowerCase();return a.IsEqual(t,"undefined")||a.IsEqual(t,"null")||a.IsEqual(e,"")||a.IsEqual(e,"0")?R(void 0):void 0}function DM(e){return R(void 0)}function jM(e){return a.IsBigInt(e)?MM(e):a.IsBoolean(e)?wM(e):a.IsNumber(e)?$M(e):a.IsNull(e)?vM(e):a.IsString(e)?GM(e):a.IsUndefined(e)?DM(e):void 0}function Qx(e,t,r){if(a.IsBigInt(r))return r;let n=J.TryBigInt(r);return J.IsOk(n)?n.value:r}function Zx(e,t,r){if(a.IsBoolean(r))return r;let n=J.TryBoolean(r);return J.IsOk(n)?n.value:r}function Jx(e,t,r){return Ae({...e,...t.$defs},Te(t.$ref),r)}function Ja(e,t,r){if(t.anyOf.some(p=>ie(e,p,r)))return r;let s=t.anyOf.map(p=>Ae(e,p,ae(r))).find(p=>ie(e,t,p));return a.IsUndefined(s)?r:s}function Xx(e,t,r){let n=qr(t);return Ja(e,n,r)}function e_(e,t,r){if(a.IsInteger(r))return r;let n=J.TryNumber(r);return J.IsOk(n)?Math.trunc(n.value):r}function t_(e,t,r){let n=At(t);return Ae(e,n,r)}function FM(e,t,r){let n=J.TryBigInt(r);return J.IsOk(n)&&a.IsEqual(t.const,n.value)?n.value:r}function qM(e,t,r){let n=J.TryBoolean(r);return J.IsOk(n)&&a.IsEqual(t.const,n.value)?n.value:r}function BM(e,t,r){let n=J.TryNumber(r);return J.IsOk(n)&&a.IsEqual(t.const,n.value)?n.value:r}function HM(e,t,r){let n=J.TryString(r);return J.IsOk(n)&&a.IsEqual(t.const,n.value)?n.value:r}function r_(e,t,r){return a.IsEqual(t.const,r)?r:ju(t)?FM(e,t,r):Fu(t)?qM(e,t,r):In(t)?BM(e,t,r):En(t)?HM(e,t,r):D()}function n_(e,t,r){if(a.IsNull(r))return r;let n=J.TryNull(r);return J.IsOk(n)?n.value:r}function o_(e,t,r){if(a.IsNumber(r))return r;let n=J.TryNumber(r);return J.IsOk(n)?n.value:r}function Xa(e,t,r,n){let i=a.Keys(n);for(let[s,p]of t)for(let c of i)s.test(c)||(n[c]=Ae(e,r,n[c]));return n}function wi(e,t,r){return be(e)&&a.IsUndefined(r[t])}function KM(e,t,r){let n=a.EntriesRegExp(t.properties),i=a.Keys(r);for(let[s,p]of n)for(let c of i)!s.test(c)||wi(p,c,r)||(r[c]=Ae(e,p,r[c]));return a.HasPropertyKey(t,"additionalProperties")&&a.IsObject(t.additionalProperties)?Xa(e,n,t.additionalProperties,r):r}function i_(e,t,r){return a.IsObjectNotArray(r)?KM(e,t,r):r}function zM(e,t,r){let n=a.EntriesRegExp(t.patternProperties),i=a.Keys(r);for(let[s,p]of n)for(let c of i)s.test(c)&&(r[c]=Ae(e,p,r[c]));return a.HasPropertyKey(t,"additionalProperties")&&a.IsObject(t.additionalProperties)?Xa(e,n,t.additionalProperties,r):r}function a_(e,t,r){return a.IsObjectNotArray(r)?zM(e,t,r):r}function s_(e,t,r){return a.HasPropertyKey(e,t.$ref)?Ae(e,e[t.$ref],r):r}function m_(e,t,r){if(a.IsString(r))return r;let n=J.TryString(r);return J.IsOk(n)?n.value:r}function p_(e,t,r){let n=De(t.pattern);return Ae(e,n,r)}function c_(e,t,r){if(!a.IsArray(r))return r;for(let n=0;n<Math.min(t.items.length,r.length);n++)r[n]=Ae(e,t.items[n],r[n]);return r}function u_(e,t,r){if(a.IsUndefined(r))return r;let n=J.TryUndefined(r);return J.IsOk(n)?n.value:r}function l_(e,t,r){if(a.IsUndefined(r))return r;let n=J.TryUndefined(r);return J.IsOk(n)?void 0:r}function Ae(e,t,r){return Q(t)?Vx(e,t,r):ct(t)?Yx(e,t,r):it(t)?Qx(e,t,r):Ye(t)?Zx(e,t,r):ne(t)?Jx(e,t,r):Ie(t)?Xx(e,t,r):ke(t)?e_(e,t,r):P(t)?t_(e,t,r):V(t)?r_(e,t,r):Pt(t)?n_(e,t,r):ue(t)?o_(e,t,r):N(t)?i_(e,t,r):le(t)?a_(e,t,r):re(t)?s_(e,t,r):xe(t)?m_(e,t,r):Ee(t)?p_(e,t,r):B(t)?c_(e,t,r):Nt(t)?u_(e,t,r):x(t)?Ja(e,t,r):st(t)?l_(e,t,r):r}function Cr(...e){let[t,r,n]=X.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return Ae(t,r,n)}function d_(e,t,r){if(!a.IsArray(r))return r;for(let n=0;n<r.length;n++)r[n]=Ce(e,t.items,r[n]);return r}function f_(e,t,r){return t.Default(r)}function g_(e,t,r){return Ce({...e,...t.$defs},Te(t.$ref),r)}function y_(e,t){return a.IsUndefined(t)?a.IsFunction(e.default)?e.default():ae(e.default):t}function I_(e,t,r){let n=At(t);return Ce(e,n,r)}function E_(e,t,r){if(!a.IsObject(r))return r;let n=a.Keys(t.properties);for(let i of n){let s=Ce(e,t.properties[i],r[i]);a.IsUndefined(s)&&(be(t.properties[i])||!a.HasPropertyKey(t.properties[i],"default"))||(r[i]=Ce(e,t.properties[i],r[i]))}if(!Qt(t)||a.IsBoolean(t.additionalProperties))return r;for(let i of a.Keys(r))n.includes(i)||(r[i]=Ce(e,t.additionalProperties,r[i]));return r}function h_(e,t,r){if(!a.IsObject(r))return r;let[n,i]=[new RegExp(at(t)),Ge(t)];for(let s of a.Keys(r))n.test(s)&&dt(i)&&(r[s]=Ce(e,i,r[s]));if(!Qt(t))return r;for(let s of a.Keys(r))n.test(s)||(r[s]=Ce(e,t.additionalProperties,r[s]));return r}function T_(e,t,r){return a.HasPropertyKey(e,t.$ref)?Ce(e,e[t.$ref],r):r}function x_(e,t,r){if(!a.IsArray(r))return r;let[n,i]=[t.items,Math.max(t.items.length,r.length)];for(let s=0;s<i;s++)s<n.length&&(r[s]=Ce(e,n[s],r[s]));return r}function __(e,t,r){for(let n of t.anyOf){let i=Ce(e,n,ae(r));if(ie(e,n,i))return i}return r}function Ce(e,t,r){let n=dt(t)?y_(t,r):r;return Q(t)?d_(e,t,n):ct(t)?f_(e,t,n):ne(t)?g_(e,t,n):P(t)?I_(e,t,n):N(t)?E_(e,t,n):le(t)?h_(e,t,n):re(t)?T_(e,t,n):B(t)?x_(e,t,n):x(t)?__(e,t,n):n}function cn(...e){let[t,r,n]=X.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return Ce(t,r,n)}function no(e){return(...t)=>{let[r,n,i]=X.Match(t,{3:(s,p,c)=>[s,p,c],2:(s,p)=>[{},s,p]});return e.reduce((s,p)=>p(r,n,s),i)}}function VM(e,t,r){return t["~codec"].decode(r)}function YM(e,t,r){return t["~codec"].encode(r)}function ge(e,t,r,n){return vr(r)?a.IsEqual(e,"Decode")?VM(t,r,n):YM(t,r,n):n}function WM(e,t,r,n){if(!a.IsArray(n))return D();for(let i=0;i<n.length;i++)n[i]=me(e,t,r.items,n[i]);return ge(e,t,r,n)}function QM(e,t,r,n){let i=ge(e,t,r,n);if(!a.IsArray(i))return i;for(let s=0;s<i.length;s++)i[s]=me(e,t,r.items,i[s]);return i}function A_(e,t,r,n){return a.IsEqual(e,"Decode")?WM(e,t,r,n):QM(e,t,r,n)}function b_(e,t,r,n){return n=me(e,{...t,...r.$defs},Te(r.$ref),n),ge(e,t,r,n)}function ZM(e,t,r,n){for(let i of r.allOf)n=me(e,t,i,n);return ge(e,t,r,n)}function JM(e,t,r,n){let i=ge(e,t,r,n);for(let s of r.allOf)i=me(e,t,s,i);return i}function O_(e,t,r,n){return a.IsEqual(e,"Decode")?ZM(e,t,r,n):JM(e,t,r,n)}function XM(e,t,r,n){if(!a.IsObjectNotArray(n))return D();for(let i of a.Keys(r.properties))!a.HasPropertyKey(n,i)||wi(r.properties[i],i,n)||(n[i]=me(e,t,r.properties[i],n[i]));return ge(e,t,r,n)}function ew(e,t,r,n){let i=ge(e,t,r,n);if(!a.IsObjectNotArray(i))return i;for(let s of a.Keys(r.properties))!a.HasPropertyKey(i,s)||wi(r.properties[s],s,i)||(i[s]=me(e,t,r.properties[s],i[s]));return i}function S_(e,t,r,n){return a.IsEqual(e,"Decode")?XM(e,t,r,n):ew(e,t,r,n)}function tw(e,t,r,n){if(!a.IsObjectNotArray(n))return D();let i=new RegExp(at(r));for(let s of a.Keys(n))i.test(s)||D(),n[s]=me(e,t,Ge(r),n[s]);return ge(e,t,r,n)}function rw(e,t,r,n){let i=ge(e,t,r,n);if(!a.IsObjectNotArray(i))return i;let s=new RegExp(at(r));for(let p of a.Keys(i))s.test(p)&&(i[p]=me(e,t,Ge(r),i[p]));return i}function R_(e,t,r,n){return a.IsEqual(e,"Decode")?tw(e,t,r,n):rw(e,t,r,n)}function C_(e,t,r,n){return n=a.HasPropertyKey(t,r.$ref)?me(e,t,t[r.$ref],n):n,ge(e,t,r,n)}function nw(e,t,r,n){if(!a.IsArray(n))return D();for(let i=0;i<Math.min(r.items.length,n.length);i++)n[i]=me(e,t,r.items[i],n[i]);return ge(e,t,r,n)}function ow(e,t,r,n){let i=ge(e,t,r,n);if(!a.IsArray(i))return n;for(let s=0;s<Math.min(r.items.length,i.length);s++)i[s]=me(e,t,r.items[s],i[s]);return i}function P_(e,t,r,n){return a.IsEqual(e,"Decode")?nw(e,t,r,n):ow(e,t,r,n)}function iw(e,t,r,n){for(let i of r.anyOf){if(!ie(t,i,n))continue;let s=me(e,t,i,n);return ge(e,t,r,s)}return D()}function aw(e,t,r,n){let i=ge(e,t,r,n);for(let s of r.anyOf){let p=me(e,t,s,ae(i));if(ie(t,s,p))return p}return i}function k_(e,t,r,n){return a.IsEqual(e,"Decode")?iw(e,t,r,n):aw(e,t,r,n)}function me(e,t,r,n){return Q(r)?A_(e,t,r,n):ne(r)?b_(e,t,r,n):P(r)?O_(e,t,r,n):N(r)?S_(e,t,r,n):le(r)?R_(e,t,r,n):re(r)?C_(e,t,r,n):B(r)?P_(e,t,r,n):x(r)?k_(e,t,r,n):ge(e,t,r,n)}var uc=class extends Rr{constructor(t,r){super("Decode",t,r)}};function sw(e,t,r){if(!ie(e,t,r))throw new uc(r,Sr(e,t,r));return r}function mw(e,t,r){return me("Decode",e,t,r)}var cCe=no([(e,t,r)=>ae(r),(e,t,r)=>cn(e,t,r),(e,t,r)=>Cr(e,t,r),(e,t,r)=>mn(e,t,r),(e,t,r)=>sw(e,t,r),(e,t,r)=>mw(e,t,r)]);var lc=class extends Rr{constructor(t,r){super("Encode",t,r)}};function pw(e,t,r){if(!ie(e,t,r))throw new lc(r,Sr(e,t,r));return r}function cw(e,t,r){return me("Encode",e,t,r)}var _Ce=no([(e,t,r)=>ae(r),(e,t,r)=>cw(e,t,r),(e,t,r)=>cn(e,t,r),(e,t,r)=>Cr(e,t,r),(e,t,r)=>mn(e,t,r),(e,t,r)=>pw(e,t,r)]);var It=class extends Error{constructor(t,r){super(r),this.type=t}};function U_(e,t){return a.IsFunction(t.default)?t.default(t):a.IsObject(t.default)?ae(t.default):t.default}function L_(e,t){if(eo(t)&&!dt(t))throw new It(t,"Arrays with uniqueItems constraints must specify a default annotation");let r=Jn(t)?t.minItems:0;return Array.from({length:r},()=>pe(e,t.items))}async function*uw(){}function N_(e,t){return uw()}function M_(e,t){return t.Create()}function w_(e,t){return Zt(t)?BigInt(t.exclusiveMinimum)+BigInt(1):Jt(t)?BigInt(t.minimum):BigInt(0)}function $_(e,t){return!1}function v_(e,t){let r=pe(e,t.instanceType);return class{constructor(){Object.assign(this,r)}}}function G_(e,t){return pe({...e,...t.$defs},Te(t.$ref))}function D_(e,t){return pe(e,qr(t))}function j_(e,t){let r=pe(e,t.returnType);return()=>r}function F_(e,t){return Zt(t)&&a.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:Jt(t)?t.minimum:0}function q_(e,t){return pe(e,At(t))}function*lw(){}function B_(e,t){return lw()}function H_(e,t){return t.const}function K_(e,t){throw new It(t,"Cannot create TNever types")}function z_(e,t){return null}function V_(e,t){return Zt(t)&&a.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:Jt(t)?t.minimum:0}function Y_(e,t){return(a.IsUndefined(t.required)?[]:t.required).reduce((n,i)=>({...n,[i]:pe(e,t.properties[i])}),{})}function W_(e,t){return Promise.resolve(pe(e,t.item))}function Q_(e,t){if(Ri(t)&&!dt(t))throw new It(t,"Record with the minProperties constraint must have a default annotation");return{}}function Z_(e,t){return a.HasPropertyKey(e,t.$ref)?pe(e,e[t.$ref]):(()=>{throw new It(t,"Unable to deref Ref")})()}function J_(e,t){if((Ci(t)||Oi(t))&&!dt(t))throw Error("Strings with format or pattern constraints must specify default");let n=Si(t)?t.minLength:0;return"".padEnd(n)}function X_(e,t){return Symbol()}function eA(e,t){let r=De(t.pattern);if(xe(r))throw new It(t,"Unable to create TemplateLiteral due to infinite type expansion");return pe(e,r)}function tA(e,t){return Array.from({length:t.minItems},(r,n)=>pe(e,t.items[n]))}function rA(e,t){if(a.IsEqual(t.anyOf.length,0))throw Error("Unable to create Union with no variants");return pe(e,t.anyOf[0])}function pe(e,t){return dt(t)?U_(e,t):Q(t)?L_(e,t):Be(t)?N_(e,t):ct(t)?M_(e,t):it(t)?w_(e,t):Ye(t)?$_(e,t):Oe(t)?v_(e,t):ne(t)?G_(e,t):Ie(t)?D_(e,t):Se(t)?j_(e,t):ke(t)?F_(e,t):P(t)?q_(e,t):He(t)?B_(e,t):V(t)?H_(e,t):qt(t)?K_(e,t):Pt(t)?z_(e,t):ue(t)?V_(e,t):N(t)?Y_(e,t):ve(t)?W_(e,t):le(t)?Q_(e,t):re(t)?Z_(e,t):xe(t)?J_(e,t):kt(t)?X_(e,t):Ee(t)?eA(e,t):B(t)?tA(e,t):Nt(t)?void 0:x(t)?rA(e,t):st(t)?void 0:void 0}function jt(...e){let[t,r]=X.Match(e,{2:(n,i)=>[n,i],1:n=>[{},n]});return pe(t,r)}var dc=class extends Rr{constructor(t,r){super("Parse",t,r)}};function dw(e,t,r){if(!ie(e,t,r))throw new dc(r,Sr(e,t,r));return r}var R0e=no([(e,t,r)=>ae(r),(e,t,r)=>cn(e,t,r),(e,t,r)=>Cr(e,t,r),(e,t,r)=>mn(e,t,r),(e,t,r)=>dw(e,t,r)]);var gw=k({type:q("insert"),path:et(),value:we()}),yw=Object({type:q("update"),path:et(),value:we()}),Iw=k({type:q("delete"),path:et()}),M0e=v([gw,yw,Iw]);function $i(e){if(!e.body)throw new Error("This command does not accept a request body");let t=e.body;return t.examples?.length?t.examples[0]:jt(t)}var iA=Lc(require("node:fs"));function vi(e){if(e.file){let t=iA.default.readFileSync(e.file==="-"?0:e.file,"utf-8");return JSON.parse(t)}if(e.data)return JSON.parse(e.data);throw new Error("Provide a request body with -f <file> or -d <json>. Use --generate-skeleton to get a template.")}function qe(e){process.stdout.write(`${JSON.stringify(e,null,2)}
38
- `)}function xw(e){return e.replace(/-/g," ").replace(/ies$/,"y").replace(/s$/,"")}function gc(e){let t=e.params;if(t?.properties){let r=Object.keys(t.properties);if(r.length===1&&r[0])return r[0]}return"id"}function aA(e,t,r){let n=e.command(t.commandName).description(t.description),i=xw(t.commandName),s=n.command("list").description(`List all ${t.commandName}`);if(t.listOptions)for(let p of t.listOptions)s.option(p.flag,p.description);if(s.action(async p=>{let c={};if(t.listOptions)for(let g of t.listOptions){let y=p[g.queryParam];y!==void 0&&(c[g.queryParam]=y)}let l=await r()(t.endpoints.list,Object.keys(c).length>0?{query:c}:void 0);qe(l)}),t.endpoints.get){let p=t.endpoints.get,c=gc(p);n.command("get <id>").description(`Get a ${i} by ID`).action(async l=>{let g=await r()(p,{params:{[c]:l}});qe(g)})}if(t.endpoints.create){let p=t.endpoints.create;n.command("create").description(`Create a new ${i}`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async c=>{if(c.generateSkeleton){qe($i(p));return}let l=vi(c),g=await r()(p,{body:l});qe(g)})}if(t.endpoints.update){let p=t.endpoints.update,c=gc(p);n.command("update <id>").description(`Update a ${i} by ID`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async(l,g)=>{if(g.generateSkeleton){qe($i(p));return}let y=vi(g),E=await r()(p,{params:{[c]:l},body:y});qe(E)})}if(t.endpoints.delete){let p=t.endpoints.delete,c=gc(p);n.command("delete <id>").description(`Delete a ${i} by ID`).action(async l=>{let g=await r()(p,{params:{[c]:l}});qe(g)})}}var _w=[{commandName:"dashboards",description:"Manage dashboards",endpoints:{list:LE,get:NE,create:ME,update:wE,delete:$E},listOptions:[{flag:"--owners <ids...>",description:"Filter by owner team IDs",queryParam:"owners"}]},{commandName:"ingestion-api-keys",description:"Manage ingestion API keys",endpoints:{list:FE,create:qE,update:BE,delete:HE}},{commandName:"monitors",description:"Manage monitors",endpoints:{list:QE,get:ZE,create:nh,update:oh,delete:ih}},{commandName:"notification-rules",description:"Manage notification rules",endpoints:{list:dh,get:fh,create:gh,update:yh,delete:Ih}},{commandName:"notification-silences",description:"Manage notification silences",endpoints:{list:hh,get:Th,create:_h,update:Ah,delete:bh}},{commandName:"quality-reports",description:"Manage quality reports",endpoints:{list:Rh}},{commandName:"retention-policies",description:"Manage retention policies",endpoints:{list:kh,get:Uh,create:Lh,update:Nh,delete:Mh}},{commandName:"routes",description:"Manage routes",endpoints:{list:wh,get:$h,create:vh,update:Gh,delete:Dh}},{commandName:"services",description:"Manage services",endpoints:{list:Hh,get:Kh}},{commandName:"tag-policies",description:"Manage tag policies",endpoints:{list:tT,get:rT,create:nT,update:oT,delete:iT}},{commandName:"teams",description:"Manage teams",endpoints:{list:aT,get:sT,create:mT,update:pT,delete:cT}}];function sA(e,t){for(let r of _w)aA(e,r,t)}var mA=`/${"v1"}/aggregation`,pA=o.Object({id:o.String({description:'Query identifier (q1, q2, ...) or "formula" for formula'}),group:o.Record(o.String(),o.Union([o.String(),o.Number()]),{description:"Group-by field values"})}),Aw={results:[{id:"q1",group:{host:"server-1"},value:123.45}]},cA=o.Object({results:o.Array(o.Object({...pA.properties,value:o.Number({description:"Aggregated value"})},{title:"ScalarResult"}),{description:"Aggregated results per query and group"})},{$id:"ScalarAggregationResponse",title:"ScalarAggregationResponse",description:"Scalar aggregation response with single values"});Object.assign(cA,{examples:[Aw]});var bw={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]},uA=o.Object({series:o.Array(o.Object({...pA.properties,points:o.Array(o.Object({timestamp:o.Integer({description:"Timestamp in milliseconds"}),value:o.Number({description:"Value"})}),{description:"Array of data points"})},{title:"Series"}),{description:"Time series data per query and group"})},{$id:"TimeseriesAggregationResponse",title:"TimeseriesAggregationResponse",description:"Timeseries aggregation response with points over time"});Object.assign(uA,{examples:[bw]});var lA={timeRange:yt,queries:o.Array(o.Omit(Vo.items,["fill"],{title:"AggregationQuery"}),{maxItems:um,description:"Aggregations that may be combined together in the same query"}),groupBy:o.Optional(Wo),dataSource:cm,formula:o.Optional(Yo)},Ow=o.Object(lA),dA=f({description:"Run aggregation queries and return scalar results",operationId:"aggregateScalar",tags:["public","aggregation"],url:`${mA}/multi-query/scalar`,method:"POST",body:Ow,response:cA}),Sw=o.Object({...lA,aggregationWindow:u({description:'Time bucket size for aggregation (e.g. "10s", "1m", "1h")'})}),fA=f({description:"Run aggregation queries and return timeseries results",operationId:"aggregateTimeseries",tags:["public","aggregation"],url:`${mA}/multi-query/timeseries`,method:"POST",body:Sw,response:uA});var es="/v0/logs";var Gi=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var Rw=0,Cw=o.Object({__tsuga_metadata__:o.Object({id:o.String(),source:o.Optional(o.String())},{additionalProperties:!0}),context:o.Optional(o.Object({team:o.Optional(o.String()),tag_policy_warnings:o.Optional(o.Record(o.String(),o.String()))},{additionalProperties:!0})),message:o.Optional(o.String()),timestamp:o.Number(),level:o.Enum(Gi)},{additionalProperties:!0});var Pw="log_timestamp",kw=o.Union([o.Literal(Pw)]),un={...zt.properties,query:o.Optional(u({type:"tsuga-query"})),maxResults:o.Optional(o.Integer({minimum:1,maximum:1e3})),shouldRecommendAttributes:o.Optional(o.Boolean()),defaultAttributesToHighlight:o.Optional(o.Array(u(),{maxItems:50})),triggeredBy:o.Optional(o.Literal("refresh")),startOffset:o.Optional(o.Number({minimum:Rw})),clusterId:o.Optional(u({allowEmpty:!1})),sortBy:o.Optional(kw),sortDirection:o.Optional(o.Union([o.Literal("asc"),o.Literal("desc")]))},FNe=f({tags:["logs"],url:`${es}/count`,method:"GET",query:o.Pick(o.Object(un),["from","to","query","clusterId"]),response:o.Object({count:o.Number()})}),yc=o.Object({value:o.String(),priority:o.Number({minimum:0,maximum:1})}),qNe=f({tags:["logs"],url:`${es}/search`,method:"GET",query:o.Object(un),response:o.Object({logs:o.Optional(o.Array(Cw)),attributesToHighlight:o.Optional(o.Array(yc))},{additionalProperties:!0})}),Ic=o.Cyclic({TokenOutput:o.Union([o.Object({type:o.Literal("top"),values:o.Array(o.String())}),o.Object({type:o.Literal("ip"),value:o.String()}),o.Object({type:o.Literal("range"),min:o.Number(),max:o.Number()}),o.Object({type:o.Literal("variable"),value:o.String()}),o.Object({type:o.Literal("text"),value:o.String()}),o.Object({type:o.Literal("date"),value:o.String()}),o.Object({type:o.Literal("url"),value:o.String()}),o.Object({type:o.Literal("structure"),key:o.Array(o.String()),value:o.Array(o.Ref("TokenOutput"))})])},"TokenOutput",{description:"A token identified as part of the pattern"}),Uw=o.Object({id:o.String(),pattern:o.Array(Ic),size:o.Integer({description:"Number of logs that matched the pattern"}),examples:o.Array(o.Object({id:o.Any(),timestampUnix:o.Number()})),timeDistribution:o.Array(o.Number()),staticFeatures:o.Array(o.Object({key:o.String(),value:o.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),BNe=f({tags:["logs"],url:`${es}/patterns`,method:"GET",query:o.Object({...zt.properties,query:u({type:"tsuga-query"}),clusteringThreshold:o.Optional(o.Number()),clusterId:o.Optional(u({allowEmpty:!1}))}),response:o.Object({patterns:o.Array(Uw),sampleSize:o.Number()})}),HNe=f({tags:["logs"],url:`${es}/attributes`,method:"GET",query:o.Object({...zt.properties,clusterId:o.Optional(u({allowEmpty:!1,description:"Cluster ID"}))}),response:o.Object({attributes:o.Array(o.String())})});var ts=`/${"v1"}/logs`,Ec=o.Object({context:o.Optional(o.Object({team:o.Optional(o.String())},{additionalProperties:!0,$id:"LogContext"})),message:o.Optional(o.String()),timestamp:o.Number(),level:o.Enum(Gi)},{additionalProperties:!0,$id:"LogEvent"}),Lw={context:{team:"platform"},message:"Request completed successfully",timestamp:17040672e5,level:"INFO"};Object.assign(Ec,{examples:[Lw]});var Nw={query:"level:ERROR",maxResults:100,from:1704067200,to:1704067200},gA=o.Object({...o.Pick(o.Object(un),["query","maxResults"]).properties,...yt.properties});Object.assign(gA,{examples:[Nw]});var yA=f({description:"Search logs",operationId:"searchLogs",tags:["public","logs"],url:`${ts}/search`,method:"GET",query:gA,response:o.Object({logs:o.Array(Ec)})}),Mw=o.Object({pattern:o.Array(Ic),size:o.Integer({description:"Number of logs that matched the pattern"}),groups:o.Array(o.Object({key:o.String(),value:o.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),IA=o.Object({patterns:o.Array(Mw),sampleSize:o.Number()}),ww={patterns:[{pattern:[{type:"text",value:"Resolved"},{type:"text",value:" "},{type:"text",value:"segment"},{type:"text",value:" "},{type:"text",value:"SegmentId("},{type:"range",min:0,max:1},{type:"text",value:")"},{type:"text",value:" "},{type:"text",value:"from"},{type:"text",value:" "},{type:"text",value:"cache"}],size:37004,groups:[{key:"level",value:"DEBUG"},{key:"context.team",value:"infra"}]}],sampleSize:100};Object.assign(IA,{examples:[ww]});var EA=f({description:"Get log patterns",operationId:"getLogPatterns",tags:["public","logs"],url:`${ts}/patterns`,method:"GET",query:o.Object({...yt.properties,query:u({type:"tsuga-query"})}),response:IA}),$w=o.Object({exampleLog:o.Optional(Ec),team:o.String(),env:o.String(),service:o.String(),firstSeen:o.Number({description:"Timestamp in milliseconds when this pattern was first seen"}),lastSeen:o.Number({description:"Timestamp in milliseconds when this pattern was last seen"})}),hA=o.Object({newErrorPatterns:o.Array($w)}),vw={newErrorPatterns:[{team:"platform",env:"production",service:"api-gateway",firstSeen:17040672e5,lastSeen:17041536e5,exampleLog:{message:"ConnectionError: Failed to connect to database",timestamp:17041536e5,level:"ERROR"}}]};Object.assign(hA,{examples:[vw]});var TA=f({description:"Get new error patterns",operationId:"getNewErrorPatterns",tags:["public","logs"],url:`${ts}/patterns/new`,method:"GET",query:o.Object({...yt.properties,team:o.Optional(u()),env:o.Optional(u()),service:o.Optional(u())}),response:hA}),Gw=o.Object({team:o.String(),env:o.String(),pattern:o.String({description:"The error pattern formatted"}),increaseTimestamps:o.Array(o.Number({description:"Timestamps in milliseconds when there were increases in this pattern"}))}),xA=o.Object({errorPatternIncreases:o.Array(Gw)}),Dw={errorPatternIncreases:[{team:"platform",env:"production",pattern:"Non-resolved segment SegmentId(*) from cache",increaseTimestamps:[17041536e5,17042392e5]}]};Object.assign(xA,{examples:[Dw]});var _A=f({description:"Get error pattern increase",operationId:"getErrorPatternIncrease",tags:["public","logs"],url:`${ts}/patterns/increase`,method:"GET",query:o.Object({...yt.properties,team:o.Optional(u()),env:o.Optional(u())}),response:xA});var Pr="/v0/metrics",jw=o.Object({__tsuga_metadata__:o.Object({id:o.Optional(o.String())},{additionalProperties:!0}),context:o.Optional(o.Object({},{additionalProperties:!0})),message:o.Optional(o.String()),timestamp:o.Number(),level:o.Enum(Gi)},{additionalProperties:!0}),oMe=f({tags:["metrics"],url:`${Pr}/count`,method:"GET",query:o.Pick(o.Object(un),["from","to","query"]),response:o.Object({count:o.Number()})}),iMe=f({tags:["metrics"],url:`${Pr}/search`,method:"GET",query:o.Object(un),response:o.Object({logs:o.Optional(o.Array(jw)),totalHits:o.Optional(o.Number()),attributesToHighlight:o.Optional(o.Array(yc))},{additionalProperties:!0})}),rs=o.Enum(["counter","gauge","histogram","summary"]),hc=o.Enum(["delta","cumulative","none"]),Fw=o.Object({capabilities:o.Optional(o.Array(o.String())),description:o.Optional(o.String()),tags:o.Optional(o.Array(o.String())),temporality:o.Optional(hc),type:o.Optional(rs),unit:o.Optional(o.String())}),aMe=f({url:`${Pr}/metadata`,method:"GET",query:o.Object({...zt.properties,metricName:u({allowEmpty:!1}),clusterId:o.Optional(u({allowEmpty:!1,description:"Cluster ID"}))}),response:Fw}),sMe=f({tags:["metrics"],url:Pr,method:"GET",query:o.Object({...zt.properties,clusterId:o.Optional(u({allowEmpty:!1,description:"Cluster ID"}))}),response:o.Array(o.String())}),Tc=o.Array(o.Object({name:o.String(),type:rs}),{description:"List of metric names and their types"}),mMe=f({tags:["metrics"],url:`${Pr}/names-and-types`,method:"GET",query:o.Object({...zt.properties,clusterId:o.Optional(u({allowEmpty:!1,description:"Cluster ID"}))}),response:Tc}),xc=o.Array(o.String(),{description:"List of attribute names"}),pMe=f({tags:["metrics"],url:`${Pr}/attributes`,method:"GET",query:o.Object({...zt.properties,metricName:u({allowEmpty:!1}),clusterId:o.Optional(u({allowEmpty:!1,description:"Cluster ID"}))}),response:xc}),_c=o.Object({assets:o.Array(o.Object({type:o.Enum(["dashboard","monitor"]),id:o.String(),name:o.String(),owner:o.String()},{description:"An asset that uses a metric"}),{description:"List of assets (dashboards and monitors) using this metric"})}),cMe=f({tags:["metrics"],url:`${Pr}/assets-usage`,method:"GET",query:o.Object({metricName:u({allowEmpty:!1})}),response:_c}),uMe=f({url:`${Pr}/per-attribute`,method:"GET",query:o.Object({from:o.Optional(o.Number()),to:o.Optional(o.Number()),attribute:u(),clusterId:o.Optional(u({allowEmpty:!1}))}),response:o.Array(o.String())});var Ac=`/${"v1"}/metrics`,qw=[{name:"http.server.request.duration",type:"histogram"},{name:"http.server.active_requests",type:"gauge"},{name:"http.server.request.count",type:"counter"}];Object.assign(Tc,{examples:[qw]});var bc=o.Object({name:o.String({description:"Name of the metric"}),type:rs,description:o.Optional(o.String({description:"Human-readable description of the metric"})),unit:o.Optional(o.String({description:"Unit of the metric"})),temporality:o.Optional(hc),capabilities:o.Optional(o.Array(o.String(),{description:"Supported capabilities, an empty array means all capabilities are supported"})),attributes:o.Optional(o.Array(o.String(),{description:"Metric attributes"}))}),Bw={name:"http.server.request.duration",type:"histogram",description:"Duration of HTTP server requests",unit:"ms",temporality:"delta",capabilities:["max","min","sum"],attributes:["context.team","context.environment","context.region"]};Object.assign(bc,{examples:[Bw]});var AA=f({description:"Get all metrics with their metadata",operationId:"listMetrics",tags:["public","metrics"],url:Ac,method:"GET",query:yt,response:o.Array(bc)}),bA=f({description:"Retrieve a metric by name with its metadata",operationId:"getMetric",tags:["public","metrics"],url:`${Ac}/:name`,method:"GET",params:o.Object({name:u({allowEmpty:!1,description:"The metric name"})}),query:yt,response:bc}),Hw=["service","env","host","method","status_code"];Object.assign(xc,{examples:[Hw]});var OA=o.Pick(_c,["assets"]),Kw={assets:[{type:"dashboard",id:"dash-123-abc",name:"API Performance Overview",owner:"user-456-def"},{type:"monitor",id:"mon-789-ghi",name:"High Latency Alert",owner:"user-456-def"}]};Object.assign(OA,{examples:[Kw]});var hMe=f({description:"Retrieve dashboards and monitors that use a specific metric",operationId:"getMetricAssetsUsage",tags:["private"],url:`${Ac}/assets-usage`,method:"GET",query:o.Object({metricName:u({allowEmpty:!1,description:"The name of the metric to find usage for"})}),response:OA});var zw=`/${"v1"}/traces`,SA=o.Object({context:o.Optional(o.Object({service:o.Optional(o.Object({name:o.Optional(o.String()),version:o.Optional(o.String())},{additionalProperties:!0}))},{additionalProperties:!0})),parentSpanId:o.Optional(o.String()),resourceAttributes:o.Object({},{additionalProperties:!0}),spanAttributes:o.Object({},{additionalProperties:!0}),duration:o.Number({description:"In milliseconds."}),startTime:o.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),endTime:o.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),error:o.Optional(o.Object({message:o.String()})),events:o.Optional(o.Array(o.Object({event_attributes:o.Object({},{additionalProperties:!0}),event_name:o.String(),event_timestamp_nanos:o.String()}))),spanId:o.String(),span:o.Object({kind:o.String(),name:o.String()}),statusCode:o.Optional(o.String()),traceId:o.String()},{additionalProperties:!0,$id:"SpanEvent"}),Vw={context:{service:{name:"my-service",version:"1.0.0"}},parentSpanId:"187a47da1b2560f8",resourceAttributes:{},spanAttributes:{busyNs:374640,code:{file:{path:"src/queue/sqs.rs"},line:{number:162},module:{name:"queue::sqs"}},idleNs:23621445,maxMessages:"1",target:"queue::sqs",thread:{id:2,name:"tokio-runtime-worker"}},duration:23,startTime:"1770923469995353600",endTime:"1770923470019349500",spanId:"3df8cc3449378f66",span:{kind:"internal",name:"receive_messages"},statusCode:"ok",traceId:"78c99c5bb1e4a30297fa134b9dbec64f"};Object.assign(SA,{examples:[Vw]});var Yw={from:1704067200,to:1704067200,query:"context.service.name:my-service",maxResults:100},RA=o.Object({...yt.properties,query:o.Optional(u({type:"tsuga-query"})),maxResults:o.Optional(o.Integer({minimum:1,maximum:1e4}))});Object.assign(RA,{examples:[Yw]});var CA=f({description:"Search spans",operationId:"searchSpans",tags:["public","traces"],url:`${zw}/search`,method:"GET",query:RA,response:o.Object({spans:o.Array(SA)})});var tr=require("node:fs"),PA=require("node:os"),Oc=require("node:path"),kA=(0,Oc.join)((0,PA.homedir)(),".config","tsuga"),oo=(0,Oc.join)(kA,"config.json"),Ww="https://api.tsuga.com";function ln(){if(!(0,tr.existsSync)(oo))return{};try{return JSON.parse((0,tr.readFileSync)(oo,"utf-8"))}catch{throw new Error(`Config file corrupted: ${oo}
39
- Re-run: tsuga auth <token>`)}}function Sc(e){(0,tr.mkdirSync)(kA,{recursive:!0,mode:448}),(0,tr.writeFileSync)(oo,`${JSON.stringify(e,null,2)}
40
- `,{mode:384})}function Rc(e){let t=ln(),r=e.apiToken??process.env.TSUGA_OPERATION_API_KEY??t.operationApiKey;return{apiUrl:Ww,apiToken:r}}function Cc(e){let t={};try{t=ln()}catch{}Sc({...t,...e})}function UA(){return(0,tr.existsSync)(oo)||!!process.env.TSUGA_OPERATION_API_KEY}function Pc(){return oo}var kc={from:"-30m",to:"now",query:"*","max-results":"100"};function LA(){return ln().defaults??{}}function io(e){return(ln().defaults??{})[e]??kc[e]}function NA(e,t){let r={};try{r=ln()}catch{}let n={...r.defaults??{},[e]:t};Sc({...r,defaults:n})}function MA(){let e={};try{e=ln()}catch{}let{defaults:t,...r}=e;Sc(r)}function wA(){return ln().lastUpdateCheck}function $A(e){Cc({lastUpdateCheck:e})}var Qw={s:1,m:60,h:3600,d:86400};function vA(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<48||r>57)return!1}return!0}function GA(){return Math.floor(Date.now()/1e3)}function DA(e){if(e==="now")return GA();if(e.startsWith("-")&&e.length>=3){let r=e.at(-1),n=r?Qw[r]:void 0;if(n){let i=e.slice(1,-1);if(i.length>0&&vA(i))return GA()-parseInt(i,10)*n}}if(vA(e)&&e.length>0)return parseInt(e,10);let t=Date.parse(e);if(!Number.isNaN(t))return Math.floor(t/1e3);throw new Error(`Invalid time value: ${e}. Use unix seconds, relative (-30m, -1h), 'now', or ISO 8601.`)}function Et(e,t){let r=t??io(e);if(!r)throw new Error(`--${e} is required`);return DA(r)}function jA(e){let t={from:Et("from",e.from),to:Et("to",e.to)},r=e.query??io("query");r!==void 0&&(t.query=r);let n=e.maxResults??io("max-results");if(n!==void 0){let i=Number(n);if(Number.isNaN(i))throw new Error(`--max-results must be a number (got: ${n})`);t.maxResults=i}return t}function FA(e,t,r,n,i){e.command(t).description(r).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async s=>{if(s.generateSkeleton){qe($i(n));return}let p=vi(s),c=await i()(n,{body:p});qe(c)})}function je(e){let t=io(e);return t===void 0?"":` (default: ${t})`}function qA(e,t){let r=e.command("logs").description("Search and analyze logs");r.command("search").description("Search logs").option("--from <timestamp>",`Start of time range${je("from")}`).option("--to <timestamp>",`End of time range${je("to")}`).option("--query <query>",`Search query${je("query")}`).option("--max-results <n>",`Maximum number of results${je("max-results")}`).action(async p=>{let c=await t()(yA,{query:jA(p)});qe(c)}),r.command("patterns").description("List log patterns").option("--from <timestamp>",`Start of time range${je("from")}`).option("--to <timestamp>",`End of time range${je("to")}`).option("--query <query>",`Search query${je("query")}`).action(async p=>{let c={from:Et("from",p.from),to:Et("to",p.to)},l=p.query??io("query");l!==void 0&&(c.query=l);let g=await t()(EA,{query:c});qe(g)}),r.command("new-error-patterns").description("List new error patterns").option("--from <timestamp>",`Start of time range${je("from")}`).option("--to <timestamp>",`End of time range${je("to")}`).option("--team <team>","Filter by team").option("--env <env>","Filter by environment").option("--service <service>","Filter by service").action(async p=>{let c={from:Et("from",p.from),to:Et("to",p.to)};p.team!==void 0&&(c.team=p.team),p.env!==void 0&&(c.env=p.env),p.service!==void 0&&(c.service=p.service);let l=await t()(TA,{query:c});qe(l)}),r.command("error-pattern-increases").description("List error pattern increases").option("--from <timestamp>",`Start of time range${je("from")}`).option("--to <timestamp>",`End of time range${je("to")}`).option("--team <team>","Filter by team").option("--env <env>","Filter by environment").action(async p=>{let c={from:Et("from",p.from),to:Et("to",p.to)};p.team!==void 0&&(c.team=p.team),p.env!==void 0&&(c.env=p.env);let l=await t()(_A,{query:c});qe(l)});let n=e.command("metrics").description("List and inspect metrics");n.command("list").description("List all metrics with their metadata").option("--from <timestamp>",`Start of time range${je("from")}`).option("--to <timestamp>",`End of time range${je("to")}`).action(async p=>{let c=await t()(AA,{query:{from:Et("from",p.from),to:Et("to",p.to)}});qe(c)}),n.command("get <name>").description("Retrieve a metric by name with its metadata").option("--from <timestamp>",`Start of time range${je("from")}`).option("--to <timestamp>",`End of time range${je("to")}`).action(async(p,c)=>{let l=await t()(bA,{params:{name:p},query:{from:Et("from",c.from),to:Et("to",c.to)}});qe(l)}),e.command("traces").description("Search traces").command("search").description("Search spans").option("--from <timestamp>",`Start of time range${je("from")}`).option("--to <timestamp>",`End of time range${je("to")}`).option("--query <query>",`Search query${je("query")}`).option("--max-results <n>",`Maximum number of results${je("max-results")}`).action(async p=>{let c=await t()(CA,{query:jA(p)});qe(c)});let s=e.command("aggregation").description("Run aggregation queries");FA(s,"scalar","Run aggregation queries and return scalar results",dA,t),FA(s,"timeseries","Run aggregation queries and return timeseries results",fA,t)}var Zw=3e3,Jw="https://registry.npmjs.org/@tsuga/cli/latest";function Xw(e,t){let r=e.split(".").map(Number),n=t.split(".").map(Number);for(let i=0;i<Math.max(r.length,n.length);i++){let s=r[i]??0,p=n[i]??0;if(s>p)return!0;if(s<p)return!1}return!1}async function BA(e){try{let t=wA();if(t&&Date.now()-t<Na)return;let r=await fetch(Jw,{signal:AbortSignal.timeout(Zw)});if(!r.ok)return;let i=(await r.json()).version;Xw(i,e)&&(process.stderr.write(`
41
+ -----END PRIVATE KEY-----`,isUsingLuhnAlgorithm:!1,regexp:"-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY(?: BLOCK)?-----[ \\r\\n\\t\\f\\v\\S-]{64,}?KEY(?: BLOCK)?-----"},{key:"pulumi_api_token",name:"Pulumi API token",category:"credential",example:"pul-b77e6bff9fddebbc2bb8eca94e3f29a41f6da70a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pul-[a-f0-9]{40})"},{key:"pypi_upload_token",name:"PyPI upload token",category:"credential",example:"pypi-AgEIcHlwaS5vcmc128fd9e0b47dde39cfecad3a997273458e6392f6aac649ae38864bdd7ff12836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)pypi-AgEIcHlwaS5vcmc[a-zA-Z0-9_-]{50}"},{key:"rapidapi_access_token",name:"RapidAPI access token",category:"credential",example:"g4x40h94pi_-zlklfz3-qvhiiu5zankyrqqwmsl60decihbqvl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{50})"},{key:"readme_api_token",name:"ReadMe API token",category:"credential",example:"rdme_k38kau741xa5lw03mdkvcd4vn6s6hdhvhg1wxa4ls7dp8h58r0yxq65nsqwndn056pxsc4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rdme_[a-z0-9]{70})"},{key:"rubygems_api_token",name:"RubyGems API token",category:"credential",example:"rubygems_7790aaa8102395704a64594a11f6de4941a27f86bc3fc9d4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rubygems_[a-f0-9]{48})"},{key:"scalingo_api_token",name:"Scalingo API token",category:"credential",example:"tk-us-4fhmqrg-rl4416b3oij_qx3q284wbhbqpk7r3te4r14lafou",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:tk-us-[a-zA-Z0-9_-]{48})"},{key:"sendbird_access_id",name:"SendBird access ID",category:"credential",example:"7e7801fd-c25d-50ab-a723-01b94c8d6c5f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sendbird_access_token",name:"SendBird access token",category:"credential",example:"305f75f04e3afa65360c25d9944fdae91138328d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{40})"},{key:"sendgrid_api_token",name:"SendGrid API token",category:"credential",example:"SG.--ed-fvdeffijnle7575jp1sh24wq_9y9hcjua5w3dnqh5-wyegkpzenziy1_qr=hf",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:SG\\.[a-z0-9=_\\-\\.]{66})"},{key:"sendinblue_api_token",name:"Sendinblue API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:xkeysib-[a-f0-9]{64}\\-[a-z0-9]{16})"},{key:"sentry_access_token",name:"Sentry access token",category:"credential",example:"1ad463398f40a52bb94a3795762f4003d51b03b8a788cba55e3a81de81c72940",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"sentry_org_token",name:"Sentry org token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)sntrys_eyJpYXQiO[a-zA-Z0-9+/]{10}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|\\z)"},{key:"sentry_user_token",name:"Sentry user token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sntryu_[a-f0-9]{64})"},{key:"settlemint_application_access_token",name:"Settlemint application access token",category:"credential",example:"sm_aat_gshgzsv353m5yb9s",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_aat_[a-zA-Z0-9]{16})"},{key:"settlemint_personal_access_token",name:"Settlemint personal access token",category:"credential",example:"sm_pat_1yhza49gsle0trg8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_pat_[a-zA-Z0-9]{16})"},{key:"settlemint_service_access_token",name:"Settlemint service access token",category:"credential",example:"sm_sat_cha543e6lb19llli",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_sat_[a-zA-Z0-9]{16})"},{key:"shippo_api_token",name:"Shippo API token",category:"credential",example:"shippo_live_1d0f80d04e7788c1edb8fc2b8076bbf8f59b84b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:shippo_(?:live|test)_[a-fA-F0-9]{40})"},{key:"shopify_access_token",name:"Shopify access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpat_[a-fA-F0-9]{32}"},{key:"shopify_custom_access_token",name:"Shopify custom access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpca_[a-fA-F0-9]{32}"},{key:"shopify_private_app_access_token",name:"Shopify private app access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shppa_[a-fA-F0-9]{32}"},{key:"shopify_shared_secret",name:"Shopify shared secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpss_[a-fA-F0-9]{32}"},{key:"sidekiq_secret",name:"Sidekiq secret",category:"credential",example:"aa8d3915:64fb5cb5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{8}:[a-f0-9]{8})"},{key:"sidekiq_sensitive_url",name:"Sidekiq sensitive URL",category:"credential",example:"https://cafebabe:deadbeef@gems.contribsys.com/",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https?://(?:[a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)"},{key:"slack_bot_token",name:"Slack bot token",category:"credential",example:"xoxb-781236542736-2364535789652-GkwFDQoHqzXDVsC6GzqYUypD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*"},{key:"slack_user_token",name:"Slack user token",category:"credential",example:"xoxp-41684372915-1320496754-45609968301-e708ba56e1517a99f6b5fb07349476ef",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}"},{key:"slack_app_token",name:"Slack app token",category:"credential",example:"xapp-1-A052FGTS2DL-5171572773297-610b6a11f4b7eb819e87b767d80e6575a3634791acb9a9ead051da879eb5b55e",isUsingLuhnAlgorithm:!1,regexp:"xapp-[0-9]-[A-Z0-9]+-[0-9]+-[a-z0-9]+"},{key:"slack_config_access_token",name:"Slack config access token",category:"credential",example:"xoxe.xoxp-1-Mi0yLTM0MTQwNDE0MDE3Ni0zNjU5NDY0Njg4MTctNTE4MjA3NTQ5NjA4MC01NDEyOTYyODY5NzUxLThhMTBjZmI1ZWIzMGIwNTg0ZDdmMDI5Y2UxNzVlZWVhYzU2ZWQyZTZiODNjNDZiMGUxMzRlNmNjNDEwYmQxMjQ",isUsingLuhnAlgorithm:!1,regexp:"xoxe.xox[bp]-[0-9]-[A-Z0-9]{50}"},{key:"slack_config_refresh_token",name:"Slack config refresh token",category:"credential",example:"xoxe-1-My0xLTMxNzcwMjQ0MTcxMy01MTU4MTUyNjkxNzE0LTUxODE4NDI0MDY3MzYtMjA5MGFkOTFlZThkZWE2OGFlZDYwYWJjODNhYzAxYjA5ZjVmODBhYjgzN2QyNDdjOTNlOGY5NTg2YWM1OGM4Mg",isUsingLuhnAlgorithm:!1,regexp:"xoxe-[0-9]-[A-Z0-9]{50}"},{key:"slack_legacy_bot_token",name:"Slack legacy bot token",category:"credential",example:"xoxb-263594206564-FGqddMF8t08v8N7Oq4i57vs1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}"},{key:"slack_legacy_workspace_token",name:"Slack legacy workspace token",category:"credential",example:"xoxa-2-511111111-31111111111-3111111111111-e039d02840a0b9379c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[ar]-(?:[0-9]-)?[0-9a-zA-Z]{8,48}"},{key:"slack_legacy_token",name:"Slack legacy token",category:"credential",example:"xoxs-416843729158-132049654-5609968301-e708ba56e1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[os]-[0-9]+-[0-9]+-[0-9]+-[a-fA-F0-9]+"},{key:"slack_webhook_url",name:"Slack webhook URL",category:"credential",example:"hooks.slack.com/services/z6cvbfngk3h7i0vts4akmbxidtb8o3b4pq2sbbd6o86g",isUsingLuhnAlgorithm:!1,regexp:"(?:https?://)?hooks.slack.com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}"},{key:"snyk_api_token",name:"Snyk API token",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sonar_api_token",name:"Sonar API token",category:"credential",example:"12345678ABCDEFH1234567890ABCDEFH12345678",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:(?:squ_|sqp_|sqa_)?[a-z0-9=_-]{40})"},{key:"stripe_access_token",name:"Stripe access token",category:"credential",example:"sk_test_cyge9m4s1kxiqdkszz0a57nyx6wk73",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})"},{key:"square_access_token",name:"Square access token",category:"credential",example:"sq0atp-OQUxovdrj3tfFpSd66r3sY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:EAAA|sq0atp-)[a-zA-Z0-9_-]{22,60})"},{key:"squarespace_access_token",name:"Squarespace access token",category:"credential",example:"86447eab-140f-2563-3572-bb016dafd692",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sumologic_access_id",name:"SumoLogic access ID",category:"credential",example:"suJS4ZsaD5bQTt",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:su[a-zA-Z0-9]{12})"},{key:"sumologic_access_token",name:"SumoLogic access token",category:"credential",example:"1xohkwr8lpvm4osygkpe5zbd16c3376ver2qed1bssuko4uy4tij1bnf4dnwy7o4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"microsoft_teams_webhook",name:"Microsoft Teams webhook URL",category:"credential",example:"https://mycompany.webhook.office.com/webhookb2/767lrnj6-okh8-dnh8-jey2-y2iteohrwz75@6igi6oz6-ud9w-wior-2zva-5vx0wp6wuiqk/IncomingWebhook/o1zox92ssprrppjtnvcjqq0q09k2wnc3/qwox5p9d-x4zr-3yis-t1on-s67zj50tmyht",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}"},{key:"telegram_bot_api_token",name:"Telegram bot API token",category:"credential",example:"59015865:A12o5wu6f78zofs0udypf9ti23u82g-qkfz",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{5,16}:(?-i:A)[a-z0-9_\\-]{34})"},{key:"travisci_access_token",name:"Travis CI access token",category:"credential",example:"zjgfo5fhshd5c60hpz22wh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{22})"},{key:"twilio_api_key",name:"Twilio API key",category:"credential",example:"SKa585fd034fcd16cdd741f7df9b57fb3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)SK[0-9a-fA-F]{32}"},{key:"twitch_api_token",name:"Twitch API token",category:"credential",example:"1hm9gcychlkpf93jdjnwdu0uaamu6d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"twitter_api_key",name:"Twitter API key",category:"credential",example:"m8zqu4etx07bjt7tyeacc6pox",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"twitter_api_secret",name:"Twitter API secret",category:"credential",example:"7f4gxkubw9qs346ik99zk3z8b6kk3d7g8toi7zujgvgbt8q0yv",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{50})"},{key:"twitter_access_token",name:"Twitter access token",category:"credential",example:"465616696186918-96B1NCD5CH0uyi7zUHiS",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{15,25}-[a-zA-Z0-9]{20,40})"},{key:"twitter_access_secret",name:"Twitter access secret",category:"credential",example:"vyuo5peybdzznr7z0ua5wamhogusans4m29uzi25w4jgj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{45})"},{key:"twitter_bearer_token",name:"Twitter bearer token",category:"credential",example:"AAAAAAAAAAAAAAAAAAAAAAWRGWFGlfwyqNrrIa3pewqNNLX0jQMj2sR6M2cZUfBdqXDtkt7Nsb56F4tCz7Pt8ujbosrLxnRqYgwI0b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:A{22}[a-zA-Z0-9%]{80})"},{key:"typeform_api_token",name:"Typeform API token",category:"credential",example:"tfp_o-nsn=6eg2ios=4g652xhf933qor4jj7ort2qh_uw_5jdsuffp31ln=e-2a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:tfp_[a-z0-9\\-_\\.=]{59})"},{key:"vault_batch_token",name:"Vault batch token",category:"credential",example:"hvb.x84j4cl53mzvhvb1nfc3mfi721gh5i-92f96lt0gns5lpksfu5f0199j-gw4ycxg6au4ser86mczcr_nx6ur2elbpazfrybo80fxjv3bghxshml3g261l6qi03yrz03qup84jk-fc2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hvb\\.[a-zA-Z0-9_-]{50})"},{key:"vault_service_token",name:"Vault service token",category:"credential",example:"s.8QH9knZV94f0IjBZismfOPD0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:hvs\\.[a-zA-Z0-9_-]{90}|s\\.(?i:[a-z0-9]{24})))"},{key:"yandex_api_key",name:"Yandex API key",category:"credential",example:"AQVN9wiAh8pyz3lmB5WTo_KUuPDXlxtzkA5-YFG",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:AQVN[A-Za-z0-9_\\-]{35,38})"},{key:"yandex_aws_access_token",name:"Yandex AWS access token",category:"credential",example:"YCZ6DHVrZONPNtgwWLZPrIGyviSrudRVSr8w0b1S",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:YC[a-zA-Z0-9_\\-]{38})"},{key:"yandex_access_token",name:"Yandex access token",category:"credential",example:"t1.L=.WJ9CYVI5eeLkTOrMM_dgaPgdmpen48R8RYsL4VJqelVKDmrqYsSHkH6QyVVhJkuHSQFTd0NOhClEDyCz7eEbh5=",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:t1\\.[A-Z0-9a-z_-]+[=]{0,2}\\.[A-Z0-9a-z_-]{86}[=]{0,2})"},{key:"zendesk_secret_key",name:"Zendesk secret key",category:"credential",example:"iydgm2jofftb2xu7niv55qnfxdwbwmqt2s561bgc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"infracost_api_token",name:"Infracost API token",category:"credential",example:"ico-fNZw8jjy6TugMUHKWX4l9iSP3i95SPNH",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ico-[a-zA-Z0-9]{32})"},{key:"iban",name:"Iban",category:"financial-data",example:"FR7630006000011234567890189",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{11,30}(?-u:\\b)"},{key:"aikido_token",name:"Aikido token",category:"credential",example:"AIK_SECRET_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_SECRET_[A-Za-z0-9]{64}"},{key:"aikido_ci_token",name:"Aikido CI secret",category:"credential",example:"AIK_CI_US_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_CI_(US_|ME_)?[A-Za-z0-9]{64}"}],hN=wh.map(e=>e.key),ice=new Set(hN),ace=wh.map(e=>e.key);var TN=["all","owning-team-and-public","owning-team-only"],Ym=n.Enum(TN,{description:"This controls which data the resource can see"});var Rt="/v0/monitors",Vm=["alert","resolve","keep_last_status","consider_zero"],$h=["alert","resolve","keep_last_status"];var xN=["no_aggregation","all","any","each","proportion"],_N=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"];var AN=n.Object({formula:c({type:"tsuga-formula"}),operator:n.Enum(_N),threshold:n.Number()}),Wm=n.Array(AN),Dh=n.Object({formula:c({type:"tsuga-formula"}),conditionType:n.Enum(["rate","error","cpu","general","to_be_set"])}),uue=n.Enum(["rate","error","cpu","general"]),jt=[1,2,3,4,5];var si={timeframe:n.Number({description:"Timeframe of the monitor in minutes"}),groupByFields:n.Array(n.Object({fields:n.Array(c(),{description:"Fields used by the monitor group by."}),limit:n.Number({description:"Configured limit for this group by. Warning! This setting is currently ignored. Monitor evaluation will instead apply a fixed limit of 100 groups per field."})}),{maxItems:1,description:"Monitor group by configuration. Warning! Note that the limit setting is currently ignored."}),aggregationAlertLogic:n.Optional(n.Enum(xN)),proportionAlertThreshold:n.Optional(n.Integer({minimum:1,maximum:99}))},Qm=n.Object({type:n.Literal("metric"),conditions:Wm,noDataBehavior:n.Enum(Vm),...si,queries:zn},{$id:"MonitorConfigurationMetric"}),Zm=n.Object({type:n.Literal("log"),conditions:Wm,noDataBehavior:n.Enum(Vm),...si,queries:zn},{$id:"MonitorConfigurationLog"}),Gh=n.Object({type:n.Literal("trace"),conditions:Wm,noDataBehavior:n.Enum(Vm),...si,queries:zn},{$id:"MonitorConfigurationTrace"}),Jm=n.Object({type:n.Literal("anomaly-log"),condition:Dh,noDataBehavior:n.Enum($h),...si,queries:zn},{$id:"MonitorConfigurationAnomalyLog"}),Xm=n.Object({type:n.Literal("anomaly-metric"),condition:Dh,noDataBehavior:n.Enum($h),...si,queries:zn},{$id:"MonitorConfigurationAnomalyMetric"}),vh=n.Object({type:n.Literal("certificate-expiry"),warnBeforeInDays:n.Integer({minimum:1,maximum:365}),cloudAccounts:n.Optional(n.Array(n.String(),{minItems:1})),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("resolve")},{$id:"MonitorConfigurationCertificateExpiry"}),bN=n.Object({type:n.Literal("log-error-pattern"),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("keep_last_status"),filter:n.Object({teamIds:n.Array(n.String()),env:n.String(),service:n.Optional(n.String())})},{$id:"MonitorConfigurationLogErrorPattern"}),jh=$("type",[Qm,Zm,Gh,Jm,Xm,bN,vh]);var Zt=n.Object({id:n.String({description:"Identifier of the monitor"}),name:n.String({description:"Display name of the monitor"}),owner:n.String({description:"Team ID that owns and manages the monitor"}),message:n.Optional(n.String({description:"Message to be displayed if a notification is triggered"})),tags:be,configuration:jh,priority:n.Enum(jt,{description:"Priority of the monitor"}),permissions:Ym,dashboardId:n.Optional(n.String({description:"Identifier of a dashboard related to the monitor"})),pauseUntil:n.Optional(b()),creator:n.Optional(Oe),updater:n.Optional(Oe),createdAt:b(),updatedAt:b(),assetUpdatedAt:b(),clusterIds:n.Array(n.String())},{title:"Monitor"}),ON=$("type",[Qm,Zm,Gh,Jm,Xm,vh]),lue=n.Object({...Zt.properties,configuration:ON},{title:"Monitor"}),due=n.Object({...Zt.properties,configuration:$("type",[Qm,Zm,Jm,Xm])},{title:"Monitor"}),mi=n.Object({name:c(),message:n.Optional(c({type:"long"})),tags:be,configuration:jh,priority:n.Enum(jt),owner:c({allowEmpty:!1}),dashboardId:n.Optional(c()),pauseUntil:n.Optional(c({allowEmpty:!1,type:"date-time"})),permissions:Ym,clusterIds:n.Optional(n.Array(c({allowEmpty:!1})))});var fue=d({tags:["monitors"],url:Rt,method:"GET",paginated:!0,response:n.Array(Zt),query:n.Object({...Te,owners:n.Optional(n.Array(c({allowEmpty:!1})))})}),gue=d({tags:["monitors"],url:`${Rt}/:id`,method:"GET",params:n.Object({id:c()}),response:Zt}),yue=d({tags:["monitors"],url:Rt,method:"POST",body:mi,response:Zt}),Iue=d({tags:["monitors"],url:`${Rt}/:id`,method:"PUT",params:n.Object({id:c()}),body:mi,response:Zt}),Eue=d({tags:["monitors"],url:`${Rt}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),hue=d({tags:["monitors"],url:`${Rt}/:id/snooze`,method:"POST",params:n.Object({id:c()}),body:n.Object({pauseUntil:c({allowEmpty:!1,type:"date-time"})}),response:Zt}),SN=["alert","ok","alert_consider_zero","ok_consider_zero","alert_no_data","ok_no_data","keep_last_status_ok","keep_last_status_alert"],en=n.Enum(SN),RN=$("type",[n.Object({type:n.Literal("each"),subStates:n.Record(n.String(),n.Object({stateValue:n.Union([en,n.Null()]),lastChangedAt:b()}))}),n.Object({type:n.Literal("no_aggregation"),stateValue:n.Optional(en)}),n.Object({type:n.Literal("any"),stateValue:n.Optional(en)}),n.Object({type:n.Literal("all"),stateValue:n.Optional(en)}),n.Object({type:n.Literal("proportion"),stateValue:n.Optional(en)})]),CN=n.Object({monitorId:n.String(),currentState:RN,lastChangedAt:n.Optional(b())}),Tue=d({tags:["monitors"],url:`${Rt}/states/:id`,method:"GET",params:n.Object({id:c()}),response:CN}),xue=d({tags:["monitors"],url:`${Rt}/:id/transitions`,method:"GET",params:n.Object({id:c()}),query:n.Object({from:n.Number(),to:n.Number()}),response:n.Array(n.Object({id:n.String(),createdAt:b(),fromState:n.Optional(en),toState:n.Optional(en),dimension:n.Optional(n.String())}))}),PN=["unprocessed","processed","failed-to-process"],_ue=d({tags:["monitors"],url:`${Rt}/:id/results`,method:"GET",params:n.Object({id:c()}),query:n.Object({from:n.Number(),to:n.Number()}),response:n.Object({isTruncated:n.Boolean(),results:n.Array(n.Object({id:n.String(),evaluationAt:b(),formulaResult:n.Object({groups:n.Array(n.Object({groupKey:n.Record(n.String(),wm),results:n.Array(n.Union([n.Number(),n.Null()])),conditionMet:n.Enum(["true","false","nan-no-data"])}))}),createdAt:b(),status:n.Enum(PN)}))})});var pi=`/${"v1"}/monitors`,ci=n.Pick(Zt,["id","name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],{$id:"Monitor",description:"Monitor allowing to send alerts based on telemetry data"}),kN={id:"123-456-abc",name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},UN={id:"456-789-def",name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(ci,{examples:[kN,UN]});var Fh=d({description:"Retrieve all monitors",operationId:"listMonitors",tags:["monitors"],url:pi,method:"GET",paginated:!0,query:n.Object({...Te,owners:n.Optional(n.Array(c({allowEmpty:!1})))}),response:n.Array(ci)}),qh=d({description:"Retrieve a monitor by its id",operationId:"getMonitor",tags:["monitors"],url:`${pi}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:ci}),Bh=["name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],Hh=n.Pick(mi,Bh,{$id:"CreateMonitorRequest"}),Kh=n.Pick(mi,Bh,{$id:"UpdateMonitorRequest"}),zh={name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},Yh={name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(Hh,{examples:[zh,Yh]});Object.assign(Kh,{examples:[zh,Yh]});var Vh=d({description:"Create a new monitor",operationId:"createMonitor",tags:["monitors"],url:pi,method:"POST",body:Hh,response:ci}),Wh=d({description:"Update a monitor by its id",operationId:"updateMonitor",tags:["monitors"],url:`${pi}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:Kh,response:ci}),NN=n.Object({id:c({allowEmpty:!1,description:"The monitor ID to delete"})}),Qh=d({description:"Delete a monitor by its id",operationId:"deleteMonitor",tags:["monitors"],url:`${pi}/:id`,method:"DELETE",params:NN,response:H});var ui="/v0/notifications",rn=`${ui}/rules`,Zh=`${ui}/slack/setup`,za=`${ui}/integrations`,tn=["triggered","resolved","no-data"],LN=["sent","stale","pending","rate-limited","failed","silenced"],Jh=n.Optional(n.Object({maxMessages:n.Integer({minimum:1,description:"Maximum number of messages allowed during the rate-limiting window"}),minutes:n.Integer({minimum:1,description:"Length of the rate-limiting window in minutes"})},{description:"Per-target rate-limiting configuration"})),Xh=n.Optional(n.Object({mode:n.Literal("each"),renotificationStates:n.Array(n.Enum(["alert","alert_no_data"]),{description:"Alert states that will trigger a renotification"}),renotifyIntervalMinutes:n.Integer({minimum:1,description:"Minimum number of minutes to wait before renotifying"})},{description:"Configuration for repeating notifications over time"})),MN=n.Object({id:c({description:"Identifier of the notification target"}),rateLimit:Jh,config:$("type",[n.Object({type:n.Literal("slack"),channel:c({description:"Slack channel ID that receives the notification"}),integrationId:c({description:"Slack workspace ID that receives the notification"})},{$id:"RuleTargetInputSlack"}),n.Object({type:n.Literal("incident-io"),integrationId:c({description:"Identifier of the incident.io integration to use"})},{$id:"RuleTargetInputIncidentIo"}),n.Object({type:n.Literal("pagerduty"),integrationId:c({description:"Identifier of the PagerDuty integration to use"})},{$id:"RuleTargetInputPagerDuty"}),n.Object({type:n.Literal("email"),addresses:n.Array(c({type:"email"}),{minItems:1,maxItems:20,description:"Email addresses that will receive the alert"})},{$id:"RuleTargetInputEmail"}),n.Object({type:n.Literal("grafana-irm"),integrationId:c({description:"Identifier of the Grafana IRM integration to use"})},{$id:"RuleTargetInputGrafanaIrm"}),n.Object({type:n.Literal("microsoft-teams"),integrationId:c({description:"Identifier of the Microsoft Teams integration to use"})},{$id:"RuleTargetInputMicrosoftTeams"}),n.Object({type:n.Literal("webhook"),integrationId:c({description:"Identifier of the webhook integration to use"})},{$id:"RuleTargetInputWebhook"}),n.Object({type:n.Literal("servicenow"),integrationId:c({description:"Identifier of the ServiceNow integration to use"})},{$id:"RuleTargetInputServiceNow"}),n.Object({type:n.Literal("google-chat"),integrationId:c({description:"Identifier of the Google Chat integration to use"})},{$id:"RuleTargetInputGoogleChat"}),n.Object({type:n.Literal("squadcast"),integrationId:c({description:"Identifier of the Squadcast integration to use"})},{$id:"RuleTargetInputSquadcast"})],{description:"Configuration describing how the alert should be delivered"}),renotifyConfig:Xh}),wN=n.Object({id:n.String({description:"Identifier of the notification target"}),rateLimit:Jh,renotifyConfig:Xh,config:$("type",[n.Object({type:n.Literal("slack"),channel:n.String({description:"Slack channel ID that receives the notification"}),integrationId:n.String({description:"Slack workspace ID that receives the notification"}),integrationName:n.String({description:"Human readable name of the Slack integration"})},{$id:"RuleTargetConfigSlack"}),n.Object({type:n.Literal("incident-io"),integrationId:n.String({description:"Identifier of the incident.io integration to use"}),integrationName:n.String({description:"Human readable name of the incident.io integration"})},{$id:"RuleTargetConfigIncidentIo"}),n.Object({type:n.Literal("email"),addresses:n.Array(n.String({format:"email"}),{description:"Email addresses that will receive the alert"})},{$id:"RuleTargetConfigEmail"}),n.Object({type:n.Literal("grafana-irm"),integrationId:n.String({description:"Identifier of the Grafana IRM integration to use"}),integrationName:n.String({description:"Human readable name of the Grafana IRM integration"})},{$id:"RuleTargetConfigGrafanaIrm"}),n.Object({type:n.Literal("pagerduty"),integrationId:n.String({description:"Identifier of the PagerDuty integration to use"}),integrationName:n.String({description:"Human readable name of the PagerDuty integration"})},{$id:"RuleTargetConfigPagerDuty"}),n.Object({type:n.Literal("microsoft-teams"),integrationId:n.String({description:"Identifier of the Microsoft Teams integration to use"}),integrationName:n.String({description:"Human readable name of the Microsoft Teams integration"})},{$id:"RuleTargetConfigMicrosoftTeams"}),n.Object({type:n.Literal("webhook"),integrationId:n.String({description:"Identifier of the webhook integration to use"}),integrationName:n.String({description:"Human readable name of the webhook integration"})},{$id:"RuleTargetConfigWebhook"}),n.Object({type:n.Literal("servicenow"),integrationId:n.String({description:"Identifier of the ServiceNow integration to use"}),integrationName:n.String({description:"Human readable name of the ServiceNow integration"})},{$id:"RuleTargetConfigServiceNow"}),n.Object({type:n.Literal("google-chat"),integrationId:n.String({description:"Identifier of the Google Chat integration to use"}),integrationName:n.String({description:"Human readable name of the Google Chat integration"})},{$id:"RuleTargetConfigGoogleChat"}),n.Object({type:n.Literal("squadcast"),integrationId:n.String({description:"Identifier of the Squadcast integration to use"}),integrationName:n.String({description:"Human readable name of the Squadcast integration"})},{$id:"RuleTargetConfigSquadcast"})],{description:"Configuration describing how the alert was delivered"})}),ep=$("type",[n.Object({type:n.Literal("specific-teams"),teams:n.Array(c(),{minItems:1,maxItems:100,description:"Team IDs to select"})}),n.Object({type:n.Literal("all-teams")}),n.Object({type:n.Literal("all-public-teams")})]),li=n.Object({name:c({description:"Display name of the notification rule"}),queryString:n.Optional(c({type:"tags-query",description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:ep,prioritiesFilter:n.Array(n.Enum(jt),{maxItems:jt.length,description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:n.Array(n.Enum(tn),{maxItems:tn.length,description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:n.Optional(n.Array(c({allowEmpty:!1}),{description:"Cluster IDs that can trigger a notification"})),owner:c({allowEmpty:!1,description:"Team ID that owns and manages the rule"}),tags:be,isActive:n.Boolean(),targets:n.Array(MN,{minItems:1,description:"Notification targets that can receive notifications when the rule matches"})}),tp=$("type",[n.Object({type:n.Literal("specific-teams"),teams:n.Array(n.String(),{description:"Team IDs to select"})}),n.Object({type:n.Literal("all-teams")}),n.Object({type:n.Literal("all-public-teams")})]),Xn=n.Object({id:n.String({description:"Identifier of the notification rule"}),name:n.String({description:"Display name of the notification rule"}),queryString:n.Optional(n.String({description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:tp,prioritiesFilter:n.Array(n.Enum(jt),{description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:n.Array(n.Enum(tn),{description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:n.Array(n.String(),{description:"Cluster IDs that can trigger a notification"}),owner:n.String({description:"Team ID that owns and manages the rule"}),createdAt:b(),updatedAt:b(),isActive:n.Boolean(),tags:be,targets:n.Array(wN,{description:"Notification targets that can receive notifications when the rule matches"}),creator:n.Optional(Oe),updater:n.Optional(Oe)}),Gue=d({tags:["notification-rules"],url:rn,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(Xn)}),vue=d({tags:["notification-rules"],url:`${rn}/:id`,params:n.Object({id:c()}),method:"GET",response:Xn}),jue=d({tags:["notification-rules"],url:rn,method:"POST",body:li,response:Xn}),Fue=d({tags:["notification-rules"],url:`${rn}/:id`,method:"PUT",params:n.Object({id:c()}),body:li,response:Xn}),que=d({tags:["notification-rules"],url:`${rn}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),Bue=d({tags:["notification-integrations"],url:`${Zh}/start`,method:"POST",response:n.Object({redirectUrl:n.String()})}),$N=n.Object({id:n.String(),name:n.String(),type:n.Enum(["slack","incident-io","grafana-irm","pagerduty","microsoft-teams","webhook","servicenow","google-chat","squadcast"]),createdAt:b(),ruleCount:n.Number(),creator:n.Optional(Oe)}),Hue=d({tags:["notification-integrations"],url:`${rn}/integrations`,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array($N)}),Kue=d({tags:["notification-integrations"],url:`${Zh}/callback`,method:"GET",query:n.Object({code:c()}),response:n.Object({success:n.Boolean()})}),rp=["POST","PUT"],DN=n.Record(n.String(),n.String()),GN=n.Record(n.String(),n.Unknown()),vN=n.Record(n.String(),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))])),jN=$("type",[n.Object({type:n.Literal("json"),value:GN}),n.Object({type:n.Literal("form"),value:vN})]),FN=n.Object({ok:n.String(),alert:n.String()}),np=n.Object({id:n.String(),name:n.String(),setting:$("type",[n.Object({type:n.Literal("incident-io"),alertSourceConfigId:n.String(),tokenLastChars:n.String()}),n.Object({type:n.Literal("grafana-irm"),urlLastChars:n.String()}),n.Object({type:n.Literal("pagerduty"),integrationKeyLastChars:n.String()}),n.Object({type:n.Literal("microsoft-teams"),webhookUrlLastChars:n.String()}),n.Object({type:n.Literal("webhook"),urlLastChars:n.String(),method:n.Enum(rp),authentication:$("type",[n.Object({type:n.Literal("bearer"),tokenLastChars:n.String()}),n.Object({type:n.Literal("basic"),username:n.String(),passwordLastChars:n.String()}),n.Object({type:n.Literal("custom-header"),key:n.String(),valueLastChars:n.String()}),n.Object({type:n.Literal("none")})]),customHeaders:n.Optional(DN),payloadTemplate:jN,eventNameMapping:n.Optional(FN)}),n.Object({type:n.Literal("servicenow"),instanceName:n.String(),username:n.String(),passwordLastChars:n.String()}),n.Object({type:n.Literal("google-chat"),webhookUrlLastChars:n.String()}),n.Object({type:n.Literal("squadcast"),webhookUrlLastChars:n.String()})]),tags:be}),qN=n.Object({type:n.Literal("webhook"),url:c({type:"uri"}),method:n.Enum(rp),authentication:$("type",[n.Object({type:n.Literal("bearer"),token:c({allowEmpty:!1})}),n.Object({type:n.Literal("basic"),username:c({allowEmpty:!1}),password:c({allowEmpty:!1})}),n.Object({type:n.Literal("custom-header"),key:c({allowEmpty:!1}),value:c({allowEmpty:!1})}),n.Object({type:n.Literal("none")})]),customHeaders:n.Record(c({allowEmpty:!1}),c()),payloadTemplate:$("type",[n.Object({type:n.Literal("json"),value:n.Record(c({allowEmpty:!1}),n.Unknown())}),n.Object({type:n.Literal("form"),value:n.Record(c({allowEmpty:!1}),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))]))})]),eventNameMapping:n.Optional(n.Object({ok:c({allowEmpty:!1}),alert:c({allowEmpty:!1})}))}),eT=n.Object({type:n.Literal("incident-io"),alertSourceConfigId:c(),token:c()}),tT=n.Object({type:n.Literal("grafana-irm"),url:c({type:"uri"})}),rT=n.Object({type:n.Literal("pagerduty"),integrationKey:c()}),nT=n.Object({type:n.Literal("microsoft-teams"),webhookUrl:c({type:"uri"})}),BN=n.Object({type:n.Literal("servicenow"),instanceName:c({allowEmpty:!1,description:'Instance name of the ServiceNow instance. This corresponds to the subdomain part of the instance URL, like "my-instance" in "my-instance.service-now.com"'}),username:c({allowEmpty:!1}),password:c({allowEmpty:!1})}),HN=n.Object({type:n.Literal("google-chat"),webhookUrl:c({type:"uri"})}),KN=n.Object({type:n.Literal("squadcast"),webhookUrl:c({type:"uri"})}),zN=n.Object({name:c(),setting:$("type",[eT,tT,rT,nT,qN,BN,HN,KN]),tags:be}),YN=n.Object({type:n.Literal("webhook"),url:n.Optional(c({type:"uri"})),method:n.Optional(n.Enum(rp)),authentication:n.Optional($("type",[n.Object({type:n.Literal("bearer"),token:n.Optional(c({allowEmpty:!1}))}),n.Object({type:n.Literal("basic"),username:n.Optional(c({allowEmpty:!1})),password:n.Optional(c({allowEmpty:!1}))}),n.Object({type:n.Literal("custom-header"),key:n.Optional(c({allowEmpty:!1})),value:n.Optional(c({allowEmpty:!1}))}),n.Object({type:n.Literal("none")})])),customHeaders:n.Optional(n.Record(c({allowEmpty:!1}),c())),payloadTemplate:n.Optional($("type",[n.Object({type:n.Literal("json"),value:n.Record(c({allowEmpty:!1}),n.Unknown())}),n.Object({type:n.Literal("form"),value:n.Record(c({allowEmpty:!1}),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))]))})])),eventNameMapping:n.Optional(n.Object({ok:n.Optional(c({allowEmpty:!1})),alert:n.Optional(c({allowEmpty:!1}))}))}),VN=n.Object({type:n.Literal("servicenow"),instanceName:n.Optional(c({allowEmpty:!1})),username:n.Optional(c({allowEmpty:!1})),password:n.Optional(c({allowEmpty:!1}))}),WN=n.Object({type:n.Literal("google-chat"),webhookUrl:c({type:"uri"})}),QN=n.Object({type:n.Literal("squadcast"),webhookUrl:c({type:"uri"})}),ZN=n.Object({name:n.Optional(c()),setting:n.Optional($("type",[eT,tT,rT,nT,YN,VN,WN,QN]))}),zue=d({tags:["notification-integrations"],url:za,method:"POST",body:zN,response:np}),Yue=d({tags:["notification-integrations"],url:`${za}/:id`,method:"GET",params:n.Object({id:c()}),response:np}),Vue=d({tags:["notification-integrations"],url:`${za}/:id`,method:"PUT",params:n.Object({id:c()}),body:ZN,response:np}),Wue=d({tags:["notification-integrations"],url:`${za}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),Que=d({tags:["notification-rules"],url:`${Rt}/:id/notifications`,method:"GET",params:n.Object({id:c()}),query:n.Optional(n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number())})),response:n.Object({notifications:n.Array(n.Object({id:n.String(),monitorId:n.String(),monitorResultId:n.String(),ruleId:n.Optional(n.String()),targetId:n.Optional(n.String()),status:n.Enum(LN),tryCount:n.Number(),nextTryAt:b(),createdAt:b(),updatedAt:b(),sentAt:n.Optional(b())})),isTruncated:n.Boolean()})}),JN=["slack","incident-io","pagerduty","email","grafana-irm","microsoft-teams","webhook","servicenow","google-chat","squadcast"],Zue=d({tags:["notification-rules"],url:`${rn}/test`,method:"POST",body:n.Object({notificationRule:li,targetIds:n.Optional(n.Array(c({allowEmpty:!1}),{description:"Target IDs to test specific targets",minItems:1,maxItems:10}))}),response:$("success",[n.Object({success:n.Literal(!1),overallMessage:n.String({description:"Message when there is an overall error"})}),n.Object({success:n.Boolean(),results:n.Array(n.Object({targetId:n.String({description:"The ID of the target that was tested"}),targetType:n.Enum(JN,{description:"The type of the target (e.g., slack, webhook)"}),status:n.Enum(["success","failure"],{description:"Whether the test notification was sent successfully"}),message:n.Optional(n.String({description:"Message if the notification failed for this specific target"}))}))})])});var di=`/${"v1"}/notification-rules`,fi=n.Pick(Xn,["id","name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","isActive","tags","targets"],{$id:"Rule",description:"Rules to trigger notifications to targets based on alert events"}),XN={id:"123-456-abc",name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(fi,{examples:[XN]});var oT=d({description:"Retrieve all notification rules",operationId:"listNotificationRules",tags:["notification-rules"],url:di,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(fi)}),iT=d({description:"Retrieve a notification rule by its id",operationId:"getNotificationRule",tags:["notification-rules"],url:`${di}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:fi}),op=n.Pick(li,["name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","tags","isActive","targets"]),eL={name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(op,{examples:[eL]});var aT=d({description:"Create a new notification rule",operationId:"createNotificationRule",tags:["notification-rules"],url:di,method:"POST",body:op,response:fi}),sT=d({description:"Update a notification rule by its id",operationId:"updateNotificationRule",tags:["notification-rules"],url:`${di}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:op,response:fi}),tL=n.Object({id:c({allowEmpty:!1,description:"The notification rule ID to delete"})}),mT=d({description:"Delete a notification rule by its id",operationId:"deleteNotificationRule",tags:["notification-rules"],url:`${di}/:id`,method:"DELETE",params:tL,response:H});var eo=`${ui}/silences`,pT=n.Union([n.Literal("monday"),n.Literal("tuesday"),n.Literal("wednesday"),n.Literal("thursday"),n.Literal("friday"),n.Literal("saturday"),n.Literal("sunday")]),rL=n.Partial(n.Record(pT,n.Array(n.Object({startTime:n.String({format:Im}),endTime:n.String({format:Im})},{title:"SilenceTimeRange"}),{minItems:1,description:"Time ranges for this day"}),{description:"Weekly schedule mapping day of week to time ranges"})),nL=n.Partial(n.Record(pT,n.Array(n.Object({startTime:n.String(),endTime:n.String()},{title:"SilenceTimeRange"}),{description:"Time ranges for this day"}),{description:"Weekly schedule mapping day of week to time ranges"})),Ya='IANA timezone identifier (e.g. "America/New_York"). Defaults to UTC if omitted.',cT="One-time silence schedule with specific start and end times",uT="Recurring weekly silence schedule",oL=$("type",[n.Object({type:n.Literal("one-time"),startTime:n.String({format:Em}),endTime:n.String({format:Em}),timeZone:n.Optional(n.String({format:ym,description:Ya}))},{$id:"InputSilenceScheduleOneTime",description:cT}),n.Object({type:n.Literal("recurring"),weeklySchedule:rL,timeZone:n.Optional(n.String({format:ym,description:Ya}))},{$id:"InputSilenceScheduleRecurring",description:uT})],{description:"Schedule defining when the silence is active"}),iL=$("type",[n.Object({type:n.Literal("one-time"),startTime:n.String(),endTime:n.String(),timeZone:n.Optional(n.String({description:Ya}))},{$id:"OutputSilenceScheduleOneTime",description:cT}),n.Object({type:n.Literal("recurring"),weeklySchedule:nL,timeZone:n.Optional(n.String({description:Ya}))},{$id:"OutputSilenceScheduleRecurring",description:uT})],{description:"Schedule defining when the silence is active"}),Va=n.Object({name:c({description:"Display name of the silence"}),reason:c({allowEmpty:!1,description:"Reason for the silence"}),owner:c({allowEmpty:!1,description:"Team ID that owns and manages the silence"}),tags:be,isActive:n.Boolean({description:"Whether the silence is currently enabled"}),schedule:oL,notificationRuleIds:n.Optional(n.Array(c(),{description:"Notification rule IDs this silence applies to"})),queryString:n.Optional(c({type:"tags-query",description:"Query string to filter which alerts this silence applies to"})),teamsFilter:ep,prioritiesFilter:n.Array(n.Enum(jt),{maxItems:jt.length,description:"Monitor priorities to filter which alerts this silence applies to"}),transitionTypesFilter:n.Array(n.Enum(tn),{maxItems:tn.length,description:"Transition types to filter which alerts this silence applies to"})}),to=n.Object({id:n.String({description:"Unique identifier of the silence"}),name:n.String({description:"Display name of the silence"}),reason:n.String({description:"Reason for the silence"}),owner:n.String({description:"Team ID that owns and manages the silence"}),tags:be,isActive:n.Boolean({description:"Whether the silence is currently enabled"}),schedule:iL,notificationRuleIds:n.Optional(n.Array(n.String(),{description:"Notification rule IDs this silence applies to"})),queryString:n.Optional(n.String({description:"Query string filtering which alerts this silence applies to"})),teamsFilter:tp,prioritiesFilter:n.Array(n.Enum(jt),{description:"Monitor priorities filtering which alerts this silence applies to"}),transitionTypesFilter:n.Array(n.Enum(tn),{description:"Transition types filtering which alerts this silence applies to"}),createdAt:b(),updatedAt:b(),creator:n.Optional(Oe),updater:n.Optional(Oe)}),gle=d({tags:["notification-silences"],url:eo,method:"GET",response:n.Array(to)}),yle=d({tags:["notification-silences"],url:`${eo}/:id`,params:n.Object({id:c()}),method:"GET",response:to}),Ile=d({tags:["notification-silences"],url:eo,method:"POST",body:Va,response:to}),Ele=d({tags:["notification-silences"],url:`${eo}/:id`,method:"PUT",params:n.Object({id:c()}),body:Va,response:to}),hle=d({tags:["notification-silences"],url:`${eo}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),Tle=d({tags:["notification-silences"],url:`${eo}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(c())}),response:n.Object({})});var gi=`/${"v1"}/notification-silences`,Wa=n.Pick(to,["id","name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"],{$id:"NotificationSilence",description:"Silences to suppress notifications based on schedules and filters"}),lT=d({description:"Retrieve all notification silences",operationId:"listNotificationSilences",tags:["notification-silences"],url:gi,method:"GET",response:n.Array(Wa)}),dT=d({description:"Retrieve a notification silence by its id",operationId:"getNotificationSilence",tags:["notification-silences"],url:`${gi}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:Wa}),fT=n.Pick(Va,["name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"]),gT=d({description:"Create a new notification silence",operationId:"createNotificationSilence",tags:["notification-silences"],url:gi,method:"POST",body:fT,response:Wa}),yT=d({description:"Update a notification silence by its id",operationId:"updateNotificationSilence",tags:["notification-silences"],url:`${gi}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:fT,response:Wa}),aL=n.Object({id:c({allowEmpty:!1,description:"The notification silence ID to delete"})}),IT=d({description:"Delete a notification silence by its id",operationId:"deleteNotificationSilence",tags:["notification-silences"],url:`${gi}/:id`,method:"DELETE",params:aL,response:H});var sL=["passed","failed","ignored"],mL=n.Enum(sL),ET=["unrouted-logs","team-has-route","service-name-present","no-orphan-spans","metric-unit-consistency","host-name-present","no-casing-drift","no-duplicate-attr-values","no-debug-logs-in-prod","no-multiline-logs","no-empty-dashboards","monitor-has-notification","no-future-dated-logs","metric-usage","no-stale-dashboards","no-unused-dashboards","no-orphan-monitors","no-flapping-monitors","no-noisy-group-monitors","no-long-alert-monitors","no-redundant-monitors","k8s-recommended-attributes","k8s-recommended-metrics","k8s-recommended-change-events"],pL=n.Enum(ET),cL=["log","metric","resource","span"],uL=["team","global"],ip=n.Object({key:n.Enum(ET),title:n.String(),summary:n.String(),rationale:n.String(),objectType:n.Enum(cL),category:n.Enum(["hygiene","routing","integrity","consistency","redundancy","cost"]),impact:n.Object({label:n.Enum(["critical","important","normal"]),weight:n.Number({minimum:0})}),recommendation:n.String(),scope:n.Optional(n.Enum(uL))}),ap=n.Intersect([ip,n.Object({status:mL,normalizedScore:n.Number({minimum:0,maximum:1}),details:n.Optional(n.Record(n.String(),n.Unknown())),recommendation:n.Optional(n.String()),examples:n.Optional(n.Array(n.Object({type:n.String(),label:n.String(),link:n.Object({to:n.String(),search:n.Optional(n.Unknown()),params:n.Optional(n.Unknown())})})))})]),lL=n.Object({teamId:n.String(),teamName:n.String(),teamWeight:n.Number({minimum:0}),score:n.Number({minimum:0,maximum:1}),weightedScore:n.Number({minimum:0}),totalWeight:n.Number({minimum:0}),ruleResults:n.Array(ap)}),dL=n.Object({score:n.Optional(n.Number({minimum:0,maximum:1})),ruleResults:n.Array(ap)}),Qa=n.Object({generatedAt:n.String({format:"date-time"}),overallScore:n.Optional(n.Number({minimum:0,maximum:1})),rules:n.Array(ip),teamResults:n.Array(lL),globalResults:n.Optional(dL)}),Nle=d({tags:["quality-reports"],url:"/v0/quality-reports",method:"POST",response:Qa}),Lle=d({tags:["quality-reports"],url:"/v0/quality-reports/latest",method:"GET",query:n.Object({clusterId:n.Optional(c({allowEmpty:!1}))}),response:n.Object({report:n.Optional(Qa)})}),Mle=d({tags:["quality-reports"],url:"/v0/quality-reports/preview",method:"POST",body:n.Object({ruleKey:pL,teamId:c(),lookbackMinutes:n.Optional(n.Integer({minimum:1,maximum:60})),clusterId:n.Optional(c({allowEmpty:!1}))}),response:n.Object({rule:ip,result:ap,teamId:n.String(),teamName:n.String()})});var fL=`/${"v1"}/quality-reports`,hT=n.Pick(Qa,["generatedAt","overallScore","rules","teamResults","globalResults"],{$id:"QualityReport",description:"Aggregated quality report with per-team rule evaluations and scores"}),gL={generatedAt:"2026-02-26T12:00:00.000Z",overallScore:.85,rules:[{key:"team-has-route",title:"\u22651 route per team",summary:"Each team owns at least one active route.",rationale:"Provides clear governance boundaries for routing and enrichment.",objectType:"resource",category:"routing",impact:{label:"important",weight:2},recommendation:"Ensure every team manages a dedicated route scoped to its context.team value."}],teamResults:[{teamId:"abc-123-def",teamName:"platform",teamWeight:1,score:.85,weightedScore:.85,totalWeight:2,ruleResults:[{key:"team-has-route",title:"\u22651 route per team",summary:"Each team owns at least one active route.",rationale:"Provides clear governance boundaries for routing and enrichment.",objectType:"resource",category:"routing",impact:{label:"important",weight:2},recommendation:"Ensure every team manages a dedicated route scoped to its context.team value.",status:"passed",normalizedScore:1}]}]};Object.assign(hT,{examples:[gL]});var yL=n.Object({clusterId:n.Optional(c({allowEmpty:!1}))}),TT=d({description:"Retrieve the latest quality report",operationId:"getLatestQualityReport",tags:["quality-reports"],url:`${fL}/latest`,method:"GET",query:yL,response:n.Object({report:n.Optional(hT)})});var yi="/v0/admin-center";var Ft=`${yi}/retention-policies`,sp=["1-day","3-days","15-days","30-days","60-days","90-days","120-days","180-days","360-days","10-years"],Jt=n.Object({id:n.String(),env:n.Optional(n.String()),teamId:n.Optional(n.String()),dataSource:n.Enum(St),durationDays:n.Enum(sp),isEnabled:n.Boolean(),createdAt:b(),updatedAt:b()}),Za=n.Object({env:n.Optional(c()),teamId:n.Optional(c()),dataSource:n.Enum(St),durationDays:n.Enum(sp),isEnabled:n.Boolean()}),xT=n.Array(n.Object({env:c(),dataSource:n.Enum(St),durationDays:n.Enum([...sp,"default"]),isEnabled:n.Boolean()})),_T=n.Object({inserted:n.Array(Jt),updated:n.Array(Jt),deleted:n.Array(Jt)}),Wle=d({tags:["retention-policies"],url:Ft,method:"POST",body:Za,response:Jt}),Qle=d({tags:["retention-policies"],url:Ft,method:"GET",response:n.Array(Jt)}),Zle=d({tags:["retention-policies"],url:`${Ft}/:id`,method:"GET",params:n.Object({id:c()}),response:Jt}),Jle=d({tags:["retention-policies"],url:`${Ft}/:id`,method:"PUT",params:n.Object({id:c()}),body:Za,response:Jt}),Xle=d({tags:["retention-policies"],url:`${Ft}/bulk-update`,method:"POST",body:xT,response:_T}),ede=d({tags:["retention-policies"],url:`${Ft}/bulk-update-for-team`,method:"POST",body:n.Object({teamId:c(),policies:xT}),response:_T}),tde=d({tags:["retention-policies"],url:`${Ft}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),Ii=["past-24-hours","past-7-days","past-30-days"],rde=d({tags:["retention-policies"],url:`${Ft}/requested-history-percentile/:teamId`,method:"POST",params:n.Object({teamId:c()}),body:n.Object({percentile:n.Number({minimum:0,maximum:1}),observationWindow:n.Enum(Ii),dataSource:n.Enum(St)}),response:n.Object({percentile:n.Number({minimum:0,maximum:1}),observationWindow:n.Enum(Ii),dataSource:n.Enum(St),teamId:n.String(),requestedHistoryDays:n.Number()})}),IL=["1-day","3-days","7-days","1-month","6-months","more-than-6-months"];var EL=n.Array(n.Object({bucket:n.Enum(IL),count:n.Number()})),nde=d({tags:["retention-policies"],url:`${Ft}/requested-history-histogram/:teamId`,method:"POST",params:n.Object({teamId:c()}),body:n.Object({observationWindow:n.Enum(Ii),dataSource:n.Enum(St)}),response:n.Object({observationWindow:n.Enum(Ii),dataSource:n.Enum(St),teamId:n.String(),histogram:EL})}),ode=d({tags:["retention-policies"],url:`${Ft}/top-teams-with-retention-surplus`,method:"POST",body:n.Object({dataSource:n.Enum(St),observationWindow:n.Enum(Ii),percentile:n.Number({minimum:0,maximum:1}),topN:n.Optional(n.Number({minimum:1,maximum:20}))}),response:n.Array(n.Object({teamId:n.String(),retentionSurplusDays:n.Number()}))});var Ei=`/${"v1"}/retention-policies`,hi=n.Pick(Jt,["id","env","teamId","dataSource","durationDays","isEnabled"],{$id:"RetentionPolicy",description:"Data retention rule for a data source within an environment"}),hL={id:"123-456-abc",env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:"30-days",isEnabled:!0};Object.assign(hi,{examples:[hL]});var AT=d({description:"Retrieve all retention policies",operationId:"listRetentionPolicies",tags:["retention-policies"],url:Ei,method:"GET",response:n.Array(hi)}),bT=d({description:"Retrieve a retention policy by its id",operationId:"getRetentionPolicy",tags:["retention-policies"],url:`${Ei}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:hi}),mp=n.Pick(Za,["env","teamId","dataSource","durationDays","isEnabled"]),TL={env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:"30-days",isEnabled:!0};Object.assign(mp,{examples:[TL]});var OT=d({description:"Create a new retention policy",operationId:"createRetentionPolicy",tags:["retention-policies"],url:Ei,method:"POST",body:mp,response:hi}),ST=d({description:"Update a retention policy by its id",operationId:"updateRetentionPolicy",tags:["retention-policies"],url:`${Ei}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:mp,response:hi}),RT=d({description:"Delete a retention policy by its id",operationId:"deleteRetentionPolicy",tags:["retention-policies"],url:`${Ei}/:id`,method:"DELETE",params:n.Object({id:c({allowEmpty:!1})}),response:H});var Ja={id:c({allowEmpty:!1,description:"Identifier of the processor"}),description:n.Optional(c({type:"long"})),tags:be,updatedAt:n.Optional(b())},xL={...Ja,type:n.Literal("creator")},_L=$("subtype",[n.Object({targetAttribute:c({allowEmpty:!1,description:"Attribute that will receive the formatted value"}),formatString:c({allowEmpty:!1,type:"long",description:"Template string used to build the target attribute value"}),overrideTarget:n.Optional(n.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:n.Literal("format-string"),replaceMissingByEmpty:n.Optional(n.Boolean())},{$id:"ProcessorParamsCreatorFormatString"}),n.Object({targetAttribute:c({allowEmpty:!1,description:"Attribute that will receive the computed value"}),formula:c({allowEmpty:!1,type:"long",description:"Mathematical formula evaluated to populate the target attribute"}),overrideTarget:n.Optional(n.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:n.Literal("math-formula"),replaceMissingBy0:n.Optional(n.Boolean())},{$id:"ProcessorParamsCreatorMathFormula"})]),AL=n.Object({...xL,params:_L}),bL={...Ja,type:n.Literal("mapper")},OL=$("subtype",[n.Object({attributes:n.Array(n.Object({originAttribute:c({allowEmpty:!1,description:"Attribute name to map to the target attribute"}),keepOrigin:n.Optional(n.Boolean({description:"Preserve the source attribute after mapping (defaults to false)"})),overrideTarget:n.Optional(n.Boolean({description:"Overwrite the target attribute when it already exists (defaults to true)"})),targetAttribute:c({allowEmpty:!1,description:"Attribute name that will receive the mapped value"})}),{minItems:1,maxItems:50,description:"Mappings that map individual attributes to new targets"}),subtype:n.Literal("map-attributes")},{$id:"ProcessorParamsMapperMapAttributes"}),n.Object({attributeName:c({allowEmpty:!1,description:"Attribute whose value will determine the log level"}),subtype:n.Literal("map-level")},{$id:"ProcessorParamsMapperMapLevel"}),n.Object({attributeName:c({allowEmpty:!1,description:"Attribute whose value will determine the log timestamp"}),subtype:n.Literal("map-timestamp")},{$id:"ProcessorParamsMapperMapTimestamp"})]),SL=n.Object({...bL,params:OL}),RL={...Ja,type:n.Literal("parse-attribute")},CL=5,PL=$("subtype",[n.Object({attributeName:c({allowEmpty:!1,description:"Attribute whose value will be parsed with Grok rules"}),rules:n.Array(c({allowEmpty:!1,type:"long",description:"Grok rule applied to parse text"}),{minItems:1,maxItems:5,description:"Ordered Grok rules evaluated until one matches"}),samples:n.Optional(n.Array(c({type:"long"}),{maxItems:CL,description:"Example log lines for validation"})),subtype:n.Literal("grok")}),n.Object({sourceAttribute:c({allowEmpty:!1,description:"Attribute containing the URL to parse"}),subtype:n.Literal("url")}),n.Object({sourceAttribute:c({allowEmpty:!1,description:"Attribute containing the user agent string to parse"}),subtype:n.Literal("user-agent")}),n.Object({sourceAttribute:c({allowEmpty:!1,description:"Attribute containing the key/value string segment to parse"}),targetAttribute:c({description:"Attribute prefix where extracted key/value pairs will be written"}),keyValueSplitter:c({allowEmpty:!1,description:"Delimiter separating keys from values in the source string"}),pairsSplitter:c({allowEmpty:!0,description:"Delimiter separating each key/value pair. Will default to whitespace if not set."}),acceptStandaloneKey:n.Boolean(),subtype:n.Literal("key-value")})]),kL=n.Object({...RL,params:PL}),UL=11,pp=n.Cyclic({Processor:n.Union([SL,kL,AL,n.Object({...Ja,params:n.Object({items:n.Array(n.Object({query:c({type:"tsuga-query",description:"Query that determines whether logs enter this branch"}),processors:n.Array(n.Ref("Processor"),{maxItems:50,description:"Processors executed when the branch query matches"})}),{minItems:2,maxItems:UL,description:"Conditional branches evaluated in order before falling back to the default"})}),type:n.Literal("split")})])},"Processor",{description:"Processing step executed sequentially on route logs"});var NL="/v0/logs",Cr=`${NL}/routes`,nn=n.Object({id:n.String({description:"Identifier of the log route"}),name:n.String({description:"Human readable name shown for the route"}),description:n.Optional(n.String()),isEnabled:n.Boolean(),query:n.String({description:"Query that selects which logs should enter the route"}),rank:n.Number(),tags:be,owner:n.String({description:"Team ID owning and managing the route"}),processors:n.Array(pp,{description:"Ordered processors applied to logs that match the route"}),creator:n.Optional(Oe),updater:n.Optional(Oe),updatedAt:b(),createdAt:b(),assetUpdatedAt:b()},{title:"Route"}),Ti=n.Object({name:c({allowEmpty:!1,description:"Human readable name shown for the route"}),description:n.Optional(c({type:"long"})),isEnabled:n.Boolean(),query:c({type:"tsuga-query",description:"Query that selects which logs should enter the route"}),tags:be,owner:c({allowEmpty:!1,description:"Team ID owning and managing the route"}),processors:n.Array(pp,{maxItems:50,description:"Ordered processors applied to logs that match the route"})}),Ode=d({tags:["routes"],url:Cr,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(nn)}),Sde=d({tags:["routes"],url:`${Cr}/:id`,params:n.Object({id:c()}),method:"GET",response:nn}),Rde=d({tags:["routes"],url:Cr,method:"POST",body:Ti,response:nn}),Cde=d({tags:["routes"],url:`${Cr}/:id`,method:"PUT",body:Ti,params:n.Object({id:c()}),response:nn}),Pde=d({tags:["routes"],url:`${Cr}/:id/clone`,method:"POST",params:n.Object({id:c()}),body:Ti,response:nn}),kde=d({tags:["routes"],url:`${Cr}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),Ude=d({tags:["routes"],url:`${Cr}/:id/modify-ranking`,method:"PUT",params:n.Object({id:c()}),body:n.Object({rank:n.Number()}),response:n.Object({})}),Nde=d({tags:["routes"],url:`${Cr}/:id/enable`,method:"PUT",params:n.Object({id:c()}),body:n.Object({enable:n.Boolean()}),response:n.Object({})});var xi=`/${"v1"}/routes`,_i=n.Pick(nn,["id","name","description","isEnabled","query","tags","owner","processors"],{$id:"Route",description:"Log route allowing to standardize logs and enrich them with additional data"}),LL={id:"123-456-abc",name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(_i,{examples:[LL]});var CT=d({description:"Retrieve all routes",operationId:"listRoutes",tags:["routes"],url:xi,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(_i)}),PT=d({description:"Retrieve a route by its id",operationId:"getRoute",tags:["routes"],url:`${xi}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:_i}),cp=n.Pick(Ti,["name","description","isEnabled","query","tags","owner","processors"]),ML={name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(cp,{examples:[ML]});var kT=d({description:"Create a new route",operationId:"createRoute",tags:["routes"],url:xi,method:"POST",body:cp,response:_i}),UT=d({description:"Update a route by its id",operationId:"updateRoute",tags:["routes"],url:`${xi}/:id`,method:"PUT",body:cp,params:n.Object({id:c({allowEmpty:!1})}),response:_i}),NT=d({description:"Delete a route by its id",operationId:"deleteRoute",tags:["routes"],url:`${xi}/:id`,method:"DELETE",params:n.Object({id:c({allowEmpty:!1})}),response:H});var on=`${yi}/tag-policies`;var LT=["ingestion-api-key","operation-api-key","dashboard","log-route","monitor","notification-rule","notification-silence"],wL=["logs","metrics","traces"],MT=n.Array(n.Enum(LT)),wT=n.Array(n.Enum(wL)),$L=n.Union([MT,wT]),$T=n.Object({teamIds:n.Array(c(),{minItems:1,maxItems:100}),mode:n.Enum(["include","exclude"])}),DT=$("type",[n.Object({type:n.Literal("telemetry"),assetTypes:wT,shouldInsertWarning:n.Boolean(),dropSample:n.Optional(n.Number({minimum:0,maximum:100}))}),n.Object({type:n.Literal("tsuga_asset"),assetTypes:MT})]),ro=n.Object({id:n.String(),name:n.String(),description:n.Optional(n.String()),isActive:n.Boolean(),tagKey:n.String(),allowedTagValues:n.Array(n.String()),isRequired:n.Boolean(),teamScope:n.Optional($T),configuration:DT,creator:n.Optional(Oe),updater:n.Optional(Oe),owner:n.Optional(n.String()),createdAt:b(),updatedAt:b(),assetUpdatedAt:b()});var Ai=n.Object({name:c(),description:n.Optional(c()),isActive:n.Boolean(),tagKey:c({allowEmpty:!1}),allowedTagValues:n.Array(c({allowEmpty:!1}),{maxItems:1e3}),isRequired:n.Boolean(),teamScope:n.Optional($T),configuration:DT,owner:c({allowEmpty:!1})}),Yde=d({tags:["tag-policies"],url:on,method:"GET",query:n.Object({teamIds:n.Optional(n.Array(c(),{maxItems:100})),assetTypes:n.Optional($L),searchQuery:n.Optional(c())}),response:n.Array(ro)}),Vde=d({tags:["tag-policies"],url:`${on}/:id`,method:"GET",params:n.Object({id:c()}),response:ro}),Wde=d({tags:["tag-policies"],url:on,method:"POST",body:Ai,response:ro}),Qde=d({tags:["tag-policies"],url:`${on}/:id`,method:"PUT",params:n.Object({id:c()}),body:Ai,response:ro}),Zde=d({tags:["tag-policies"],url:`${on}/:id`,method:"DELETE",params:n.Object({id:c()}),response:H}),Jde=d({tags:["tag-policies"],url:`${yi}/applicable-tag-rules`,method:"GET",query:n.Object({assetType:n.Enum(LT),teamId:c()}),response:n.Array(n.Object({tagKey:n.String(),allowedTagValues:n.Array(n.String()),isRequired:n.Boolean()}))}),GT=n.Object({total:n.Number(),totalNonCompliant:n.Number(),idsNonCompliant:n.Array(c())}),vT=n.Union([n.Literal("ingestion-api-key"),n.Literal("operation-api-key"),n.Literal("dashboard"),n.Literal("log-route"),n.Literal("monitor"),n.Literal("notification-rule"),n.Literal("notification-silence")]),DL=n.Object({total:n.Number(),totalNonCompliant:n.Number(),byAssetType:n.Record(vT,GT)}),GL=n.Omit(GT,["total"]),vL=n.Object({totalNonCompliant:n.Number(),byAssetType:n.Record(vT,GL)}),jT=n.Object({totals:DL,byTeam:n.Record(n.String(),vL)}),Xde=d({tags:["tag-policies"],url:`${on}/:id/stats`,method:"GET",params:n.Object({id:c()}),response:jT}),efe=d({tags:["tag-policies"],url:`${on}/new-policy-stats`,method:"POST",body:Ai,response:jT});var bi=`/${"v1"}/tag-policies`,Xa=n.Pick(ro,["id","name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"],{$id:"TagPolicy",description:"Policy that enforces tag requirements on Tsuga assets or telemetry data"}),FT=n.Pick(Ai,["name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"]),qT=d({description:"Retrieve all tag policies",operationId:"listTagPolicies",tags:["tag-policies"],url:bi,method:"GET",response:n.Array(Xa)}),BT=d({description:"Retrieve a tag policy by its id",operationId:"getTagPolicy",tags:["tag-policies"],url:`${bi}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:Xa}),HT=d({description:"Create a new tag policy",operationId:"createTagPolicy",tags:["tag-policies"],url:bi,method:"POST",body:FT,response:Xa}),KT=d({description:"Update a tag policy by its id",operationId:"updateTagPolicy",tags:["tag-policies"],url:`${bi}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:FT,response:Xa}),zT=d({description:"Delete a tag policy by its id",operationId:"deleteTagPolicy",tags:["tag-policies"],url:`${bi}/:id`,method:"DELETE",params:n.Object({id:c({allowEmpty:!1})}),response:H});var Oi=`/${"v1"}/teams`,Si=n.Pick(Wn,["id","name","description","visibility","tags"],{$id:"Team",description:"Collection of users used to manage ownership and access to resources"}),jL={id:"abc-123-def",name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(Si,{examples:[jL]});var YT=d({description:"Retrieve all teams",operationId:"listTeams",tags:["teams"],url:Oi,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(Si)}),VT=d({description:"Retrieve a team by its id",operationId:"getTeam",tags:["teams"],url:`${Oi}/:id`,method:"GET",params:n.Object({id:c({allowEmpty:!1})}),response:Si}),up=n.Pick(qa,["name","description","visibility","tags"]),FL={name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(up,{examples:[FL]});var WT=d({description:"Create a new team",operationId:"createTeam",tags:["teams"],url:Oi,method:"POST",body:up,response:Si}),QT=d({description:"Update a team by its id",operationId:"updateTeam",tags:["teams"],url:`${Oi}/:id`,method:"PUT",params:n.Object({id:c({allowEmpty:!1})}),body:up,response:Si}),ZT=d({description:"Delete a team by its id",operationId:"deleteTeam",tags:["teams"],url:`${Oi}/:id`,method:"DELETE",params:n.Object({id:c({allowEmpty:!1})}),response:H});function qL(e){return a.IsObject(e)&&a.HasPropertyKey(e,"check")&&a.HasPropertyKey(e,"errors")&&a.IsFunction(e.check)&&a.IsFunction(e.errors)}function lp(e){return a.HasPropertyKey(e,"~guard")&&qL(e["~guard"])}function dp(e){return a.HasPropertyKey(e,"~refine")&&a.IsArray(e["~refine"])&&a.Every(e["~refine"],0,t=>a.IsObject(t)&&a.HasPropertyKey(t,"refine")&&a.HasPropertyKey(t,"message")&&a.IsFunction(t.refine)&&a.IsString(t.message))}function Xt(e){return a.IsObject(e)&&!a.IsArray(e)}function es(e){return a.IsBoolean(e)}function D(e){return Xt(e)||es(e)}function fp(e){return a.HasPropertyKey(e,"additionalItems")&&D(e.additionalItems)}function er(e){return a.HasPropertyKey(e,"additionalProperties")&&D(e.additionalProperties)}function gp(e){return a.HasPropertyKey(e,"allOf")&&a.IsArray(e.allOf)&&e.allOf.every(t=>D(t))}function Ri(e){return a.HasPropertyKey(e,"$anchor")&&a.IsString(e.$anchor)}function yp(e){return a.HasPropertyKey(e,"anyOf")&&a.IsArray(e.anyOf)&&e.anyOf.every(t=>D(t))}function Ip(e){return a.HasPropertyKey(e,"const")}function an(e){return a.HasPropertyKey(e,"contains")&&D(e.contains)}function gt(e){return a.HasPropertyKey(e,"default")}function Ep(e){return a.HasPropertyKey(e,"dependencies")&&a.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>D(t)||a.IsArray(t)&&t.every(r=>a.IsString(r)))}function hp(e){return a.HasPropertyKey(e,"dependentRequired")&&a.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>a.IsArray(t)&&t.every(r=>a.IsString(r)))}function Tp(e){return a.HasPropertyKey(e,"dependentSchemas")&&a.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>D(t))}function xp(e){return a.HasPropertyKey(e,"$dynamicAnchor")&&a.IsString(e.$dynamicAnchor)}function _p(e){return a.HasPropertyKey(e,"else")&&D(e.else)}function Ap(e){return a.HasPropertyKey(e,"enum")&&a.IsArray(e.enum)}function bp(e){return a.HasPropertyKey(e,"exclusiveMaximum")&&(a.IsNumber(e.exclusiveMaximum)||a.IsBigInt(e.exclusiveMaximum))}function tr(e){return a.HasPropertyKey(e,"exclusiveMinimum")&&(a.IsNumber(e.exclusiveMinimum)||a.IsBigInt(e.exclusiveMinimum))}function Ci(e){return a.HasPropertyKey(e,"format")&&a.IsString(e.format)}function sn(e){return a.HasPropertyKey(e,"$id")&&a.IsString(e.$id)}function Op(e){return a.HasPropertyKey(e,"if")&&D(e.if)}function no(e){return a.HasPropertyKey(e,"items")&&(D(e.items)||a.IsArray(e.items)&&e.items.every(t=>D(t)))}function Sp(e){return no(e)&&a.IsArray(e.items)}function Rp(e){return a.HasPropertyKey(e,"maximum")&&(a.IsNumber(e.maximum)||a.IsBigInt(e.maximum))}function Cp(e){return a.HasPropertyKey(e,"maxContains")&&a.IsNumber(e.maxContains)}function ts(e){return a.HasPropertyKey(e,"maxItems")&&a.IsNumber(e.maxItems)}function Pp(e){return a.HasPropertyKey(e,"maxLength")&&a.IsNumber(e.maxLength)}function kp(e){return a.HasPropertyKey(e,"maxProperties")&&a.IsNumber(e.maxProperties)}function rr(e){return a.HasPropertyKey(e,"minimum")&&(a.IsNumber(e.minimum)||a.IsBigInt(e.minimum))}function mn(e){return a.HasPropertyKey(e,"minContains")&&a.IsNumber(e.minContains)}function oo(e){return a.HasPropertyKey(e,"minItems")&&a.IsNumber(e.minItems)}function Pi(e){return a.HasPropertyKey(e,"minLength")&&a.IsNumber(e.minLength)}function ki(e){return a.HasPropertyKey(e,"minProperties")&&a.IsNumber(e.minProperties)}function Up(e){return a.HasPropertyKey(e,"multipleOf")&&(a.IsNumber(e.multipleOf)||a.IsBigInt(e.multipleOf))}function Np(e){return a.HasPropertyKey(e,"not")&&D(e.not)}function Lp(e){return a.HasPropertyKey(e,"oneOf")&&a.IsArray(e.oneOf)&&e.oneOf.every(t=>D(t))}function Ui(e){return a.HasPropertyKey(e,"pattern")&&(a.IsString(e.pattern)||e.pattern instanceof RegExp)}function Ni(e){return a.HasPropertyKey(e,"patternProperties")&&a.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>D(t))}function io(e){return a.HasPropertyKey(e,"prefixItems")&&a.IsArray(e.prefixItems)&&e.prefixItems.every(t=>D(t))}function Li(e){return a.HasPropertyKey(e,"properties")&&a.IsObject(e.properties)&&Object.values(e.properties).every(t=>D(t))}function Mp(e){return a.HasPropertyKey(e,"propertyNames")&&(a.IsObject(e.propertyNames)||D(e.propertyNames))}function BL(e){return a.HasPropertyKey(e,"$recursiveAnchor")&&a.IsBoolean(e.$recursiveAnchor)}function rs(e){return BL(e)&&a.IsEqual(e.$recursiveAnchor,!0)}function wp(e){return a.HasPropertyKey(e,"$recursiveRef")&&a.IsString(e.$recursiveRef)}function $p(e){return a.HasPropertyKey(e,"$ref")&&a.IsString(e.$ref)}function pn(e){return a.HasPropertyKey(e,"required")&&a.IsArray(e.required)&&e.required.every(t=>a.IsString(t))}function Dp(e){return a.HasPropertyKey(e,"then")&&D(e.then)}function Gp(e){return a.HasPropertyKey(e,"type")&&(a.IsString(e.type)||a.IsArray(e.type)&&e.type.every(t=>a.IsString(t)))}function ao(e){return a.HasPropertyKey(e,"uniqueItems")&&a.IsBoolean(e.uniqueItems)}function ns(e){return a.HasPropertyKey(e,"unevaluatedItems")&&D(e.unevaluatedItems)}function os(e){return a.HasPropertyKey(e,"unevaluatedProperties")&&D(e.unevaluatedProperties)}var Je=class{constructor(){this.indices=new Set,this.keys=new Set}AddIndex(t){return this.indices.add(t),!0}AddKey(t){return this.keys.add(t),!0}GetIndices(){return this.indices}GetKeys(){return this.keys}Merge(t){for(let r of t)r.indices.forEach(o=>this.indices.add(o)),r.keys.forEach(o=>this.keys.add(o));return!0}},Mi=class extends Je{constructor(t){super(),this.callback=t}AddError(t){return this.callback(t),!1}},we=class extends Mi{constructor(){super(t=>this.errors.push(t)),this.errors=[]}AddError(t){return this.errors.push(t),!1}GetErrors(){return this.errors}};var HL="external_",KL=0,vIe={identifier:`${HL}${KL}`,variables:[]};function JT(e,t,r,o){return r["~guard"].check(o)}function XT(e,t,r,o,i,s){return i["~guard"].check(s)||t.AddError({keyword:"~guard",schemaPath:r,instancePath:o,params:{errors:i["~guard"].errors(s)}})}function ex(e,t,r,o){return a.Every(r["~refine"],0,(i,s)=>i.refine(o))}function tx(e,t,r,o,i,s){return a.EveryAll(i["~refine"],0,(p,u)=>p.refine(s)||t.AddError({keyword:"~refine",schemaPath:r,instancePath:o,params:{index:u,message:p.message}}))}function rx(e){return no(e)&&a.IsArray(e.items)}function nx(e,t,r,o){return rx(r)?o.every((s,p)=>a.IsLessThan(p,r.items.length)||w(e,t,r.additionalItems,s)&&t.AddIndex(p)):!0}function ox(e,t,r,o,i,s){return rx(i)?s.every((u,l)=>{let g=`${r}/additionalItems`,y=`${o}/${l}`;return a.IsLessThan(l,i.items.length)||K(e,t,g,y,i.additionalItems,u)&&t.AddIndex(l)}):!0}function zL(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function ix(e){let t=[];return Ni(e)&&t.push(...a.Keys(e.patternProperties)),Li(e)&&t.push(...a.Keys(e.properties).map(zL)),a.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function ax(e,t,r,o){let i=new RegExp(ix(r));return a.Every(a.Keys(o),0,(p,u)=>i.test(p)||w(e,t,r.additionalProperties,o[p])&&t.AddKey(p))}function sx(e,t,r,o,i,s){let p=new RegExp(ix(i)),u=[];return a.EveryAll(a.Keys(s),0,(g,y)=>{let E=`${r}/additionalProperties`,O=`${o}/${g}`,Ne=new we,it=p.test(g)||K(e,Ne,E,O,i.additionalProperties,s[g])&&t.AddKey(g);return it||u.push(g),it})||t.AddError({keyword:"additionalProperties",schemaPath:r,instancePath:o,params:{additionalProperties:u}})}function mx(e,t,r,o){let i=r.allOf.reduce((s,p)=>{let u=new Je;return w(e,u,p,o)?[...s,u]:s},[]);return a.IsEqual(i.length,r.allOf.length)&&t.Merge(i)}function px(e,t,r,o,i,s){let p=[],u=i.allOf.reduce((g,y,E)=>{let O=`${r}/allOf/${E}`,Ne=new we,it=K(e,Ne,O,o,y,s);return it||p.push(Ne),it?[...g,Ne]:g},[]),l=a.IsEqual(u.length,i.allOf.length)&&t.Merge(u);return l||p.forEach(g=>g.GetErrors().forEach(y=>t.AddError(y))),l}function cx(e,t,r,o){let i=r.anyOf.reduce((s,p,u)=>{let l=new Je;return w(e,l,p,o)?[...s,l]:s},[]);return a.IsGreaterThan(i.length,0)&&t.Merge(i)}function ux(e,t,r,o,i,s){let p=[],u=i.anyOf.reduce((g,y,E)=>{let O=new we,Ne=`${r}/anyOf/${E}`,it=K(e,O,Ne,o,y,s);return it||p.push(O),it?[...g,O]:g},[]),l=a.IsGreaterThan(u.length,0)&&t.Merge(u);return l||p.forEach(g=>g.GetErrors().forEach(y=>t.AddError(y))),l||t.AddError({keyword:"anyOf",schemaPath:r,instancePath:o,params:{}})}function jp(e,t,r,o){return r}function lx(e,t,r,o,i,s){return jp(e,t,i,s)||t.AddError({keyword:"boolean",schemaPath:r,instancePath:o,params:{}})}function Fp(e,t,r,o){return a.IsValueLike(r.const)?a.IsEqual(o,r.const):a.IsDeepEqual(o,r.const)}function dx(e,t,r,o,i,s){return Fp(e,t,i,s)||t.AddError({keyword:"const",schemaPath:r,instancePath:o,params:{allowedValue:i.const}})}function YL(e){return!(mn(e)&&a.IsEqual(e.minContains,0))}function qp(e,t,r,o){return YL(r)?!a.IsEqual(o.length,0)&&o.some(i=>w(e,t,r.contains,i)):!0}function fx(e,t,r,o,i,s){return qp(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:1}})}function gx(e,t,r,o){let i=a.IsEqual(a.Keys(o).length,0),s=a.Every(a.Entries(r.dependencies),0,([p,u])=>!a.HasPropertyKey(o,p)||(a.IsArray(u)?u.every(l=>a.HasPropertyKey(o,l)):w(e,t,u,o)));return i||s}function yx(e,t,r,o,i,s){let p=a.IsEqual(a.Keys(s).length,0),u=a.EveryAll(a.Entries(i.dependencies),0,([l,g])=>{let y=`${r}/dependencies/${l}`;return!a.HasPropertyKey(s,l)||(a.IsArray(g)?g.every(E=>a.HasPropertyKey(s,E)||t.AddError({keyword:"dependencies",schemaPath:r,instancePath:o,params:{property:l,dependencies:g}})):K(e,t,y,o,g,s))});return p||u}function Ix(e,t,r,o){let i=a.IsEqual(a.Keys(o).length,0),s=a.Every(a.Entries(r.dependentRequired),0,([p,u])=>!a.HasPropertyKey(o,p)||u.every(l=>a.HasPropertyKey(o,l)));return i||s}function Ex(e,t,r,o,i,s){let p=a.IsEqual(a.Keys(s).length,0),u=a.EveryAll(a.Entries(i.dependentRequired),0,([l,g])=>!a.HasPropertyKey(s,l)||a.EveryAll(g,0,y=>a.HasPropertyKey(s,y)||t.AddError({keyword:"dependentRequired",schemaPath:r,instancePath:o,params:{property:l,dependencies:g}})));return p||u}function hx(e,t,r,o){let i=a.IsEqual(a.Keys(o).length,0),s=a.Every(a.Entries(r.dependentSchemas),0,([p,u])=>!a.HasPropertyKey(o,p)||w(e,t,u,o));return i||s}function Tx(e,t,r,o,i,s){let p=a.IsEqual(a.Keys(s).length,0),u=a.EveryAll(a.Entries(i.dependentSchemas),0,([l,g])=>{let y=`${r}/dependentSchemas/${l}`;return!a.HasPropertyKey(s,l)||K(e,t,y,o,g,s)});return p||u}function Bp(e,t,r,o){return r.enum.some(i=>a.IsValueLike(i)?a.IsEqual(o,i):a.IsDeepEqual(o,i))}function xx(e,t,r,o,i,s){return Bp(e,t,i,s)||t.AddError({keyword:"enum",schemaPath:r,instancePath:o,params:{allowedValues:i.enum}})}function Hp(e,t,r,o){return a.IsLessThan(o,r.exclusiveMaximum)}function _x(e,t,r,o,i,s){return Hp(e,t,i,s)||t.AddError({keyword:"exclusiveMaximum",schemaPath:r,instancePath:o,params:{comparison:"<",limit:i.exclusiveMaximum}})}function Kp(e,t,r,o){return a.IsGreaterThan(o,r.exclusiveMinimum)}function Ax(e,t,r,o,i,s){return Kp(e,t,i,s)||t.AddError({keyword:"exclusiveMinimum",schemaPath:r,instancePath:o,params:{comparison:">",limit:i.exclusiveMinimum}})}var mo={};yt(mo,{Clear:()=>Ox,Entries:()=>lM,Get:()=>gM,Has:()=>fM,IsDate:()=>wi,IsDateTime:()=>zp,IsDuration:()=>Yp,IsEmail:()=>Vp,IsHostname:()=>Wp,IsIPv4:()=>Xp,IsIPv6:()=>ec,IsIdnEmail:()=>Qp,IsIdnHostname:()=>Jp,IsIri:()=>rc,IsIriReference:()=>tc,IsJsonPointer:()=>oc,IsJsonPointerUriFragment:()=>nc,IsRegex:()=>ic,IsRelativeJsonPointer:()=>ac,IsTime:()=>$i,IsUri:()=>pc,IsUriReference:()=>sc,IsUriTemplate:()=>mc,IsUrl:()=>cc,IsUuid:()=>uc,Reset:()=>Sx,Set:()=>dM,Test:()=>yM});var VL=[0,31,28,31,30,31,30,31,31,30,31,30,31],WL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function QL(e){return e%4===0&&(e%100!==0||e%400===0)}function wi(e){let t=WL.exec(e);if(!t)return!1;let r=+t[1],o=+t[2],i=+t[3];return o>=1&&o<=12&&i>=1&&i<=(o===2&&QL(r)?29:VL[o])}var ZL=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function $i(e,t=!0){let r=ZL.exec(e);if(!r)return!1;let o=+r[1],i=+r[2],s=+r[3],p=r[4]==="-"?-1:1,u=+(r[5]||0),l=+(r[6]||0);if(u>23||l>59||t&&!r[4]&&e.toLowerCase().indexOf("z")===-1)return!1;if(o<=23&&i<=59&&s<60)return!0;let g=i-l*p,y=o-u*p-(g<0?1:0);return(y===23||y===-1)&&(g===59||g===-1)&&s<61}function zp(e,t=!0){let r=e.split(/T/i);return r.length===2&&wi(r[0])&&$i(r[1],t)}var JL=/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/;function Yp(e){return JL.test(e)}var XL=/^(?!.*\.\.)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i;function Vp(e){return XL.test(e)}var eM=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;function Wp(e){return eM.test(e)}var tM=/^(?!.*\.\.)[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+(?:\.[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+)*@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?)*$/iu;function Qp(e){return tM.test(e)}function Zp(e){let t=e.codePointAt(0);return t===void 0?!1:t>=12352&&t<=12447||t>=12448&&t<=12543&&t!==12539||t>=19968&&t<=40959}function Jp(e){if(e.length===0||e.includes(" "))return!1;let t=/[\u002E\u3002\uFF0E\uFF61]/g,r=e.normalize("NFC").replace(t,".");if(r.length>253)return!1;let o=r.split(".");if(o.some(i=>i.length===0))return!1;for(let i of o){if(i.length>63||i.startsWith("-")||i.endsWith("-"))return!1;if(/^xn--/i.test(i)){let l=i.slice(4);if(l.length<2||l.includes("---"))return!1;continue}if(/[\u302E\u302F\u3031\u3032\u3033\u3034\u3035\u303B\u0640\u07FA]/.test(i))return!1;let s=i.charAt(0);if(/[\u0903\u0300\u0488]/.test(s))return!1;for(let l=0;l<i.length;l++){let g=i.charAt(l);if(g==="\xB7"){if(l===0||l===i.length-1)return!1;let y=i.charAt(l-1),E=i.charAt(l+1);if(!/^[lL]$/.test(y)||!/^[lL]$/.test(E))return!1}if(g==="\u30FB"){if(i.length===1)return!1;if(l===0){let y=i.charAt(l+1);if(!Zp(y))return!1}else{let y=i.charAt(l-1),E=i.charAt(l+1);if(!Zp(y)||!Zp(E))return!1}}if(g==="\u0375"){if(l===i.length-1)return!1;let y=i.charAt(l+1);if(!/[\u0370-\u03FF]/.test(y))return!1}if(g==="\u05F3"||g==="\u05F4"){if(l===0)return!1;let y=i.charAt(l-1);if(!/[\u05D0-\u05EA]/.test(y))return!1}if(g==="\u200D"&&(l===0||i.charAt(l-1)!=="\u094D"))return!1}let p=!1,u=!1;for(let l=0;l<i.length;l++){let g=i.charAt(l);/[\u0660-\u0669]/.test(g)&&(p=!0),/[\u06F0-\u06F9]/.test(g)&&(u=!0)}if(p&&u)return!1}return!0}var rM=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function Xp(e){return rM.test(e)}var nM=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function ec(e){return nM.test(e)}function bx(e){try{return new URL(e,"http://example.com"),!0}catch{return!1}}function tc(e){if(e.includes(" ")||e.includes("\\")||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e==="")return!0;let t=e.indexOf(":");return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?bx(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:bx(e)}function rc(e){try{return new URL(e),!0}catch{return!1}}var oM=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function nc(e){return oM.test(e)}var iM=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function oc(e){return iM.test(e)}function ic(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var aM=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function ac(e){return aM.test(e)}var sM=/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;function sc(e){return sM.test(e)}var mM=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function mc(e){return mM.test(e)}var pM=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i;function pc(e){return pM.test(e)}var cM=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function cc(e){return cM.test(e)}var uM=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function uc(e){return uM.test(e)}var me=new Map;function Ox(){me.clear()}function lM(){return[...me.entries()]}function dM(e,t){me.set(e,t)}function fM(e){return me.has(e)}function gM(e){return me.get(e)}function yM(e,t){return me.get(e)?.(t)??!0}function Sx(){Ox(),me.set("date-time",zp),me.set("date",wi),me.set("duration",Yp),me.set("email",Vp),me.set("hostname",Wp),me.set("idn-email",Qp),me.set("idn-hostname",Jp),me.set("ipv4",Xp),me.set("ipv6",ec),me.set("iri-reference",tc),me.set("iri",rc),me.set("json-pointer-uri-fragment",nc),me.set("json-pointer",oc),me.set("regex",ic),me.set("relative-json-pointer",ac),me.set("time",$i),me.set("uri-reference",sc),me.set("uri-template",mc),me.set("uri",pc),me.set("url",cc),me.set("uuid",uc)}Sx();function lc(e,t,r,o){return mo.Test(r.format,o)}function Rx(e,t,r,o,i,s){return lc(e,t,i,s)||t.AddError({keyword:"format",schemaPath:r,instancePath:o,params:{format:i.format}})}function Cx(e,t,r,o){let i=Dp(r)?r.then:!0,s=_p(r)?r.else:!0;return w(e,t,r.if,o)?w(e,t,i,o):w(e,t,s,o)}function Px(e,t,r,o,i,s){let p=Dp(i)?i.then:!0,u=_p(i)?i.else:!0,l=new we,g=K(e,l,`${r}/if`,o,i.if,s)?K(e,l,`${r}/then`,o,p,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"then"}}):K(e,t,`${r}/else`,o,u,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"else"}});return g&&t.Merge([l]),g}function IM(e,t,r,o){return a.Every(r.items,0,(i,s)=>a.IsLessEqualThan(o.length,s)||w(e,t,i,o[s])&&t.AddIndex(s))}function EM(e,t,r,o,i,s){return a.EveryAll(i.items,0,(p,u)=>{let l=`${r}/items/${u}`,g=`${o}/${u}`;return a.IsLessEqualThan(s.length,u)||K(e,t,l,g,p,s[u])&&t.AddIndex(u)})}function hM(e,t,r,o){let i=io(r)?r.prefixItems.length:0;return a.Every(o,i,(s,p)=>w(e,t,r.items,s)&&t.AddIndex(p))}function TM(e,t,r,o,i,s){let p=io(i)?i.prefixItems.length:0;return a.EveryAll(s,p,(u,l)=>{let g=`${r}/items`,y=`${o}/${l}`;return K(e,t,g,y,i.items,u)&&t.AddIndex(l)})}function kx(e,t,r,o){return Sp(r)?IM(e,t,r,o):hM(e,t,r,o)}function Ux(e,t,r,o,i,s){return Sp(i)?EM(e,t,r,o,i,s):TM(e,t,r,o,i,s)}function xM(e){return an(e)}function dc(e,t,r,o){if(!xM(r))return!0;let i=o.reduce((s,p)=>w(e,t,r.contains,p)?++s:s,0);return a.IsLessEqualThan(i,r.maxContains)}function Nx(e,t,r,o,i,s){let p=mn(i)?i.minContains:1;return dc(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:p,maxContains:i.maxContains}})}function fc(e,t,r,o){return a.IsLessEqualThan(o,r.maximum)}function Lx(e,t,r,o,i,s){return fc(e,t,i,s)||t.AddError({keyword:"maximum",schemaPath:r,instancePath:o,params:{comparison:"<=",limit:i.maximum}})}function gc(e,t,r,o){return a.IsLessEqualThan(o.length,r.maxItems)}function Mx(e,t,r,o,i,s){return gc(e,t,i,s)||t.AddError({keyword:"maxItems",schemaPath:r,instancePath:o,params:{limit:i.maxItems}})}function yc(e,t,r,o){return a.IsMaxLength(o,r.maxLength)}function wx(e,t,r,o,i,s){return yc(e,t,i,s)||t.AddError({keyword:"maxLength",schemaPath:r,instancePath:o,params:{limit:i.maxLength}})}function Ic(e,t,r,o){return a.IsLessEqualThan(a.Keys(o).length,r.maxProperties)}function $x(e,t,r,o,i,s){return Ic(e,t,i,s)||t.AddError({keyword:"maxProperties",schemaPath:r,instancePath:o,params:{limit:i.maxProperties}})}function _M(e){return an(e)}function Ec(e,t,r,o){if(!_M(r))return!0;let i=o.reduce((s,p)=>w(e,t,r.contains,p)?++s:s,0);return a.IsGreaterEqualThan(i,r.minContains)}function Dx(e,t,r,o,i,s){return Ec(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:i.minContains}})}function hc(e,t,r,o){return a.IsGreaterEqualThan(o,r.minimum)}function Gx(e,t,r,o,i,s){return hc(e,t,i,s)||t.AddError({keyword:"minimum",schemaPath:r,instancePath:o,params:{comparison:">=",limit:i.minimum}})}function Tc(e,t,r,o){return a.IsGreaterEqualThan(o.length,r.minItems)}function vx(e,t,r,o,i,s){return Tc(e,t,i,s)||t.AddError({keyword:"minItems",schemaPath:r,instancePath:o,params:{limit:i.minItems}})}function xc(e,t,r,o){return a.IsMinLength(o,r.minLength)}function jx(e,t,r,o,i,s){return xc(e,t,i,s)||t.AddError({keyword:"minLength",schemaPath:r,instancePath:o,params:{limit:i.minLength}})}function _c(e,t,r,o){return a.IsGreaterEqualThan(a.Keys(o).length,r.minProperties)}function Fx(e,t,r,o,i,s){return _c(e,t,i,s)||t.AddError({keyword:"minProperties",schemaPath:r,instancePath:o,params:{limit:i.minProperties}})}function Ac(e,t,r,o){return a.IsMultipleOf(o,r.multipleOf)}function qx(e,t,r,o,i,s){return Ac(e,t,i,s)||t.AddError({keyword:"multipleOf",schemaPath:r,instancePath:o,params:{multipleOf:i.multipleOf}})}function bc(e,t,r,o){let i=new Je;return!w(e,i,r.not,o)&&t.Merge([i])}function Bx(e,t,r,o,i,s){return bc(e,t,i,s)||t.AddError({keyword:"not",schemaPath:r,instancePath:o,params:{}})}function Hx(e,t,r,o){let i=r.oneOf.reduce((s,p)=>{let u=new Je;return w(e,u,p,o)?[...s,u]:s},[]);return a.IsEqual(i.length,1)&&t.Merge(i)}function Kx(e,t,r,o,i,s){let p=[],u=[],l=i.oneOf.reduce((y,E,O)=>{let Ne=new we,it=`${r}/oneOf/${O}`,co=K(e,Ne,it,o,E,s);return co&&u.push(O),co||p.push(Ne),co?[...y,Ne]:y},[]),g=a.IsEqual(l.length,1)&&t.Merge(l);return!g&&a.IsEqual(u.length,0)&&p.forEach(y=>y.GetErrors().forEach(E=>t.AddError(E))),g||t.AddError({keyword:"oneOf",schemaPath:r,instancePath:o,params:{passingSchemas:u}})}function Oc(e,t,r,o){return(a.IsString(r.pattern)?new RegExp(r.pattern):r.pattern).test(o)}function zx(e,t,r,o,i,s){return Oc(e,t,i,s)||t.AddError({keyword:"pattern",schemaPath:r,instancePath:o,params:{pattern:i.pattern}})}function Yx(e,t,r,o){return a.Every(a.Entries(r.patternProperties),0,([i,s])=>{let p=new RegExp(i);return a.Every(a.Entries(o),0,([u,l])=>!p.test(u)||w(e,t,s,l)&&t.AddKey(u))})}function Vx(e,t,r,o,i,s){return a.EveryAll(a.Entries(i.patternProperties),0,([p,u])=>{let l=`${r}/patternProperties/${p}`,g=new RegExp(p);return a.EveryAll(a.Entries(s),0,([y,E])=>{let O=`${o}/${y}`;return!g.test(y)||K(e,t,l,O,u,E)&&t.AddKey(y)})})}function Wx(e,t,r,o){return a.IsEqual(o.length,0)||a.Every(r.prefixItems,0,(i,s)=>a.IsLessEqualThan(o.length,s)||w(e,t,i,o[s])&&t.AddIndex(s))}function Qx(e,t,r,o,i,s){return a.IsEqual(s.length,0)||a.EveryAll(i.prefixItems,0,(p,u)=>{let l=`${r}/prefixItems/${u}`,g=`${o}/${u}`;return a.IsLessEqualThan(s.length,u)||K(e,t,l,g,p,s[u])&&t.AddIndex(u)})}function Sc(e,t){return e.includes(t)||ut.Get().exactOptionalPropertyTypes}function Rc(e,t){return a.IsUndefined(e[t])}function Zx(e,t,r,o){let i=pn(r)?r.required:[];return a.Every(a.Entries(r.properties),0,([p,u])=>{let l=!a.HasPropertyKey(o,p)||w(e,t,u,o[p])&&t.AddKey(p);return Sc(i,p)?l:Rc(o,p)||l})}function Jx(e,t,r,o,i,s){let p=pn(i)?i.required:[];return a.EveryAll(a.Entries(i.properties),0,([l,g])=>{let y=`${r}/properties/${l}`,E=`${o}/${l}`,O=()=>!a.HasPropertyKey(s,l)||K(e,t,y,E,g,s[l])&&t.AddKey(l);return Sc(p,l)?O():Rc(s,l)||O()})}function Xx(e,t,r,o){return a.Every(a.Keys(o),0,(i,s)=>w(e,t,r.propertyNames,i))}function e_(e,t,r,o,i,s){let p=[];return a.EveryAll(a.Keys(s),0,(l,g)=>{let y=`${o}/${l}`,E=`${r}/propertyNames`,O=new we,Ne=K(e,O,E,y,i.propertyNames,l);return Ne||p.push(l),Ne})||t.AddError({keyword:"propertyNames",schemaPath:r,instancePath:o,params:{propertyNames:p}})}function t_(e,t,r,o){let i=e.RecursiveRef(r.$recursiveRef)??!1;return D(i)&&w(e,t,i,o)}function r_(e,t,r,o,i,s){let p=e.RecursiveRef(i.$recursiveRef)??!1;return D(p)&&K(e,t,"#",o,p,s)}function i_(e,t,r,o){let i=e.Ref(r.$ref)??!1,s=new Je,p=D(i)&&w(e,s,i,o);return p&&t.Merge([s]),p}function a_(e,t,r,o,i,s){let p=e.Ref(i.$ref)??!1,u=new we,l=D(p)&&K(e,u,"#",o,p,s);return l&&t.Merge([u]),l||u.GetErrors().forEach(g=>t.AddError(g)),l}function s_(e,t,r,o){return a.Every(r.required,0,i=>a.HasPropertyKey(o,i))}function m_(e,t,r,o,i,s){let p=[];return a.EveryAll(i.required,0,l=>{let g=a.HasPropertyKey(s,l);return g||p.push(l),g})||t.AddError({keyword:"required",schemaPath:r,instancePath:o,params:{requiredProperties:p}})}function Cc(e,t,r,o,i){return a.IsEqual(r,"object")?a.IsObjectNotArray(i):a.IsEqual(r,"array")?a.IsArray(i):a.IsEqual(r,"boolean")?a.IsBoolean(i):a.IsEqual(r,"integer")?a.IsInteger(i):a.IsEqual(r,"number")?a.IsNumber(i):a.IsEqual(r,"null")?a.IsNull(i):a.IsEqual(r,"string")?a.IsString(i):a.IsEqual(r,"asyncIterator")?a.IsAsyncIterator(i):a.IsEqual(r,"bigint")?a.IsBigInt(i):a.IsEqual(r,"constructor")?a.IsConstructor(i):a.IsEqual(r,"function")?a.IsFunction(i):a.IsEqual(r,"iterator")?a.IsIterator(i):a.IsEqual(r,"symbol")?a.IsSymbol(i):a.IsEqual(r,"undefined")?a.IsUndefined(i):a.IsEqual(r,"void")?a.IsUndefined(i):!0}function p_(e,t,r,o,i){return r.some(s=>Cc(e,t,s,o,i))}function c_(e,t,r,o){return a.IsArray(r.type)?p_(e,t,r.type,r,o):Cc(e,t,r.type,r,o)}function u_(e,t,r,o,i,s){return(a.IsArray(i.type)?p_(e,t,i.type,i,s):Cc(e,t,i.type,i,s))||t.AddError({keyword:"type",schemaPath:r,instancePath:o,params:{type:i.type}})}function l_(e,t,r,o){let i=t.GetIndices();return a.Every(o,0,(s,p)=>(i.has(p)||w(e,t,r.unevaluatedItems,s))&&t.AddIndex(p))}function d_(e,t,r,o,i,s){let p=t.GetIndices(),u=[];return a.EveryAll(s,0,(g,y)=>{let E=new we,O=(p.has(y)||K(e,E,r,o,i.unevaluatedItems,g))&&t.AddIndex(y);return O||u.push(y),O})||t.AddError({keyword:"unevaluatedItems",schemaPath:r,instancePath:o,params:{unevaluatedItems:u}})}function f_(e,t,r,o){let i=t.GetKeys();return a.Every(a.Entries(o),0,([s,p])=>i.has(s)||w(e,t,r.unevaluatedProperties,p)&&t.AddKey(s))}function g_(e,t,r,o,i,s){let p=t.GetKeys(),u=[];return a.EveryAll(a.Entries(s),0,([g,y])=>{let E=new we,O=p.has(g)||K(e,E,r,o,i.unevaluatedProperties,y)&&t.AddKey(g);return O||u.push(g),O})||t.AddError({keyword:"unevaluatedProperties",schemaPath:r,instancePath:o,params:{unevaluatedProperties:u}})}function y_(e){return!a.IsEqual(e.uniqueItems,!1)}function I_(e,t,r,o){if(!y_(r))return!0;let i=new Set(o.map(fr.Hash)).size,s=o.length;return a.IsEqual(i,s)}function E_(e,t,r,o,i,s){if(!y_(i))return!0;let p=new Set,u=s.reduce((g,y,E)=>{let O=fr.Hash(y);return p.has(O)?[...g,E]:(p.add(O),g)},[]);return a.IsEqual(u.length,0)||t.AddError({keyword:"uniqueItems",schemaPath:r,instancePath:o,params:{duplicateItems:u}})}function w(e,t,r,o){e.Push(r);let i=es(r)?jp(e,t,r,o):(!Gp(r)||c_(e,t,r,o))&&(!(a.IsObject(o)&&!a.IsArray(o))||(!pn(r)||s_(e,t,r,o))&&(!er(r)||ax(e,t,r,o))&&(!Ep(r)||gx(e,t,r,o))&&(!hp(r)||Ix(e,t,r,o))&&(!Tp(r)||hx(e,t,r,o))&&(!Ni(r)||Yx(e,t,r,o))&&(!Li(r)||Zx(e,t,r,o))&&(!Mp(r)||Xx(e,t,r,o))&&(!ki(r)||_c(e,t,r,o))&&(!kp(r)||Ic(e,t,r,o)))&&(!a.IsArray(o)||(!fp(r)||nx(e,t,r,o))&&(!an(r)||qp(e,t,r,o))&&(!no(r)||kx(e,t,r,o))&&(!Cp(r)||dc(e,t,r,o))&&(!ts(r)||gc(e,t,r,o))&&(!mn(r)||Ec(e,t,r,o))&&(!oo(r)||Tc(e,t,r,o))&&(!io(r)||Wx(e,t,r,o))&&(!ao(r)||I_(e,t,r,o)))&&(!a.IsString(o)||(!Ci(r)||lc(e,t,r,o))&&(!Pp(r)||yc(e,t,r,o))&&(!Pi(r)||xc(e,t,r,o))&&(!Ui(r)||Oc(e,t,r,o)))&&(!(a.IsNumber(o)||a.IsBigInt(o))||(!bp(r)||Hp(e,t,r,o))&&(!tr(r)||Kp(e,t,r,o))&&(!Rp(r)||fc(e,t,r,o))&&(!rr(r)||hc(e,t,r,o))&&(!Up(r)||Ac(e,t,r,o)))&&(!wp(r)||t_(e,t,r,o))&&(!$p(r)||i_(e,t,r,o))&&(!lp(r)||JT(e,t,r,o))&&(!Ip(r)||Fp(e,t,r,o))&&(!Ap(r)||Bp(e,t,r,o))&&(!Op(r)||Cx(e,t,r,o))&&(!Np(r)||bc(e,t,r,o))&&(!gp(r)||mx(e,t,r,o))&&(!yp(r)||cx(e,t,r,o))&&(!Lp(r)||Hx(e,t,r,o))&&(!ns(r)||!a.IsArray(o)||l_(e,t,r,o))&&(!os(r)||!a.IsObject(o)||f_(e,t,r,o))&&(!dp(r)||ex(e,t,r,o));return e.Pop(r),i}function K(e,t,r,o,i,s){e.Push(i);let p=es(i)?lx(e,t,r,o,i,s):!!(+(!Gp(i)||u_(e,t,r,o,i,s))&+(!(a.IsObject(s)&&!a.IsArray(s))||!!(+(!pn(i)||m_(e,t,r,o,i,s))&+(!er(i)||sx(e,t,r,o,i,s))&+(!Ep(i)||yx(e,t,r,o,i,s))&+(!hp(i)||Ex(e,t,r,o,i,s))&+(!Tp(i)||Tx(e,t,r,o,i,s))&+(!Ni(i)||Vx(e,t,r,o,i,s))&+(!Li(i)||Jx(e,t,r,o,i,s))&+(!Mp(i)||e_(e,t,r,o,i,s))&+(!ki(i)||Fx(e,t,r,o,i,s))&+(!kp(i)||$x(e,t,r,o,i,s))))&+(!a.IsArray(s)||!!(+(!fp(i)||ox(e,t,r,o,i,s))&+(!an(i)||fx(e,t,r,o,i,s))&+(!no(i)||Ux(e,t,r,o,i,s))&+(!Cp(i)||Nx(e,t,r,o,i,s))&+(!ts(i)||Mx(e,t,r,o,i,s))&+(!mn(i)||Dx(e,t,r,o,i,s))&+(!oo(i)||vx(e,t,r,o,i,s))&+(!io(i)||Qx(e,t,r,o,i,s))&+(!ao(i)||E_(e,t,r,o,i,s))))&+(!a.IsString(s)||!!(+(!Ci(i)||Rx(e,t,r,o,i,s))&+(!Pp(i)||wx(e,t,r,o,i,s))&+(!Pi(i)||jx(e,t,r,o,i,s))&+(!Ui(i)||zx(e,t,r,o,i,s))))&+(!(a.IsNumber(s)||a.IsBigInt(s))||!!(+(!bp(i)||_x(e,t,r,o,i,s))&+(!tr(i)||Ax(e,t,r,o,i,s))&+(!Rp(i)||Lx(e,t,r,o,i,s))&+(!rr(i)||Gx(e,t,r,o,i,s))&+(!Up(i)||qx(e,t,r,o,i,s))))&+(!wp(i)||r_(e,t,r,o,i,s))&+(!$p(i)||a_(e,t,r,o,i,s))&+(!lp(i)||XT(e,t,r,o,i,s))&+(!Ip(i)||dx(e,t,r,o,i,s))&+(!Ap(i)||xx(e,t,r,o,i,s))&+(!Op(i)||Px(e,t,r,o,i,s))&+(!Np(i)||Bx(e,t,r,o,i,s))&+(!gp(i)||px(e,t,r,o,i,s))&+(!yp(i)||ux(e,t,r,o,i,s))&+(!Lp(i)||Kx(e,t,r,o,i,s))&+(!ns(i)||!a.IsArray(s)||d_(e,t,r,o,i,s))&+(!os(i)||!a.IsObject(s)||g_(e,t,r,o,i,s)))&&(!dp(i)||tx(e,t,r,o,i,s));return e.Pop(i),p}var un={};yt(un,{Ref:()=>wM});var nr={};yt(nr,{Delete:()=>PM,Get:()=>RM,Has:()=>SM,Indices:()=>Di,Set:()=>CM});function h_(e){if(e.length===0)throw Error("Cannot set root")}function T_(e){if(!a.IsObject(e))throw Error("Cannot set value")}function AM(e){return/^(0|[1-9]\d*)$/.test(e)}function x_(e){return[e.slice(0,e.length-1),e.slice(e.length-1)[0]]}function bM(e,t){return a.IsObject(t)&&a.HasPropertyKey(t,e)}function OM(e,t){return a.IsObject(t)?t[e]:void 0}function Pc(e,t){return e.reduce((r,o)=>OM(o,r),t)}function Di(e){if(a.IsEqual(e.length,0))return[];let t=e.split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>0&&t[0]===""?t.slice(1):t}function SM(e,t){let r=e;return Di(t).every(o=>bM(o,r)?(r=r[o],!0):!1)}function RM(e,t){let r=Di(t);return Pc(r,e)}function CM(e,t,r){let o=Di(t);h_(o);let[i,s]=x_(o),p=Pc(i,e);return T_(p),p[s]=r,e}function PM(e,t){let r=Di(t);h_(r);let[o,i]=x_(r),s=Pc(o,e);return T_(s),a.IsArray(s)&&AM(i)?s.splice(+i,1):delete s[i],e}function kM(e,t,r){if(e.$id===r.hash)return e;let o=new URL(e.$id,t.href),i=new URL(r.href,t.href);if(a.IsEqual(o.pathname,i.pathname))return r.hash.startsWith("#")?__(e,t,r):e}function UM(e,t,r){let o=new URL(`#${e.$anchor}`,t.href),i=new URL(r.href,t.href);if(a.IsEqual(o.href,i.href))return e}function __(e,t,r){return r.href.endsWith("#")?e:r.hash.startsWith("#")?nr.Get(e,decodeURIComponent(r.hash.slice(1))):void 0}function NM(e,t,r){if(sn(e)){let o=kM(e,t,r);if(!a.IsUndefined(o))return o}if(Ri(e)){let o=UM(e,t,r);if(!a.IsUndefined(o))return o}return __(e,t,r)}function LM(e,t,r){return e.reduce((o,i)=>{let s=kc(i,t,r);return a.IsUndefined(s)?o:s},void 0)}function MM(e,t,r){return a.Keys(e).reduce((o,i)=>{let s=kc(e[i],t,r);return a.IsUndefined(s)?o:s},void 0)}function kc(e,t,r){if(t=Xt(e)&&sn(e)?new URL(e.$id,t.href):t,Xt(e)){let o=NM(e,t,r);if(!a.IsUndefined(o))return o}if(a.IsArray(e))return LM(e,t,r);if(a.IsObject(e))return MM(e,t,r)}function wM(e,t){let r=new URL("http://unknown"),o=sn(e)?new URL(e.$id,r.href):r,i=new URL(t,o.href);return kc(e,o,i)}var ln=class{constructor(t,r){this.context=t,this.schema=r,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((t,r)=>new URL(r.$id,t),new URL("http://unknown"))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(t){Xt(t)&&(sn(t)&&this.ids.push(t),Ri(t)&&this.anchors.push(t),rs(t)&&this.recursiveAnchors.push(t),xp(t)&&this.dynamicAnchors.push(t))}Pop(t){Xt(t)&&(sn(t)&&this.ids.pop(),Ri(t)&&this.anchors.pop(),rs(t)&&this.recursiveAnchors.pop(),xp(t)&&this.dynamicAnchors.pop())}FromContext(t){return a.HasPropertyKey(this.context,t)?this.context[t]:void 0}FromRef(t){return t.startsWith("#")?un.Ref(this.Base(),t):un.Ref(this.schema,t)}Ref(t){return this.FromContext(t)??this.FromRef(t)}RecursiveRef(t){return rs(this.Base())?un.Ref(this.recursiveAnchors[0],t):un.Ref(this.Base(),t)}};function A_(...e){let[t,r,o]=ee.Match(e,{3:(p,u,l)=>[p,u,l],2:(p,u)=>[{},p,u]}),i=new ln(t,r),s=new Je;return w(i,s,r,o)}function b_(...e){let[t,r,o]=ee.Match(e,{3:(y,E,O)=>[y,E,O],2:(y,E)=>[{},y,E]}),i=ut.Get(),s=Vu(),p=[],u=new ln(t,r),l=new Mi(y=>{if(!a.IsGreaterEqualThan(p.length,i.maxErrors))return p.push({...y,message:s(y)})});return[K(u,l,"#","",r,o),p]}function ae(...e){let[t,r,o]=ee.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return A_(t,r,o)}function kr(...e){let[t,r,o]=ee.Match(e,{3:(p,u,l)=>[p,u,l],2:(p,u)=>[{},p,u]}),[i,s]=b_(t,r,o);return s}var Ur=class extends Error{constructor(t,r,o){super(t),Object.defineProperty(this,"cause",{value:{source:t,errors:o,value:r},writable:!1,configurable:!1,enumerable:!1})}};function O_(e,t,r){return a.IsArray(r)?r.map(o=>De(e,t.items,o)):r}function S_(e,t,r){return t.Clean(r)}function R_(e,t,r){return De({...e,...t.$defs},_e(t.$ref),r)}function DM(e){let t=a.HasPropertyKey(e,"unevaluatedProperties")?{additionalProperties:e.unevaluatedProperties}:{},r=Ot(e);return L(r)?Ua(r,t):r}function C_(e,t,r){let o=DM(t);return De(e,o,r)}function is(e){return a.HasPropertyKey(e,"additionalProperties")?e.additionalProperties:void 0}function P_(e,t,r){if(!a.IsObject(r)||a.IsArray(r))return r;let o=is(t);for(let i of a.Keys(r)){if(a.HasPropertyKey(t.properties,i)){r[i]=De(e,t.properties[i],r[i]);continue}if(a.IsBoolean(o)&&a.IsEqual(o,!0)||_(o)&&ae(e,o,r[i])){r[i]=De(e,o,r[i]);continue}delete r[i]}return r}function k_(e,t,r){if(!a.IsObject(r))return r;let o=is(t),[i,s]=[new RegExp(st(t)),Fe(t)];for(let p of a.Keys(r)){if(i.test(p)){r[p]=De(e,s,r[p]);continue}if(a.IsBoolean(o)&&a.IsEqual(o,!0)||_(o)&&ae(e,o,r[p])){r[p]=De(e,o,r[p]);continue}delete r[p]}return r}function U_(e,t,r){return a.HasPropertyKey(e,t.$ref)?De(e,e[t.$ref],r):r}function N_(e,t,r){if(!a.IsArray(r))return r;let o=Math.min(r.length,t.items.length);for(let i=0;i<o;i++)r[i]=De(e,t.items[i],r[i]);return a.IsGreaterThan(r.length,o)?r.slice(0,o):r}function GM(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=se(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=se(e[r]);return t}function vM(e){return a.IsClassInstance(e)?e:GM(e)}function jM(e){return e.map(t=>se(t))}function FM(e){return e.slice()}function qM(e){return new Map(se([...e.entries()]))}function BM(e){return new Set(se([...e.values()]))}function se(e){return Ye.IsTypeArray(e)?FM(e):Ye.IsMap(e)?qM(e):Ye.IsSet(e)?BM(e):a.IsArray(e)?jM(e):a.IsObject(e)?vM(e):e}function L_(e,t,r){for(let o of t.anyOf){let i=De(e,o,se(r));if(ae(e,o,i))return i}return r}function De(e,t,r){return Z(t)?O_(e,t,r):lt(t)?S_(e,t,r):ie(t)?R_(e,t,r):P(t)?C_(e,t,r):L(t)?P_(e,t,r):le(t)?k_(e,t,r):oe(t)?U_(e,t,r):B(t)?N_(e,t,r):x(t)?L_(e,t,r):r}function fn(...e){let[t,r,o]=ee.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return De(t,r,o)}function M_(e,t,r){return a.IsArray(r)?r.map(o=>Se(e,t.items,o)):r}function w_(e,t,r){return t.Convert(r)}var X={};yt(X,{Fail:()=>gn,IsOk:()=>Nc,Ok:()=>C,TryBigInt:()=>Lc,TryBoolean:()=>mw,TryNull:()=>gw,TryNumber:()=>bw,TryString:()=>Uw,TryUndefined:()=>Gw});function Nc(e){return a.IsObject(e)&&a.HasPropertyKey(e,"value")}function C(e){return{value:e}}function gn(){}function HM(e){return C(e)}function KM(e){return a.IsEqual(e,!0)?C(BigInt(1)):C(BigInt(0))}function zM(e){return C(BigInt(Math.trunc(e)))}function YM(e){return C(BigInt(0))}var VM=/^-?(0|[1-9]\d*)n$/,WM=/^-?(0|[1-9]\d*)\.\d+$/,QM=/^-?(0|[1-9]\d*)$/;function ZM(e){return VM.test(e)}function JM(e){return WM.test(e)}function XM(e){return QM.test(e)}function ew(e){let t=e.toLowerCase();return ZM(e)?C(BigInt(e.slice(0,e.length-1))):JM(e)?C(BigInt(e.split(".")[0])):XM(e)?C(BigInt(e)):a.IsEqual(t,"false")?C(BigInt(0)):a.IsEqual(t,"true")?C(BigInt(1)):void 0}function tw(e){return C(BigInt(0))}function Lc(e){return a.IsBigInt(e)?HM(e):a.IsBoolean(e)?KM(e):a.IsNumber(e)?zM(e):a.IsNull(e)?YM(e):a.IsString(e)?ew(e):a.IsUndefined(e)?tw(e):void 0}function rw(e){return a.IsEqual(e,BigInt(0))?C(!1):a.IsEqual(e,BigInt(1))?C(!0):void 0}function nw(e){return C(e)}function ow(e){return a.IsEqual(e,0)?C(!1):a.IsEqual(e,1)?C(!0):void 0}function iw(e){return C(!1)}function aw(e){return a.IsEqual(e.toLowerCase(),"false")?C(!1):a.IsEqual(e.toLowerCase(),"true")?C(!0):a.IsEqual(e,"0")?C(!1):a.IsEqual(e,"1")?C(!0):void 0}function sw(e){return C(!1)}function mw(e){return a.IsBigInt(e)?rw(e):a.IsBoolean(e)?nw(e):a.IsNumber(e)?ow(e):a.IsNull(e)?iw(e):a.IsString(e)?aw(e):a.IsUndefined(e)?sw(e):void 0}function pw(e){return a.IsEqual(e,BigInt(0))?C(null):void 0}function cw(e){return a.IsEqual(e,!1)?C(null):void 0}function uw(e){return a.IsEqual(e,0)?C(null):void 0}function lw(e){return C(null)}function dw(e){let t=e.toLowerCase();return a.IsEqual(t,"undefined")||a.IsEqual(t,"null")||a.IsEqual(e,"")||a.IsEqual(e,"0")?C(null):void 0}function fw(e){return C(null)}function gw(e){return a.IsBigInt(e)?pw(e):a.IsBoolean(e)?cw(e):a.IsNumber(e)?uw(e):a.IsNull(e)?lw(e):a.IsString(e)?dw(e):a.IsUndefined(e)?fw(e):void 0}var yw=BigInt(Number.MAX_SAFE_INTEGER),Iw=BigInt(Number.MIN_SAFE_INTEGER);function Ew(e){return e<=yw&&e>=Iw}function $_(e){return Ew(e)?C(Number(e)):void 0}function hw(e){return e?C(1):C(0)}function Tw(e){return C(e)}function xw(e){return C(0)}function _w(e){let t=+e;if(a.IsNumber(t))return C(t);let r=e.toLowerCase();if(a.IsEqual(r,"false"))return C(0);if(a.IsEqual(r,"true"))return C(1);let o=Lc(e);return Nc(o)?$_(o.value):void 0}function Aw(e){return C(0)}function bw(e){return a.IsBigInt(e)?$_(e):a.IsBoolean(e)?hw(e):a.IsNumber(e)?Tw(e):a.IsNull(e)?xw(e):a.IsString(e)?_w(e):a.IsUndefined(e)?Aw(e):void 0}function Ow(e){return C(e.toString())}function Sw(e){return C(e.toString())}function Rw(e){return C(e.toString())}function Cw(e){return C("null")}function Pw(e){return C(e)}function kw(e){return C("")}function Uw(e){return a.IsBigInt(e)?Ow(e):a.IsBoolean(e)?Sw(e):a.IsNumber(e)?Rw(e):a.IsNull(e)?Cw(e):a.IsString(e)?Pw(e):a.IsUndefined(e)?kw(e):void 0}function Nw(e){return a.IsEqual(e,BigInt(0))?C(void 0):void 0}function Lw(e){return a.IsEqual(e,!1)?C(void 0):void 0}function Mw(e){return a.IsEqual(e,0)?C(void 0):void 0}function ww(e){return C(void 0)}function $w(e){let t=e.toLowerCase();return a.IsEqual(t,"undefined")||a.IsEqual(t,"null")||a.IsEqual(e,"")||a.IsEqual(e,"0")?C(void 0):void 0}function Dw(e){return C(void 0)}function Gw(e){return a.IsBigInt(e)?Nw(e):a.IsBoolean(e)?Lw(e):a.IsNumber(e)?Mw(e):a.IsNull(e)?ww(e):a.IsString(e)?$w(e):a.IsUndefined(e)?Dw(e):void 0}function D_(e,t,r){if(a.IsBigInt(r))return r;let o=X.TryBigInt(r);return X.IsOk(o)?o.value:r}function G_(e,t,r){if(a.IsBoolean(r))return r;let o=X.TryBoolean(r);return X.IsOk(o)?o.value:r}function v_(e,t,r){return Se({...e,...t.$defs},_e(t.$ref),r)}function as(e,t,r){if(t.anyOf.some(p=>ae(e,p,r)))return r;let s=t.anyOf.map(p=>Se(e,p,se(r))).find(p=>ae(e,t,p));return a.IsUndefined(s)?r:s}function j_(e,t,r){let o=Hr(t);return as(e,o,r)}function F_(e,t,r){if(a.IsInteger(r))return r;let o=X.TryNumber(r);return X.IsOk(o)?Math.trunc(o.value):r}function q_(e,t,r){let o=Ot(t);return Se(e,o,r)}function vw(e,t,r){let o=X.TryBigInt(r);return X.IsOk(o)&&a.IsEqual(t.const,o.value)?o.value:r}function jw(e,t,r){let o=X.TryBoolean(r);return X.IsOk(o)&&a.IsEqual(t.const,o.value)?o.value:r}function Fw(e,t,r){let o=X.TryNumber(r);return X.IsOk(o)&&a.IsEqual(t.const,o.value)?o.value:r}function qw(e,t,r){let o=X.TryString(r);return X.IsOk(o)&&a.IsEqual(t.const,o.value)?o.value:r}function B_(e,t,r){return a.IsEqual(t.const,r)?r:rl(t)?vw(e,t,r):nl(t)?jw(e,t,r):_n(t)?Fw(e,t,r):An(t)?qw(e,t,r):j()}function H_(e,t,r){if(a.IsNull(r))return r;let o=X.TryNull(r);return X.IsOk(o)?o.value:r}function K_(e,t,r){if(a.IsNumber(r))return r;let o=X.TryNumber(r);return X.IsOk(o)?o.value:r}function ss(e,t,r,o){let i=a.Keys(o);for(let[s,p]of t)for(let u of i)s.test(u)||(o[u]=Se(e,r,o[u]));return o}function Gi(e,t,r){return Re(e)&&a.IsUndefined(r[t])}function Bw(e,t,r){let o=a.EntriesRegExp(t.properties),i=a.Keys(r);for(let[s,p]of o)for(let u of i)!s.test(u)||Gi(p,u,r)||(r[u]=Se(e,p,r[u]));return a.HasPropertyKey(t,"additionalProperties")&&a.IsObject(t.additionalProperties)?ss(e,o,t.additionalProperties,r):r}function z_(e,t,r){return a.IsObjectNotArray(r)?Bw(e,t,r):r}function Hw(e,t,r){let o=a.EntriesRegExp(t.patternProperties),i=a.Keys(r);for(let[s,p]of o)for(let u of i)s.test(u)&&(r[u]=Se(e,p,r[u]));return a.HasPropertyKey(t,"additionalProperties")&&a.IsObject(t.additionalProperties)?ss(e,o,t.additionalProperties,r):r}function Y_(e,t,r){return a.IsObjectNotArray(r)?Hw(e,t,r):r}function V_(e,t,r){return a.HasPropertyKey(e,t.$ref)?Se(e,e[t.$ref],r):r}function W_(e,t,r){if(a.IsString(r))return r;let o=X.TryString(r);return X.IsOk(o)?o.value:r}function Q_(e,t,r){let o=qe(t.pattern);return Se(e,o,r)}function Z_(e,t,r){if(!a.IsArray(r))return r;for(let o=0;o<Math.min(t.items.length,r.length);o++)r[o]=Se(e,t.items[o],r[o]);return r}function J_(e,t,r){if(a.IsUndefined(r))return r;let o=X.TryUndefined(r);return X.IsOk(o)?o.value:r}function X_(e,t,r){if(a.IsUndefined(r))return r;let o=X.TryUndefined(r);return X.IsOk(o)?void 0:r}function Se(e,t,r){return Z(t)?M_(e,t,r):lt(t)?w_(e,t,r):at(t)?D_(e,t,r):Qe(t)?G_(e,t,r):ie(t)?v_(e,t,r):Ie(t)?j_(e,t,r):Le(t)?F_(e,t,r):P(t)?q_(e,t,r):Y(t)?B_(e,t,r):Ut(t)?H_(e,t,r):ue(t)?K_(e,t,r):L(t)?z_(e,t,r):le(t)?Y_(e,t,r):oe(t)?V_(e,t,r):Ae(t)?W_(e,t,r):Ee(t)?Q_(e,t,r):B(t)?Z_(e,t,r):wt(t)?J_(e,t,r):x(t)?as(e,t,r):mt(t)?X_(e,t,r):r}function Nr(...e){let[t,r,o]=ee.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return Se(t,r,o)}function eA(e,t,r){if(!a.IsArray(r))return r;for(let o=0;o<r.length;o++)r[o]=Ue(e,t.items,r[o]);return r}function tA(e,t,r){return t.Default(r)}function rA(e,t,r){return Ue({...e,...t.$defs},_e(t.$ref),r)}function nA(e,t){return a.IsUndefined(t)?a.IsFunction(e.default)?e.default():se(e.default):t}function oA(e,t,r){let o=Ot(t);return Ue(e,o,r)}function iA(e,t,r){if(!a.IsObject(r))return r;let o=a.Keys(t.properties);for(let i of o){let s=Ue(e,t.properties[i],r[i]);a.IsUndefined(s)&&(Re(t.properties[i])||!a.HasPropertyKey(t.properties[i],"default"))||(r[i]=Ue(e,t.properties[i],r[i]))}if(!er(t)||a.IsBoolean(t.additionalProperties))return r;for(let i of a.Keys(r))o.includes(i)||(r[i]=Ue(e,t.additionalProperties,r[i]));return r}function aA(e,t,r){if(!a.IsObject(r))return r;let[o,i]=[new RegExp(st(t)),Fe(t)];for(let s of a.Keys(r))o.test(s)&&gt(i)&&(r[s]=Ue(e,i,r[s]));if(!er(t))return r;for(let s of a.Keys(r))o.test(s)||(r[s]=Ue(e,t.additionalProperties,r[s]));return r}function sA(e,t,r){return a.HasPropertyKey(e,t.$ref)?Ue(e,e[t.$ref],r):r}function mA(e,t,r){if(!a.IsArray(r))return r;let[o,i]=[t.items,Math.max(t.items.length,r.length)];for(let s=0;s<i;s++)s<o.length&&(r[s]=Ue(e,o[s],r[s]));return r}function pA(e,t,r){for(let o of t.anyOf){let i=Ue(e,o,se(r));if(ae(e,o,i))return i}return r}function Ue(e,t,r){let o=gt(t)?nA(t,r):r;return Z(t)?eA(e,t,o):lt(t)?tA(e,t,o):ie(t)?rA(e,t,o):P(t)?oA(e,t,o):L(t)?iA(e,t,o):le(t)?aA(e,t,o):oe(t)?sA(e,t,o):B(t)?mA(e,t,o):x(t)?pA(e,t,o):o}function yn(...e){let[t,r,o]=ee.Match(e,{3:(i,s,p)=>[i,s,p],2:(i,s)=>[{},i,s]});return Ue(t,r,o)}function po(e){return(...t)=>{let[r,o,i]=ee.Match(t,{3:(s,p,u)=>[s,p,u],2:(s,p)=>[{},s,p]});return e.reduce((s,p)=>p(r,o,s),i)}}function Kw(e,t,r){return t["~codec"].decode(r)}function zw(e,t,r){return t["~codec"].encode(r)}function ge(e,t,r,o){return vr(r)?a.IsEqual(e,"Decode")?Kw(t,r,o):zw(t,r,o):o}function Yw(e,t,r,o){if(!a.IsArray(o))return j();for(let i=0;i<o.length;i++)o[i]=pe(e,t,r.items,o[i]);return ge(e,t,r,o)}function Vw(e,t,r,o){let i=ge(e,t,r,o);if(!a.IsArray(i))return i;for(let s=0;s<i.length;s++)i[s]=pe(e,t,r.items,i[s]);return i}function cA(e,t,r,o){return a.IsEqual(e,"Decode")?Yw(e,t,r,o):Vw(e,t,r,o)}function uA(e,t,r,o){return o=pe(e,{...t,...r.$defs},_e(r.$ref),o),ge(e,t,r,o)}function Ww(e,t,r,o){for(let i of r.allOf)o=pe(e,t,i,o);return ge(e,t,r,o)}function Qw(e,t,r,o){let i=ge(e,t,r,o);for(let s of r.allOf)i=pe(e,t,s,i);return i}function lA(e,t,r,o){return a.IsEqual(e,"Decode")?Ww(e,t,r,o):Qw(e,t,r,o)}function Zw(e,t,r,o){if(!a.IsObjectNotArray(o))return j();for(let i of a.Keys(r.properties))!a.HasPropertyKey(o,i)||Gi(r.properties[i],i,o)||(o[i]=pe(e,t,r.properties[i],o[i]));return ge(e,t,r,o)}function Jw(e,t,r,o){let i=ge(e,t,r,o);if(!a.IsObjectNotArray(i))return i;for(let s of a.Keys(r.properties))!a.HasPropertyKey(i,s)||Gi(r.properties[s],s,i)||(i[s]=pe(e,t,r.properties[s],i[s]));return i}function dA(e,t,r,o){return a.IsEqual(e,"Decode")?Zw(e,t,r,o):Jw(e,t,r,o)}function Xw(e,t,r,o){if(!a.IsObjectNotArray(o))return j();let i=new RegExp(st(r));for(let s of a.Keys(o))i.test(s)||j(),o[s]=pe(e,t,Fe(r),o[s]);return ge(e,t,r,o)}function e$(e,t,r,o){let i=ge(e,t,r,o);if(!a.IsObjectNotArray(i))return i;let s=new RegExp(st(r));for(let p of a.Keys(i))s.test(p)&&(i[p]=pe(e,t,Fe(r),i[p]));return i}function fA(e,t,r,o){return a.IsEqual(e,"Decode")?Xw(e,t,r,o):e$(e,t,r,o)}function gA(e,t,r,o){return o=a.HasPropertyKey(t,r.$ref)?pe(e,t,t[r.$ref],o):o,ge(e,t,r,o)}function t$(e,t,r,o){if(!a.IsArray(o))return j();for(let i=0;i<Math.min(r.items.length,o.length);i++)o[i]=pe(e,t,r.items[i],o[i]);return ge(e,t,r,o)}function r$(e,t,r,o){let i=ge(e,t,r,o);if(!a.IsArray(i))return o;for(let s=0;s<Math.min(r.items.length,i.length);s++)i[s]=pe(e,t,r.items[s],i[s]);return i}function yA(e,t,r,o){return a.IsEqual(e,"Decode")?t$(e,t,r,o):r$(e,t,r,o)}function n$(e,t,r,o){for(let i of r.anyOf){if(!ae(t,i,o))continue;let s=pe(e,t,i,o);return ge(e,t,r,s)}return j()}function o$(e,t,r,o){let i=ge(e,t,r,o);for(let s of r.anyOf){let p=pe(e,t,s,se(i));if(ae(t,s,p))return p}return i}function IA(e,t,r,o){return a.IsEqual(e,"Decode")?n$(e,t,r,o):o$(e,t,r,o)}function pe(e,t,r,o){return Z(r)?cA(e,t,r,o):ie(r)?uA(e,t,r,o):P(r)?lA(e,t,r,o):L(r)?dA(e,t,r,o):le(r)?fA(e,t,r,o):oe(r)?gA(e,t,r,o):B(r)?yA(e,t,r,o):x(r)?IA(e,t,r,o):ge(e,t,r,o)}var Mc=class extends Ur{constructor(t,r){super("Decode",t,r)}};function i$(e,t,r){if(!ae(e,t,r))throw new Mc(r,kr(e,t,r));return r}function a$(e,t,r){return pe("Decode",e,t,r)}var Vke=po([(e,t,r)=>se(r),(e,t,r)=>yn(e,t,r),(e,t,r)=>Nr(e,t,r),(e,t,r)=>fn(e,t,r),(e,t,r)=>i$(e,t,r),(e,t,r)=>a$(e,t,r)]);var wc=class extends Ur{constructor(t,r){super("Encode",t,r)}};function s$(e,t,r){if(!ae(e,t,r))throw new wc(r,kr(e,t,r));return r}function m$(e,t,r){return pe("Encode",e,t,r)}var a0e=po([(e,t,r)=>se(r),(e,t,r)=>m$(e,t,r),(e,t,r)=>yn(e,t,r),(e,t,r)=>Nr(e,t,r),(e,t,r)=>fn(e,t,r),(e,t,r)=>s$(e,t,r)]);var ht=class extends Error{constructor(t,r){super(r),this.type=t}};function EA(e,t){return a.IsFunction(t.default)?t.default(t):a.IsObject(t.default)?se(t.default):t.default}function hA(e,t){if(ao(t)&&!gt(t))throw new ht(t,"Arrays with uniqueItems constraints must specify a default annotation");let r=oo(t)?t.minItems:0;return Array.from({length:r},()=>ce(e,t.items))}async function*p$(){}function TA(e,t){return p$()}function xA(e,t){return t.Create()}function _A(e,t){return tr(t)?BigInt(t.exclusiveMinimum)+BigInt(1):rr(t)?BigInt(t.minimum):BigInt(0)}function AA(e,t){return!1}function bA(e,t){let r=ce(e,t.instanceType);return class{constructor(){Object.assign(this,r)}}}function OA(e,t){return ce({...e,...t.$defs},_e(t.$ref))}function SA(e,t){return ce(e,Hr(t))}function RA(e,t){let r=ce(e,t.returnType);return()=>r}function CA(e,t){return tr(t)&&a.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:rr(t)?t.minimum:0}function PA(e,t){return ce(e,Ot(t))}function*c$(){}function kA(e,t){return c$()}function UA(e,t){return t.const}function NA(e,t){throw new ht(t,"Cannot create TNever types")}function LA(e,t){return null}function MA(e,t){return tr(t)&&a.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:rr(t)?t.minimum:0}function wA(e,t){return(a.IsUndefined(t.required)?[]:t.required).reduce((o,i)=>({...o,[i]:ce(e,t.properties[i])}),{})}function $A(e,t){return Promise.resolve(ce(e,t.item))}function DA(e,t){if(ki(t)&&!gt(t))throw new ht(t,"Record with the minProperties constraint must have a default annotation");return{}}function GA(e,t){return a.HasPropertyKey(e,t.$ref)?ce(e,e[t.$ref]):(()=>{throw new ht(t,"Unable to deref Ref")})()}function vA(e,t){if((Ui(t)||Ci(t))&&!gt(t))throw Error("Strings with format or pattern constraints must specify default");let o=Pi(t)?t.minLength:0;return"".padEnd(o)}function jA(e,t){return Symbol()}function FA(e,t){let r=qe(t.pattern);if(Ae(r))throw new ht(t,"Unable to create TemplateLiteral due to infinite type expansion");return ce(e,r)}function qA(e,t){return Array.from({length:t.minItems},(r,o)=>ce(e,t.items[o]))}function BA(e,t){if(a.IsEqual(t.anyOf.length,0))throw Error("Unable to create Union with no variants");return ce(e,t.anyOf[0])}function ce(e,t){return gt(t)?EA(e,t):Z(t)?hA(e,t):Ke(t)?TA(e,t):lt(t)?xA(e,t):at(t)?_A(e,t):Qe(t)?AA(e,t):Ce(t)?bA(e,t):ie(t)?OA(e,t):Ie(t)?SA(e,t):Pe(t)?RA(e,t):Le(t)?CA(e,t):P(t)?PA(e,t):ze(t)?kA(e,t):Y(t)?UA(e,t):Kt(t)?NA(e,t):Ut(t)?LA(e,t):ue(t)?MA(e,t):L(t)?wA(e,t):je(t)?$A(e,t):le(t)?DA(e,t):oe(t)?GA(e,t):Ae(t)?vA(e,t):Nt(t)?jA(e,t):Ee(t)?FA(e,t):B(t)?qA(e,t):wt(t)?void 0:x(t)?BA(e,t):mt(t)?void 0:void 0}function qt(...e){let[t,r]=ee.Match(e,{2:(o,i)=>[o,i],1:o=>[{},o]});return ce(t,r)}var $c=class extends Ur{constructor(t,r){super("Parse",t,r)}};function u$(e,t,r){if(!ae(e,t,r))throw new $c(r,kr(e,t,r));return r}var uLe=po([(e,t,r)=>se(r),(e,t,r)=>yn(e,t,r),(e,t,r)=>Nr(e,t,r),(e,t,r)=>fn(e,t,r),(e,t,r)=>u$(e,t,r)]);var d$=k({type:q("insert"),path:rt(),value:Ge()}),f$=Object({type:q("update"),path:rt(),value:Ge()}),g$=k({type:q("delete"),path:rt()}),ELe=G([d$,f$,g$]);function vi(e){if(!e.body)throw new Error("This command does not accept a request body");let t=e.body;return t.examples?.length?t.examples[0]:qt(t)}function h$(e){return e.replace(/-/g," ").replace(/ies$/,"y").replace(/s$/,"")}function Gc(e){let t=e.params;if(t?.properties){let r=Object.keys(t.properties);if(r.length===1&&r[0])return r[0]}return"id"}function zA(e,t,r){let o=e.command(t.commandName).description(t.description),i=h$(t.commandName),s=o.command("list").description(`List all ${t.commandName}`);if(t.listOptions)for(let p of t.listOptions)s.option(p.flag,p.description);if(s.action(async p=>{let u={};if(t.listOptions)for(let g of t.listOptions){let y=p[g.queryParam];y!==void 0&&(u[g.queryParam]=y)}let l=await r()(t.endpoints.list,Object.keys(u).length>0?{query:u}:void 0);xe(l)}),t.endpoints.get){let p=t.endpoints.get,u=Gc(p);o.command("get <id>").description(`Get a ${i} by ID`).action(async l=>{let g=await r()(p,{params:{[u]:l}});xe(g)})}if(t.endpoints.create){let p=t.endpoints.create;o.command("create").description(`Create a new ${i}`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async u=>{if(u.generateSkeleton){xe(vi(p));return}let l=Zo(u),g=await r()(p,{body:l});xe(g)})}if(t.endpoints.update){let p=t.endpoints.update,u=Gc(p);o.command("update <id>").description(`Update a ${i} by ID`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async(l,g)=>{if(g.generateSkeleton){xe(vi(p));return}let y=Zo(g),E=await r()(p,{params:{[u]:l},body:y});xe(E)})}if(t.endpoints.delete){let p=t.endpoints.delete,u=Gc(p);o.command("delete <id>").description(`Delete a ${i} by ID`).action(async l=>{let g=await r()(p,{params:{[u]:l}});xe(g)})}}var T$=[{commandName:"dashboards",description:"Manage dashboards",endpoints:{list:xh,get:_h,create:Ah,update:bh,delete:Oh},listOptions:[{flag:"--owners <ids...>",description:"Filter by owner team IDs",queryParam:"owners"}]},{commandName:"ingestion-api-keys",description:"Manage ingestion API keys",endpoints:{list:kh,create:Uh,update:Nh,delete:Lh}},{commandName:"monitors",description:"Manage monitors",endpoints:{list:Fh,get:qh,create:Vh,update:Wh,delete:Qh}},{commandName:"notification-rules",description:"Manage notification rules",endpoints:{list:oT,get:iT,create:aT,update:sT,delete:mT}},{commandName:"notification-silences",description:"Manage notification silences",endpoints:{list:lT,get:dT,create:gT,update:yT,delete:IT}},{commandName:"quality-reports",description:"Manage quality reports",endpoints:{list:TT}},{commandName:"retention-policies",description:"Manage retention policies",endpoints:{list:AT,get:bT,create:OT,update:ST,delete:RT}},{commandName:"routes",description:"Manage routes",endpoints:{list:CT,get:PT,create:kT,update:UT,delete:NT}},{commandName:"services",description:"Manage services",endpoints:{list:jE,get:FE}},{commandName:"tag-policies",description:"Manage tag policies",endpoints:{list:qT,get:BT,create:HT,update:KT,delete:zT}},{commandName:"teams",description:"Manage teams",endpoints:{list:YT,get:VT,create:WT,update:QT,delete:ZT}}];function YA(e,t){for(let r of T$)zA(e,r,t)}var VA=`/${"v1"}/aggregation`,WA=n.Object({id:n.String({description:'Query identifier (q1, q2, ...) or "formula" for formula'}),group:n.Record(n.String(),n.Union([n.String(),n.Number()]),{description:"Group-by field values"})}),x$={results:[{id:"q1",group:{host:"server-1"},value:123.45}]},QA=n.Object({results:n.Array(n.Object({...WA.properties,value:n.Number({description:"Aggregated value"})},{title:"ScalarResult"}),{description:"Aggregated results per query and group"})},{$id:"ScalarAggregationResponse",title:"ScalarAggregationResponse",description:"Scalar aggregation response with single values"});Object.assign(QA,{examples:[x$]});var _$={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]},ZA=n.Object({series:n.Array(n.Object({...WA.properties,points:n.Array(n.Object({timestamp:n.Integer({description:"Timestamp in milliseconds"}),value:n.Number({description:"Value"})}),{description:"Array of data points"})},{title:"Series"}),{description:"Time series data per query and group"})},{$id:"TimeseriesAggregationResponse",title:"TimeseriesAggregationResponse",description:"Timeseries aggregation response with points over time"});Object.assign(ZA,{examples:[_$]});var JA={timeRange:Et,queries:n.Array(n.Omit(Xo.items,["fill"],{title:"AggregationQuery"}),{maxItems:Dm,description:"Aggregations that may be combined together in the same query"}),groupBy:n.Optional(Yn),dataSource:Jo,formula:n.Optional(ei)},A$=n.Object(JA),XA=d({description:"Run aggregation queries and return scalar results",operationId:"aggregateScalar",tags:["public","aggregation"],url:`${VA}/multi-query/scalar`,method:"POST",body:A$,response:QA}),b$=n.Object({...JA,aggregationWindow:c({description:'Time bucket size for aggregation (e.g. "10s", "1m", "1h")'})}),eb=d({description:"Run aggregation queries and return timeseries results",operationId:"aggregateTimeseries",tags:["public","aggregation"],url:`${VA}/multi-query/timeseries`,method:"POST",body:b$,response:ZA});var ms="/v0/logs";var ji=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var O$=0,S$=n.Object({__tsuga_metadata__:n.Object({id:n.String(),source:n.Optional(n.String())},{additionalProperties:!0}),context:n.Optional(n.Object({team:n.Optional(n.String()),tag_policy_warnings:n.Optional(n.Record(n.String(),n.String()))},{additionalProperties:!0})),message:n.Optional(n.String()),timestamp:n.Number(),level:n.Enum(ji)},{additionalProperties:!0});var R$="log_timestamp",C$=n.Union([n.Literal(R$)]),In={...ct.properties,query:n.Optional(c({type:"tsuga-query"})),maxResults:n.Optional(n.Integer({minimum:1,maximum:1e3})),shouldRecommendAttributes:n.Optional(n.Boolean()),defaultAttributesToHighlight:n.Optional(n.Array(c(),{maxItems:50})),triggeredBy:n.Optional(n.Literal("refresh")),startOffset:n.Optional(n.Number({minimum:O$})),clusterId:n.Optional(c({allowEmpty:!1})),sortBy:n.Optional(C$),sortDirection:n.Optional(n.Union([n.Literal("asc"),n.Literal("desc")]))},b$e=d({tags:["logs"],url:`${ms}/count`,method:"GET",query:n.Pick(n.Object(In),["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),vc=n.Object({value:n.String(),priority:n.Number({minimum:0,maximum:1})}),O$e=d({tags:["logs"],url:`${ms}/search`,method:"GET",query:n.Object(In),response:n.Object({logs:n.Optional(n.Array(S$)),attributesToHighlight:n.Optional(n.Array(vc))},{additionalProperties:!0})}),jc=n.Cyclic({TokenOutput:n.Union([n.Object({type:n.Literal("top"),values:n.Array(n.String())}),n.Object({type:n.Literal("ip"),value:n.String()}),n.Object({type:n.Literal("range"),min:n.Number(),max:n.Number()}),n.Object({type:n.Literal("variable"),value:n.String()}),n.Object({type:n.Literal("text"),value:n.String()}),n.Object({type:n.Literal("date"),value:n.String()}),n.Object({type:n.Literal("url"),value:n.String()}),n.Object({type:n.Literal("structure"),key:n.Array(n.String()),value:n.Array(n.Ref("TokenOutput"))})])},"TokenOutput",{description:"A token identified as part of the pattern"}),P$=n.Object({id:n.String(),pattern:n.Array(jc),size:n.Integer({description:"Number of logs that matched the pattern"}),examples:n.Array(n.Object({id:n.Any(),timestampUnix:n.Number()})),timeDistribution:n.Array(n.Number()),staticFeatures:n.Array(n.Object({key:n.String(),value:n.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),S$e=d({tags:["logs"],url:`${ms}/patterns`,method:"GET",query:n.Object({...ct.properties,query:c({type:"tsuga-query"}),clusteringThreshold:n.Optional(n.Number()),clusterId:n.Optional(c({allowEmpty:!1}))}),response:n.Object({patterns:n.Array(P$),sampleSize:n.Number()})}),R$e=d({tags:["logs"],url:`${ms}/attributes`,method:"GET",query:n.Object({...ct.properties,clusterId:n.Optional(c({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Object({attributes:n.Array(n.String())})});var ps=`/${"v1"}/logs`,Fc=n.Object({context:n.Optional(n.Object({team:n.Optional(n.String())},{additionalProperties:!0,$id:"LogContext"})),message:n.Optional(n.String()),timestamp:n.Number(),level:n.Enum(ji)},{additionalProperties:!0,$id:"LogEvent"}),k$={context:{team:"platform"},message:"Request completed successfully",timestamp:17040672e5,level:"INFO"};Object.assign(Fc,{examples:[k$]});var U$={query:"level:ERROR",maxResults:100,from:1704067200,to:1704067200},tb=n.Object({...n.Pick(n.Object(In),["query","maxResults"]).properties,...Et.properties});Object.assign(tb,{examples:[U$]});var rb=d({description:"Search logs",operationId:"searchLogs",tags:["public","logs"],url:`${ps}/search`,method:"GET",query:tb,response:n.Object({logs:n.Array(Fc)})}),N$=n.Object({pattern:n.Array(jc),size:n.Integer({description:"Number of logs that matched the pattern"}),groups:n.Array(n.Object({key:n.String(),value:n.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),nb=n.Object({patterns:n.Array(N$),sampleSize:n.Number()}),L$={patterns:[{pattern:[{type:"text",value:"Resolved"},{type:"text",value:" "},{type:"text",value:"segment"},{type:"text",value:" "},{type:"text",value:"SegmentId("},{type:"range",min:0,max:1},{type:"text",value:")"},{type:"text",value:" "},{type:"text",value:"from"},{type:"text",value:" "},{type:"text",value:"cache"}],size:37004,groups:[{key:"level",value:"DEBUG"},{key:"context.team",value:"infra"}]}],sampleSize:100};Object.assign(nb,{examples:[L$]});var ob=d({description:"Get log patterns",operationId:"getLogPatterns",tags:["public","logs"],url:`${ps}/patterns`,method:"GET",query:n.Object({...Et.properties,query:c({type:"tsuga-query"})}),response:nb}),M$=n.Object({exampleLog:n.Optional(Fc),team:n.String(),env:n.String(),service:n.String(),firstSeen:n.Number({description:"Timestamp in milliseconds when this pattern was first seen"}),lastSeen:n.Number({description:"Timestamp in milliseconds when this pattern was last seen"})}),ib=n.Object({newErrorPatterns:n.Array(M$)}),w$={newErrorPatterns:[{team:"platform",env:"production",service:"api-gateway",firstSeen:17040672e5,lastSeen:17041536e5,exampleLog:{message:"ConnectionError: Failed to connect to database",timestamp:17041536e5,level:"ERROR"}}]};Object.assign(ib,{examples:[w$]});var ab=d({description:"Get new error patterns",operationId:"getNewErrorPatterns",tags:["public","logs"],url:`${ps}/patterns/new`,method:"GET",query:n.Object({...Et.properties,team:n.Optional(c()),env:n.Optional(c()),service:n.Optional(c())}),response:ib}),$$=n.Object({team:n.String(),env:n.String(),pattern:n.String({description:"The error pattern formatted"}),increaseTimestamps:n.Array(n.Number({description:"Timestamps in milliseconds when there were increases in this pattern"}))}),sb=n.Object({errorPatternIncreases:n.Array($$)}),D$={errorPatternIncreases:[{team:"platform",env:"production",pattern:"Non-resolved segment SegmentId(*) from cache",increaseTimestamps:[17041536e5,17042392e5]}]};Object.assign(sb,{examples:[D$]});var mb=d({description:"Get error pattern increases for a given team",operationId:"getErrorPatternIncrease",tags:["public","logs"],url:`${ps}/patterns/increase`,method:"GET",query:n.Object({...Et.properties,team:c(),env:n.Optional(c())}),response:sb});var ir="/v0/metrics",G$=n.Object({__tsuga_metadata__:n.Object({id:n.Optional(n.String())},{additionalProperties:!0}),context:n.Optional(n.Object({},{additionalProperties:!0})),message:n.Optional(n.String()),timestamp:n.Number(),level:n.Enum(ji)},{additionalProperties:!0}),F$e=d({tags:["metrics"],url:`${ir}/count`,method:"GET",query:n.Pick(n.Object(In),["from","to","query"]),response:n.Object({count:n.Number()})}),q$e=d({tags:["metrics"],url:`${ir}/search`,method:"GET",query:n.Object(In),response:n.Object({logs:n.Optional(n.Array(G$)),totalHits:n.Optional(n.Number()),attributesToHighlight:n.Optional(n.Array(vc))},{additionalProperties:!0})}),cs=n.Enum(["counter","gauge","histogram","summary"]),qc=n.Enum(["delta","cumulative","none"]),v$=n.Object({capabilities:n.Optional(n.Array(n.String())),description:n.Optional(n.String()),tags:n.Optional(n.Array(n.String())),temporality:n.Optional(qc),type:n.Optional(cs),unit:n.Optional(n.String())}),B$e=d({url:`${ir}/metadata`,method:"GET",query:n.Object({...ct.properties,metricName:c({allowEmpty:!1}),clusterId:n.Optional(c({allowEmpty:!1,description:"Cluster ID"}))}),response:v$}),H$e=d({tags:["metrics"],url:ir,method:"GET",query:n.Object({...ct.properties,clusterId:n.Optional(c({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Array(n.String())}),Bc=n.Array(n.Object({name:n.String(),type:cs}),{description:"List of metric names and their types"}),K$e=d({tags:["metrics"],url:`${ir}/names-and-types`,method:"GET",query:n.Object({...ct.properties,clusterId:n.Optional(c({allowEmpty:!1,description:"Cluster ID"}))}),response:Bc}),us=n.Array(n.String(),{description:"List of attribute names"}),z$e=d({tags:["metrics"],url:`${ir}/attributes`,method:"GET",query:n.Object({...ct.properties,metricName:c({allowEmpty:!1}),clusterId:n.Optional(c({allowEmpty:!1,description:"Cluster ID"}))}),response:us}),Y$e=d({tags:["metrics"],url:`${ir}/attributes/batch`,method:"GET",query:n.Object({...ct.properties,metricNames:n.Array(c({allowEmpty:!1}),{minItems:1,description:"Metric names to fetch attributes for"}),clusterId:n.Optional(c({allowEmpty:!1,description:"Cluster ID"}))}),response:us}),Hc=n.Object({assets:n.Array(n.Object({type:n.Enum(["dashboard","monitor"]),id:n.String(),name:n.String(),owner:n.String()},{description:"An asset that uses a metric"}),{description:"List of assets (dashboards and monitors) using this metric"})}),V$e=d({tags:["metrics"],url:`${ir}/assets-usage`,method:"GET",query:n.Object({metricName:c({allowEmpty:!1})}),response:Hc}),W$e=d({url:`${ir}/per-attribute`,method:"GET",query:n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number()),attribute:c(),clusterId:n.Optional(c({allowEmpty:!1}))}),response:n.Array(n.String())});var Kc=`/${"v1"}/metrics`,j$=[{name:"http.server.request.duration",type:"histogram"},{name:"http.server.active_requests",type:"gauge"},{name:"http.server.request.count",type:"counter"}];Object.assign(Bc,{examples:[j$]});var zc=n.Object({name:n.String({description:"Name of the metric"}),type:cs,description:n.Optional(n.String({description:"Human-readable description of the metric"})),unit:n.Optional(n.String({description:"Unit of the metric"})),temporality:n.Optional(qc),capabilities:n.Optional(n.Array(n.String(),{description:"Supported capabilities, an empty array means all capabilities are supported"})),attributes:n.Optional(n.Array(n.String(),{description:"Metric attributes"}))}),F$={name:"http.server.request.duration",type:"histogram",description:"Duration of HTTP server requests",unit:"ms",temporality:"delta",capabilities:["max","min","sum"],attributes:["context.team","context.environment","context.region"]};Object.assign(zc,{examples:[F$]});var pb=d({description:"Get all metrics with their metadata",operationId:"listMetrics",tags:["public","metrics"],url:Kc,method:"GET",query:Et,response:n.Array(zc)}),cb=d({description:"Retrieve a metric by name with its metadata",operationId:"getMetric",tags:["public","metrics"],url:`${Kc}/:name`,method:"GET",params:n.Object({name:c({allowEmpty:!1,description:"The metric name"})}),query:Et,response:zc}),q$=["service","env","host","method","status_code"];Object.assign(us,{examples:[q$]});var ub=n.Pick(Hc,["assets"]),B$={assets:[{type:"dashboard",id:"dash-123-abc",name:"API Performance Overview",owner:"user-456-def"},{type:"monitor",id:"mon-789-ghi",name:"High Latency Alert",owner:"user-456-def"}]};Object.assign(ub,{examples:[B$]});var n1e=d({description:"Retrieve dashboards and monitors that use a specific metric",operationId:"getMetricAssetsUsage",tags:["private"],url:`${Kc}/assets-usage`,method:"GET",query:n.Object({metricName:c({allowEmpty:!1,description:"The name of the metric to find usage for"})}),response:ub});var H$=`/${"v1"}/traces`,lb=n.Object({context:n.Optional(n.Object({service:n.Optional(n.Object({name:n.Optional(n.String()),version:n.Optional(n.String())},{additionalProperties:!0}))},{additionalProperties:!0})),parentSpanId:n.Optional(n.String()),resourceAttributes:n.Object({},{additionalProperties:!0}),spanAttributes:n.Object({},{additionalProperties:!0}),duration:n.Number({description:"In milliseconds."}),startTime:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),endTime:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),error:n.Optional(n.Object({message:n.String()})),events:n.Optional(n.Array(n.Object({event_attributes:n.Object({},{additionalProperties:!0}),event_name:n.String(),event_timestamp_nanos:n.String()}))),spanId:n.String(),span:n.Object({kind:n.String(),name:n.String()}),statusCode:n.Optional(n.String()),traceId:n.String()},{additionalProperties:!0,$id:"SpanEvent"}),K$={context:{service:{name:"my-service",version:"1.0.0"}},parentSpanId:"187a47da1b2560f8",resourceAttributes:{},spanAttributes:{busyNs:374640,code:{file:{path:"src/queue/sqs.rs"},line:{number:162},module:{name:"queue::sqs"}},idleNs:23621445,maxMessages:"1",target:"queue::sqs",thread:{id:2,name:"tokio-runtime-worker"}},duration:23,startTime:"1770923469995353600",endTime:"1770923470019349500",spanId:"3df8cc3449378f66",span:{kind:"internal",name:"receive_messages"},statusCode:"ok",traceId:"78c99c5bb1e4a30297fa134b9dbec64f"};Object.assign(lb,{examples:[K$]});var z$={from:1704067200,to:1704067200,query:"context.service.name:my-service",maxResults:100},db=n.Object({...Et.properties,query:n.Optional(c({type:"tsuga-query"})),maxResults:n.Optional(n.Integer({minimum:1,maximum:1e4}))});Object.assign(db,{examples:[z$]});var fb=d({description:"Search spans",operationId:"searchSpans",tags:["public","traces"],url:`${H$}/search`,method:"GET",query:db,response:n.Object({spans:n.Array(lb)})});function Tt(e,t){let r=t??Qt(e);if(!r)throw new Error(`--${e} is required`);return Da(r)}function gb(e){let t={from:Tt("from",e.from),to:Tt("to",e.to)},r=e.query??Qt("query");r!==void 0&&(t.query=r);let o=e.maxResults??Qt("max-results");if(o!==void 0){let i=Number(o);if(Number.isNaN(i))throw new Error(`--max-results must be a number (got: ${o})`);t.maxResults=i}return t}function yb(e,t,r,o,i){e.command(t).description(r).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async s=>{if(s.generateSkeleton){xe(vi(o));return}let p=Zo(s),u=await i()(o,{body:p});xe(u)})}function Be(e){let t=Qt(e);return t===void 0?"":` (default: ${t})`}function Ib(e,t){let r=e.command("logs").description("Search and analyze logs");r.command("search").description("Search logs").option("--from <timestamp>",`Start of time range${Be("from")}`).option("--to <timestamp>",`End of time range${Be("to")}`).option("--query <query>",`Search query${Be("query")}`).option("--max-results <n>",`Maximum number of results${Be("max-results")}`).action(async p=>{let u=await t()(rb,{query:gb(p)});xe(u)}),r.command("patterns").description("List log patterns").option("--from <timestamp>",`Start of time range${Be("from")}`).option("--to <timestamp>",`End of time range${Be("to")}`).option("--query <query>",`Search query${Be("query")}`).action(async p=>{let u={from:Tt("from",p.from),to:Tt("to",p.to)},l=p.query??Qt("query");l!==void 0&&(u.query=l);let g=await t()(ob,{query:u});xe(g)}),r.command("new-error-patterns").description("List new error patterns").option("--from <timestamp>",`Start of time range${Be("from")}`).option("--to <timestamp>",`End of time range${Be("to")}`).option("--team <team>","Filter by team").option("--env <env>","Filter by environment").option("--service <service>","Filter by service").action(async p=>{let u={from:Tt("from",p.from),to:Tt("to",p.to)};p.team!==void 0&&(u.team=p.team),p.env!==void 0&&(u.env=p.env),p.service!==void 0&&(u.service=p.service);let l=await t()(ab,{query:u});xe(l)}),r.command("error-pattern-increases").description("List error pattern increases for a given team").option("--from <timestamp>",`Start of time range${Be("from")}`).option("--to <timestamp>",`End of time range${Be("to")}`).requiredOption("--team <team>","Team to query").option("--env <env>","Filter by environment").action(async p=>{let u={from:Tt("from",p.from),to:Tt("to",p.to),team:p.team};p.env!==void 0&&(u.env=p.env);let l=await t()(mb,{query:u});xe(l)});let o=e.command("metrics").description("List and inspect metrics");o.command("list").description("List all metrics with their metadata").option("--from <timestamp>",`Start of time range${Be("from")}`).option("--to <timestamp>",`End of time range${Be("to")}`).action(async p=>{let u=await t()(pb,{query:{from:Tt("from",p.from),to:Tt("to",p.to)}});xe(u)}),o.command("get <name>").description("Retrieve a metric by name with its metadata").option("--from <timestamp>",`Start of time range${Be("from")}`).option("--to <timestamp>",`End of time range${Be("to")}`).action(async(p,u)=>{let l=await t()(cb,{params:{name:p},query:{from:Tt("from",u.from),to:Tt("to",u.to)}});xe(l)}),e.command("traces").description("Search traces").command("search").description("Search spans").option("--from <timestamp>",`Start of time range${Be("from")}`).option("--to <timestamp>",`End of time range${Be("to")}`).option("--query <query>",`Search query${Be("query")}`).option("--max-results <n>",`Maximum number of results${Be("max-results")}`).action(async p=>{let u=await t()(fb,{query:gb(p)});xe(u)});let s=e.command("aggregation").description("Run aggregation queries");yb(s,"scalar","Run aggregation queries and return scalar results",XA,t),yb(s,"timeseries","Run aggregation queries and return timeseries results",eb,t)}var Y$=3e3,V$="https://registry.npmjs.org/@tsuga/cli/latest";function W$(e,t){let r=e.split(".").map(Number),o=t.split(".").map(Number);for(let i=0;i<Math.max(r.length,o.length);i++){let s=r[i]??0,p=o[i]??0;if(s>p)return!0;if(s<p)return!1}return!1}async function Eb(e){try{let t=JE();if(t&&Date.now()-t<$a)return;let r=await fetch(V$,{signal:AbortSignal.timeout(Y$)});if(!r.ok)return;let i=(await r.json()).version;W$(i,e)&&(process.stderr.write(`
41
42
  Update available: ${e} \u2192 ${i}
42
- `),process.stderr.write("Run `npm install -g @tsuga/cli` to update\n")),$A(Date.now())}catch{}}var kr=new zc().name("tsuga").description("Tsuga CLI - manage resources from the command line").version("1.0.5").option("--operation-api-key <operation-api-key>","Operation API key"),Uc;function HA(){if(!Uc){let e=kr.opts(),t=Rc({apiToken:e.apiToken});t.apiToken||(console.error("Error: API token is required. Set it with one of:"),console.error(" tsuga auth <operation-api-key>"),console.error(" export TSUGA_OPERATION_API_KEY=<operation-api-key>"),console.error(" tsuga --operation-api-key <operation-api-key> <command>"),process.exit(1)),Uc=AE(t.apiUrl,t.apiToken)}return Uc}kr.command("auth <operation-api-key>").description("Save Operation API key to ~/.config/tsuga/config.json").action(e=>{Cc({operationApiKey:e}),process.stdout.write(`Operation API key saved to ${Pc()}
43
- `)});kr.command("config").description("Show current configuration").action(()=>{if(!UA()){process.stdout.write(`No config found. Run: tsuga auth <operation-api-key>
44
- `);return}let e=kr.opts(),t=Rc({apiToken:e.apiToken}),r=[`API URL: ${t.apiUrl}`];t.apiToken?r.push(`API Token: ${t.apiToken.slice(0,12)}...${t.apiToken.slice(-4)}`):r.push("API Token: (not set)"),r.push(`Config: ${Pc()}`),process.stdout.write(`${r.join(`
43
+ `),process.stderr.write("Run `npm install -g @tsuga/cli` to update\n")),XE(Date.now())}catch{}}var Bt=new mu().name("tsuga").description("Tsuga CLI - manage resources from the command line").version("1.0.7").option("--operation-api-key <operation-api-key>","Operation API key"),Yc;function ls(){if(!Yc){let e=Bt.opts(),t=km({apiToken:e.apiToken});t.apiToken||(console.error("Error: API token is required. Set it with one of:"),console.error(" tsuga auth <operation-api-key>"),console.error(" export TSUGA_OPERATION_API_KEY=<operation-api-key>"),console.error(" tsuga --operation-api-key <operation-api-key> <command>"),process.exit(1)),Yc=bE(t.apiUrl,t.apiToken)}return Yc}Bt.command("auth <operation-api-key>").description("Save Operation API key to ~/.config/tsuga/config.json").action(e=>{Um({operationApiKey:e}),process.stdout.write(`Operation API key saved to ${Nm()}
44
+ `)});Bt.command("config").description("Show current configuration").action(()=>{if(!VE()){process.stdout.write(`No config found. Run: tsuga auth <operation-api-key>
45
+ `);return}let e=Bt.opts(),t=km({apiToken:e.apiToken}),r=[`API URL: ${t.apiUrl}`];t.apiToken?r.push(`API Token: ${t.apiToken.slice(0,12)}...${t.apiToken.slice(-4)}`):r.push("API Token: (not set)"),r.push(`Config: ${Nm()}`),process.stdout.write(`${r.join(`
45
46
  `)}
46
- `)});var KA=kr.command("defaults").description("Show or manage default values for command flags").action(()=>{let e=LA(),t={...kc,...e},r=["Defaults (custom overrides marked with *):"];for(let[n,i]of Object.entries(t)){let s=n in e?" *":"";r.push(` ${n}: ${i}${s}`)}process.stdout.write(`${r.join(`
47
+ `)});var hb=Bt.command("defaults").description("Show or manage default values for command flags").action(()=>{let e=WE(),t={...Lm,...e},r=["Defaults (custom overrides marked with *):"];for(let[o,i]of Object.entries(t)){let s=o in e?" *":"";r.push(` ${o}: ${i}${s}`)}process.stdout.write(`${r.join(`
47
48
  `)}
48
- `)});KA.command("set <key> <value>").description("Set a custom default value").action((e,t)=>{NA(e,t),process.stdout.write(`Default set: ${e} = ${t}
49
- `)});KA.command("reset").description("Clear all custom defaults").action(()=>{MA(),process.stdout.write(`Custom defaults cleared
50
- `)});sA(kr,HA);qA(kr,HA);kr.parseAsync().then(()=>BA("1.0.5")).catch(e=>{console.error(_E(e)),process.exitCode=1});
49
+ `)});hb.command("set <key> <value>").description("Set a custom default value").action((e,t)=>{QE(e,t),process.stdout.write(`Default set: ${e} = ${t}
50
+ `)});hb.command("reset").description("Clear all custom defaults").action(()=>{ZE(),process.stdout.write(`Custom defaults cleared
51
+ `)});YA(Bt,ls);Ib(Bt,ls);th(Bt,ls);UE(Bt,ls);Bt.parseAsync().then(()=>Eb("1.0.7")).catch(e=>{console.error(AE(e)),process.exitCode=1});
51
52
  /**
52
53
  * The following is a list of HTTP status codes and their meanings.
53
54
  *