fjall 2.11.0 → 2.11.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-07T01:02:46.053Z
|
|
2
2
|
bundle size: 3047777 bytes
|
|
3
|
-
cli version: 2.11.
|
|
3
|
+
cli version: 2.11.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= packageName %>",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.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.11.
|
|
12
|
+
"@fjall/components-infrastructure": "^2.11.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 en.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()}`,en.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new U4e(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=_ae(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=_ae(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=>M4e(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(en.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 Dae(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 r4(){if(en.env.NO_COLOR||en.env.FORCE_COLOR==="0"||en.env.FORCE_COLOR==="false")return!1;if(en.env.FORCE_COLOR||en.env.CLICOLOR_FORCE!==void 0)return!0}n4.Command=t4;n4.useColor=r4});var Mae=se(zc=>{var{Argument:Oae}=uR(),{Command:a4}=Rae(),{CommanderError:B4e,InvalidArgumentError:Nae}=cw(),{Help:j4e}=K3(),{Option:$ae}=X3();zc.program=new a4;zc.createCommand=t=>new a4(t);zc.createOption=(t,e)=>new $ae(t,e);zc.createArgument=(t,e)=>new Oae(t,e);zc.Command=a4;zc.Option=$ae;zc.Argument=Oae;zc.Help=j4e;zc.CommanderError=B4e;zc.InvalidArgumentError=Nae;zc.InvalidOptionArgumentError=Nae});var lw,o4=b(()=>{lw={name:"@fjall/cli",version:"2.11.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.11.0","@fjall/generator":"^2.11.0","@fjall/util":"^2.11.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 W4e(){let t=new Map;for(let[e,r]of Object.entries(Zn)){for(let[n,a]of Object.entries(r))Zn[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},r[n]=Zn[n],t.set(a[0],a[1]);Object.defineProperty(Zn,e,{value:r,enumerable:!1})}return Object.defineProperty(Zn,"codes",{value:t,enumerable:!1}),Zn.color.close="\x1B[39m",Zn.bgColor.close="\x1B[49m",Zn.color.ansi=Uae(),Zn.color.ansi256=Bae(),Zn.color.ansi16m=jae(),Zn.bgColor.ansi=Uae(10),Zn.bgColor.ansi256=Bae(10),Zn.bgColor.ansi16m=jae(10),Object.defineProperties(Zn,{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=>Zn.rgbToAnsi256(...Zn.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)=>Zn.ansi256ToAnsi(Zn.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Zn.ansi256ToAnsi(Zn.hexToAnsi256(e)),enumerable:!1}}),Zn}var Uae,Bae,jae,Zn,k_t,V4e,G4e,I_t,H4e,nu,zae=b(()=>{Uae=(t=0)=>e=>`\x1B[${e+t}m`,Bae=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,jae=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Zn={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]}},k_t=Object.keys(Zn.modifier),V4e=Object.keys(Zn.color),G4e=Object.keys(Zn.bgColor),I_t=[...V4e,...G4e];H4e=W4e(),nu=H4e});import s4 from"node:process";import q4e from"node:os";import Vae from"node:tty";function Vc(t,e=globalThis.Deno?globalThis.Deno.args:s4.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),a=e.indexOf("--");return n!==-1&&(a===-1||n<a)}function K4e(){if("FORCE_COLOR"in Xn)return Xn.FORCE_COLOR==="true"?1:Xn.FORCE_COLOR==="false"?0:Xn.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Xn.FORCE_COLOR,10),3)}function Y4e(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function J4e(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=K4e();n!==void 0&&(dR=n);let a=r?dR:n;if(a===0)return 0;if(r){if(Vc("color=16m")||Vc("color=full")||Vc("color=truecolor"))return 3;if(Vc("color=256"))return 2}if("TF_BUILD"in Xn&&"AGENT_NAME"in Xn)return 1;if(t&&!e&&a===void 0)return 0;let o=a||0;if(Xn.TERM==="dumb")return o;if(s4.platform==="win32"){let s=q4e.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in Xn)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in Xn)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in Xn)||Xn.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in Xn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xn.TEAMCITY_VERSION)?1:0;if(Xn.COLORTERM==="truecolor"||Xn.TERM==="xterm-kitty"||Xn.TERM==="xterm-ghostty"||Xn.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Xn){let s=Number.parseInt((Xn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xn.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Xn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Xn.TERM)||"COLORTERM"in Xn?1:o}function Gae(t,e={}){let r=J4e(t,{streamIsTTY:t&&t.isTTY,...e});return Y4e(r)}var Xn,dR,Z4e,Wae,Hae=b(()=>{({env:Xn}=s4);Vc("no-color")||Vc("no-colors")||Vc("color=false")||Vc("color=never")?dR=0:(Vc("color")||Vc("colors")||Vc("color=true")||Vc("color=always"))&&(dR=1);Z4e={stdout:Gae({isTTY:Vae.isatty(1)}),stderr:Gae({isTTY:Vae.isatty(2)})},Wae=Z4e});function qae(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 Kae(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 Dae(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 r4(){if(en.env.NO_COLOR||en.env.FORCE_COLOR==="0"||en.env.FORCE_COLOR==="false")return!1;if(en.env.FORCE_COLOR||en.env.CLICOLOR_FORCE!==void 0)return!0}n4.Command=t4;n4.useColor=r4});var Mae=se(zc=>{var{Argument:Oae}=uR(),{Command:a4}=Rae(),{CommanderError:B4e,InvalidArgumentError:Nae}=cw(),{Help:j4e}=K3(),{Option:$ae}=X3();zc.program=new a4;zc.createCommand=t=>new a4(t);zc.createOption=(t,e)=>new $ae(t,e);zc.createArgument=(t,e)=>new Oae(t,e);zc.Command=a4;zc.Option=$ae;zc.Argument=Oae;zc.Help=j4e;zc.CommanderError=B4e;zc.InvalidArgumentError=Nae;zc.InvalidOptionArgumentError=Nae});var lw,o4=b(()=>{lw={name:"@fjall/cli",version:"2.11.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.11.1","@fjall/generator":"^2.11.1","@fjall/util":"^2.11.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 W4e(){let t=new Map;for(let[e,r]of Object.entries(Zn)){for(let[n,a]of Object.entries(r))Zn[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},r[n]=Zn[n],t.set(a[0],a[1]);Object.defineProperty(Zn,e,{value:r,enumerable:!1})}return Object.defineProperty(Zn,"codes",{value:t,enumerable:!1}),Zn.color.close="\x1B[39m",Zn.bgColor.close="\x1B[49m",Zn.color.ansi=Uae(),Zn.color.ansi256=Bae(),Zn.color.ansi16m=jae(),Zn.bgColor.ansi=Uae(10),Zn.bgColor.ansi256=Bae(10),Zn.bgColor.ansi16m=jae(10),Object.defineProperties(Zn,{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=>Zn.rgbToAnsi256(...Zn.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)=>Zn.ansi256ToAnsi(Zn.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Zn.ansi256ToAnsi(Zn.hexToAnsi256(e)),enumerable:!1}}),Zn}var Uae,Bae,jae,Zn,k_t,V4e,G4e,I_t,H4e,nu,zae=b(()=>{Uae=(t=0)=>e=>`\x1B[${e+t}m`,Bae=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,jae=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Zn={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]}},k_t=Object.keys(Zn.modifier),V4e=Object.keys(Zn.color),G4e=Object.keys(Zn.bgColor),I_t=[...V4e,...G4e];H4e=W4e(),nu=H4e});import s4 from"node:process";import q4e from"node:os";import Vae from"node:tty";function Vc(t,e=globalThis.Deno?globalThis.Deno.args:s4.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),a=e.indexOf("--");return n!==-1&&(a===-1||n<a)}function K4e(){if("FORCE_COLOR"in Xn)return Xn.FORCE_COLOR==="true"?1:Xn.FORCE_COLOR==="false"?0:Xn.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Xn.FORCE_COLOR,10),3)}function Y4e(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function J4e(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=K4e();n!==void 0&&(dR=n);let a=r?dR:n;if(a===0)return 0;if(r){if(Vc("color=16m")||Vc("color=full")||Vc("color=truecolor"))return 3;if(Vc("color=256"))return 2}if("TF_BUILD"in Xn&&"AGENT_NAME"in Xn)return 1;if(t&&!e&&a===void 0)return 0;let o=a||0;if(Xn.TERM==="dumb")return o;if(s4.platform==="win32"){let s=q4e.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in Xn)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in Xn)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in Xn)||Xn.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in Xn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xn.TEAMCITY_VERSION)?1:0;if(Xn.COLORTERM==="truecolor"||Xn.TERM==="xterm-kitty"||Xn.TERM==="xterm-ghostty"||Xn.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Xn){let s=Number.parseInt((Xn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xn.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Xn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Xn.TERM)||"COLORTERM"in Xn?1:o}function Gae(t,e={}){let r=J4e(t,{streamIsTTY:t&&t.isTTY,...e});return Y4e(r)}var Xn,dR,Z4e,Wae,Hae=b(()=>{({env:Xn}=s4);Vc("no-color")||Vc("no-colors")||Vc("color=false")||Vc("color=never")?dR=0:(Vc("color")||Vc("colors")||Vc("color=true")||Vc("color=always"))&&(dR=1);Z4e={stdout:Gae({isTTY:Vae.isatty(1)}),stderr:Gae({isTTY:Vae.isatty(2)})},Wae=Z4e});function qae(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 Kae(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 Yae=b(()=>{});function pw(t){return Q4e(t)}var Jae,Zae,i4,TS,uw,Xae,kS,X4e,Q4e,c4,e6e,t6e,l4,mR,r6e,n6e,L_t,Y,Mn=b(()=>{zae();Hae();Yae();({stdout:Jae,stderr:Zae}=Wae),i4=Symbol("GENERATOR"),TS=Symbol("STYLER"),uw=Symbol("IS_EMPTY"),Xae=["ansi","ansi","ansi256","ansi16m"],kS=Object.create(null),X4e=(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=Jae?Jae.level:0;t.level=e.level===void 0?r:e.level},Q4e=t=>{let e=(...r)=>r.join(" ");return X4e(e,t),Object.setPrototypeOf(e,pw.prototype),e};Object.setPrototypeOf(pw.prototype,Function.prototype);for(let[t,e]of Object.entries(nu))kS[t]={get(){let r=mR(this,l4(e.open,e.close,this[TS]),this[uw]);return Object.defineProperty(this,t,{value:r}),r}};kS.visible={get(){let t=mR(this,this[TS],!0);return Object.defineProperty(this,"visible",{value:t}),t}};c4=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?nu[r].ansi16m(...n):e==="ansi256"?nu[r].ansi256(nu.rgbToAnsi256(...n)):nu[r].ansi(nu.rgbToAnsi(...n)):t==="hex"?c4("rgb",e,r,...nu.hexToRgb(...n)):nu[r][t](...n),e6e=["rgb","hex","ansi256"];for(let t of e6e){kS[t]={get(){let{level:r}=this;return function(...n){let a=l4(c4(t,Xae[r],"color",...n),nu.color.close,this[TS]);return mR(this,a,this[uw])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);kS[e]={get(){let{level:r}=this;return function(...n){let a=l4(c4(t,Xae[r],"bgColor",...n),nu.bgColor.close,this[TS]);return mR(this,a,this[uw])}}}}t6e=Object.defineProperties(()=>{},{...kS,level:{enumerable:!0,get(){return this[i4].level},set(t){this[i4].level=t}}}),l4=(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}},mR=(t,e,r)=>{let n=(...a)=>r6e(n,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(n,t6e),n[i4]=t,n[TS]=e,n[uw]=r,n},r6e=(t,e)=>{if(t.level<=0||!e)return t[uw]?"":e;let r=t[TS];if(r===void 0)return e;let{openAll:n,closeAll:a}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=qae(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
|
|
@@ -50,7 +50,7 @@ ${e}`,c6e=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),l6e=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 tg,au,Sw=b(()=>{"use strict";tg={trace:0,debug:1,info:2,warn:3,error:4},au={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 Q6e}from"path";import{homedir as eze}from"os";function _S(){let t=process.env.FJALL_LOG_DIR;return t!==void 0&&t!==""?t:Q6e(eze(),".fjall","logs")}var Ew=b(()=>{"use strict"});import{createWriteStream as tze,existsSync as rze,mkdirSync as nze}from"fs";import{join as qoe}from"path";var bw,R4=b(()=>{"use strict";Sw();Ew();bw=class{mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=au.MAX_BUFFER_SIZE;constructor(e,r,n){this.mainLogger=e,this.appName=r,this.operationType=n,this.deploymentId=`${n}-${Date.now()}`;let a=_S(),o=qoe(a,"deployments",r);rze(o)||nze(o,{recursive:!0});let s=new Date().toISOString().replace(/[:.]/g,"-"),i=`${n}-${s}.jsonl`;this.logPath=qoe(o,i);try{this.logStream=tze(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),au.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 O4}from"path";var IR,Koe=b(()=>{"use strict";Mm();P4();Hoe();R4();Sw();Ew();P4();IR=class t{static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let e=_S(),r=O4(e,"debug"),n=this.parseEnvInt("FJALL_LOG_MAX_SIZE",au.MAX_FILE_SIZE),a=this.parseEnvInt("FJALL_LOG_MAX_FILES",au.MAX_FILES);this.config={logDir:e,debugLogDir:r,maxFileSize:n,maxFiles:a,maxBufferSize:au.MAX_BUFFER_SIZE,flushIntervalMs:au.FLUSH_INTERVAL_MS},this.mainLogPath=O4(e,au.LOG_FILENAME),this.debugLogPath=O4(r,au.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 tg?this.minLevel=o:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new kR(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 tg[e]>=tg[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(Dr.shouldSuppressOutput||Dr.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,tg[this.minLevel]>tg.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(e){return new PS(this,e)}forDeployment(e,r="deploy"){return new bw(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,ne=b(()=>{"use strict";Koe();_4();Sw();Ew();Ew();R4();Sw();I=IR.getInstance()});var N4,xw,$4=b(()=>{"use strict";ne();Cw();N4=class{info(e){PR(e)}error(e){_R(e)}warning(e){Joe(e)}success(e){Yoe(e)}debug(e){I.debug("CLI",e)}startSpinner(e){return Zoe(e)}stopSpinner(){rg()}updateSpinner(e){Aw(e)}},xw=class{mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(e={}){this.isNonInteractive=e.noPrompt??!1,this.logger=new N4}}});var M4,ww,F4=b(()=>{"use strict";M4=class{info(e){}error(e){}warning(e){}success(e){}debug(e){}startSpinner(e){return null}stopSpinner(){}updateSpinner(e){}},ww=class{mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new M4}}});var Dr,Xoe=b(()=>{"use strict";$4();F4();Dr=class{static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new xw({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 ww)}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 Mm=b(()=>{"use strict";Loe();$4();F4();Xoe()});function PR(t,...e){Dr.shouldSuppressOutput||(Gn&&Gn.stop(),console.log(t,...e),Gn&&Gn.start())}function Yoe(t,...e){Dr.shouldSuppressOutput||(Gn?(Gn.succeed(Y.hex("#A4C2A5")(`\u2705 ${t}`)),Gn=null):console.log(Y.hex("#A4C2A5")(`\u2705 ${t}`),...e))}function Joe(t,...e){Dr.shouldSuppressOutput||(Gn?(Gn.warn(`\u26A0\uFE0F ${t}`),Gn=null):console.log(Y.yellow(`\u26A0\uFE0F ${t}`),...e))}function _R(t,...e){Dr.shouldSuppressOutput||(Gn?(Gn.fail(Y.red.bold(`\u274C Error: ${t}`)),Gn=null):console.error(Y.red.bold(`\u274C Error: ${t}`),...e))}function L4(){return Dr.shouldSuppressOutput||Dr.isNonInteractive}function Zoe(t){if(L4())return null;if(Gn)return Gn.text=t,Gn;let e=Y.hex("#FF7BFF")(t);return Gn=TR({text:e,spinner:Qoe,color:"magenta"}).start(),Gn}function Aw(t){if(L4())return null;if(Gn)Gn.text=Y.hex("#FF7BFF")(t);else{let e=Y.hex("#FF7BFF")(t);Gn=TR({text:e,spinner:Qoe,color:"magenta"}).start()}return Gn}function rg(){L4()||Gn&&(Gn.stop(),Gn=null)}var Qoe,Gn,Cw=b(()=>{"use strict";Mn();Foe();Mm();Qoe={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},Gn=null});var tse=b(()=>{});var rse=b(()=>{tse()});var nse=b(()=>{});var ase=b(()=>{});var ose=b(()=>{});var sse=b(()=>{});var DR,ise=b(()=>{DR=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 cse=b(()=>{});var lse=b(()=>{});var use=b(()=>{rse();nse();ase();ose();sse();ise();cse();lse()});var RR,aze,pse=b(()=>{RR=t=>encodeURIComponent(t).replace(/[!'()*]/g,aze),aze=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`});var dse=b(()=>{});var mse=b(()=>{pse();dse()});function fse(t){let e=[];for(let r of Object.keys(t).sort()){let n=t[r];if(r=RR(r),Array.isArray(n))for(let a=0,o=n.length;a<o;a++)e.push(`${r}=${RR(n[a])}`);else{let a=r;(n||typeof n=="string")&&(a+=`=${RR(n)}`),e.push(a)}}return e.join("&")}var hse=b(()=>{mse()});function U4(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 gse=b(()=>{});var yse,vse=b(()=>{yse=["ECONNRESET","EPIPE","ETIMEDOUT"]});var Sse,Ese=b(()=>{Sse=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,ng=b(()=>{Ra={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)}});var bse,xse,Ase=b(()=>{ng();bse=1e3,xse=(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,bse),bse)}});var Cse,wse=b(()=>{ng();Cse=(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 oze,Tse,kse=b(()=>{ng();oze=3e3,Tse=(t,{keepAlive:e,keepAliveMsecs:r},n=oze)=>{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 Ise,Pse,_se=b(()=>{ng();Ise=3e3,Pse=(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:Ise),Ise)}});import{Readable as sze}from"node:stream";async function Rse(t,e,r=Dse,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(Dse,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&&ize(t,e.body)}function ize(t,e){if(e instanceof sze){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 Dse,Ose=b(()=>{ng();Dse=6e3});import{Agent as B4,request as cze}from"node:https";var OR,Nse,Qa,$se=b(()=>{use();hse();gse();vse();Ese();Ase();wse();kse();_se();ng();Ose();Qa=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=U4(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?B4:OR)({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=fse(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?cze:Nse)(w,O=>{let R=new DR({statusCode:O.statusCode||-1,reason:O.statusMessage,headers:Sse(O.headers),body:O});u({response:R})});if(T.on("error",O=>{yse.includes(O.code)?p(Object.assign(O,{name:"TimeoutError"})):p(O)}),r){let O=()=>{T.destroy();let R=U4(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(xse(T,p,a.connectionTimeout)),l.push(Cse(T,p,_,a.throwOnRequestTimeout,a.logger??console)),l.push(Pse(T,p,a.socketTimeout));let D=w.agent;typeof D=="object"&&"keepAlive"in D&&l.push(Tse(T,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs})),c=Rse(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 Nse=d,OR=m,s instanceof OR||typeof s?.destroy=="function"?(this.externalAgent=!0,s):new OR({keepAlive:u,maxSockets:p,...s})},httpsAgent:i instanceof B4||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new B4({keepAlive:u,maxSockets:p,...i}),logger:l}}}});var Mse=b(()=>{});var Fse=b(()=>{});var Fm=b(()=>{$se();Mse();Fse()});function os(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 NR,Lse=b(()=>{"use strict";NR="@"});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 og(t){return wi(t).replace(/-/g,"_")}function Use(t){return wi(t).replace(/-/g,"_").toUpperCase()}function Ti(t){return t.length===0?t:t.charAt(0).toUpperCase()+t.slice(1)}function $R(t){return t.split(".").join("")}function ag(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Bse(t){let e=t.replace(new RegExp("\\P{ASCII}","gu"),"");return ag(e)===ag(t)&&ag(t)!==""}var j4=b(()=>{"use strict"});function jse(t){let e=new Map;for(let r of t){let n=ag(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 zse=b(()=>{"use strict";j4()});function $r(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 MR(t,e){return!t||typeof t!="object"?!1:"code"in t&&t.code===e}function Tw(t){if(!(!t||typeof t!="object")&&"code"in t&&typeof t.code=="string")return t.code}function DS(t){return t instanceof Error?t.stack:void 0}function FR(t){let e=k(t),r=Tw(t);return r&&r!=="UNKNOWN_ERROR"?`[${r}] ${e}`:e}var z4=b(()=>{"use strict"});function Tt(t){let e,r=!1;return()=>(r||(e=t(),r=!0),e)}var Vse=b(()=>{"use strict"});function Vt(t){return Object.fromEntries(Object.entries(t).filter(([e])=>!V4.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(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,"$1_$2_***").replace(/\bwhsec_[A-Za-z0-9]{8,}/g,"whsec_***").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(lze,"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 V4,lze,sg=b(()=>{"use strict";V4=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"]);lze=/fjall_ak_[A-Z2-7]{16}\.[A-Z2-7]{40}/g});var st,Gse=b(()=>{"use strict";st=t=>new Promise(e=>setTimeout(e,t))});async function RS(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 Wse=b(()=>{"use strict"});function G4(t){return OS.includes(t)}function Hse(t){return G4(t)?kw[t]:t.charAt(0).toUpperCase()+t.slice(1)}var OS,jr,NS,kw,LR,qse=b(()=>{"use strict";OS=["production","staging","development","platform","compliance"];jr={ROOT:"root",PLATFORM:"platform"},NS=[...OS,jr.ROOT],kw={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"};LR={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"}});function Lm(t){if(!t)return"compute";if(t.startsWith("Custom::"))return Kse[t]??"compute";let e=Kse[t];return e||uze.add(t),e??"compute"}function Iw(t){return pze[t]??dze}function $s(t){return mze[t]||t.split("::").pop()||t}var UR,Kse,uze,pze,dze,mze,W4=b(()=>{"use strict";UR=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],Kse=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"}),uze=new Set;pze=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}),dze=30;mze=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 BR(t){if(!t)return null;let e=t.replace(/^(https?:\/\/)[^@]+@/,"$1"),r=e.match(hze)??e.match(gze)??t.match(yze);if(!r)return null;let[,n,a,o]=r;return!n||!a||!o?null:{provider:fze[n]??"other",owner:a,repo:o,host:n}}var fze,hze,gze,yze,Yse=b(()=>{"use strict";fze={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},hze=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,gze=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,yze=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/});function ig(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 H4=b(()=>{"use strict"});var Jse,Zse=b(()=>{"use strict";Jse=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy"]});function ou(t){let e=[t.primaryRegion,...t.secondaryRegions??[],t.disasterRecoveryRegion].filter(r=>r!==void 0);return[...new Set(e)]}function su(t,e){return`${t.toLowerCase()}-${ig(e)}`}function id(t,e){let r=[];for(let n of t)if(n.environment!=="root")for(let a of e)r.push({name:su(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,ou(t))}function Gc(t,e){return t.find(r=>r.name===e)}var Xse=b(()=>{"use strict";H4()});function Lo(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 Qse=b(()=>{"use strict"});function jR(t,e){let r=e?.excludedPathPrefixes,n=e?.excludedPathSegments,a=[];for(let o of t){if(!Pw(o.path)||r&&Sze(o.path,r)||n&&Eze(o.path,n))continue;let s=Y4(o.path);s!==null&&a.push({configPath:vze(o.path),boundaryPath:s})}return a}function Pw(t){return t===q4||t.endsWith(`/${q4}`)}function Y4(t){let e=t.split("/");for(let r=0;r<e.length-1;r++)if(e[r]===K4)return e.slice(0,r+1).join("/");return null}function vze(t){return t.slice(0,-`/${q4}`.length)}function Sze(t,e){for(let r of e)if(t.startsWith(r))return!0;return!1}function Eze(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 q4,K4,zR=b(()=>{"use strict";q4="infrastructure.ts",K4="fjall"});function VR(t){if(t.length===0)return null;let e=[];for(let n of t){let a=bze(n.boundaryPath);if(a===null)return null;e.push(a)}let r=xze(e);return r.length===0?null:r.join("/")}function bze(t){let e=t.split("/").filter(n=>n.length>0);if(e.length===0||e[e.length-1]!==K4)return null;let r=e.slice(0,e.length-1);return r.length===0?null:r}function xze(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 eie=b(()=>{"use strict";zR()});function GR(t){return J4.includes(t.toLowerCase())}var J4,tie=b(()=>{"use strict";J4=["fjall"]});function Aze(t){return{success:!0,data:t}}function WR(t){return{success:!1,error:t}}function $S(t,e,r){if(!t.startsWith(rie))return WR(new Error(`expected sha256:... digest, got ${t.slice(0,32)}`));let n=t.slice(rie.length);if(n.length<Z4)return WR(new Error(`digest hex payload too short (need >=${Z4} chars, got ${n.length})`));let a=e.trim();if(a==="")return WR(new Error("serviceName must be a non-empty string"));let o;if(r!==void 0){let c=r.trim();if(c==="")return WR(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=c.toLowerCase()}let s=n.slice(0,Z4).toLowerCase(),i=o!==void 0?`${a.toLowerCase()}-${o}`:a.toLowerCase();return Aze(`${i}-sha-${s}`)}var rie,Z4,nie=b(()=>{"use strict";rie="sha256:",Z4=12});var aie,oie,sie,iie,cie,lie,uie,pie,die=b(()=>{"use strict";aie="fjall-premigrate",oie="EXPECTED_SCHEMA_VERSION",sie="EXPECTED_SCHEMA_VERSION_TOOL",iie="EXPECTED_CH_SCHEMA_VERSION",cie="SCHEMA_ADMIN_USER",lie="SCHEMA_ADMIN_PASSWORD",uie=/^\d{14}_/,pie=/\.dev\.sql$/});var mie={};Dt(mie,{ACCOUNT_ROLES:()=>LR,CLICKHOUSE_MIGRATION_SKIP_RE:()=>pie,DANGEROUS_ENV_VARS:()=>V4,DNS_APEX:()=>NR,ENVIRONMENT_LABELS:()=>kw,EXPECTED_CH_SCHEMA_VERSION_ENV:()=>iie,EXPECTED_SCHEMA_VERSION_ENV:()=>oie,EXPECTED_SCHEMA_VERSION_TOOL_ENV:()=>sie,MIGRATION_SNAPSHOT_NAME_PREFIX:()=>aie,PRISMA_MIGRATION_DIR_RE:()=>uie,RESERVED_APP_NAMES:()=>J4,RESOURCE_CATEGORIES:()=>UR,SCHEMA_ADMIN_PASSWORD_ENV:()=>lie,SCHEMA_ADMIN_USER_ENV:()=>cie,SCOPE_VALUES:()=>Jse,STANDARD_ENVIRONMENTS:()=>OS,STANDARD_ENVIRONMENTS_WITH_ROOT:()=>NS,STRUCTURAL_ENVIRONMENTS:()=>jr,abbreviateRegion:()=>ig,accountConstructKey:()=>ag,buildAppConfigPath:()=>Lo,capitalise:()=>Ti,categoriseResource:()=>Lm,deriveAllTargets:()=>cd,deriveContentHashTag:()=>$S,deriveRegionsFromOrgConfig:()=>ou,deriveTargets:()=>id,filterDangerousEnvVars:()=>Vt,findAccountNameCollision:()=>jse,findBoundaryPath:()=>Y4,findInfrastructurePaths:()=>jR,findTarget:()=>Gc,formatErrorString:()=>FR,generateTargetName:()=>su,getDomainExportNames:()=>os,getEnvironmentLabel:()=>Hse,getErrorCode:()=>Tw,getErrorMessage:()=>k,getErrorStack:()=>DS,getExpectedDuration:()=>Iw,getFriendlyResourceType:()=>$s,getSafeZoneName:()=>$R,hasAsciiStableConstructKey:()=>Bse,hasErrorCode:()=>MR,inferContainerFromCandidates:()=>VR,isInfrastructureFile:()=>Pw,isReservedAppName:()=>GR,isValidEnvironment:()=>G4,mapSettledWithConcurrency:()=>RS,maskSensitiveOutput:()=>E,normaliseError:()=>$r,parseGitRemoteUrl:()=>BR,parseShellArgs:()=>sd,singleton:()=>Tt,sleep:()=>st,toKebab:()=>wi,toPascalCase:()=>Ht,toScreamingSnake:()=>Use,toValidDatabaseName:()=>og});var $=b(()=>{"use strict";Lse();j4();zse();z4();Vse();sg();Gse();Wse();qse();W4();Yse();H4();Zse();Xse();Qse();zR();eie();tie();nie();die()});var _w=b(()=>{"use strict";$()});function ld(t){return t.success===!0}function Nt(t){return t.success===!1}function A(t){return{success:!0,data:t}}function v(t){return{success:!1,error:t}}async function X4(t){try{let e=await t();return A(e)}catch(e){return v($r(e))}}function Q4(t){try{let e=t();return A(e)}catch(e){return v($r(e))}}var ln=b(()=>{"use strict";_w()});function e6(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 fie,Et,hie=b(()=>{"use strict";fie=/^[a-zA-Z][a-zA-Z0-9-]*$/,Et=Object.freeze({IDENTIFIER:fie,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:fie,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,gie=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 Wc=b(()=>{"use strict";hie();gie()});function FS(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Rw(t){return iu.includes(t)}function Ow(t){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(t)}function Nw(t){if(!t)return MS.slice(0,3);let e=t.toLowerCase().split("-"),r=e[0],n=e.length>1?e[1]:"",a=[];return r&&n&&(a=iu.filter(o=>o.startsWith(`${r}-${n}`))),a.length===0&&r&&(a=iu.filter(o=>o.startsWith(`${r}-`))),a.length>0?a.slice(0,3):MS.slice(0,3)}function $w(t){if(Rw(t))return!0;let e=Nw(t);return Ow(t)?`Unknown region. Try: ${e.join(", ")}`:`Invalid format. Try: ${e.join(", ")}`}function HR(t){if(!t||t.trim()==="")return!0;let e=FS(t);for(let r of e){let n=$w(r);if(n!==!0)return n}return!0}function Mw(t,e){return t.filter(r=>r!==e)}function ki(){return cu.map(t=>({label:t.city,value:t.code,description:t.code}))}function Um(t){return cu.filter(e=>e.code!==t).map(e=>({label:e.city,value:e.code,description:e.code}))}function sc(t){let e=cu.find(r=>r.code===t);return e?e.city:t}function qR(t){return e=>{let r=FS(e);return Mw(r,t)}}var Ke,iu,cu,Dw,MS,t6=b(()=>{"use strict";Ke="us-east-2",iu=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"]),cu=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"}]),Dw=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"}]),MS=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"])});var Fw,r6=b(()=>{"use strict";Fw="2.10.0"});function J(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 Sa(t){return t&&Object.assign(cg,t),cg}var yie,n6,a6,lu,Bm,cg,lg=b(()=>{n6=Object.freeze({status:"aborted"});a6=Symbol("zod_brand"),lu=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Bm=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(yie=globalThis).__zod_globalConfig??(yie.__zod_globalConfig={});cg=globalThis.__zod_globalConfig});var we={};Dt(we,{BIGINT_FORMAT_RANGES:()=>f6,Class:()=>s6,NUMBER_FORMAT_RANGES:()=>m6,aborted:()=>Gm,allowsEval:()=>l6,assert:()=>Ize,assertEqual:()=>Cze,assertIs:()=>Tze,assertNever:()=>kze,assertNotEqual:()=>wze,assignProp:()=>zm,base64ToUint8Array:()=>Sie,base64urlToUint8Array:()=>Wze,cached:()=>US,captureStackTrace:()=>YR,cleanEnum:()=>Gze,cleanRegex:()=>Bw,clone:()=>Ms,cloneDef:()=>_ze,createTransparentProxy:()=>Mze,defineLazy:()=>ir,esc:()=>KR,escapeRegex:()=>Hc,explicitlyAborted:()=>h6,extend:()=>Uze,finalizeIssue:()=>Fs,floatSafeRemainder:()=>i6,getElementAtPath:()=>Dze,getEnumValues:()=>Uw,getLengthableOrigin:()=>Vw,getParsedType:()=>$ze,getSizableOrigin:()=>zw,hexToUint8Array:()=>qze,isObject:()=>ug,isPlainObject:()=>Vm,issue:()=>BS,joinValues:()=>ie,jsonStringifyReplacer:()=>LS,merge:()=>jze,mergeDefs:()=>ud,normalizeParams:()=>Re,nullish:()=>jm,numKeys:()=>Nze,objectClone:()=>Pze,omit:()=>Lze,optionalKeys:()=>d6,parsedType:()=>Ae,partial:()=>zze,pick:()=>Fze,prefixIssues:()=>Ii,primitiveTypes:()=>p6,promiseAllObject:()=>Rze,propertyKeyTypes:()=>jw,randomString:()=>Oze,required:()=>Vze,safeExtend:()=>Bze,shallowClone:()=>u6,slugify:()=>c6,stringifyPrimitive:()=>be,uint8ArrayToBase64:()=>Eie,uint8ArrayToBase64url:()=>Hze,uint8ArrayToHex:()=>Kze,unwrapMessage:()=>Lw});function Cze(t){return t}function wze(t){return t}function Tze(t){}function kze(t){throw new Error("Unexpected value in exhaustive check")}function Ize(t){}function Uw(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 LS(t,e){return typeof e=="bigint"?e.toString():e}function US(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function jm(t){return t==null}function Bw(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function i6(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 ir(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==vie)return n===void 0&&(n=vie,n=r()),n},set(a){Object.defineProperty(t,e,{value:a})},configurable:!0})}function Pze(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function zm(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 _ze(t){return ud(t._zod.def)}function Dze(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function Rze(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 Oze(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function KR(t){return JSON.stringify(t)}function c6(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ug(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Vm(t){if(ug(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(ug(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function u6(t){return Vm(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Nze(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function Hc(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 Mze(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 d6(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function Fze(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 zm(this,"shape",s),s},checks:[]});return Ms(t,o)}function Lze(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 zm(this,"shape",s),s},checks:[]});return Ms(t,o)}function Uze(t,e){if(!Vm(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 zm(this,"shape",o),o}});return Ms(t,a)}function Bze(t,e){if(!Vm(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 zm(this,"shape",n),n}});return Ms(t,r)}function jze(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 zm(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Ms(t,r)}function zze(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 zm(this,"shape",c),c},checks:[]});return Ms(e,s)}function Vze(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 zm(this,"shape",o),o}});return Ms(e,n)}function Gm(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 h6(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 Lw(t){return typeof t=="string"?t:t?.message}function Fs(t,e,r){let n=t.message?t.message:Lw(t.inst?._zod.def?.error?.(t))??Lw(e?.error?.(t))??Lw(r.customError?.(t))??Lw(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 zw(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Vw(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ae(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 BS(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Gze(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Sie(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 Eie(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Wze(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Sie(e+r)}function Hze(t){return Eie(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function qze(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 Kze(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var vie,YR,l6,$ze,jw,p6,m6,f6,s6,ot=b(()=>{lg();vie=Symbol("evaluating");YR="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};l6=US(()=>{if(cg.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});$ze=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}`)}},jw=new Set(["string","number","symbol"]),p6=new Set(["string","number","bigint","boolean","symbol","undefined"]);m6={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]},f6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};s6=class{constructor(...e){}}});function Ww(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 Hw(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 g6(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 xie(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 y6(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 ${xie(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=U4(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?B4:OR)({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=fse(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?cze:Nse)(w,O=>{let R=new DR({statusCode:O.statusCode||-1,reason:O.statusMessage,headers:Sse(O.headers),body:O});u({response:R})});if(T.on("error",O=>{yse.includes(O.code)?p(Object.assign(O,{name:"TimeoutError"})):p(O)}),r){let O=()=>{T.destroy();let R=U4(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(xse(T,p,a.connectionTimeout)),l.push(Cse(T,p,_,a.throwOnRequestTimeout,a.logger??console)),l.push(Pse(T,p,a.socketTimeout));let D=w.agent;typeof D=="object"&&"keepAlive"in D&&l.push(Tse(T,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs})),c=Rse(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 Nse=d,OR=m,s instanceof OR||typeof s?.destroy=="function"?(this.externalAgent=!0,s):new OR({keepAlive:u,maxSockets:p,...s})},httpsAgent:i instanceof B4||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new B4({keepAlive:u,maxSockets:p,...i}),logger:l}}}});var Mse=b(()=>{});var Fse=b(()=>{});var Fm=b(()=>{$se();Mse();Fse()});function os(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 NR,Lse=b(()=>{"use strict";NR="@"});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 og(t){return wi(t).replace(/-/g,"_")}function Use(t){return wi(t).replace(/-/g,"_").toUpperCase()}function Ti(t){return t.length===0?t:t.charAt(0).toUpperCase()+t.slice(1)}function $R(t){return t.split(".").join("")}function ag(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Bse(t){let e=t.replace(new RegExp("\\P{ASCII}","gu"),"");return ag(e)===ag(t)&&ag(t)!==""}var j4=b(()=>{"use strict"});function jse(t){let e=new Map;for(let r of t){let n=ag(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 zse=b(()=>{"use strict";j4()});function $r(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 MR(t,e){return!t||typeof t!="object"?!1:"code"in t&&t.code===e}function Tw(t){if(!(!t||typeof t!="object")&&"code"in t&&typeof t.code=="string")return t.code}function DS(t){return t instanceof Error?t.stack:void 0}function FR(t){let e=k(t),r=Tw(t);return r&&r!=="UNKNOWN_ERROR"?`[${r}] ${e}`:e}var z4=b(()=>{"use strict"});function Tt(t){let e,r=!1;return()=>(r||(e=t(),r=!0),e)}var Vse=b(()=>{"use strict"});function Vt(t){return Object.fromEntries(Object.entries(t).filter(([e])=>!V4.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(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,"$1_$2_***").replace(/\bwhsec_[A-Za-z0-9]{8,}/g,"whsec_***").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(lze,"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 V4,lze,sg=b(()=>{"use strict";V4=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"]);lze=/fjall_ak_[A-Z2-7]{16}\.[A-Z2-7]{40}/g});var st,Gse=b(()=>{"use strict";st=t=>new Promise(e=>setTimeout(e,t))});async function RS(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 Wse=b(()=>{"use strict"});function G4(t){return OS.includes(t)}function Hse(t){return G4(t)?kw[t]:t.charAt(0).toUpperCase()+t.slice(1)}var OS,jr,NS,kw,LR,qse=b(()=>{"use strict";OS=["production","staging","development","platform","compliance"];jr={ROOT:"root",PLATFORM:"platform"},NS=[...OS,jr.ROOT],kw={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"};LR={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"}});function Lm(t){if(!t)return"compute";if(t.startsWith("Custom::"))return Kse[t]??"compute";let e=Kse[t];return e||uze.add(t),e??"compute"}function Iw(t){return pze[t]??dze}function $s(t){return mze[t]||t.split("::").pop()||t}var UR,Kse,uze,pze,dze,mze,W4=b(()=>{"use strict";UR=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],Kse=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"}),uze=new Set;pze=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}),dze=30;mze=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 BR(t){if(!t)return null;let e=t.replace(/^(https?:\/\/)[^@]+@/,"$1"),r=e.match(hze)??e.match(gze)??t.match(yze);if(!r)return null;let[,n,a,o]=r;return!n||!a||!o?null:{provider:fze[n]??"other",owner:a,repo:o,host:n}}var fze,hze,gze,yze,Yse=b(()=>{"use strict";fze={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},hze=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,gze=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,yze=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/});function ig(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 H4=b(()=>{"use strict"});var Jse,Zse=b(()=>{"use strict";Jse=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy"]});function ou(t){let e=[t.primaryRegion,...t.secondaryRegions??[],t.disasterRecoveryRegion].filter(r=>r!==void 0);return[...new Set(e)]}function su(t,e){return`${t.toLowerCase()}-${ig(e)}`}function id(t,e){let r=[];for(let n of t)if(n.environment!=="root")for(let a of e)r.push({name:su(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,ou(t))}function Gc(t,e){return t.find(r=>r.name===e)}var Xse=b(()=>{"use strict";H4()});function Lo(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 Qse=b(()=>{"use strict"});function jR(t,e){let r=e?.excludedPathPrefixes,n=e?.excludedPathSegments,a=[];for(let o of t){if(!Pw(o.path)||r&&Sze(o.path,r)||n&&Eze(o.path,n))continue;let s=Y4(o.path);s!==null&&a.push({configPath:vze(o.path),boundaryPath:s})}return a}function Pw(t){return t===q4||t.endsWith(`/${q4}`)}function Y4(t){let e=t.split("/");for(let r=0;r<e.length-1;r++)if(e[r]===K4)return e.slice(0,r+1).join("/");return null}function vze(t){return t.slice(0,-`/${q4}`.length)}function Sze(t,e){for(let r of e)if(t.startsWith(r))return!0;return!1}function Eze(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 q4,K4,zR=b(()=>{"use strict";q4="infrastructure.ts",K4="fjall"});function VR(t){if(t.length===0)return null;let e=[];for(let n of t){let a=bze(n.boundaryPath);if(a===null)return null;e.push(a)}let r=xze(e);return r.length===0?null:r.join("/")}function bze(t){let e=t.split("/").filter(n=>n.length>0);if(e.length===0||e[e.length-1]!==K4)return null;let r=e.slice(0,e.length-1);return r.length===0?null:r}function xze(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 eie=b(()=>{"use strict";zR()});function GR(t){return J4.includes(t.toLowerCase())}var J4,tie=b(()=>{"use strict";J4=["fjall"]});function Aze(t){return{success:!0,data:t}}function WR(t){return{success:!1,error:t}}function $S(t,e,r){if(!t.startsWith(rie))return WR(new Error(`expected sha256:... digest, got ${t.slice(0,32)}`));let n=t.slice(rie.length);if(n.length<Z4)return WR(new Error(`digest hex payload too short (need >=${Z4} chars, got ${n.length})`));let a=e.trim();if(a==="")return WR(new Error("serviceName must be a non-empty string"));let o;if(r!==void 0){let c=r.trim();if(c==="")return WR(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=c.toLowerCase()}let s=n.slice(0,Z4).toLowerCase(),i=o!==void 0?`${a.toLowerCase()}-${o}`:a.toLowerCase();return Aze(`${i}-sha-${s}`)}var rie,Z4,nie=b(()=>{"use strict";rie="sha256:",Z4=12});var aie,oie,sie,iie,cie,lie,uie,pie,die=b(()=>{"use strict";aie="fjall-premigrate",oie="EXPECTED_SCHEMA_VERSION",sie="EXPECTED_SCHEMA_VERSION_TOOL",iie="EXPECTED_CH_SCHEMA_VERSION",cie="SCHEMA_ADMIN_USER",lie="SCHEMA_ADMIN_PASSWORD",uie=/^\d{14}_/,pie=/\.dev\.sql$/});var mie={};Dt(mie,{ACCOUNT_ROLES:()=>LR,CLICKHOUSE_MIGRATION_SKIP_RE:()=>pie,DANGEROUS_ENV_VARS:()=>V4,DNS_APEX:()=>NR,ENVIRONMENT_LABELS:()=>kw,EXPECTED_CH_SCHEMA_VERSION_ENV:()=>iie,EXPECTED_SCHEMA_VERSION_ENV:()=>oie,EXPECTED_SCHEMA_VERSION_TOOL_ENV:()=>sie,MIGRATION_SNAPSHOT_NAME_PREFIX:()=>aie,PRISMA_MIGRATION_DIR_RE:()=>uie,RESERVED_APP_NAMES:()=>J4,RESOURCE_CATEGORIES:()=>UR,SCHEMA_ADMIN_PASSWORD_ENV:()=>lie,SCHEMA_ADMIN_USER_ENV:()=>cie,SCOPE_VALUES:()=>Jse,STANDARD_ENVIRONMENTS:()=>OS,STANDARD_ENVIRONMENTS_WITH_ROOT:()=>NS,STRUCTURAL_ENVIRONMENTS:()=>jr,abbreviateRegion:()=>ig,accountConstructKey:()=>ag,buildAppConfigPath:()=>Lo,capitalise:()=>Ti,categoriseResource:()=>Lm,deriveAllTargets:()=>cd,deriveContentHashTag:()=>$S,deriveRegionsFromOrgConfig:()=>ou,deriveTargets:()=>id,filterDangerousEnvVars:()=>Vt,findAccountNameCollision:()=>jse,findBoundaryPath:()=>Y4,findInfrastructurePaths:()=>jR,findTarget:()=>Gc,formatErrorString:()=>FR,generateTargetName:()=>su,getDomainExportNames:()=>os,getEnvironmentLabel:()=>Hse,getErrorCode:()=>Tw,getErrorMessage:()=>k,getErrorStack:()=>DS,getExpectedDuration:()=>Iw,getFriendlyResourceType:()=>$s,getSafeZoneName:()=>$R,hasAsciiStableConstructKey:()=>Bse,hasErrorCode:()=>MR,inferContainerFromCandidates:()=>VR,isInfrastructureFile:()=>Pw,isReservedAppName:()=>GR,isValidEnvironment:()=>G4,mapSettledWithConcurrency:()=>RS,maskSensitiveOutput:()=>E,normaliseError:()=>$r,parseGitRemoteUrl:()=>BR,parseShellArgs:()=>sd,singleton:()=>Tt,sleep:()=>st,toKebab:()=>wi,toPascalCase:()=>Ht,toScreamingSnake:()=>Use,toValidDatabaseName:()=>og});var $=b(()=>{"use strict";Lse();j4();zse();z4();Vse();sg();Gse();Wse();qse();W4();Yse();H4();Zse();Xse();Qse();zR();eie();tie();nie();die()});var _w=b(()=>{"use strict";$()});function ld(t){return t.success===!0}function Nt(t){return t.success===!1}function A(t){return{success:!0,data:t}}function v(t){return{success:!1,error:t}}async function X4(t){try{let e=await t();return A(e)}catch(e){return v($r(e))}}function Q4(t){try{let e=t();return A(e)}catch(e){return v($r(e))}}var ln=b(()=>{"use strict";_w()});function e6(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 fie,Et,hie=b(()=>{"use strict";fie=/^[a-zA-Z][a-zA-Z0-9-]*$/,Et=Object.freeze({IDENTIFIER:fie,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:fie,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,gie=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 Wc=b(()=>{"use strict";hie();gie()});function FS(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Rw(t){return iu.includes(t)}function Ow(t){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(t)}function Nw(t){if(!t)return MS.slice(0,3);let e=t.toLowerCase().split("-"),r=e[0],n=e.length>1?e[1]:"",a=[];return r&&n&&(a=iu.filter(o=>o.startsWith(`${r}-${n}`))),a.length===0&&r&&(a=iu.filter(o=>o.startsWith(`${r}-`))),a.length>0?a.slice(0,3):MS.slice(0,3)}function $w(t){if(Rw(t))return!0;let e=Nw(t);return Ow(t)?`Unknown region. Try: ${e.join(", ")}`:`Invalid format. Try: ${e.join(", ")}`}function HR(t){if(!t||t.trim()==="")return!0;let e=FS(t);for(let r of e){let n=$w(r);if(n!==!0)return n}return!0}function Mw(t,e){return t.filter(r=>r!==e)}function ki(){return cu.map(t=>({label:t.city,value:t.code,description:t.code}))}function Um(t){return cu.filter(e=>e.code!==t).map(e=>({label:e.city,value:e.code,description:e.code}))}function sc(t){let e=cu.find(r=>r.code===t);return e?e.city:t}function qR(t){return e=>{let r=FS(e);return Mw(r,t)}}var Ke,iu,cu,Dw,MS,t6=b(()=>{"use strict";Ke="us-east-2",iu=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"]),cu=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"}]),Dw=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"}]),MS=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"])});var Fw,r6=b(()=>{"use strict";Fw="2.11.0"});function J(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 Sa(t){return t&&Object.assign(cg,t),cg}var yie,n6,a6,lu,Bm,cg,lg=b(()=>{n6=Object.freeze({status:"aborted"});a6=Symbol("zod_brand"),lu=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Bm=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(yie=globalThis).__zod_globalConfig??(yie.__zod_globalConfig={});cg=globalThis.__zod_globalConfig});var we={};Dt(we,{BIGINT_FORMAT_RANGES:()=>f6,Class:()=>s6,NUMBER_FORMAT_RANGES:()=>m6,aborted:()=>Gm,allowsEval:()=>l6,assert:()=>Ize,assertEqual:()=>Cze,assertIs:()=>Tze,assertNever:()=>kze,assertNotEqual:()=>wze,assignProp:()=>zm,base64ToUint8Array:()=>Sie,base64urlToUint8Array:()=>Wze,cached:()=>US,captureStackTrace:()=>YR,cleanEnum:()=>Gze,cleanRegex:()=>Bw,clone:()=>Ms,cloneDef:()=>_ze,createTransparentProxy:()=>Mze,defineLazy:()=>ir,esc:()=>KR,escapeRegex:()=>Hc,explicitlyAborted:()=>h6,extend:()=>Uze,finalizeIssue:()=>Fs,floatSafeRemainder:()=>i6,getElementAtPath:()=>Dze,getEnumValues:()=>Uw,getLengthableOrigin:()=>Vw,getParsedType:()=>$ze,getSizableOrigin:()=>zw,hexToUint8Array:()=>qze,isObject:()=>ug,isPlainObject:()=>Vm,issue:()=>BS,joinValues:()=>ie,jsonStringifyReplacer:()=>LS,merge:()=>jze,mergeDefs:()=>ud,normalizeParams:()=>Re,nullish:()=>jm,numKeys:()=>Nze,objectClone:()=>Pze,omit:()=>Lze,optionalKeys:()=>d6,parsedType:()=>Ae,partial:()=>zze,pick:()=>Fze,prefixIssues:()=>Ii,primitiveTypes:()=>p6,promiseAllObject:()=>Rze,propertyKeyTypes:()=>jw,randomString:()=>Oze,required:()=>Vze,safeExtend:()=>Bze,shallowClone:()=>u6,slugify:()=>c6,stringifyPrimitive:()=>be,uint8ArrayToBase64:()=>Eie,uint8ArrayToBase64url:()=>Hze,uint8ArrayToHex:()=>Kze,unwrapMessage:()=>Lw});function Cze(t){return t}function wze(t){return t}function Tze(t){}function kze(t){throw new Error("Unexpected value in exhaustive check")}function Ize(t){}function Uw(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 LS(t,e){return typeof e=="bigint"?e.toString():e}function US(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function jm(t){return t==null}function Bw(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function i6(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 ir(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==vie)return n===void 0&&(n=vie,n=r()),n},set(a){Object.defineProperty(t,e,{value:a})},configurable:!0})}function Pze(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function zm(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 _ze(t){return ud(t._zod.def)}function Dze(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function Rze(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 Oze(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function KR(t){return JSON.stringify(t)}function c6(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ug(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Vm(t){if(ug(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(ug(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function u6(t){return Vm(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Nze(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function Hc(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 Mze(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 d6(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function Fze(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 zm(this,"shape",s),s},checks:[]});return Ms(t,o)}function Lze(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 zm(this,"shape",s),s},checks:[]});return Ms(t,o)}function Uze(t,e){if(!Vm(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 zm(this,"shape",o),o}});return Ms(t,a)}function Bze(t,e){if(!Vm(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 zm(this,"shape",n),n}});return Ms(t,r)}function jze(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 zm(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Ms(t,r)}function zze(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 zm(this,"shape",c),c},checks:[]});return Ms(e,s)}function Vze(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 zm(this,"shape",o),o}});return Ms(e,n)}function Gm(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 h6(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 Lw(t){return typeof t=="string"?t:t?.message}function Fs(t,e,r){let n=t.message?t.message:Lw(t.inst?._zod.def?.error?.(t))??Lw(e?.error?.(t))??Lw(r.customError?.(t))??Lw(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 zw(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Vw(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ae(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 BS(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Gze(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Sie(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 Eie(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Wze(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Sie(e+r)}function Hze(t){return Eie(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function qze(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 Kze(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var vie,YR,l6,$ze,jw,p6,m6,f6,s6,ot=b(()=>{lg();vie=Symbol("evaluating");YR="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};l6=US(()=>{if(cg.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});$ze=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}`)}},jw=new Set(["string","number","symbol"]),p6=new Set(["string","number","bigint","boolean","symbol","undefined"]);m6={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]},f6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};s6=class{constructor(...e){}}});function Ww(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 Hw(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 g6(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 xie(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 y6(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 ${xie(n.path)}`);return e.join(`
|
|
54
54
|
`)}var bie,Gw,Pi,v6=b(()=>{lg();ot();bie=(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,LS,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Gw=J("$ZodError",bie),Pi=J("$ZodError",bie,{Parent:Error})});var jS,JR,zS,ZR,VS,S6,GS,E6,XR,Jze,QR,Zze,eO,Xze,tO,Qze,rO,eVe,nO,tVe,aO,rVe,oO,nVe,b6=b(()=>{lg();v6();ot();jS=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 lu;if(s.issues.length){let i=new(a?.Err??t)(s.issues.map(c=>Fs(c,o,Sa())));throw YR(i,a?.callee),i}return s.value},JR=jS(Pi),zS=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,Sa())));throw YR(i,a?.callee),i}return s.value},ZR=zS(Pi),VS=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 lu;return o.issues.length?{success:!1,error:new(t??Gw)(o.issues.map(s=>Fs(s,a,Sa())))}:{success:!0,data:o.value}},S6=VS(Pi),GS=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,Sa())))}:{success:!0,data:o.value}},E6=GS(Pi),XR=t=>(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return jS(t)(e,r,a)},Jze=XR(Pi),QR=t=>(e,r,n)=>jS(t)(e,r,n),Zze=QR(Pi),eO=t=>async(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return zS(t)(e,r,a)},Xze=eO(Pi),tO=t=>async(e,r,n)=>zS(t)(e,r,n),Qze=tO(Pi),rO=t=>(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return VS(t)(e,r,a)},eVe=rO(Pi),nO=t=>(e,r,n)=>VS(t)(e,r,n),tVe=nO(Pi),aO=t=>async(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return GS(t)(e,r,a)},rVe=aO(Pi),oO=t=>async(e,r,n)=>GS(t)(e,r,n),nVe=oO(Pi)});var ic={};Dt(ic,{base64:()=>F6,base64url:()=>sO,bigint:()=>G6,boolean:()=>H6,browserEmail:()=>pVe,cidrv4:()=>$6,cidrv6:()=>M6,cuid:()=>x6,cuid2:()=>A6,date:()=>B6,datetime:()=>z6,domain:()=>fVe,duration:()=>I6,e164:()=>U6,email:()=>_6,emoji:()=>D6,extendedDuration:()=>aVe,guid:()=>P6,hex:()=>hVe,hostname:()=>mVe,html5Email:()=>cVe,httpProtocol:()=>L6,idnEmail:()=>uVe,integer:()=>W6,ipv4:()=>R6,ipv6:()=>O6,ksuid:()=>T6,lowercase:()=>Y6,mac:()=>N6,md5_base64:()=>yVe,md5_base64url:()=>vVe,md5_hex:()=>gVe,nanoid:()=>k6,null:()=>q6,number:()=>iO,rfc5322Email:()=>lVe,sha1_base64:()=>EVe,sha1_base64url:()=>bVe,sha1_hex:()=>SVe,sha256_base64:()=>AVe,sha256_base64url:()=>CVe,sha256_hex:()=>xVe,sha384_base64:()=>TVe,sha384_base64url:()=>kVe,sha384_hex:()=>wVe,sha512_base64:()=>PVe,sha512_base64url:()=>_Ve,sha512_hex:()=>IVe,string:()=>V6,time:()=>j6,ulid:()=>C6,undefined:()=>K6,unicodeEmail:()=>Aie,uppercase:()=>J6,uuid:()=>pg,uuid4:()=>oVe,uuid6:()=>sVe,uuid7:()=>iVe,xid:()=>w6});function D6(){return new RegExp(dVe,"u")}function wie(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 j6(t){return new RegExp(`^${wie(t)}$`)}function z6(t){let e=wie({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(`^${Cie}T(?:${n})$`)}function qw(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Kw(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var x6,A6,C6,w6,T6,k6,I6,aVe,P6,pg,oVe,sVe,iVe,_6,cVe,lVe,Aie,uVe,pVe,dVe,R6,O6,N6,$6,M6,F6,sO,mVe,fVe,L6,U6,Cie,B6,V6,G6,W6,iO,H6,q6,K6,Y6,J6,hVe,gVe,yVe,vVe,SVe,EVe,bVe,xVe,AVe,CVe,wVe,TVe,kVe,IVe,PVe,_Ve,cO=b(()=>{ot();x6=/^[cC][0-9a-z]{6,}$/,A6=/^[0-9a-z]+$/,C6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,w6=/^[0-9a-vA-V]{20}$/,T6=/^[A-Za-z0-9]{27}$/,k6=/^[a-zA-Z0-9_-]{21}$/,I6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,aVe=/^[-+]?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)?)??$/,P6=/^([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})$/,pg=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)$/,oVe=pg(4),sVe=pg(6),iVe=pg(7),_6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cVe=/^[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])?)*$/,lVe=/^(([^<>()\[\]\\.,;:\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,}))$/,Aie=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,uVe=Aie,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="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";R6=/^(?:(?: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])$/,O6=/^(([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}|:))$/,N6=t=>{let e=Hc(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},$6=/^((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])$/,M6=/^(([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])$/,F6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,sO=/^[A-Za-z0-9_-]*$/,mVe=/^(?=.{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])?)*\.?$/,fVe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,L6=/^https?$/,U6=/^\+[1-9]\d{6,14}$/,Cie="(?:(?:\\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])))",B6=new RegExp(`^${Cie}$`);V6=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},G6=/^-?\d+n?$/,W6=/^-?\d+$/,iO=/^-?\d+(?:\.\d+)?$/,H6=/^(?:true|false)$/i,q6=/^null$/i,K6=/^undefined$/i,Y6=/^[^A-Z]*$/,J6=/^[^a-z]*$/,hVe=/^[0-9a-fA-F]*$/;gVe=/^[0-9a-fA-F]{32}$/,yVe=qw(22,"=="),vVe=Kw(22),SVe=/^[0-9a-fA-F]{40}$/,EVe=qw(27,"="),bVe=Kw(27),xVe=/^[0-9a-fA-F]{64}$/,AVe=qw(43,"="),CVe=Kw(43),wVe=/^[0-9a-fA-F]{96}$/,TVe=qw(64,""),kVe=Kw(64),IVe=/^[0-9a-fA-F]{128}$/,PVe=qw(86,"=="),_Ve=Kw(86)});function Tie(t,e,r){t.issues.length&&e.issues.push(...Ii(r,t.issues))}var Tn,kie,lO,uO,Z6,X6,Q6,ez,tz,rz,nz,az,oz,WS,sz,iz,cz,lz,uz,pz,dz,mz,fz,pO=b(()=>{lg();cO();ot();Tn=J("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),kie={number:"number",bigint:"bigint",object:"date"},lO=J("$ZodCheckLessThan",(t,e)=>{Tn.init(t,e);let r=kie[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})}}),uO=J("$ZodCheckGreaterThan",(t,e)=>{Tn.init(t,e);let r=kie[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})}}),Z6=J("$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):i6(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})}}),X6=J("$ZodCheckNumberFormat",(t,e)=>{Tn.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[a,o]=m6[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=W6)}),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})}}),Q6=J("$ZodCheckBigIntFormat",(t,e)=>{Tn.init(t,e);let[r,n]=f6[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})}}),ez=J("$ZodCheckMaxSize",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!jm(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:zw(a),code:"too_big",maximum:e.maximum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),tz=J("$ZodCheckMinSize",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!jm(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:zw(a),code:"too_small",minimum:e.minimum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),rz=J("$ZodCheckSizeEquals",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!jm(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:zw(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})}}),nz=J("$ZodCheckMaxLength",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!jm(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=Vw(a);n.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),az=J("$ZodCheckMinLength",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!jm(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=Vw(a);n.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),oz=J("$ZodCheckLengthEquals",(t,e)=>{var r;Tn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!jm(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=Vw(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})}}),WS=J("$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=()=>{})}),sz=J("$ZodCheckRegex",(t,e)=>{WS.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})}}),iz=J("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Y6),WS.init(t,e)}),cz=J("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=J6),WS.init(t,e)}),lz=J("$ZodCheckIncludes",(t,e)=>{Tn.init(t,e);let r=Hc(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})}}),uz=J("$ZodCheckStartsWith",(t,e)=>{Tn.init(t,e);let r=new RegExp(`^${Hc(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})}}),pz=J("$ZodCheckEndsWith",(t,e)=>{Tn.init(t,e);let r=new RegExp(`.*${Hc(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})}});dz=J("$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=>Tie(a,r,e.property));Tie(n,r,e.property)}}),mz=J("$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})}}),fz=J("$ZodCheckOverwrite",(t,e)=>{Tn.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var Yw,hz=b(()=>{Yw=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 gz,yz=b(()=>{gz={major:4,minor:4,patch:3}});function Uz(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Vie(t){if(!sO.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Uz(r)}function Gie(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 Pie(t,e,r){t.issues.length&&e.issues.push(...Ii(r,t.issues)),e.value[r]=t.value}function hO(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 Wie(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=d6(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function Hie(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=>hO(f,r,m,e,u,p))):hO(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 _ie(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=>!Gm(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,Sa())))}),e)}function Die(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,Sa())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}function vz(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(Vm(t)&&Vm(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=vz(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=vz(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 Rie(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}),Gm(t))return t;let s=vz(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 Oie(t,e){for(let r=t.length-1;r>=0;r--)if(t[r]._zod[e]!=="optional")return r+1;return 0}function Nie(t,e,r){t.issues.length&&e.issues.push(...Ii(r,t.issues)),e.value[r]=t.value}function $ie(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 Mie(t,e,r,n,a,o,s){t.issues.length&&(jw.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,Sa()))})),e.issues.length&&(jw.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,Sa()))})),r.value.set(t.value,e.value)}function Fie(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function Lie(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}function Uie(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function Bie(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 dO(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 mO(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=>fO(t,o,e.out,r)):fO(t,a,e.out,r)}else{let a=e.reverseTransform(t.value,t);return a instanceof Promise?a.then(o=>fO(t,o,e.in,r)):fO(t,a,e.in,r)}}function fO(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}function jie(t){return t.value=Object.freeze(t.value),t}function zie(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(BS(a))}}var $t,dg,An,Sz,Ez,bz,xz,Az,Cz,wz,Tz,kz,Iz,Pz,_z,Dz,Rz,Oz,Nz,$z,Mz,Fz,Lz,Bz,jz,zz,Vz,Gz,gO,Wz,Jw,yO,Hz,qz,Kz,Yz,Jz,Zz,Xz,Qz,eV,tV,qie,rV,Zw,nV,aV,oV,vO,sV,iV,cV,lV,uV,pV,dV,SO,mV,fV,hV,gV,yV,vV,SV,EV,EO,Xw,bV,xV,AV,CV,wV,TV,kV,IV=b(()=>{pO();lg();hz();b6();cO();ot();yz();ot();$t=J("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=gz;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=Gm(s),u;for(let p of i){if(p._zod.def.when){if(h6(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 lu;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,s.issues.length!==m&&(l||(l=Gm(s,m)))});else{if(s.issues.length===m)continue;l||(l=Gm(s,m))}}return u?u.then(()=>s):s},o=(s,i,c)=>{if(Gm(s))return s.aborted=!0,s;let l=a(i,n,c);if(l instanceof Promise){if(c.async===!1)throw new lu;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 lu;return c.then(l=>a(l,n,i))}return a(c,n,i)}}ir(t,"~standard",()=>({validate:a=>{try{let o=S6(t,a);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return E6(t,a).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),dg=J("$ZodString",(t,e)=>{$t.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??V6(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}}),An=J("$ZodStringFormat",(t,e)=>{WS.init(t,e),dg.init(t,e)}),Sz=J("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=P6),An.init(t,e)}),Ez=J("$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=pg(n))}else e.pattern??(e.pattern=pg());An.init(t,e)}),bz=J("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=_6),An.init(t,e)}),xz=J("$ZodURL",(t,e)=>{An.init(t,e),t._zod.check=r=>{try{let n=r.value.trim();if(!e.normalize&&e.protocol?.source===L6.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})}}}),Az=J("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=D6()),An.init(t,e)}),Cz=J("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=k6),An.init(t,e)}),wz=J("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=x6),An.init(t,e)}),Tz=J("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=A6),An.init(t,e)}),kz=J("$ZodULID",(t,e)=>{e.pattern??(e.pattern=C6),An.init(t,e)}),Iz=J("$ZodXID",(t,e)=>{e.pattern??(e.pattern=w6),An.init(t,e)}),Pz=J("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=T6),An.init(t,e)}),_z=J("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=z6(e)),An.init(t,e)}),Dz=J("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=B6),An.init(t,e)}),Rz=J("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=j6(e)),An.init(t,e)}),Oz=J("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=I6),An.init(t,e)}),Nz=J("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=R6),An.init(t,e),t._zod.bag.format="ipv4"}),$z=J("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=O6),An.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})}}}),Mz=J("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=N6(e.delimiter)),An.init(t,e),t._zod.bag.format="mac"}),Fz=J("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=$6),An.init(t,e)}),Lz=J("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=M6),An.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})}}});Bz=J("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=F6),An.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{Uz(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});jz=J("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=sO),An.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{Vie(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),zz=J("$ZodE164",(t,e)=>{e.pattern??(e.pattern=U6),An.init(t,e)});Vz=J("$ZodJWT",(t,e)=>{An.init(t,e),t._zod.check=r=>{Gie(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Gz=J("$ZodCustomStringFormat",(t,e)=>{An.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})}}),gO=J("$ZodNumber",(t,e)=>{$t.init(t,e),t._zod.pattern=t._zod.bag.pattern??iO,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}}),Wz=J("$ZodNumberFormat",(t,e)=>{X6.init(t,e),gO.init(t,e)}),Jw=J("$ZodBoolean",(t,e)=>{$t.init(t,e),t._zod.pattern=H6,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}}),yO=J("$ZodBigInt",(t,e)=>{$t.init(t,e),t._zod.pattern=G6,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}}),Hz=J("$ZodBigIntFormat",(t,e)=>{Q6.init(t,e),yO.init(t,e)}),qz=J("$ZodSymbol",(t,e)=>{$t.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}}),Kz=J("$ZodUndefined",(t,e)=>{$t.init(t,e),t._zod.pattern=K6,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}}),Yz=J("$ZodNull",(t,e)=>{$t.init(t,e),t._zod.pattern=q6,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}}),Jz=J("$ZodAny",(t,e)=>{$t.init(t,e),t._zod.parse=r=>r}),Zz=J("$ZodUnknown",(t,e)=>{$t.init(t,e),t._zod.parse=r=>r}),Xz=J("$ZodNever",(t,e)=>{$t.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),Qz=J("$ZodVoid",(t,e)=>{$t.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}}),eV=J("$ZodDate",(t,e)=>{$t.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}});tV=J("$ZodArray",(t,e)=>{$t.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=>Pie(l,r,s))):Pie(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});qie=J("$ZodObject",(t,e)=>{if($t.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=US(()=>Wie(e));ir(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=ug,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=>hO(S,i,m,l,f,h))):hO(g,i,m,l,f,h)}return o?Hie(u,l,i,c,n.value,t):u.length?Promise.all(u).then(()=>i):i}}),rV=J("$ZodObjectJIT",(t,e)=>{qie.init(t,e);let r=t._zod.parse,n=US(()=>Wie(e)),a=m=>{let d=new Yw(["shape","payload","ctx"]),f=n.value,h=w=>{let C=KR(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=KR(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.11.
|
|
3
|
+
"version": "2.11.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.11.
|
|
46
|
+
"@fjall/cli": "^2.11.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": "69823c3d7f2eacba419657464381119c5b5b5fd6"
|
|
66
66
|
}
|