fjall 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/.bundled
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
bundled at 2026-06-
|
|
1
|
+
bundled at 2026-06-01T20:34:20.317Z
|
|
2
2
|
bundle size: 3052656 bytes
|
|
3
|
-
cli version: 2.7.
|
|
3
|
+
cli version: 2.7.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= packageName %>",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"devDependencies": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript": "~6.0.3"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@fjall/components-infrastructure": "^2.7.
|
|
12
|
+
"@fjall/components-infrastructure": "^2.7.1",
|
|
13
13
|
"aws-cdk-lib": "^2.251.0",
|
|
14
14
|
"constructs": "^10.6.0"
|
|
15
15
|
}
|
package/bin/fjall.bundle.js
CHANGED
|
@@ -33,7 +33,7 @@ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
33
33
|
`),this.outputHelp({error:!0}));let n=r||{},a=n.exitCode||1,o=n.code||"commander.error";this._exit(a,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in tn.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,tn.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new z4e(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())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(a=>!r(a)).forEach(a=>{this.setOptionValueWithSource(a,n.implied[a],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=s=>{let i=s.attributeName(),c=this.getOptionValue(i),l=this.options.find(p=>p.negate&&i===p.attributeName()),u=this.options.find(p=>!p.negate&&i===p.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||s},a=s=>{let i=n(s),c=i.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${i.envVar}'`:`option '${i.flags}'`},o=`error: ${a(e)} cannot be used with ${a(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let a=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(i=>i.long).map(i=>i.long);a=a.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);r=Lae(e,a)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let a=[];this.createHelp().visibleCommands(this).forEach(o=>{a.push(o.name()),o.alias()&&a.push(o.alias())}),r=Lae(e,a)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let a=this.createOption(r,n);return this._versionOptionName=a.attributeName(),this._registerOption(a),this.on("option:"+a.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
34
34
|
`),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===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]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let a=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${a}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>U4e(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=ad.basename(e,ad.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let a=r.formatHelp(this,r);return n.hasColors?a:this._outputConfiguration.stripColor(a)}_getOutputContext(e){e=e||{};let r=!!e.error,n,a,o;return r?(n=i=>this._outputConfiguration.writeErr(i),a=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(n=i=>this._outputConfiguration.writeOut(i),a=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:i=>(a||(i=this._outputConfiguration.stripColor(i)),n(i)),hasColors:a,helpWidth:o}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),a={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",a)),this.emit("beforeHelp",a);let o=this.helpInformation({error:n.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",a),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",a))}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(tn.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
35
35
|
Expecting one of '${n.join("', '")}'`);let a=`${e}Help`;return this.on(a,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
|
|
36
|
-
`)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(a=>r.is(a))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Uae(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",a="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?a=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],a=o[4]),r&&a!=="0"?`${r}=${n}:${parseInt(a)+1}`:e})}function s4(){if(tn.env.NO_COLOR||tn.env.FORCE_COLOR==="0"||tn.env.FORCE_COLOR==="false")return!1;if(tn.env.FORCE_COLOR||tn.env.CLICOLOR_FORCE!==void 0)return!0}i4.Command=o4;i4.useColor=s4});var Gae=se(Gc=>{var{Argument:jae}=fR(),{Command:c4}=Bae(),{CommanderError:V4e,InvalidArgumentError:zae}=fw(),{Help:G4e}=X3(),{Option:Vae}=r4();Gc.program=new c4;Gc.createCommand=t=>new c4(t);Gc.createOption=(t,e)=>new Vae(t,e);Gc.createArgument=(t,e)=>new jae(t,e);Gc.Command=c4;Gc.Option=Vae;Gc.Argument=jae;Gc.Help=G4e;Gc.CommanderError=V4e;Gc.InvalidArgumentError=zae;Gc.InvalidOptionArgumentError=zae});var hw,l4=b(()=>{hw={name:"@fjall/cli",version:"2.7.0",description:"Fjall CLI helper",private:!0,type:"module",bin:{fjall:"dist/src/cli.js"},files:["dist/"],scripts:{clean:"rm -rf ./dist ./sourcemaps","clean:node":"rm -rf ./node_modules","copy-files":'find generators -type d -name files | while read dir; do mkdir -p "dist/$dir" && cp -R "$dir/"* "dist/$dir/"; done && cp -R src/proto ./dist/src/proto',build:"npm run clean && npx tsc && npm run copy-files && node ../scripts/minify-dist.mjs dist && chmod +x ./dist/src/cli.js",watch:"npm run build && npx tsc-watch","watch:only":'npx tsc-watch --onSuccess "npm run copy-files"',"fjall-cli":"node ./dist/src/cli.js",version:"npx tsx scripts/updateTemplateVersions.ts",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',"format:check":'prettier --check "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',lint:"eslint src/ generators/","lint:fix":"eslint src/ generators/ --fix",typecheck:"tsc --noEmit","typecheck:tests":"tsc --noEmit --project tsconfig.test.json","typecheck:scripts":"tsc --noEmit --project tsconfig.scripts.json","typecheck:all":"npm run typecheck && npm run typecheck:tests && npm run typecheck:scripts",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:integration":"vitest run --config vitest.config.integration.ts","test:integration:watch":"vitest --config vitest.config.integration.ts","test:e2e":"vitest run --config vitest.e2e.config.ts","test:all":"npm run test && npm run test:integration && npm run test:e2e","test:setup":"node scripts/setupTestFixtures.mjs","test:payload-compat":"npx tsx scripts/testPayloadCompatibility.ts","test:payload-compat:e2e":"npx tsx scripts/testPayloadCompatibility.ts --e2e"},engines:{node:">=22.0.0"},author:"",license:"SEE LICENSE IN LICENSE",devDependencies:{"@eslint/js":"^10.0.1","@playwright/test":"^1.59.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/ejs":"^3.1.5","@types/js-yaml":"^4.0.9","@types/mime-types":"^3.0.1","@types/picomatch":"^4.0.3","@types/prompts":"^2.4.9","@types/proper-lockfile":"^4.1.4","@types/react":"^19.2.14","@types/tar-fs":"^2.0.4","@types/tar-stream":"^3.1.4","@typescript-eslint/eslint-plugin":"^8.59.1","@typescript-eslint/parser":"^8.59.1","@vitest/coverage-v8":"^4.1.5",eslint:"^10.2.1","eslint-plugin-fjall":"file:./eslint-rules","ink-testing-library":"^4.0.0",jsdom:"^29.1.0",prettier:"^3.8.3","react-dom":"^19.2.5","tsc-watch":"^7.2.0",tsx:"^4.21.0","typescript-eslint":"^8.59.1",vitest:"4.1.7"},dependencies:{"@aws-sdk/client-auto-scaling":"^3.1038.0","@aws-sdk/client-backup":"^3.1038.0","@aws-sdk/client-cloudformation":"^3.1038.0","@aws-sdk/client-cost-explorer":"^3.1038.0","@aws-sdk/client-ec2":"^3.1038.0","@aws-sdk/client-ecr":"^3.1038.0","@aws-sdk/client-ecs":"^3.1038.0","@aws-sdk/client-elasticache":"^3.1038.0","@aws-sdk/client-iam":"^3.1038.0","@aws-sdk/client-identitystore":"^3.1038.0","@aws-sdk/client-lambda":"^3.1038.0","@aws-sdk/client-organizations":"^3.1038.0","@aws-sdk/client-ram":"^3.1038.0","@aws-sdk/client-rds":"^3.1038.0","@aws-sdk/client-route-53":"^3.1038.0","@aws-sdk/client-s3":"^3.1038.0","@aws-sdk/client-secrets-manager":"^3.1038.0","@aws-sdk/client-ssm":"^3.1038.0","@aws-sdk/client-sso":"^3.1038.0","@aws-sdk/client-sso-admin":"^3.1038.0","@aws-sdk/client-sso-oidc":"^3.1038.0","@aws-sdk/client-sts":"^3.1038.0","@fjall/deploy-core":"^2.7.0","@fjall/generator":"^2.7.0","@fjall/util":"^2.7.0","@nx/devkit":"^22.7.0","@opennextjs/aws":"^3.10.4","@smithy/node-http-handler":"^4.6.1","@toon-format/toon":"^2.1.0","aws-cdk":"^2.1119.0",axios:"^1.15.2",chalk:"^5.6.2","cli-cursor":"^5.0.0",commander:"^14.0.3",ejs:"^5.0.2",ink:"^7.0.1","js-yaml":"^4.1.1","mime-types":"^3.0.2",open:"^11.0.0",ora:"^9.4.0",picomatch:"^4.0.4",prompts:"^2.4.2","proper-lockfile":"^4.1.2",protobufjs:"^8.0.3",react:"^19.2.5","tar-fs":"^3.1.2",typescript:"^6.0.3","update-check":"^1.5.4",zod:"^4.4.3"},gitHead:"8e075d68ec034e0b9c2256f80ac2baf25a0f5645"}});function K4e(){let t=new Map;for(let[e,r]of Object.entries(Qn)){for(let[n,a]of Object.entries(r))Qn[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},r[n]=Qn[n],t.set(a[0],a[1]);Object.defineProperty(Qn,e,{value:r,enumerable:!1})}return Object.defineProperty(Qn,"codes",{value:t,enumerable:!1}),Qn.color.close="\x1B[39m",Qn.bgColor.close="\x1B[49m",Qn.color.ansi=qae(),Qn.color.ansi256=Kae(),Qn.color.ansi16m=Yae(),Qn.bgColor.ansi=qae(10),Qn.bgColor.ansi256=Kae(10),Qn.bgColor.ansi16m=Yae(10),Object.defineProperties(Qn,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let a=Number.parseInt(n,16);return[a>>16&255,a>>8&255,a&255]},enumerable:!1},hexToAnsi256:{value:e=>Qn.rgbToAnsi256(...Qn.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,a;if(e>=232)r=((e-232)*10+8)/255,n=r,a=r;else{e-=16;let i=e%36;r=Math.floor(e/36)/5,n=Math.floor(i/6)/5,a=i%6/5}let o=Math.max(r,n,a)*2;if(o===0)return 30;let s=30+(Math.round(a)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Qn.ansi256ToAnsi(Qn.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Qn.ansi256ToAnsi(Qn.hexToAnsi256(e)),enumerable:!1}}),Qn}var qae,Kae,Yae,Qn,C_t,H4e,q4e,w_t,Y4e,ou,Jae=b(()=>{qae=(t=0)=>e=>`\x1B[${e+t}m`,Kae=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Yae=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Qn={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},C_t=Object.keys(Qn.modifier),H4e=Object.keys(Qn.color),q4e=Object.keys(Qn.bgColor),w_t=[...H4e,...q4e];Y4e=K4e(),ou=Y4e});import u4 from"node:process";import J4e from"node:os";import Zae from"node:tty";function Wc(t,e=globalThis.Deno?globalThis.Deno.args:u4.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),a=e.indexOf("--");return n!==-1&&(a===-1||n<a)}function Z4e(){if("FORCE_COLOR"in ea)return ea.FORCE_COLOR==="true"?1:ea.FORCE_COLOR==="false"?0:ea.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ea.FORCE_COLOR,10),3)}function X4e(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Q4e(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Z4e();n!==void 0&&(gR=n);let a=r?gR:n;if(a===0)return 0;if(r){if(Wc("color=16m")||Wc("color=full")||Wc("color=truecolor"))return 3;if(Wc("color=256"))return 2}if("TF_BUILD"in ea&&"AGENT_NAME"in ea)return 1;if(t&&!e&&a===void 0)return 0;let o=a||0;if(ea.TERM==="dumb")return o;if(u4.platform==="win32"){let s=J4e.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ea)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in ea)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in ea)||ea.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ea)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ea.TEAMCITY_VERSION)?1:0;if(ea.COLORTERM==="truecolor"||ea.TERM==="xterm-kitty"||ea.TERM==="xterm-ghostty"||ea.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ea){let s=Number.parseInt((ea.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ea.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ea.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ea.TERM)||"COLORTERM"in ea?1:o}function Xae(t,e={}){let r=Q4e(t,{streamIsTTY:t&&t.isTTY,...e});return X4e(r)}var ea,gR,e6e,Qae,eoe=b(()=>{({env:ea}=u4);Wc("no-color")||Wc("no-colors")||Wc("color=false")||Wc("color=never")?gR=0:(Wc("color")||Wc("colors")||Wc("color=true")||Wc("color=always"))&&(gR=1);e6e={stdout:Xae({isTTY:Zae.isatty(1)}),stderr:Xae({isTTY:Zae.isatty(2)})},Qae=e6e});function toe(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let a=e.length,o=0,s="";do s+=t.slice(o,n)+e+r,o=n+a,n=t.indexOf(e,o);while(n!==-1);return s+=t.slice(o),s}function roe(t,e,r,n){let a=0,o="";do{let s=t[n-1]==="\r";o+=t.slice(a,s?n-1:n)+e+(s?`\r
|
|
36
|
+
`)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(a=>r.is(a))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Uae(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",a="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?a=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],a=o[4]),r&&a!=="0"?`${r}=${n}:${parseInt(a)+1}`:e})}function s4(){if(tn.env.NO_COLOR||tn.env.FORCE_COLOR==="0"||tn.env.FORCE_COLOR==="false")return!1;if(tn.env.FORCE_COLOR||tn.env.CLICOLOR_FORCE!==void 0)return!0}i4.Command=o4;i4.useColor=s4});var Gae=se(Gc=>{var{Argument:jae}=fR(),{Command:c4}=Bae(),{CommanderError:V4e,InvalidArgumentError:zae}=fw(),{Help:G4e}=X3(),{Option:Vae}=r4();Gc.program=new c4;Gc.createCommand=t=>new c4(t);Gc.createOption=(t,e)=>new Vae(t,e);Gc.createArgument=(t,e)=>new jae(t,e);Gc.Command=c4;Gc.Option=Vae;Gc.Argument=jae;Gc.Help=G4e;Gc.CommanderError=V4e;Gc.InvalidArgumentError=zae;Gc.InvalidOptionArgumentError=zae});var hw,l4=b(()=>{hw={name:"@fjall/cli",version:"2.7.1",description:"Fjall CLI helper",private:!0,type:"module",bin:{fjall:"dist/src/cli.js"},files:["dist/"],scripts:{clean:"rm -rf ./dist ./sourcemaps","clean:node":"rm -rf ./node_modules","copy-files":'find generators -type d -name files | while read dir; do mkdir -p "dist/$dir" && cp -R "$dir/"* "dist/$dir/"; done && cp -R src/proto ./dist/src/proto',build:"npm run clean && npx tsc && npm run copy-files && node ../scripts/minify-dist.mjs dist && chmod +x ./dist/src/cli.js",watch:"npm run build && npx tsc-watch","watch:only":'npx tsc-watch --onSuccess "npm run copy-files"',"fjall-cli":"node ./dist/src/cli.js",version:"npx tsx scripts/updateTemplateVersions.ts",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',"format:check":'prettier --check "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',lint:"eslint src/ generators/","lint:fix":"eslint src/ generators/ --fix",typecheck:"tsc --noEmit","typecheck:tests":"tsc --noEmit --project tsconfig.test.json","typecheck:scripts":"tsc --noEmit --project tsconfig.scripts.json","typecheck:all":"npm run typecheck && npm run typecheck:tests && npm run typecheck:scripts",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:integration":"vitest run --config vitest.config.integration.ts","test:integration:watch":"vitest --config vitest.config.integration.ts","test:e2e":"vitest run --config vitest.e2e.config.ts","test:all":"npm run test && npm run test:integration && npm run test:e2e","test:setup":"node scripts/setupTestFixtures.mjs","test:payload-compat":"npx tsx scripts/testPayloadCompatibility.ts","test:payload-compat:e2e":"npx tsx scripts/testPayloadCompatibility.ts --e2e"},engines:{node:">=22.0.0"},author:"",license:"SEE LICENSE IN LICENSE",devDependencies:{"@eslint/js":"^10.0.1","@playwright/test":"^1.59.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/ejs":"^3.1.5","@types/js-yaml":"^4.0.9","@types/mime-types":"^3.0.1","@types/picomatch":"^4.0.3","@types/prompts":"^2.4.9","@types/proper-lockfile":"^4.1.4","@types/react":"^19.2.14","@types/tar-fs":"^2.0.4","@types/tar-stream":"^3.1.4","@typescript-eslint/eslint-plugin":"^8.59.1","@typescript-eslint/parser":"^8.59.1","@vitest/coverage-v8":"^4.1.5",eslint:"^10.2.1","eslint-plugin-fjall":"file:./eslint-rules","ink-testing-library":"^4.0.0",jsdom:"^29.1.0",prettier:"^3.8.3","react-dom":"^19.2.5","tsc-watch":"^7.2.0",tsx:"^4.21.0","typescript-eslint":"^8.59.1",vitest:"4.1.7"},dependencies:{"@aws-sdk/client-auto-scaling":"^3.1038.0","@aws-sdk/client-backup":"^3.1038.0","@aws-sdk/client-cloudformation":"^3.1038.0","@aws-sdk/client-cost-explorer":"^3.1038.0","@aws-sdk/client-ec2":"^3.1038.0","@aws-sdk/client-ecr":"^3.1038.0","@aws-sdk/client-ecs":"^3.1038.0","@aws-sdk/client-elasticache":"^3.1038.0","@aws-sdk/client-iam":"^3.1038.0","@aws-sdk/client-identitystore":"^3.1038.0","@aws-sdk/client-lambda":"^3.1038.0","@aws-sdk/client-organizations":"^3.1038.0","@aws-sdk/client-ram":"^3.1038.0","@aws-sdk/client-rds":"^3.1038.0","@aws-sdk/client-route-53":"^3.1038.0","@aws-sdk/client-s3":"^3.1038.0","@aws-sdk/client-secrets-manager":"^3.1038.0","@aws-sdk/client-ssm":"^3.1038.0","@aws-sdk/client-sso":"^3.1038.0","@aws-sdk/client-sso-admin":"^3.1038.0","@aws-sdk/client-sso-oidc":"^3.1038.0","@aws-sdk/client-sts":"^3.1038.0","@fjall/deploy-core":"^2.7.1","@fjall/generator":"^2.7.1","@fjall/util":"^2.7.1","@nx/devkit":"^22.7.0","@opennextjs/aws":"^3.10.4","@smithy/node-http-handler":"^4.6.1","@toon-format/toon":"^2.1.0","aws-cdk":"^2.1119.0",axios:"^1.15.2",chalk:"^5.6.2","cli-cursor":"^5.0.0",commander:"^14.0.3",ejs:"^5.0.2",ink:"^7.0.1","js-yaml":"^4.1.1","mime-types":"^3.0.2",open:"^11.0.0",ora:"^9.4.0",picomatch:"^4.0.4",prompts:"^2.4.2","proper-lockfile":"^4.1.2",protobufjs:"^8.0.3",react:"^19.2.5","tar-fs":"^3.1.2",typescript:"^6.0.3","update-check":"^1.5.4",zod:"^4.4.3"},gitHead:"8e075d68ec034e0b9c2256f80ac2baf25a0f5645"}});function K4e(){let t=new Map;for(let[e,r]of Object.entries(Qn)){for(let[n,a]of Object.entries(r))Qn[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},r[n]=Qn[n],t.set(a[0],a[1]);Object.defineProperty(Qn,e,{value:r,enumerable:!1})}return Object.defineProperty(Qn,"codes",{value:t,enumerable:!1}),Qn.color.close="\x1B[39m",Qn.bgColor.close="\x1B[49m",Qn.color.ansi=qae(),Qn.color.ansi256=Kae(),Qn.color.ansi16m=Yae(),Qn.bgColor.ansi=qae(10),Qn.bgColor.ansi256=Kae(10),Qn.bgColor.ansi16m=Yae(10),Object.defineProperties(Qn,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let a=Number.parseInt(n,16);return[a>>16&255,a>>8&255,a&255]},enumerable:!1},hexToAnsi256:{value:e=>Qn.rgbToAnsi256(...Qn.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,a;if(e>=232)r=((e-232)*10+8)/255,n=r,a=r;else{e-=16;let i=e%36;r=Math.floor(e/36)/5,n=Math.floor(i/6)/5,a=i%6/5}let o=Math.max(r,n,a)*2;if(o===0)return 30;let s=30+(Math.round(a)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Qn.ansi256ToAnsi(Qn.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Qn.ansi256ToAnsi(Qn.hexToAnsi256(e)),enumerable:!1}}),Qn}var qae,Kae,Yae,Qn,C_t,H4e,q4e,w_t,Y4e,ou,Jae=b(()=>{qae=(t=0)=>e=>`\x1B[${e+t}m`,Kae=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Yae=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Qn={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},C_t=Object.keys(Qn.modifier),H4e=Object.keys(Qn.color),q4e=Object.keys(Qn.bgColor),w_t=[...H4e,...q4e];Y4e=K4e(),ou=Y4e});import u4 from"node:process";import J4e from"node:os";import Zae from"node:tty";function Wc(t,e=globalThis.Deno?globalThis.Deno.args:u4.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),a=e.indexOf("--");return n!==-1&&(a===-1||n<a)}function Z4e(){if("FORCE_COLOR"in ea)return ea.FORCE_COLOR==="true"?1:ea.FORCE_COLOR==="false"?0:ea.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ea.FORCE_COLOR,10),3)}function X4e(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Q4e(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Z4e();n!==void 0&&(gR=n);let a=r?gR:n;if(a===0)return 0;if(r){if(Wc("color=16m")||Wc("color=full")||Wc("color=truecolor"))return 3;if(Wc("color=256"))return 2}if("TF_BUILD"in ea&&"AGENT_NAME"in ea)return 1;if(t&&!e&&a===void 0)return 0;let o=a||0;if(ea.TERM==="dumb")return o;if(u4.platform==="win32"){let s=J4e.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ea)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in ea)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in ea)||ea.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ea)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ea.TEAMCITY_VERSION)?1:0;if(ea.COLORTERM==="truecolor"||ea.TERM==="xterm-kitty"||ea.TERM==="xterm-ghostty"||ea.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ea){let s=Number.parseInt((ea.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ea.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ea.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ea.TERM)||"COLORTERM"in ea?1:o}function Xae(t,e={}){let r=Q4e(t,{streamIsTTY:t&&t.isTTY,...e});return X4e(r)}var ea,gR,e6e,Qae,eoe=b(()=>{({env:ea}=u4);Wc("no-color")||Wc("no-colors")||Wc("color=false")||Wc("color=never")?gR=0:(Wc("color")||Wc("colors")||Wc("color=true")||Wc("color=always"))&&(gR=1);e6e={stdout:Xae({isTTY:Zae.isatty(1)}),stderr:Xae({isTTY:Zae.isatty(2)})},Qae=e6e});function toe(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let a=e.length,o=0,s="";do s+=t.slice(o,n)+e+r,o=n+a,n=t.indexOf(e,o);while(n!==-1);return s+=t.slice(o),s}function roe(t,e,r,n){let a=0,o="";do{let s=t[n-1]==="\r";o+=t.slice(a,s?n-1:n)+e+(s?`\r
|
|
37
37
|
`:`
|
|
38
38
|
`)+r,a=n+1,n=t.indexOf(`
|
|
39
39
|
`,a)}while(n!==-1);return o+=t.slice(a),o}var noe=b(()=>{});function yw(t){return r6e(t)}var aoe,ooe,p4,IS,gw,soe,PS,t6e,r6e,d4,n6e,a6e,m4,yR,o6e,s6e,$_t,H,wn=b(()=>{Jae();eoe();noe();({stdout:aoe,stderr:ooe}=Qae),p4=Symbol("GENERATOR"),IS=Symbol("STYLER"),gw=Symbol("IS_EMPTY"),soe=["ansi","ansi","ansi256","ansi16m"],PS=Object.create(null),t6e=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=aoe?aoe.level:0;t.level=e.level===void 0?r:e.level},r6e=t=>{let e=(...r)=>r.join(" ");return t6e(e,t),Object.setPrototypeOf(e,yw.prototype),e};Object.setPrototypeOf(yw.prototype,Function.prototype);for(let[t,e]of Object.entries(ou))PS[t]={get(){let r=yR(this,m4(e.open,e.close,this[IS]),this[gw]);return Object.defineProperty(this,t,{value:r}),r}};PS.visible={get(){let t=yR(this,this[IS],!0);return Object.defineProperty(this,"visible",{value:t}),t}};d4=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?ou[r].ansi16m(...n):e==="ansi256"?ou[r].ansi256(ou.rgbToAnsi256(...n)):ou[r].ansi(ou.rgbToAnsi(...n)):t==="hex"?d4("rgb",e,r,...ou.hexToRgb(...n)):ou[r][t](...n),n6e=["rgb","hex","ansi256"];for(let t of n6e){PS[t]={get(){let{level:r}=this;return function(...n){let a=m4(d4(t,soe[r],"color",...n),ou.color.close,this[IS]);return yR(this,a,this[gw])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);PS[e]={get(){let{level:r}=this;return function(...n){let a=m4(d4(t,soe[r],"bgColor",...n),ou.bgColor.close,this[IS]);return yR(this,a,this[gw])}}}}a6e=Object.defineProperties(()=>{},{...PS,level:{enumerable:!0,get(){return this[p4].level},set(t){this[p4].level=t}}}),m4=(t,e,r)=>{let n,a;return r===void 0?(n=t,a=e):(n=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:a,parent:r}},yR=(t,e,r)=>{let n=(...a)=>o6e(n,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(n,a6e),n[p4]=t,n[IS]=e,n[gw]=r,n},o6e=(t,e)=>{if(t.level<=0||!e)return t[gw]?"":e;let r=t[IS];if(r===void 0)return e;let{openAll:n,closeAll:a}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=toe(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
|
|
@@ -50,7 +50,7 @@ ${e}`,p6e=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),d6e=Obj
|
|
|
50
50
|
`);return{buffer:[],stream:a}}flush(){let e=this.flushBuffer(this.buffer,this.mainLogStream,this.mainLogPath);this.buffer=e.buffer,this.mainLogStream=e.stream;let r=this.flushBuffer(this.debugBuffer,this.debugLogStream,this.debugLogPath);this.debugBuffer=r.buffer,this.debugLogStream=r.stream}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.mainLogStream&&(this.mainLogStream.end(),this.mainLogStream=null),this.debugLogStream&&(this.debugLogStream.end(),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,this.isClosing=!1}}});var ig,su,ww=b(()=>{"use strict";ig={trace:0,debug:1,info:2,warn:3,error:4},su={MAX_FILE_SIZE:10*1024*1024,MAX_FILES:5,MAX_BUFFER_SIZE:100,FLUSH_INTERVAL_MS:500,LOG_FILENAME:"fjall.jsonl",DEBUG_LOG_FILENAME:"fjall-debug.jsonl"}});import{join as rze}from"path";import{homedir as nze}from"os";function RS(){let t=process.env.FJALL_LOG_DIR;return t!==void 0&&t!==""?t:rze(nze(),".fjall","logs")}var Tw=b(()=>{"use strict"});import{createWriteStream as aze,existsSync as oze,mkdirSync as sze}from"fs";import{join as tse}from"path";var kw,M4=b(()=>{"use strict";ww();Tw();kw=class{mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=su.MAX_BUFFER_SIZE;constructor(e,r,n){this.mainLogger=e,this.appName=r,this.operationType=n,this.deploymentId=`${n}-${Date.now()}`;let a=RS(),o=tse(a,"deployments",r);oze(o)||sze(o,{recursive:!0});let s=new Date().toISOString().replace(/[:.]/g,"-"),i=`${n}-${s}.jsonl`;this.logPath=tse(o,i);try{this.logStream=aze(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),su.FLUSH_INTERVAL_MS),this.info("DeploymentLogger","Deployment logging initialised",{appName:r,operationType:n,deploymentId:this.deploymentId,logPath:this.logPath})}catch{}}log(e,r,n,a,o,s){if(this.isClosing)return;let i={timestamp:new Date().toISOString(),level:e,component:r,message:n,correlationId:this.deploymentId,...a&&Object.keys(a).length>0&&{data:a},...o&&{stackName:o},...s&&{phase:s}};this.buffer.push(i),this.mainLogger.logWithCorrelation(e,r,n,this.deploymentId,a,o,s),this.buffer.length>=this.maxBufferSize&&this.flush()}flush(){if(!(this.buffer.length===0||!this.logStream)){for(let e of this.buffer)this.logStream.write(JSON.stringify(e)+`
|
|
51
51
|
`);this.buffer=[]}}info(e,r,n){this.log("info",e,r,n)}warn(e,r,n){this.log("warn",e,r,n)}error(e,r,n){this.log("error",e,r,n)}debug(e,r,n){this.log("debug",e,r,n)}stackEvent(e,r,n,a){this.log("info","StackDeployment",n,a,e,r)}dockerEvent(e,r){this.log("info","DockerOperation",e,{percentage:r})}ecsEvent(e,r,n){this.log("info","ECSDeployment",e,{percentage:r,taskCount:n})}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.logStream&&(this.logStream.end(),this.logStream=null),this.buffer=[],this.isClosing=!1}getLogPath(){return this.logPath}getDeploymentId(){return this.deploymentId}}});import{join as F4}from"path";var RR,rse=b(()=>{"use strict";Fm();O4();ese();M4();ww();Tw();O4();RR=class t{static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let e=RS(),r=F4(e,"debug"),n=this.parseEnvInt("FJALL_LOG_MAX_SIZE",su.MAX_FILE_SIZE),a=this.parseEnvInt("FJALL_LOG_MAX_FILES",su.MAX_FILES);this.config={logDir:e,debugLogDir:r,maxFileSize:n,maxFiles:a,maxBufferSize:su.MAX_BUFFER_SIZE,flushIntervalMs:su.FLUSH_INTERVAL_MS},this.mainLogPath=F4(e,su.LOG_FILENAME),this.debugLogPath=F4(r,su.DEBUG_LOG_FILENAME),this.debugEnabled=process.env.FJALL_DEBUG==="true"||process.env.FJALL_TRACE==="true"||process.argv.includes("--verbose")||process.argv.includes("-v"),this.traceEnabled=process.env.FJALL_TRACE==="true";let o=process.env.FJALL_LOG_LEVEL?.toLowerCase();o&&o in ig?this.minLevel=o:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new DR(this.config,this.mainLogPath,this.debugLogPath,this.debugEnabled)}parseEnvInt(e,r){let n=process.env[e];if(n){let a=parseInt(n,10);if(!isNaN(a)&&a>0)return a}return r}static getInstance(){return t.instance||(t.instance=new t),t.instance}shouldLog(e){return ig[e]>=ig[this.minLevel]}createEntry(e,r,n,a,o,s,i){return{timestamp:new Date().toISOString(),level:e,component:r,message:n,...o&&{correlationId:o},...a&&Object.keys(a).length>0&&{data:a},...s&&{stackName:s},...i&&{phase:i}}}log(e,r,n,a,o,s,i){if(!this.shouldLog(e))return;let c=this.createEntry(e,r,n,a,o,s,i),l=e==="debug"||e==="trace";this.fileWriter.write(c,l),this.writeConsole(c)}writeConsole(e){if(_r.shouldSuppressOutput||_r.isNonInteractive)return;let r=this.getConsolePrefix(e.level),n=`[${e.component}]`,a=`${r} ${n} ${e.message}`;e.level==="error"?console.error(a):e.level==="warn"?console.warn(a):console.log(a)}getConsolePrefix(e){switch(e){case"error":return"[ERROR]";case"warn":return"[WARN]";case"info":return"[INFO]";case"debug":return"[DEBUG]";case"trace":return"[TRACE]"}}error(e,r,n){this.log("error",e,r,n)}warn(e,r,n){this.log("warn",e,r,n)}info(e,r,n){this.log("info",e,r,n)}debug(e,r,n){this.log("debug",e,r,n)}trace(e,r,n){this.log("trace",e,r,n)}isDebugEnabled(){return this.debugEnabled}isTraceEnabled(){return this.traceEnabled}enableDebug(){this.debugEnabled=!0,ig[this.minLevel]>ig.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(e){return new DS(this,e)}forDeployment(e,r="deploy"){return new kw(this,e,r)}close(){this.fileWriter.close()}getLogPath(){return this.mainLogPath}getDebugLogPath(){return this.debugLogPath}getLogDir(){return this.config.logDir}logWithCorrelation(e,r,n,a,o,s,i){this.log(e,r,n,o,a,s,i)}static reset(){t.instance&&(t.instance.close(),t.instance=null)}}});var I,re=b(()=>{"use strict";rse();N4();ww();Tw();Tw();M4();ww();I=RR.getInstance()});var L4,Iw,U4=b(()=>{"use strict";re();_w();L4=class{info(e){OR(e)}error(e){NR(e)}warning(e){ase(e)}success(e){nse(e)}debug(e){I.debug("CLI",e)}startSpinner(e){return ose(e)}stopSpinner(){cg()}updateSpinner(e){Pw(e)}},Iw=class{mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(e={}){this.isNonInteractive=e.noPrompt??!1,this.logger=new L4}}});var B4,Dw,j4=b(()=>{"use strict";B4=class{info(e){}error(e){}warning(e){}success(e){}debug(e){}startSpinner(e){return null}stopSpinner(){}updateSpinner(e){}},Dw=class{mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new B4}}});var _r,sse=b(()=>{"use strict";U4();j4();_r=class{static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new Iw({noPrompt:!1}):this.stack[this.stack.length-1]}static get isNonInteractive(){return this._isNonInteractive}static enterNonInteractiveMode(){this._isNonInteractive=!0}static exitNonInteractiveMode(){this._isNonInteractive=!1}static getContext(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0}static push(e){this.stack.push(e)}static pop(){this.stack.length>0&&this.stack.pop()}static enterUIMode(){this.push(new Dw)}static exitUIMode(){this.pop()}static async withContext(e,r){this.push(e);try{return await r()}finally{this.pop()}}static get isUIMode(){return this.current.mode==="ink"}static get shouldSuppressOutput(){return this.current.suppressOutput}static reset(){this.stack=[]}}});var Fm=b(()=>{"use strict";Hoe();U4();j4();sse()});function OR(t,...e){_r.shouldSuppressOutput||(Wn&&Wn.stop(),console.log(t,...e),Wn&&Wn.start())}function nse(t,...e){_r.shouldSuppressOutput||(Wn?(Wn.succeed(H.hex("#A4C2A5")(`\u2705 ${t}`)),Wn=null):console.log(H.hex("#A4C2A5")(`\u2705 ${t}`),...e))}function ase(t,...e){_r.shouldSuppressOutput||(Wn?(Wn.warn(`\u26A0\uFE0F ${t}`),Wn=null):console.log(H.yellow(`\u26A0\uFE0F ${t}`),...e))}function NR(t,...e){_r.shouldSuppressOutput||(Wn?(Wn.fail(H.red.bold(`\u274C Error: ${t}`)),Wn=null):console.error(H.red.bold(`\u274C Error: ${t}`),...e))}function z4(){return _r.shouldSuppressOutput||_r.isNonInteractive}function ose(t){if(z4())return null;if(Wn)return Wn.text=t,Wn;let e=H.hex("#FF7BFF")(t);return Wn=_R({text:e,spinner:ise,color:"magenta"}).start(),Wn}function Pw(t){if(z4())return null;if(Wn)Wn.text=H.hex("#FF7BFF")(t);else{let e=H.hex("#FF7BFF")(t);Wn=_R({text:e,spinner:ise,color:"magenta"}).start()}return Wn}function cg(){z4()||Wn&&(Wn.stop(),Wn=null)}var ise,Wn,_w=b(()=>{"use strict";wn();Woe();Fm();ise={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},Wn=null});var lse=b(()=>{});var use=b(()=>{lse()});var pse=b(()=>{});var dse=b(()=>{});var mse=b(()=>{});var fse=b(()=>{});var $R,hse=b(()=>{$R=class{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}});var gse=b(()=>{});var yse=b(()=>{});var vse=b(()=>{use();pse();dse();mse();fse();hse();gse();yse()});var MR,ize,Sse=b(()=>{MR=t=>encodeURIComponent(t).replace(/[!'()*]/g,ize),ize=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`});var Ese=b(()=>{});var bse=b(()=>{Sse();Ese()});function xse(t){let e=[];for(let r of Object.keys(t).sort()){let n=t[r];if(r=MR(r),Array.isArray(n))for(let a=0,o=n.length;a<o;a++)e.push(`${r}=${MR(n[a])}`);else{let a=r;(n||typeof n=="string")&&(a+=`=${MR(n)}`),e.push(a)}}return e.join("&")}var Ase=b(()=>{bse()});function V4(t){let e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){let a=new Error("Request aborted");return a.name="AbortError",a.cause=e,a}let n=new Error(String(e));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}var Cse=b(()=>{});var wse,Tse=b(()=>{wse=["ECONNRESET","EPIPE","ETIMEDOUT"]});var kse,Ise=b(()=>{kse=t=>{let e={};for(let r of Object.keys(t)){let n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e}});var Ra,lg=b(()=>{Ra={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)}});var Pse,_se,Dse=b(()=>{lg();Pse=1e3,_se=(t,e,r=0)=>{if(!r)return-1;let n=a=>{let o=Ra.setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${r} ms.`),{name:"TimeoutError"}))},r-a),s=i=>{i?.connecting?i.on("connect",()=>{Ra.clearTimeout(o)}):Ra.clearTimeout(o)};t.socket?s(t.socket):t.on("socket",s)};return r<2e3?(n(0),0):Ra.setTimeout(n.bind(null,Pse),Pse)}});var Rse,Ose=b(()=>{lg();Rse=(t,e,r=0,n,a)=>r?Ra.setTimeout(()=>{let o=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(n){let s=Object.assign(new Error(o),{name:"TimeoutError",code:"ETIMEDOUT"});t.destroy(s),e(s)}else o+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",a?.warn?.(o)},r):-1});var cze,Nse,$se=b(()=>{lg();cze=3e3,Nse=(t,{keepAlive:e,keepAliveMsecs:r},n=cze)=>{if(e!==!0)return-1;let a=()=>{t.socket?t.socket.setKeepAlive(e,r||0):t.on("socket",o=>{o.setKeepAlive(e,r||0)})};return n===0?(a(),0):Ra.setTimeout(a,n)}});var Mse,Fse,Lse=b(()=>{lg();Mse=3e3,Fse=(t,e,r=0)=>{let n=a=>{let o=r-a,s=()=>{t.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${r} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};t.socket?(t.socket.setTimeout(o,s),t.on("close",()=>t.socket?.removeListener("timeout",s))):t.setTimeout(o,s)};return 0<r&&r<6e3?(n(0),0):Ra.setTimeout(n.bind(null,r===0?0:Mse),Mse)}});import{Readable as lze}from"node:stream";async function Bse(t,e,r=Use,n=!1){let a=e.headers??{},o=a.Expect||a.expect,s=-1,i=!0;!n&&o==="100-continue"&&(i=await Promise.race([new Promise(c=>{s=Number(Ra.setTimeout(()=>c(!0),Math.max(Use,r)))}),new Promise(c=>{t.on("continue",()=>{Ra.clearTimeout(s),c(!0)}),t.on("response",()=>{Ra.clearTimeout(s),c(!1)}),t.on("error",()=>{Ra.clearTimeout(s),c(!1)})})])),i&&uze(t,e.body)}function uze(t,e){if(e instanceof lze){e.pipe(t);return}if(e){let r=Buffer.isBuffer(e);if(r||typeof e=="string"){r&&e.byteLength===0?t.end():t.end(e);return}let a=e;if(typeof a=="object"&&a.buffer&&typeof a.byteOffset=="number"&&typeof a.byteLength=="number"){t.end(Buffer.from(a.buffer,a.byteOffset,a.byteLength));return}t.end(Buffer.from(e));return}t.end()}var Use,jse=b(()=>{lg();Use=6e3});import{Agent as G4,request as pze}from"node:https";var FR,zse,eo,Vse=b(()=>{vse();Ase();Cse();Tse();Ise();Dse();Ose();$se();Lse();lg();jse();eo=class t{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){return typeof e?.handle=="function"?e:new t(e)}static checkSocketUsage(e,r,n=console){let{sockets:a,requests:o,maxSockets:s}=e;if(typeof s!="number"||s===1/0||Date.now()-15e3<r)return r;if(a&&o)for(let c in a){let l=a[c]?.length??0,u=o[c]?.length??0;if(l>=s&&u>=2*s)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${l} and ${u} additional requests are enqueued.
|
|
52
52
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
53
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(e){this.configProvider=new Promise((r,n)=>{typeof e=="function"?e().then(a=>{r(this.resolveDefaultConfig(a))}).catch(n):r(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let a=this.config,o=e.protocol==="https:";return!o&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((s,i)=>{let c,l=[],u=async O=>{await c,l.forEach(Ra.clearTimeout),s(O)},p=async O=>{await c,l.forEach(Ra.clearTimeout),i(O)};if(r?.aborted){let O=V4(r);p(O);return}let m=e.headers??{},d=(m.Expect??m.expect)==="100-continue",f=o?a.httpsAgent:a.httpAgent;d&&!this.externalAgent&&(f=new(o?G4:FR)({keepAlive:!1,maxSockets:1/0})),l.push(Ra.setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(f,this.socketWarningTimestamp,a.logger)},a.socketAcquisitionWarningTimeout??(a.requestTimeout??2e3)+(a.connectionTimeout??1e3)));let h=xse(e.query||{}),g;if(e.username!=null||e.password!=null){let O=e.username??"",R=e.password??"";g=`${O}:${R}`}let S=e.path;h&&(S+=`?${h}`),e.fragment&&(S+=`#${e.fragment}`);let x=e.hostname??"";x[0]==="["&&x.endsWith("]")?x=e.hostname.slice(1,-1):x=e.hostname;let w={headers:e.headers,host:x,method:e.method,path:S,port:e.port,agent:f,auth:g},T=(o?pze:zse)(w,O=>{let R=new $R({statusCode:O.statusCode||-1,reason:O.statusMessage,headers:kse(O.headers),body:O});u({response:R})});if(T.on("error",O=>{wse.includes(O.code)?p(Object.assign(O,{name:"TimeoutError"})):p(O)}),r){let O=()=>{T.destroy();let R=V4(r);p(R)};if(typeof r.addEventListener=="function"){let R=r;R.addEventListener("abort",O,{once:!0}),T.once("close",()=>R.removeEventListener("abort",O))}else r.onabort=O}let _=n??a.requestTimeout;l.push(_se(T,p,a.connectionTimeout)),l.push(Rse(T,p,_,a.throwOnRequestTimeout,a.logger??console)),l.push(Fse(T,p,a.socketTimeout));let D=w.agent;typeof D=="object"&&"keepAlive"in D&&l.push(Nse(T,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs})),c=Bse(T,e,_,this.externalAgent).catch(O=>(l.forEach(Ra.clearTimeout),i(O)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:a,socketAcquisitionWarningTimeout:o,httpAgent:s,httpsAgent:i,throwOnRequestTimeout:c,logger:l}=e||{},u=!0,p=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:a,socketAcquisitionWarningTimeout:o,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:m,request:d}=await import("node:http");return zse=d,FR=m,s instanceof FR||typeof s?.destroy=="function"?(this.externalAgent=!0,s):new FR({keepAlive:u,maxSockets:p,...s})},httpsAgent:i instanceof G4||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new G4({keepAlive:u,maxSockets:p,...i}),logger:l}}}});var Gse=b(()=>{});var Wse=b(()=>{});var Lm=b(()=>{Vse();Gse();Wse()});function cs(t){let e=t.replace(/\./g,"-");return{hostedZoneId:`${e}-hosted-zone-id`,certificateArn:`${e}-certificate-arn`,delegationRoleArn:`${e}-delegation-role-arn`,nameservers:`${e}-nameservers`}}var LR,Hse=b(()=>{"use strict";LR="@"});function Ht(t){return t.replace(/[-_](.)/g,(e,r)=>r.toUpperCase()).replace(/^./,e=>e.toUpperCase())}function wi(t){return t.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function pg(t){return wi(t).replace(/-/g,"_")}function qse(t){return wi(t).replace(/-/g,"_").toUpperCase()}function Ti(t){return t.length===0?t:t.charAt(0).toUpperCase()+t.slice(1)}function UR(t){return t.split(".").join("")}function ug(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Kse(t){let e=t.replace(new RegExp("\\P{ASCII}","gu"),"");return ug(e)===ug(t)&&ug(t)!==""}var W4=b(()=>{"use strict"});function Yse(t){let e=new Map;for(let r of t){let n=ug(r);if(n==="")return{kind:"empty-construct-key",name:r};let a=e.get(n);if(a!==void 0)return{kind:"duplicate-construct-key",name:r,existingName:a,constructKey:n};e.set(n,r)}return null}var Jse=b(()=>{"use strict";W4()});function Nr(t){return t instanceof Error?t:new Error(String(t))}function k(t){return t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):"An unknown error occurred"}function BR(t,e){return!t||typeof t!="object"?!1:"code"in t&&t.code===e}function Rw(t){if(!(!t||typeof t!="object")&&"code"in t&&typeof t.code=="string")return t.code}function OS(t){return t instanceof Error?t.stack:void 0}function jR(t){let e=k(t),r=Rw(t);return r&&r!=="UNKNOWN_ERROR"?`[${r}] ${e}`:e}var H4=b(()=>{"use strict"});function xt(t){let e,r=!1;return()=>(r||(e=t(),r=!0),e)}var Zse=b(()=>{"use strict"});function Vt(t){return Object.fromEntries(Object.entries(t).filter(([e])=>!q4.has(e.toUpperCase())))}function E(t){return t.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,"$1***$2").replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,"$1$2***").replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,"$1***").replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"***").replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,"$1***").replace(/(?<=AWS_SECRET_ACCESS_KEY=|SecretAccessKey[=:]\s*|"secretAccessKey":\s*")[A-Za-z0-9/+=]{40,}/g,"***").replace(/(arn:aws[^:]*:[^:]*:[^:]*:)(\d{12})(:[^\s]*)/g,"$1***$3").replace(/(?<="(aws)?[Ss]essionToken":\s*")[^"]+/g,"***").replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,"***").replace(dze,"fjall_ak_***")}function sd(t){let e=[],r="",n=!1,a=!1,o=!1,s=!1;for(let i of t){if(o){r+=i,o=!1;continue}if(i==="\\"&&!n){o=!0;continue}if(i==="'"&&!a){n=!n,s=!0;continue}if(i==='"'&&!n){a=!a,s=!0;continue}if(i===" "&&!n&&!a){(r||s)&&(e.push(r),r="",s=!1);continue}r+=i}if(n||a)throw new Error(`Unbalanced ${n?"single":"double"} quote in command: ${t.slice(0,80)}`);if(o)throw new Error(`Trailing backslash in command: ${t.slice(0,80)}`);return(r||s)&&e.push(r),e}var q4,dze,dg=b(()=>{"use strict";q4=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);dze=/fjall_ak_[A-Z2-7]{16}\.[A-Z2-7]{40}/g});var it,Xse=b(()=>{"use strict";it=t=>new Promise(e=>setTimeout(e,t))});async function NS(t,e,r){let n=new Array(t.length);if(t.length===0)return n;let a=Math.max(1,Math.min(e,t.length)),o=0,s=async()=>{for(;o<t.length;){let i=o++;try{let c=await r(t[i],i);n[i]={status:"fulfilled",value:c}}catch(c){n[i]={status:"rejected",reason:c}}}};return await Promise.all(Array.from({length:a},()=>s())),n}var Qse=b(()=>{"use strict"});function K4(t){return $S.includes(t)}function eie(t){return K4(t)?Ow[t]:t.charAt(0).toUpperCase()+t.slice(1)}var $S,jr,MS,Ow,zR,tie=b(()=>{"use strict";$S=["production","staging","development","platform","compliance"];jr={ROOT:"root",PLATFORM:"platform"},MS=[...$S,jr.ROOT],Ow={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"};zR={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"}});function Um(t){if(!t)return"compute";if(t.startsWith("Custom::"))return rie[t]??"compute";let e=rie[t];return e||mze.add(t),e??"compute"}function Nw(t){return fze[t]??hze}function $s(t){return gze[t]||t.split("::").pop()||t}var VR,rie,mze,fze,hze,gze,Y4=b(()=>{"use strict";VR=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],rie=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),mze=new Set;fze=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),hze=30;gze=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"})});function GR(t){if(!t)return null;let e=t.replace(/^(https?:\/\/)[^@]+@/,"$1"),r=e.match(vze)??e.match(Sze)??t.match(Eze);if(!r)return null;let[,n,a,o]=r;return!n||!a||!o?null:{provider:yze[n]??"other",owner:a,repo:o,host:n}}var yze,vze,Sze,Eze,nie=b(()=>{"use strict";yze={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},vze=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,Sze=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,Eze=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/});function mg(t){let e=t.split("-");return e.length===3&&e[0]&&e[1]&&e[1].length>0&&e[2]?`${e[0]}${e[1][0]}${e[2]}`:t}var J4=b(()=>{"use strict"});var aie,oie=b(()=>{"use strict";aie=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy"]});function iu(t){let e=[t.primaryRegion,...t.secondaryRegions??[],t.disasterRecoveryRegion].filter(r=>r!==void 0);return[...new Set(e)]}function cu(t,e){return`${t.toLowerCase()}-${mg(e)}`}function id(t,e){let r=[];for(let n of t)if(n.environment!=="root")for(let a of e)r.push({name:cu(n.name,a),accountName:n.name,accountId:n.id,environment:n.environment,region:a});return r.sort((n,a)=>{let o=n.environment.localeCompare(a.environment);if(o!==0)return o;let s=n.accountName.localeCompare(a.accountName);return s!==0?s:n.region.localeCompare(a.region)})}function cd(t){return id(t.providerAccounts,iu(t))}function Hc(t,e){return t.find(r=>r.name===e)}var sie=b(()=>{"use strict";J4()});function Bo(t,e){if(e!==void 0){if(e.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${e}/fjall/${t}`}return`fjall/${t}`}var iie=b(()=>{"use strict"});function WR(t,e){let r=e?.excludedPathPrefixes,n=e?.excludedPathSegments,a=[];for(let o of t){if(!$w(o.path)||r&&xze(o.path,r)||n&&Aze(o.path,n))continue;let s=Q4(o.path);s!==null&&a.push({configPath:bze(o.path),boundaryPath:s})}return a}function $w(t){return t===Z4||t.endsWith(`/${Z4}`)}function Q4(t){let e=t.split("/");for(let r=0;r<e.length-1;r++)if(e[r]===X4)return e.slice(0,r+1).join("/");return null}function bze(t){return t.slice(0,-`/${Z4}`.length)}function xze(t,e){for(let r of e)if(t.startsWith(r))return!0;return!1}function Aze(t,e){let r=t.split("/");for(let n=0;n<r.length-1;n++)if(e.has(r[n]))return!0;return!1}var Z4,X4,HR=b(()=>{"use strict";Z4="infrastructure.ts",X4="fjall"});function qR(t){if(t.length===0)return null;let e=[];for(let n of t){let a=Cze(n.boundaryPath);if(a===null)return null;e.push(a)}let r=wze(e);return r.length===0?null:r.join("/")}function Cze(t){let e=t.split("/").filter(n=>n.length>0);if(e.length===0||e[e.length-1]!==X4)return null;let r=e.slice(0,e.length-1);return r.length===0?null:r}function wze(t){if(t.length===0)return[];let[e,...r]=t,n=[];for(let a=0;a<e.length;a+=1){let o=e[a];for(let s of r)if(s[a]!==o)return n;n.push(o)}return n}var cie=b(()=>{"use strict";HR()});function KR(t){return e6.includes(t.toLowerCase())}var e6,lie=b(()=>{"use strict";e6=["fjall"]});function Tze(t){return{success:!0,data:t}}function YR(t){return{success:!1,error:t}}function FS(t,e,r){if(!t.startsWith(uie))return YR(new Error(`expected sha256:... digest, got ${t.slice(0,32)}`));let n=t.slice(uie.length);if(n.length<t6)return YR(new Error(`digest hex payload too short (need >=${t6} chars, got ${n.length})`));let a=e.trim();if(a==="")return YR(new Error("serviceName must be a non-empty string"));let o;if(r!==void 0){let c=r.trim();if(c==="")return YR(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=c.toLowerCase()}let s=n.slice(0,t6).toLowerCase(),i=o!==void 0?`${a.toLowerCase()}-${o}`:a.toLowerCase();return Tze(`${i}-sha-${s}`)}var uie,t6,pie=b(()=>{"use strict";uie="sha256:",t6=12});var die,mie,fie,hie,gie,yie,vie,Sie,Eie=b(()=>{"use strict";die="fjall-premigrate",mie="EXPECTED_SCHEMA_VERSION",fie="EXPECTED_SCHEMA_VERSION_TOOL",hie="EXPECTED_CH_SCHEMA_VERSION",gie="SCHEMA_ADMIN_USER",yie="SCHEMA_ADMIN_PASSWORD",vie=/^\d{14}_/,Sie=/\.dev\.sql$/});var bie={};_t(bie,{ACCOUNT_ROLES:()=>zR,CLICKHOUSE_MIGRATION_SKIP_RE:()=>Sie,DANGEROUS_ENV_VARS:()=>q4,DNS_APEX:()=>LR,ENVIRONMENT_LABELS:()=>Ow,EXPECTED_CH_SCHEMA_VERSION_ENV:()=>hie,EXPECTED_SCHEMA_VERSION_ENV:()=>mie,EXPECTED_SCHEMA_VERSION_TOOL_ENV:()=>fie,MIGRATION_SNAPSHOT_NAME_PREFIX:()=>die,PRISMA_MIGRATION_DIR_RE:()=>vie,RESERVED_APP_NAMES:()=>e6,RESOURCE_CATEGORIES:()=>VR,SCHEMA_ADMIN_PASSWORD_ENV:()=>yie,SCHEMA_ADMIN_USER_ENV:()=>gie,SCOPE_VALUES:()=>aie,STANDARD_ENVIRONMENTS:()=>$S,STANDARD_ENVIRONMENTS_WITH_ROOT:()=>MS,STRUCTURAL_ENVIRONMENTS:()=>jr,abbreviateRegion:()=>mg,accountConstructKey:()=>ug,buildAppConfigPath:()=>Bo,capitalise:()=>Ti,categoriseResource:()=>Um,deriveAllTargets:()=>cd,deriveContentHashTag:()=>FS,deriveRegionsFromOrgConfig:()=>iu,deriveTargets:()=>id,filterDangerousEnvVars:()=>Vt,findAccountNameCollision:()=>Yse,findBoundaryPath:()=>Q4,findInfrastructurePaths:()=>WR,findTarget:()=>Hc,formatErrorString:()=>jR,generateTargetName:()=>cu,getDomainExportNames:()=>cs,getEnvironmentLabel:()=>eie,getErrorCode:()=>Rw,getErrorMessage:()=>k,getErrorStack:()=>OS,getExpectedDuration:()=>Nw,getFriendlyResourceType:()=>$s,getSafeZoneName:()=>UR,hasAsciiStableConstructKey:()=>Kse,hasErrorCode:()=>BR,inferContainerFromCandidates:()=>qR,isInfrastructureFile:()=>$w,isReservedAppName:()=>KR,isValidEnvironment:()=>K4,mapSettledWithConcurrency:()=>NS,maskSensitiveOutput:()=>E,normaliseError:()=>Nr,parseGitRemoteUrl:()=>GR,parseShellArgs:()=>sd,singleton:()=>xt,sleep:()=>it,toKebab:()=>wi,toPascalCase:()=>Ht,toScreamingSnake:()=>qse,toValidDatabaseName:()=>pg});var $=b(()=>{"use strict";Hse();W4();Jse();H4();Zse();dg();Xse();Qse();tie();Y4();nie();J4();oie();sie();iie();HR();cie();lie();pie();Eie()});var Mw=b(()=>{"use strict";$()});function ld(t){return t.success===!0}function $t(t){return t.success===!1}function A(t){return{success:!0,data:t}}function v(t){return{success:!1,error:t}}async function r6(t){try{let e=await t();return A(e)}catch(e){return v(Nr(e))}}function n6(t){try{let e=t();return A(e)}catch(e){return v(Nr(e))}}var ln=b(()=>{"use strict";Mw()});function a6(t){let e=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(t);if(!e)return;let r=e[1],n=e[2];if(r===void 0||n===void 0)return;let a=parseInt(r,10);if(!Number.isFinite(a)||a<1)return;let o=n==="minute"||n==="hour"||n==="day";if(!(o&&a!==1)&&!(!o&&a===1))return n==="minute"||n==="minutes"?{everyMs:a*6e4}:n==="hour"||n==="hours"?{everyMs:a*60*6e4}:{everyMs:a*24*60*6e4}}var xie,bt,Aie=b(()=>{"use strict";xie=/^[a-zA-Z][a-zA-Z0-9-]*$/,bt=Object.freeze({IDENTIFIER:xie,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:xie,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:/^\/[a-zA-Z][a-zA-Z0-9-]*(\/[a-zA-Z][a-zA-Z0-9-]*)*$/,SECRET_NAME:/^[a-zA-Z_][a-zA-Z0-9._-]*$/,SSM_COMPONENT:/^[a-zA-Z][a-zA-Z0-9._-]*$/,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((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)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/})});var F,Cie=b(()=>{"use strict";F=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:"Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",SSM_COMPONENT:"Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores",EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",FIRST_NAME:"First name is required",LAST_NAME:"Last name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"})});var qc=b(()=>{"use strict";Aie();Cie()});function US(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Lw(t){return lu.includes(t)}function Uw(t){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(t)}function Bw(t){if(!t)return LS.slice(0,3);let e=t.toLowerCase().split("-"),r=e[0],n=e.length>1?e[1]:"",a=[];return r&&n&&(a=lu.filter(o=>o.startsWith(`${r}-${n}`))),a.length===0&&r&&(a=lu.filter(o=>o.startsWith(`${r}-`))),a.length>0?a.slice(0,3):LS.slice(0,3)}function jw(t){if(Lw(t))return!0;let e=Bw(t);return Uw(t)?`Unknown region. Try: ${e.join(", ")}`:`Invalid format. Try: ${e.join(", ")}`}function JR(t){if(!t||t.trim()==="")return!0;let e=US(t);for(let r of e){let n=jw(r);if(n!==!0)return n}return!0}function zw(t,e){return t.filter(r=>r!==e)}function ki(){return uu.map(t=>({label:t.city,value:t.code,description:t.code}))}function Bm(t){return uu.filter(e=>e.code!==t).map(e=>({label:e.city,value:e.code,description:e.code}))}function lc(t){let e=uu.find(r=>r.code===t);return e?e.city:t}function ZR(t){return e=>{let r=US(e);return zw(r,t)}}var Ke,lu,uu,Fw,LS,o6=b(()=>{"use strict";Ke="us-east-2",lu=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1","ap-northeast-1","ap-southeast-2","us-west-1","ca-central-1","af-south-1","ap-east-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-3","ap-southeast-4","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1"]),uu=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan"},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia"},{code:"us-west-1",name:"US West",city:"N. California",country:"USA"},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada"},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa"},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"China"},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea"},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan"},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India"},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India"},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia"},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia"},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland"},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden"},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy"},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain"},{code:"eu-west-2",name:"EU West",city:"London",country:"UK"},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France"},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE"},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain"},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil"}]),Fw=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"}]),LS=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"])});var Vw,s6=b(()=>{"use strict";Vw="2.6.0"});function Z(t,e,r){function n(i,c){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),i._zod.traits.has(t))return;i._zod.traits.add(t),e(i,c);let l=s.prototype,u=Object.keys(l);for(let p=0;p<u.length;p++){let m=u[p];m in i||(i[m]=l[m].bind(i))}}let a=r?.Parent??Object;class o extends a{}Object.defineProperty(o,"name",{value:t});function s(i){var c;let l=r?.Parent?new o:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:i=>r?.Parent&&i instanceof r.Parent?!0:i?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}function ba(t){return t&&Object.assign(fg,t),fg}var wie,i6,c6,pu,jm,fg,hg=b(()=>{i6=Object.freeze({status:"aborted"});c6=Symbol("zod_brand"),pu=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jm=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(wie=globalThis).__zod_globalConfig??(wie.__zod_globalConfig={});fg=globalThis.__zod_globalConfig});var we={};_t(we,{BIGINT_FORMAT_RANGES:()=>v6,Class:()=>u6,NUMBER_FORMAT_RANGES:()=>y6,aborted:()=>Wm,allowsEval:()=>m6,assert:()=>Dze,assertEqual:()=>kze,assertIs:()=>Pze,assertNever:()=>_ze,assertNotEqual:()=>Ize,assignProp:()=>Vm,base64ToUint8Array:()=>kie,base64urlToUint8Array:()=>Kze,cached:()=>jS,captureStackTrace:()=>QR,cleanEnum:()=>qze,cleanRegex:()=>Hw,clone:()=>Ms,cloneDef:()=>Oze,createTransparentProxy:()=>Uze,defineLazy:()=>lr,esc:()=>XR,escapeRegex:()=>Kc,explicitlyAborted:()=>S6,extend:()=>zze,finalizeIssue:()=>Fs,floatSafeRemainder:()=>p6,getElementAtPath:()=>Nze,getEnumValues:()=>Ww,getLengthableOrigin:()=>Yw,getParsedType:()=>Lze,getSizableOrigin:()=>Kw,hexToUint8Array:()=>Jze,isObject:()=>gg,isPlainObject:()=>Gm,issue:()=>zS,joinValues:()=>ie,jsonStringifyReplacer:()=>BS,merge:()=>Gze,mergeDefs:()=>ud,normalizeParams:()=>Re,nullish:()=>zm,numKeys:()=>Fze,objectClone:()=>Rze,omit:()=>jze,optionalKeys:()=>g6,parsedType:()=>Ce,partial:()=>Wze,pick:()=>Bze,prefixIssues:()=>Ii,primitiveTypes:()=>h6,promiseAllObject:()=>$ze,propertyKeyTypes:()=>qw,randomString:()=>Mze,required:()=>Hze,safeExtend:()=>Vze,shallowClone:()=>f6,slugify:()=>d6,stringifyPrimitive:()=>be,uint8ArrayToBase64:()=>Iie,uint8ArrayToBase64url:()=>Yze,uint8ArrayToHex:()=>Zze,unwrapMessage:()=>Gw});function kze(t){return t}function Ize(t){return t}function Pze(t){}function _ze(t){throw new Error("Unexpected value in exhaustive check")}function Dze(t){}function Ww(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,a])=>e.indexOf(+n)===-1).map(([n,a])=>a)}function ie(t,e="|"){return t.map(r=>be(r)).join(e)}function BS(t,e){return typeof e=="bigint"?e.toString():e}function jS(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function zm(t){return t==null}function Hw(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function p6(t,e){let r=t/e,n=Math.round(r),a=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<a?0:r-n}function lr(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Tie)return n===void 0&&(n=Tie,n=r()),n},set(a){Object.defineProperty(t,e,{value:a})},configurable:!0})}function Rze(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Vm(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ud(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function Oze(t){return ud(t._zod.def)}function Nze(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function $ze(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let a={};for(let o=0;o<e.length;o++)a[e[o]]=n[o];return a})}function Mze(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function XR(t){return JSON.stringify(t)}function d6(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function gg(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Gm(t){if(gg(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(gg(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function f6(t){return Gm(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Fze(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function Kc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ms(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Re(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Uze(t){let e;return new Proxy({},{get(r,n,a){return e??(e=t()),Reflect.get(e,n,a)},set(r,n,a,o){return e??(e=t()),Reflect.set(e,n,a,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,a){return e??(e=t()),Reflect.defineProperty(e,n,a)}})}function be(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function g6(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function Bze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=ud(t._zod.def,{get shape(){let s={};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(s[i]=r.shape[i])}return Vm(this,"shape",s),s},checks:[]});return Ms(t,o)}function jze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=ud(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete s[i]}return Vm(this,"shape",s),s},checks:[]});return Ms(t,o)}function zze(t,e){if(!Gm(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let a=ud(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return Vm(this,"shape",o),o}});return Ms(t,a)}function Vze(t,e){if(!Gm(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ud(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return Vm(this,"shape",n),n}});return Ms(t,r)}function Gze(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=ud(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Vm(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Ms(t,r)}function Wze(t,e,r){let a=e._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ud(e._zod.def,{get shape(){let i=e._zod.def.shape,c={...i};if(r)for(let l in r){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:i[l]}):i[l])}else for(let l in i)c[l]=t?new t({type:"optional",innerType:i[l]}):i[l];return Vm(this,"shape",c),c},checks:[]});return Ms(e,s)}function Hze(t,e,r){let n=ud(e._zod.def,{get shape(){let a=e._zod.def.shape,o={...a};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:a[s]}))}else for(let s in a)o[s]=new t({type:"nonoptional",innerType:a[s]});return Vm(this,"shape",o),o}});return Ms(e,n)}function Wm(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function S6(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function Ii(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Gw(t){return typeof t=="string"?t:t?.message}function Fs(t,e,r){let n=t.message?t.message:Gw(t.inst?._zod.def?.error?.(t))??Gw(e?.error?.(t))??Gw(r.customError?.(t))??Gw(r.localeError?.(t))??"Invalid input",{inst:a,continue:o,input:s,...i}=t;return i.path??(i.path=[]),i.message=n,e?.reportInput&&(i.input=s),i}function Kw(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Yw(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ce(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function zS(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function qze(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function kie(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Iie(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Kze(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return kie(e+r)}function Yze(t){return Iie(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Jze(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function Zze(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Tie,QR,m6,Lze,qw,h6,y6,v6,u6,ot=b(()=>{hg();Tie=Symbol("evaluating");QR="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};m6=jS(()=>{if(fg.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});Lze=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},qw=new Set(["string","number","symbol"]),h6=new Set(["string","number","bigint","boolean","symbol","undefined"]);y6={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},v6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};u6=class{constructor(...e){}}});function Zw(t,e=r=>r.message){let r={},n=[];for(let a of t.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:r}}function Xw(t,e=r=>r.message){let r={_errors:[]},n=(a,o=[])=>{for(let s of a.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>n({issues:i},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let i=[...o,...s.path];if(i.length===0)r._errors.push(e(s));else{let c=r,l=0;for(;l<i.length;){let u=i[l];l===i.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(e(s))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return n(t),r}function E6(t,e=r=>r.message){let r={errors:[]},n=(a,o=[])=>{var s,i;for(let c of a.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>n({issues:l},[...o,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...o,...c.path]);else{let l=[...o,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,p=0;for(;p<l.length;){let m=l[p],d=p===l.length-1;typeof m=="string"?(u.properties??(u.properties={}),(s=u.properties)[m]??(s[m]={errors:[]}),u=u.properties[m]):(u.items??(u.items=[]),(i=u.items)[m]??(i[m]={errors:[]}),u=u.items[m]),d&&u.errors.push(e(c)),p++}}};return n(t),r}function _ie(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function b6(t){let e=[],r=[...t.issues].sort((n,a)=>(n.path??[]).length-(a.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${_ie(n.path)}`);return e.join(`
|
|
53
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(e){this.configProvider=new Promise((r,n)=>{typeof e=="function"?e().then(a=>{r(this.resolveDefaultConfig(a))}).catch(n):r(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let a=this.config,o=e.protocol==="https:";return!o&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((s,i)=>{let c,l=[],u=async O=>{await c,l.forEach(Ra.clearTimeout),s(O)},p=async O=>{await c,l.forEach(Ra.clearTimeout),i(O)};if(r?.aborted){let O=V4(r);p(O);return}let m=e.headers??{},d=(m.Expect??m.expect)==="100-continue",f=o?a.httpsAgent:a.httpAgent;d&&!this.externalAgent&&(f=new(o?G4:FR)({keepAlive:!1,maxSockets:1/0})),l.push(Ra.setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(f,this.socketWarningTimestamp,a.logger)},a.socketAcquisitionWarningTimeout??(a.requestTimeout??2e3)+(a.connectionTimeout??1e3)));let h=xse(e.query||{}),g;if(e.username!=null||e.password!=null){let O=e.username??"",R=e.password??"";g=`${O}:${R}`}let S=e.path;h&&(S+=`?${h}`),e.fragment&&(S+=`#${e.fragment}`);let x=e.hostname??"";x[0]==="["&&x.endsWith("]")?x=e.hostname.slice(1,-1):x=e.hostname;let w={headers:e.headers,host:x,method:e.method,path:S,port:e.port,agent:f,auth:g},T=(o?pze:zse)(w,O=>{let R=new $R({statusCode:O.statusCode||-1,reason:O.statusMessage,headers:kse(O.headers),body:O});u({response:R})});if(T.on("error",O=>{wse.includes(O.code)?p(Object.assign(O,{name:"TimeoutError"})):p(O)}),r){let O=()=>{T.destroy();let R=V4(r);p(R)};if(typeof r.addEventListener=="function"){let R=r;R.addEventListener("abort",O,{once:!0}),T.once("close",()=>R.removeEventListener("abort",O))}else r.onabort=O}let _=n??a.requestTimeout;l.push(_se(T,p,a.connectionTimeout)),l.push(Rse(T,p,_,a.throwOnRequestTimeout,a.logger??console)),l.push(Fse(T,p,a.socketTimeout));let D=w.agent;typeof D=="object"&&"keepAlive"in D&&l.push(Nse(T,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs})),c=Bse(T,e,_,this.externalAgent).catch(O=>(l.forEach(Ra.clearTimeout),i(O)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:a,socketAcquisitionWarningTimeout:o,httpAgent:s,httpsAgent:i,throwOnRequestTimeout:c,logger:l}=e||{},u=!0,p=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:a,socketAcquisitionWarningTimeout:o,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:m,request:d}=await import("node:http");return zse=d,FR=m,s instanceof FR||typeof s?.destroy=="function"?(this.externalAgent=!0,s):new FR({keepAlive:u,maxSockets:p,...s})},httpsAgent:i instanceof G4||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new G4({keepAlive:u,maxSockets:p,...i}),logger:l}}}});var Gse=b(()=>{});var Wse=b(()=>{});var Lm=b(()=>{Vse();Gse();Wse()});function cs(t){let e=t.replace(/\./g,"-");return{hostedZoneId:`${e}-hosted-zone-id`,certificateArn:`${e}-certificate-arn`,delegationRoleArn:`${e}-delegation-role-arn`,nameservers:`${e}-nameservers`}}var LR,Hse=b(()=>{"use strict";LR="@"});function Ht(t){return t.replace(/[-_](.)/g,(e,r)=>r.toUpperCase()).replace(/^./,e=>e.toUpperCase())}function wi(t){return t.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function pg(t){return wi(t).replace(/-/g,"_")}function qse(t){return wi(t).replace(/-/g,"_").toUpperCase()}function Ti(t){return t.length===0?t:t.charAt(0).toUpperCase()+t.slice(1)}function UR(t){return t.split(".").join("")}function ug(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Kse(t){let e=t.replace(new RegExp("\\P{ASCII}","gu"),"");return ug(e)===ug(t)&&ug(t)!==""}var W4=b(()=>{"use strict"});function Yse(t){let e=new Map;for(let r of t){let n=ug(r);if(n==="")return{kind:"empty-construct-key",name:r};let a=e.get(n);if(a!==void 0)return{kind:"duplicate-construct-key",name:r,existingName:a,constructKey:n};e.set(n,r)}return null}var Jse=b(()=>{"use strict";W4()});function Nr(t){return t instanceof Error?t:new Error(String(t))}function k(t){return t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):"An unknown error occurred"}function BR(t,e){return!t||typeof t!="object"?!1:"code"in t&&t.code===e}function Rw(t){if(!(!t||typeof t!="object")&&"code"in t&&typeof t.code=="string")return t.code}function OS(t){return t instanceof Error?t.stack:void 0}function jR(t){let e=k(t),r=Rw(t);return r&&r!=="UNKNOWN_ERROR"?`[${r}] ${e}`:e}var H4=b(()=>{"use strict"});function xt(t){let e,r=!1;return()=>(r||(e=t(),r=!0),e)}var Zse=b(()=>{"use strict"});function Vt(t){return Object.fromEntries(Object.entries(t).filter(([e])=>!q4.has(e.toUpperCase())))}function E(t){return t.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,"$1***$2").replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,"$1$2***").replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,"$1***").replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"***").replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,"$1***").replace(/(?<=AWS_SECRET_ACCESS_KEY=|SecretAccessKey[=:]\s*|"secretAccessKey":\s*")[A-Za-z0-9/+=]{40,}/g,"***").replace(/(arn:aws[^:]*:[^:]*:[^:]*:)(\d{12})(:[^\s]*)/g,"$1***$3").replace(/(?<="(aws)?[Ss]essionToken":\s*")[^"]+/g,"***").replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,"***").replace(dze,"fjall_ak_***")}function sd(t){let e=[],r="",n=!1,a=!1,o=!1,s=!1;for(let i of t){if(o){r+=i,o=!1;continue}if(i==="\\"&&!n){o=!0;continue}if(i==="'"&&!a){n=!n,s=!0;continue}if(i==='"'&&!n){a=!a,s=!0;continue}if(i===" "&&!n&&!a){(r||s)&&(e.push(r),r="",s=!1);continue}r+=i}if(n||a)throw new Error(`Unbalanced ${n?"single":"double"} quote in command: ${t.slice(0,80)}`);if(o)throw new Error(`Trailing backslash in command: ${t.slice(0,80)}`);return(r||s)&&e.push(r),e}var q4,dze,dg=b(()=>{"use strict";q4=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);dze=/fjall_ak_[A-Z2-7]{16}\.[A-Z2-7]{40}/g});var it,Xse=b(()=>{"use strict";it=t=>new Promise(e=>setTimeout(e,t))});async function NS(t,e,r){let n=new Array(t.length);if(t.length===0)return n;let a=Math.max(1,Math.min(e,t.length)),o=0,s=async()=>{for(;o<t.length;){let i=o++;try{let c=await r(t[i],i);n[i]={status:"fulfilled",value:c}}catch(c){n[i]={status:"rejected",reason:c}}}};return await Promise.all(Array.from({length:a},()=>s())),n}var Qse=b(()=>{"use strict"});function K4(t){return $S.includes(t)}function eie(t){return K4(t)?Ow[t]:t.charAt(0).toUpperCase()+t.slice(1)}var $S,jr,MS,Ow,zR,tie=b(()=>{"use strict";$S=["production","staging","development","platform","compliance"];jr={ROOT:"root",PLATFORM:"platform"},MS=[...$S,jr.ROOT],Ow={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"};zR={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"}});function Um(t){if(!t)return"compute";if(t.startsWith("Custom::"))return rie[t]??"compute";let e=rie[t];return e||mze.add(t),e??"compute"}function Nw(t){return fze[t]??hze}function $s(t){return gze[t]||t.split("::").pop()||t}var VR,rie,mze,fze,hze,gze,Y4=b(()=>{"use strict";VR=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],rie=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),mze=new Set;fze=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),hze=30;gze=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"})});function GR(t){if(!t)return null;let e=t.replace(/^(https?:\/\/)[^@]+@/,"$1"),r=e.match(vze)??e.match(Sze)??t.match(Eze);if(!r)return null;let[,n,a,o]=r;return!n||!a||!o?null:{provider:yze[n]??"other",owner:a,repo:o,host:n}}var yze,vze,Sze,Eze,nie=b(()=>{"use strict";yze={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},vze=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,Sze=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,Eze=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/});function mg(t){let e=t.split("-");return e.length===3&&e[0]&&e[1]&&e[1].length>0&&e[2]?`${e[0]}${e[1][0]}${e[2]}`:t}var J4=b(()=>{"use strict"});var aie,oie=b(()=>{"use strict";aie=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy"]});function iu(t){let e=[t.primaryRegion,...t.secondaryRegions??[],t.disasterRecoveryRegion].filter(r=>r!==void 0);return[...new Set(e)]}function cu(t,e){return`${t.toLowerCase()}-${mg(e)}`}function id(t,e){let r=[];for(let n of t)if(n.environment!=="root")for(let a of e)r.push({name:cu(n.name,a),accountName:n.name,accountId:n.id,environment:n.environment,region:a});return r.sort((n,a)=>{let o=n.environment.localeCompare(a.environment);if(o!==0)return o;let s=n.accountName.localeCompare(a.accountName);return s!==0?s:n.region.localeCompare(a.region)})}function cd(t){return id(t.providerAccounts,iu(t))}function Hc(t,e){return t.find(r=>r.name===e)}var sie=b(()=>{"use strict";J4()});function Bo(t,e){if(e!==void 0){if(e.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${e}/fjall/${t}`}return`fjall/${t}`}var iie=b(()=>{"use strict"});function WR(t,e){let r=e?.excludedPathPrefixes,n=e?.excludedPathSegments,a=[];for(let o of t){if(!$w(o.path)||r&&xze(o.path,r)||n&&Aze(o.path,n))continue;let s=Q4(o.path);s!==null&&a.push({configPath:bze(o.path),boundaryPath:s})}return a}function $w(t){return t===Z4||t.endsWith(`/${Z4}`)}function Q4(t){let e=t.split("/");for(let r=0;r<e.length-1;r++)if(e[r]===X4)return e.slice(0,r+1).join("/");return null}function bze(t){return t.slice(0,-`/${Z4}`.length)}function xze(t,e){for(let r of e)if(t.startsWith(r))return!0;return!1}function Aze(t,e){let r=t.split("/");for(let n=0;n<r.length-1;n++)if(e.has(r[n]))return!0;return!1}var Z4,X4,HR=b(()=>{"use strict";Z4="infrastructure.ts",X4="fjall"});function qR(t){if(t.length===0)return null;let e=[];for(let n of t){let a=Cze(n.boundaryPath);if(a===null)return null;e.push(a)}let r=wze(e);return r.length===0?null:r.join("/")}function Cze(t){let e=t.split("/").filter(n=>n.length>0);if(e.length===0||e[e.length-1]!==X4)return null;let r=e.slice(0,e.length-1);return r.length===0?null:r}function wze(t){if(t.length===0)return[];let[e,...r]=t,n=[];for(let a=0;a<e.length;a+=1){let o=e[a];for(let s of r)if(s[a]!==o)return n;n.push(o)}return n}var cie=b(()=>{"use strict";HR()});function KR(t){return e6.includes(t.toLowerCase())}var e6,lie=b(()=>{"use strict";e6=["fjall"]});function Tze(t){return{success:!0,data:t}}function YR(t){return{success:!1,error:t}}function FS(t,e,r){if(!t.startsWith(uie))return YR(new Error(`expected sha256:... digest, got ${t.slice(0,32)}`));let n=t.slice(uie.length);if(n.length<t6)return YR(new Error(`digest hex payload too short (need >=${t6} chars, got ${n.length})`));let a=e.trim();if(a==="")return YR(new Error("serviceName must be a non-empty string"));let o;if(r!==void 0){let c=r.trim();if(c==="")return YR(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=c.toLowerCase()}let s=n.slice(0,t6).toLowerCase(),i=o!==void 0?`${a.toLowerCase()}-${o}`:a.toLowerCase();return Tze(`${i}-sha-${s}`)}var uie,t6,pie=b(()=>{"use strict";uie="sha256:",t6=12});var die,mie,fie,hie,gie,yie,vie,Sie,Eie=b(()=>{"use strict";die="fjall-premigrate",mie="EXPECTED_SCHEMA_VERSION",fie="EXPECTED_SCHEMA_VERSION_TOOL",hie="EXPECTED_CH_SCHEMA_VERSION",gie="SCHEMA_ADMIN_USER",yie="SCHEMA_ADMIN_PASSWORD",vie=/^\d{14}_/,Sie=/\.dev\.sql$/});var bie={};_t(bie,{ACCOUNT_ROLES:()=>zR,CLICKHOUSE_MIGRATION_SKIP_RE:()=>Sie,DANGEROUS_ENV_VARS:()=>q4,DNS_APEX:()=>LR,ENVIRONMENT_LABELS:()=>Ow,EXPECTED_CH_SCHEMA_VERSION_ENV:()=>hie,EXPECTED_SCHEMA_VERSION_ENV:()=>mie,EXPECTED_SCHEMA_VERSION_TOOL_ENV:()=>fie,MIGRATION_SNAPSHOT_NAME_PREFIX:()=>die,PRISMA_MIGRATION_DIR_RE:()=>vie,RESERVED_APP_NAMES:()=>e6,RESOURCE_CATEGORIES:()=>VR,SCHEMA_ADMIN_PASSWORD_ENV:()=>yie,SCHEMA_ADMIN_USER_ENV:()=>gie,SCOPE_VALUES:()=>aie,STANDARD_ENVIRONMENTS:()=>$S,STANDARD_ENVIRONMENTS_WITH_ROOT:()=>MS,STRUCTURAL_ENVIRONMENTS:()=>jr,abbreviateRegion:()=>mg,accountConstructKey:()=>ug,buildAppConfigPath:()=>Bo,capitalise:()=>Ti,categoriseResource:()=>Um,deriveAllTargets:()=>cd,deriveContentHashTag:()=>FS,deriveRegionsFromOrgConfig:()=>iu,deriveTargets:()=>id,filterDangerousEnvVars:()=>Vt,findAccountNameCollision:()=>Yse,findBoundaryPath:()=>Q4,findInfrastructurePaths:()=>WR,findTarget:()=>Hc,formatErrorString:()=>jR,generateTargetName:()=>cu,getDomainExportNames:()=>cs,getEnvironmentLabel:()=>eie,getErrorCode:()=>Rw,getErrorMessage:()=>k,getErrorStack:()=>OS,getExpectedDuration:()=>Nw,getFriendlyResourceType:()=>$s,getSafeZoneName:()=>UR,hasAsciiStableConstructKey:()=>Kse,hasErrorCode:()=>BR,inferContainerFromCandidates:()=>qR,isInfrastructureFile:()=>$w,isReservedAppName:()=>KR,isValidEnvironment:()=>K4,mapSettledWithConcurrency:()=>NS,maskSensitiveOutput:()=>E,normaliseError:()=>Nr,parseGitRemoteUrl:()=>GR,parseShellArgs:()=>sd,singleton:()=>xt,sleep:()=>it,toKebab:()=>wi,toPascalCase:()=>Ht,toScreamingSnake:()=>qse,toValidDatabaseName:()=>pg});var $=b(()=>{"use strict";Hse();W4();Jse();H4();Zse();dg();Xse();Qse();tie();Y4();nie();J4();oie();sie();iie();HR();cie();lie();pie();Eie()});var Mw=b(()=>{"use strict";$()});function ld(t){return t.success===!0}function $t(t){return t.success===!1}function A(t){return{success:!0,data:t}}function v(t){return{success:!1,error:t}}async function r6(t){try{let e=await t();return A(e)}catch(e){return v(Nr(e))}}function n6(t){try{let e=t();return A(e)}catch(e){return v(Nr(e))}}var ln=b(()=>{"use strict";Mw()});function a6(t){let e=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(t);if(!e)return;let r=e[1],n=e[2];if(r===void 0||n===void 0)return;let a=parseInt(r,10);if(!Number.isFinite(a)||a<1)return;let o=n==="minute"||n==="hour"||n==="day";if(!(o&&a!==1)&&!(!o&&a===1))return n==="minute"||n==="minutes"?{everyMs:a*6e4}:n==="hour"||n==="hours"?{everyMs:a*60*6e4}:{everyMs:a*24*60*6e4}}var xie,bt,Aie=b(()=>{"use strict";xie=/^[a-zA-Z][a-zA-Z0-9-]*$/,bt=Object.freeze({IDENTIFIER:xie,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:xie,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:/^\/[a-zA-Z][a-zA-Z0-9-]*(\/[a-zA-Z][a-zA-Z0-9-]*)*$/,SECRET_NAME:/^[a-zA-Z_][a-zA-Z0-9._-]*$/,SSM_COMPONENT:/^[a-zA-Z][a-zA-Z0-9._-]*$/,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((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)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/})});var F,Cie=b(()=>{"use strict";F=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:"Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",SSM_COMPONENT:"Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores",EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",FIRST_NAME:"First name is required",LAST_NAME:"Last name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"})});var qc=b(()=>{"use strict";Aie();Cie()});function US(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Lw(t){return lu.includes(t)}function Uw(t){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(t)}function Bw(t){if(!t)return LS.slice(0,3);let e=t.toLowerCase().split("-"),r=e[0],n=e.length>1?e[1]:"",a=[];return r&&n&&(a=lu.filter(o=>o.startsWith(`${r}-${n}`))),a.length===0&&r&&(a=lu.filter(o=>o.startsWith(`${r}-`))),a.length>0?a.slice(0,3):LS.slice(0,3)}function jw(t){if(Lw(t))return!0;let e=Bw(t);return Uw(t)?`Unknown region. Try: ${e.join(", ")}`:`Invalid format. Try: ${e.join(", ")}`}function JR(t){if(!t||t.trim()==="")return!0;let e=US(t);for(let r of e){let n=jw(r);if(n!==!0)return n}return!0}function zw(t,e){return t.filter(r=>r!==e)}function ki(){return uu.map(t=>({label:t.city,value:t.code,description:t.code}))}function Bm(t){return uu.filter(e=>e.code!==t).map(e=>({label:e.city,value:e.code,description:e.code}))}function lc(t){let e=uu.find(r=>r.code===t);return e?e.city:t}function ZR(t){return e=>{let r=US(e);return zw(r,t)}}var Ke,lu,uu,Fw,LS,o6=b(()=>{"use strict";Ke="us-east-2",lu=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1","ap-northeast-1","ap-southeast-2","us-west-1","ca-central-1","af-south-1","ap-east-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-3","ap-southeast-4","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1"]),uu=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan"},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia"},{code:"us-west-1",name:"US West",city:"N. California",country:"USA"},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada"},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa"},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"China"},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea"},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan"},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India"},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India"},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia"},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia"},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland"},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden"},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy"},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain"},{code:"eu-west-2",name:"EU West",city:"London",country:"UK"},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France"},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE"},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain"},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil"}]),Fw=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"}]),LS=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"])});var Vw,s6=b(()=>{"use strict";Vw="2.7.0"});function Z(t,e,r){function n(i,c){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),i._zod.traits.has(t))return;i._zod.traits.add(t),e(i,c);let l=s.prototype,u=Object.keys(l);for(let p=0;p<u.length;p++){let m=u[p];m in i||(i[m]=l[m].bind(i))}}let a=r?.Parent??Object;class o extends a{}Object.defineProperty(o,"name",{value:t});function s(i){var c;let l=r?.Parent?new o:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:i=>r?.Parent&&i instanceof r.Parent?!0:i?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}function ba(t){return t&&Object.assign(fg,t),fg}var wie,i6,c6,pu,jm,fg,hg=b(()=>{i6=Object.freeze({status:"aborted"});c6=Symbol("zod_brand"),pu=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jm=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(wie=globalThis).__zod_globalConfig??(wie.__zod_globalConfig={});fg=globalThis.__zod_globalConfig});var we={};_t(we,{BIGINT_FORMAT_RANGES:()=>v6,Class:()=>u6,NUMBER_FORMAT_RANGES:()=>y6,aborted:()=>Wm,allowsEval:()=>m6,assert:()=>Dze,assertEqual:()=>kze,assertIs:()=>Pze,assertNever:()=>_ze,assertNotEqual:()=>Ize,assignProp:()=>Vm,base64ToUint8Array:()=>kie,base64urlToUint8Array:()=>Kze,cached:()=>jS,captureStackTrace:()=>QR,cleanEnum:()=>qze,cleanRegex:()=>Hw,clone:()=>Ms,cloneDef:()=>Oze,createTransparentProxy:()=>Uze,defineLazy:()=>lr,esc:()=>XR,escapeRegex:()=>Kc,explicitlyAborted:()=>S6,extend:()=>zze,finalizeIssue:()=>Fs,floatSafeRemainder:()=>p6,getElementAtPath:()=>Nze,getEnumValues:()=>Ww,getLengthableOrigin:()=>Yw,getParsedType:()=>Lze,getSizableOrigin:()=>Kw,hexToUint8Array:()=>Jze,isObject:()=>gg,isPlainObject:()=>Gm,issue:()=>zS,joinValues:()=>ie,jsonStringifyReplacer:()=>BS,merge:()=>Gze,mergeDefs:()=>ud,normalizeParams:()=>Re,nullish:()=>zm,numKeys:()=>Fze,objectClone:()=>Rze,omit:()=>jze,optionalKeys:()=>g6,parsedType:()=>Ce,partial:()=>Wze,pick:()=>Bze,prefixIssues:()=>Ii,primitiveTypes:()=>h6,promiseAllObject:()=>$ze,propertyKeyTypes:()=>qw,randomString:()=>Mze,required:()=>Hze,safeExtend:()=>Vze,shallowClone:()=>f6,slugify:()=>d6,stringifyPrimitive:()=>be,uint8ArrayToBase64:()=>Iie,uint8ArrayToBase64url:()=>Yze,uint8ArrayToHex:()=>Zze,unwrapMessage:()=>Gw});function kze(t){return t}function Ize(t){return t}function Pze(t){}function _ze(t){throw new Error("Unexpected value in exhaustive check")}function Dze(t){}function Ww(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,a])=>e.indexOf(+n)===-1).map(([n,a])=>a)}function ie(t,e="|"){return t.map(r=>be(r)).join(e)}function BS(t,e){return typeof e=="bigint"?e.toString():e}function jS(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function zm(t){return t==null}function Hw(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function p6(t,e){let r=t/e,n=Math.round(r),a=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<a?0:r-n}function lr(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Tie)return n===void 0&&(n=Tie,n=r()),n},set(a){Object.defineProperty(t,e,{value:a})},configurable:!0})}function Rze(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Vm(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ud(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function Oze(t){return ud(t._zod.def)}function Nze(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function $ze(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let a={};for(let o=0;o<e.length;o++)a[e[o]]=n[o];return a})}function Mze(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function XR(t){return JSON.stringify(t)}function d6(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function gg(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Gm(t){if(gg(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(gg(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function f6(t){return Gm(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Fze(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function Kc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ms(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Re(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Uze(t){let e;return new Proxy({},{get(r,n,a){return e??(e=t()),Reflect.get(e,n,a)},set(r,n,a,o){return e??(e=t()),Reflect.set(e,n,a,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,a){return e??(e=t()),Reflect.defineProperty(e,n,a)}})}function be(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function g6(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function Bze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=ud(t._zod.def,{get shape(){let s={};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(s[i]=r.shape[i])}return Vm(this,"shape",s),s},checks:[]});return Ms(t,o)}function jze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=ud(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete s[i]}return Vm(this,"shape",s),s},checks:[]});return Ms(t,o)}function zze(t,e){if(!Gm(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let a=ud(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return Vm(this,"shape",o),o}});return Ms(t,a)}function Vze(t,e){if(!Gm(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ud(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return Vm(this,"shape",n),n}});return Ms(t,r)}function Gze(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=ud(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Vm(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Ms(t,r)}function Wze(t,e,r){let a=e._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ud(e._zod.def,{get shape(){let i=e._zod.def.shape,c={...i};if(r)for(let l in r){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:i[l]}):i[l])}else for(let l in i)c[l]=t?new t({type:"optional",innerType:i[l]}):i[l];return Vm(this,"shape",c),c},checks:[]});return Ms(e,s)}function Hze(t,e,r){let n=ud(e._zod.def,{get shape(){let a=e._zod.def.shape,o={...a};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:a[s]}))}else for(let s in a)o[s]=new t({type:"nonoptional",innerType:a[s]});return Vm(this,"shape",o),o}});return Ms(e,n)}function Wm(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function S6(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function Ii(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Gw(t){return typeof t=="string"?t:t?.message}function Fs(t,e,r){let n=t.message?t.message:Gw(t.inst?._zod.def?.error?.(t))??Gw(e?.error?.(t))??Gw(r.customError?.(t))??Gw(r.localeError?.(t))??"Invalid input",{inst:a,continue:o,input:s,...i}=t;return i.path??(i.path=[]),i.message=n,e?.reportInput&&(i.input=s),i}function Kw(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Yw(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ce(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function zS(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function qze(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function kie(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Iie(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Kze(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return kie(e+r)}function Yze(t){return Iie(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Jze(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function Zze(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Tie,QR,m6,Lze,qw,h6,y6,v6,u6,ot=b(()=>{hg();Tie=Symbol("evaluating");QR="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};m6=jS(()=>{if(fg.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});Lze=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},qw=new Set(["string","number","symbol"]),h6=new Set(["string","number","bigint","boolean","symbol","undefined"]);y6={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},v6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};u6=class{constructor(...e){}}});function Zw(t,e=r=>r.message){let r={},n=[];for(let a of t.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:r}}function Xw(t,e=r=>r.message){let r={_errors:[]},n=(a,o=[])=>{for(let s of a.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>n({issues:i},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let i=[...o,...s.path];if(i.length===0)r._errors.push(e(s));else{let c=r,l=0;for(;l<i.length;){let u=i[l];l===i.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(e(s))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return n(t),r}function E6(t,e=r=>r.message){let r={errors:[]},n=(a,o=[])=>{var s,i;for(let c of a.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>n({issues:l},[...o,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...o,...c.path]);else{let l=[...o,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,p=0;for(;p<l.length;){let m=l[p],d=p===l.length-1;typeof m=="string"?(u.properties??(u.properties={}),(s=u.properties)[m]??(s[m]={errors:[]}),u=u.properties[m]):(u.items??(u.items=[]),(i=u.items)[m]??(i[m]={errors:[]}),u=u.items[m]),d&&u.errors.push(e(c)),p++}}};return n(t),r}function _ie(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function b6(t){let e=[],r=[...t.issues].sort((n,a)=>(n.path??[]).length-(a.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${_ie(n.path)}`);return e.join(`
|
|
54
54
|
`)}var Pie,Jw,Pi,x6=b(()=>{hg();ot();Pie=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,BS,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Jw=Z("$ZodError",Pie),Pi=Z("$ZodError",Pie,{Parent:Error})});var VS,eO,GS,tO,WS,A6,HS,C6,rO,Qze,nO,eVe,aO,tVe,oO,rVe,sO,nVe,iO,aVe,cO,oVe,lO,sVe,w6=b(()=>{hg();x6();ot();VS=t=>(e,r,n,a)=>{let o=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new pu;if(s.issues.length){let i=new(a?.Err??t)(s.issues.map(c=>Fs(c,o,ba())));throw QR(i,a?.callee),i}return s.value},eO=VS(Pi),GS=t=>async(e,r,n,a)=>{let o=n?{...n,async:!0}:{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let i=new(a?.Err??t)(s.issues.map(c=>Fs(c,o,ba())));throw QR(i,a?.callee),i}return s.value},tO=GS(Pi),WS=t=>(e,r,n)=>{let a=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new pu;return o.issues.length?{success:!1,error:new(t??Jw)(o.issues.map(s=>Fs(s,a,ba())))}:{success:!0,data:o.value}},A6=WS(Pi),HS=t=>async(e,r,n)=>{let a=n?{...n,async:!0}:{async:!0},o=e._zod.run({value:r,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>Fs(s,a,ba())))}:{success:!0,data:o.value}},C6=HS(Pi),rO=t=>(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return VS(t)(e,r,a)},Qze=rO(Pi),nO=t=>(e,r,n)=>VS(t)(e,r,n),eVe=nO(Pi),aO=t=>async(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return GS(t)(e,r,a)},tVe=aO(Pi),oO=t=>async(e,r,n)=>GS(t)(e,r,n),rVe=oO(Pi),sO=t=>(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return WS(t)(e,r,a)},nVe=sO(Pi),iO=t=>(e,r,n)=>WS(t)(e,r,n),aVe=iO(Pi),cO=t=>async(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return HS(t)(e,r,a)},oVe=cO(Pi),lO=t=>async(e,r,n)=>HS(t)(e,r,n),sVe=lO(Pi)});var uc={};_t(uc,{base64:()=>j6,base64url:()=>uO,bigint:()=>K6,boolean:()=>J6,browserEmail:()=>fVe,cidrv4:()=>U6,cidrv6:()=>B6,cuid:()=>T6,cuid2:()=>k6,date:()=>G6,datetime:()=>H6,domain:()=>yVe,duration:()=>R6,e164:()=>V6,email:()=>N6,emoji:()=>$6,extendedDuration:()=>iVe,guid:()=>O6,hex:()=>vVe,hostname:()=>gVe,html5Email:()=>pVe,httpProtocol:()=>z6,idnEmail:()=>mVe,integer:()=>Y6,ipv4:()=>M6,ipv6:()=>F6,ksuid:()=>_6,lowercase:()=>Q6,mac:()=>L6,md5_base64:()=>EVe,md5_base64url:()=>bVe,md5_hex:()=>SVe,nanoid:()=>D6,null:()=>Z6,number:()=>pO,rfc5322Email:()=>dVe,sha1_base64:()=>AVe,sha1_base64url:()=>CVe,sha1_hex:()=>xVe,sha256_base64:()=>TVe,sha256_base64url:()=>kVe,sha256_hex:()=>wVe,sha384_base64:()=>PVe,sha384_base64url:()=>_Ve,sha384_hex:()=>IVe,sha512_base64:()=>RVe,sha512_base64url:()=>OVe,sha512_hex:()=>DVe,string:()=>q6,time:()=>W6,ulid:()=>I6,undefined:()=>X6,unicodeEmail:()=>Die,uppercase:()=>ez,uuid:()=>yg,uuid4:()=>cVe,uuid6:()=>lVe,uuid7:()=>uVe,xid:()=>P6});function $6(){return new RegExp(hVe,"u")}function Oie(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function W6(t){return new RegExp(`^${Oie(t)}$`)}function H6(t){let e=Oie({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Rie}T(?:${n})$`)}function Qw(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function e0(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var T6,k6,I6,P6,_6,D6,R6,iVe,O6,yg,cVe,lVe,uVe,N6,pVe,dVe,Die,mVe,fVe,hVe,M6,F6,L6,U6,B6,j6,uO,gVe,yVe,z6,V6,Rie,G6,q6,K6,Y6,pO,J6,Z6,X6,Q6,ez,vVe,SVe,EVe,bVe,xVe,AVe,CVe,wVe,TVe,kVe,IVe,PVe,_Ve,DVe,RVe,OVe,dO=b(()=>{ot();T6=/^[cC][0-9a-z]{6,}$/,k6=/^[0-9a-z]+$/,I6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,P6=/^[0-9a-vA-V]{20}$/,_6=/^[A-Za-z0-9]{27}$/,D6=/^[a-zA-Z0-9_-]{21}$/,R6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,iVe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,O6=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,yg=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,cVe=yg(4),lVe=yg(6),uVe=yg(7),N6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pVe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,dVe=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Die=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,mVe=Die,fVe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hVe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";M6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,F6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,L6=t=>{let e=Kc(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},U6=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,B6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,j6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uO=/^[A-Za-z0-9_-]*$/,gVe=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,yVe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,z6=/^https?$/,V6=/^\+[1-9]\d{6,14}$/,Rie="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",G6=new RegExp(`^${Rie}$`);q6=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},K6=/^-?\d+n?$/,Y6=/^-?\d+$/,pO=/^-?\d+(?:\.\d+)?$/,J6=/^(?:true|false)$/i,Z6=/^null$/i,X6=/^undefined$/i,Q6=/^[^A-Z]*$/,ez=/^[^a-z]*$/,vVe=/^[0-9a-fA-F]*$/;SVe=/^[0-9a-fA-F]{32}$/,EVe=Qw(22,"=="),bVe=e0(22),xVe=/^[0-9a-fA-F]{40}$/,AVe=Qw(27,"="),CVe=e0(27),wVe=/^[0-9a-fA-F]{64}$/,TVe=Qw(43,"="),kVe=e0(43),IVe=/^[0-9a-fA-F]{96}$/,PVe=Qw(64,""),_Ve=e0(64),DVe=/^[0-9a-fA-F]{128}$/,RVe=Qw(86,"=="),OVe=e0(86)});function Nie(t,e,r){t.issues.length&&e.issues.push(...Ii(r,t.issues))}var Tn,$ie,mO,fO,tz,rz,nz,az,oz,sz,iz,cz,lz,qS,uz,pz,dz,mz,fz,hz,gz,yz,vz,hO=b(()=>{hg();dO();ot();Tn=Z("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),$ie={number:"number",bigint:"bigint",object:"date"},mO=Z("$ZodCheckLessThan",(t,e)=>{Tn.init(t,e);let r=$ie[typeof e.value];t._zod.onattach.push(n=>{let a=n._zod.bag,o=(e.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?a.maximum=e.value:a.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),fO=Z("$ZodCheckGreaterThan",(t,e)=>{Tn.init(t,e);let r=$ie[typeof e.value];t._zod.onattach.push(n=>{let a=n._zod.bag,o=(e.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?a.minimum=e.value:a.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),tz=Z("$ZodCheckMultipleOf",(t,e)=>{Tn.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):p6(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),rz=Z("$ZodCheckNumberFormat",(t,e)=>{Tn.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[a,o]=y6[e.format];t._zod.onattach.push(s=>{let i=s._zod.bag;i.format=e.format,i.minimum=a,i.maximum=o,r&&(i.pattern=Y6)}),t._zod.check=s=>{let i=s.value;if(r){if(!Number.isInteger(i)){s.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:i,inst:t});return}if(!Number.isSafeInteger(i)){i>0?s.issues.push({input:i,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):s.issues.push({input:i,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}i<a&&s.issues.push({origin:"number",input:i,code:"too_small",minimum:a,inclusive:!0,inst:t,continue:!e.abort}),i>o&&s.issues.push({origin:"number",input:i,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),nz=Z("$ZodCheckBigIntFormat",(t,e)=>{Tn.init(t,e);let[r,n]=v6[e.format];t._zod.onattach.push(a=>{let o=a._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=a=>{let o=a.value;o<r&&a.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&a.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),az=Z("$ZodCheckMaxSize",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!zm(a)&&a.size!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<a&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let a=n.value;a.size<=e.maximum||n.issues.push({origin:Kw(a),code:"too_big",maximum:e.maximum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),oz=Z("$ZodCheckMinSize",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!zm(a)&&a.size!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>a&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let a=n.value;a.size>=e.minimum||n.issues.push({origin:Kw(a),code:"too_small",minimum:e.minimum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),sz=Z("$ZodCheckSizeEquals",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!zm(a)&&a.size!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag;a.minimum=e.size,a.maximum=e.size,a.size=e.size}),t._zod.check=n=>{let a=n.value,o=a.size;if(o===e.size)return;let s=o>e.size;n.issues.push({origin:Kw(a),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),iz=Z("$ZodCheckMaxLength",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!zm(a)&&a.length!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<a&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let a=n.value;if(a.length<=e.maximum)return;let s=Yw(a);n.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),cz=Z("$ZodCheckMinLength",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!zm(a)&&a.length!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>a&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let a=n.value;if(a.length>=e.minimum)return;let s=Yw(a);n.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),lz=Z("$ZodCheckLengthEquals",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!zm(a)&&a.length!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag;a.minimum=e.length,a.maximum=e.length,a.length=e.length}),t._zod.check=n=>{let a=n.value,o=a.length;if(o===e.length)return;let s=Yw(a),i=o>e.length;n.issues.push({origin:s,...i?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),qS=Z("$ZodCheckStringFormat",(t,e)=>{var r,n;Tn.init(t,e),t._zod.onattach.push(a=>{let o=a._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=a=>{e.pattern.lastIndex=0,!e.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:e.format,input:a.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),uz=Z("$ZodCheckRegex",(t,e)=>{qS.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),pz=Z("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Q6),qS.init(t,e)}),dz=Z("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=ez),qS.init(t,e)}),mz=Z("$ZodCheckIncludes",(t,e)=>{Tn.init(t,e);let r=Kc(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(a=>{let o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=a=>{a.value.includes(e.includes,e.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:a.value,inst:t,continue:!e.abort})}}),fz=Z("$ZodCheckStartsWith",(t,e)=>{Tn.init(t,e);let r=new RegExp(`^${Kc(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),hz=Z("$ZodCheckEndsWith",(t,e)=>{Tn.init(t,e);let r=new RegExp(`.*${Kc(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});gz=Z("$ZodCheckProperty",(t,e)=>{Tn.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(a=>Nie(a,r,e.property));Nie(n,r,e.property)}}),yz=Z("$ZodCheckMimeType",(t,e)=>{Tn.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),vz=Z("$ZodCheckOverwrite",(t,e)=>{Tn.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var t0,Sz=b(()=>{t0=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
55
55
|
`).filter(s=>s),a=Math.min(...n.map(s=>s.length-s.trimStart().length)),o=n.map(s=>s.slice(a)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let e=Function,r=this?.args,a=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,a.join(`
|
|
56
56
|
`))}}});var Ez,bz=b(()=>{Ez={major:4,minor:4,patch:3}});function Vz(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Zie(t){if(!uO.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Vz(r)}function Xie(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let a=JSON.parse(atob(n));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||e&&(!("alg"in a)||a.alg!==e))}catch{return!1}}function Fie(t,e,r){t.issues.length&&e.issues.push(...Ii(r,t.issues)),e.value[r]=t.value}function SO(t,e,r,n,a,o){let s=r in n;if(t.issues.length){if(a&&o&&!s)return;e.issues.push(...Ii(r,t.issues))}if(!s&&!a){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?s&&(e.value[r]=void 0):e.value[r]=t.value}function Qie(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=g6(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function ece(t,e,r,n,a,o){let s=[],i=a.keySet,c=a.catchall._zod,l=c.def.type,u=c.optin==="optional",p=c.optout==="optional";for(let m in e){if(m==="__proto__"||i.has(m))continue;if(l==="never"){s.push(m);continue}let d=c.run({value:e[m],issues:[]},n);d instanceof Promise?t.push(d.then(f=>SO(f,r,m,e,u,p))):SO(d,r,m,e,u,p)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}function Lie(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let a=t.filter(o=>!Wm(o));return a.length===1?(e.value=a[0].value,a[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>Fs(s,n,ba())))}),e)}function Uie(t,e,r,n){let a=t.filter(o=>o.issues.length===0);return a.length===1?(e.value=a[0].value,e):(a.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>Fs(s,n,ba())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}function xz(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Gm(t)&&Gm(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),a={...t,...e};for(let o of n){let s=xz(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};a[o]=s.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let a=t[n],o=e[n],s=xz(a,o);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Bie(t,e,r){let n=new Map,a;for(let i of e.issues)if(i.code==="unrecognized_keys"){a??(a=i);for(let c of i.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(i);for(let i of r.issues)if(i.code==="unrecognized_keys")for(let c of i.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(i);let o=[...n].filter(([,i])=>i.l&&i.r).map(([i])=>i);if(o.length&&a&&t.issues.push({...a,keys:o}),Wm(t))return t;let s=xz(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}function jie(t,e){for(let r=t.length-1;r>=0;r--)if(t[r]._zod[e]!=="optional")return r+1;return 0}function zie(t,e,r){t.issues.length&&e.issues.push(...Ii(r,t.issues)),e.value[r]=t.value}function Vie(t,e,r,n,a){for(let o=0;o<r.length;o++){let s=t[o],i=o<n.length;if(s.issues.length){if(!i&&o>=a){e.value.length=o;break}e.issues.push(...Ii(o,s.issues))}e.value[o]=s.value}for(let o=e.value.length-1;o>=n.length&&(r[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}function Gie(t,e,r,n,a,o,s){t.issues.length&&(qw.has(typeof n)?r.issues.push(...Ii(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:a,inst:o,issues:t.issues.map(i=>Fs(i,s,ba()))})),e.issues.length&&(qw.has(typeof n)?r.issues.push(...Ii(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:a,inst:o,key:n,issues:e.issues.map(i=>Fs(i,s,ba()))})),r.value.set(t.value,e.value)}function Wie(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function Hie(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}function qie(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function Kie(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function gO(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},r)}function yO(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let a=e.transform(t.value,t);return a instanceof Promise?a.then(o=>vO(t,o,e.out,r)):vO(t,a,e.out,r)}else{let a=e.reverseTransform(t.value,t);return a instanceof Promise?a.then(o=>vO(t,o,e.in,r)):vO(t,a,e.in,r)}}function vO(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}function Yie(t){return t.value=Object.freeze(t.value),t}function Jie(t,e,r,n){if(!t){let a={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(a.params=n._zod.def.params),e.issues.push(zS(a))}}var Mt,vg,xn,Az,Cz,wz,Tz,kz,Iz,Pz,_z,Dz,Rz,Oz,Nz,$z,Mz,Fz,Lz,Uz,Bz,jz,zz,Gz,Wz,Hz,qz,Kz,EO,Yz,r0,bO,Jz,Zz,Xz,Qz,eV,tV,rV,nV,aV,oV,tce,sV,n0,iV,cV,lV,xO,uV,pV,dV,mV,fV,hV,gV,AO,yV,vV,SV,EV,bV,xV,AV,CV,CO,a0,wV,TV,kV,IV,PV,_V,DV,RV=b(()=>{hO();hg();Sz();w6();dO();ot();bz();ot();Mt=Z("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Ez;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let a of n)for(let o of a._zod.onattach)o(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let a=(s,i,c)=>{let l=Wm(s),u;for(let p of i){if(p._zod.def.when){if(S6(s)||!p._zod.def.when(s))continue}else if(l)continue;let m=s.issues.length,d=p._zod.check(s);if(d instanceof Promise&&c?.async===!1)throw new pu;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,s.issues.length!==m&&(l||(l=Wm(s,m)))});else{if(s.issues.length===m)continue;l||(l=Wm(s,m))}}return u?u.then(()=>s):s},o=(s,i,c)=>{if(Wm(s))return s.aborted=!0,s;let l=a(i,n,c);if(l instanceof Promise){if(c.async===!1)throw new pu;return l.then(u=>t._zod.parse(u,c))}return t._zod.parse(l,c)};t._zod.run=(s,i)=>{if(i.skipChecks)return t._zod.parse(s,i);if(i.direction==="backward"){let l=t._zod.parse({value:s.value,issues:[]},{...i,skipChecks:!0});return l instanceof Promise?l.then(u=>o(u,s,i)):o(l,s,i)}let c=t._zod.parse(s,i);if(c instanceof Promise){if(i.async===!1)throw new pu;return c.then(l=>a(l,n,i))}return a(c,n,i)}}lr(t,"~standard",()=>({validate:a=>{try{let o=A6(t,a);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return C6(t,a).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),vg=Z("$ZodString",(t,e)=>{Mt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??q6(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),xn=Z("$ZodStringFormat",(t,e)=>{qS.init(t,e),vg.init(t,e)}),Az=Z("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=O6),xn.init(t,e)}),Cz=Z("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=yg(n))}else e.pattern??(e.pattern=yg());xn.init(t,e)}),wz=Z("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=N6),xn.init(t,e)}),Tz=Z("$ZodURL",(t,e)=>{xn.init(t,e),t._zod.check=r=>{try{let n=r.value.trim();if(!e.normalize&&e.protocol?.source===z6.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}let a=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=a.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),kz=Z("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=$6()),xn.init(t,e)}),Iz=Z("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=D6),xn.init(t,e)}),Pz=Z("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=T6),xn.init(t,e)}),_z=Z("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=k6),xn.init(t,e)}),Dz=Z("$ZodULID",(t,e)=>{e.pattern??(e.pattern=I6),xn.init(t,e)}),Rz=Z("$ZodXID",(t,e)=>{e.pattern??(e.pattern=P6),xn.init(t,e)}),Oz=Z("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=_6),xn.init(t,e)}),Nz=Z("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=H6(e)),xn.init(t,e)}),$z=Z("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=G6),xn.init(t,e)}),Mz=Z("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=W6(e)),xn.init(t,e)}),Fz=Z("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=R6),xn.init(t,e)}),Lz=Z("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=M6),xn.init(t,e),t._zod.bag.format="ipv4"}),Uz=Z("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=F6),xn.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Bz=Z("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=L6(e.delimiter)),xn.init(t,e),t._zod.bag.format="mac"}),jz=Z("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=U6),xn.init(t,e)}),zz=Z("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=B6),xn.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[a,o]=n;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${a}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});Gz=Z("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=j6),xn.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{Vz(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});Wz=Z("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=uO),xn.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{Zie(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Hz=Z("$ZodE164",(t,e)=>{e.pattern??(e.pattern=V6),xn.init(t,e)});qz=Z("$ZodJWT",(t,e)=>{xn.init(t,e),t._zod.check=r=>{Xie(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Kz=Z("$ZodCustomStringFormat",(t,e)=>{xn.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),EO=Z("$ZodNumber",(t,e)=>{Mt.init(t,e),t._zod.pattern=t._zod.bag.pattern??pO,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;let o=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:a,inst:t,...o?{received:o}:{}}),r}}),Yz=Z("$ZodNumberFormat",(t,e)=>{rz.init(t,e),EO.init(t,e)}),r0=Z("$ZodBoolean",(t,e)=>{Mt.init(t,e),t._zod.pattern=J6,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let a=r.value;return typeof a=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:t}),r}}),bO=Z("$ZodBigInt",(t,e)=>{Mt.init(t,e),t._zod.pattern=K6,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),Jz=Z("$ZodBigIntFormat",(t,e)=>{nz.init(t,e),bO.init(t,e)}),Zz=Z("$ZodSymbol",(t,e)=>{Mt.init(t,e),t._zod.parse=(r,n)=>{let a=r.value;return typeof a=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:a,inst:t}),r}}),Xz=Z("$ZodUndefined",(t,e)=>{Mt.init(t,e),t._zod.pattern=X6,t._zod.values=new Set([void 0]),t._zod.parse=(r,n)=>{let a=r.value;return typeof a>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:a,inst:t}),r}}),Qz=Z("$ZodNull",(t,e)=>{Mt.init(t,e),t._zod.pattern=Z6,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let a=r.value;return a===null||r.issues.push({expected:"null",code:"invalid_type",input:a,inst:t}),r}}),eV=Z("$ZodAny",(t,e)=>{Mt.init(t,e),t._zod.parse=r=>r}),tV=Z("$ZodUnknown",(t,e)=>{Mt.init(t,e),t._zod.parse=r=>r}),rV=Z("$ZodNever",(t,e)=>{Mt.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),nV=Z("$ZodVoid",(t,e)=>{Mt.init(t,e),t._zod.parse=(r,n)=>{let a=r.value;return typeof a>"u"||r.issues.push({expected:"void",code:"invalid_type",input:a,inst:t}),r}}),aV=Z("$ZodDate",(t,e)=>{Mt.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let a=r.value,o=a instanceof Date;return o&&!Number.isNaN(a.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:a,...o?{received:"Invalid Date"}:{},inst:t}),r}});oV=Z("$ZodArray",(t,e)=>{Mt.init(t,e),t._zod.parse=(r,n)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:t}),r;r.value=Array(a.length);let o=[];for(let s=0;s<a.length;s++){let i=a[s],c=e.element._zod.run({value:i,issues:[]},n);c instanceof Promise?o.push(c.then(l=>Fie(l,r,s))):Fie(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});tce=Z("$ZodObject",(t,e)=>{if(Mt.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let i=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...i};return Object.defineProperty(e,"shape",{value:c}),c}})}let n=jS(()=>Qie(e));lr(t._zod,"propValues",()=>{let i=e.shape,c={};for(let l in i){let u=i[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let p of u.values)c[l].add(p)}}return c});let a=gg,o=e.catchall,s;t._zod.parse=(i,c)=>{s??(s=n.value);let l=i.value;if(!a(l))return i.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),i;i.value={};let u=[],p=s.shape;for(let m of s.keys){let d=p[m],f=d._zod.optin==="optional",h=d._zod.optout==="optional",g=d._zod.run({value:l[m],issues:[]},c);g instanceof Promise?u.push(g.then(S=>SO(S,i,m,l,f,h))):SO(g,i,m,l,f,h)}return o?ece(u,l,i,c,n.value,t):u.length?Promise.all(u).then(()=>i):i}}),sV=Z("$ZodObjectJIT",(t,e)=>{tce.init(t,e);let r=t._zod.parse,n=jS(()=>Qie(e)),a=m=>{let d=new t0(["shape","payload","ctx"]),f=n.value,h=w=>{let C=XR(w);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};d.write("const input = payload.value;");let g=Object.create(null),S=0;for(let w of f.keys)g[w]=`key_${S++}`;d.write("const newResult = {};");for(let w of f.keys){let C=g[w],T=XR(w),_=m[w],D=_?._zod?.optin==="optional",O=_?._zod?.optout==="optional";d.write(`const ${C} = ${h(w)};`),D&&O?d.write(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fjall",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Fjall CLI",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"typescript": "^6.0.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@fjall/cli": "^2.7.
|
|
46
|
+
"@fjall/cli": "^2.7.1",
|
|
47
47
|
"esbuild": "^0.28.0",
|
|
48
48
|
"vitest": "^4.1.5"
|
|
49
49
|
},
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=22.0.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "2b37679546b7695b1678148e0b8e1f349afac3d9"
|
|
66
66
|
}
|