import { i as __require, s as __toESM, t as __commonJS } from "./chunk-btbCw1m3.mjs";
import { n as StyledError, r as require_cjs, t as app } from "./app-Be0xsoIH.mjs";
import "./string-width-D78SVDLD.mjs";
import "./cli-cursor-Dab4mDU2.mjs";
import "./token-error-C0CafU2G.mjs";

//#region ../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json
var require_package$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json": ((exports, module) => {
	module.exports = {
		"name": "dotenv",
		"version": "16.5.0",
		"description": "Loads environment variables from .env file",
		"main": "lib/main.js",
		"types": "lib/main.d.ts",
		"exports": {
			".": {
				"types": "./lib/main.d.ts",
				"require": "./lib/main.js",
				"default": "./lib/main.js"
			},
			"./config": "./config.js",
			"./config.js": "./config.js",
			"./lib/env-options": "./lib/env-options.js",
			"./lib/env-options.js": "./lib/env-options.js",
			"./lib/cli-options": "./lib/cli-options.js",
			"./lib/cli-options.js": "./lib/cli-options.js",
			"./package.json": "./package.json"
		},
		"scripts": {
			"dts-check": "tsc --project tests/types/tsconfig.json",
			"lint": "standard",
			"pretest": "npm run lint && npm run dts-check",
			"test": "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
			"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",
			"prerelease": "npm test",
			"release": "standard-version"
		},
		"repository": {
			"type": "git",
			"url": "git://github.com/motdotla/dotenv.git"
		},
		"homepage": "https://github.com/motdotla/dotenv#readme",
		"funding": "https://dotenvx.com",
		"keywords": [
			"dotenv",
			"env",
			".env",
			"environment",
			"variables",
			"config",
			"settings"
		],
		"readmeFilename": "README.md",
		"license": "BSD-2-Clause",
		"devDependencies": {
			"@types/node": "^18.11.3",
			"decache": "^4.6.2",
			"sinon": "^14.0.1",
			"standard": "^17.0.0",
			"standard-version": "^9.5.0",
			"tap": "^19.2.0",
			"typescript": "^4.8.4"
		},
		"engines": { "node": ">=12" },
		"browser": { "fs": false }
	};
}) });

//#endregion
//#region ../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js
var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js": ((exports, module) => {
	const fs$1 = __require("fs");
	const path = __require("path");
	const os = __require("os");
	const crypto = __require("crypto");
	const version$1 = require_package$1().version;
	const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
	function parse$1(src) {
		const obj = {};
		let lines = src.toString();
		lines = lines.replace(/\r\n?/gm, "\n");
		let match;
		while ((match = LINE.exec(lines)) != null) {
			const key = match[1];
			let value = match[2] || "";
			value = value.trim();
			const maybeQuote = value[0];
			value = value.replace(/^(['"`])([\s\S]*)\1$/gm, "$2");
			if (maybeQuote === "\"") {
				value = value.replace(/\\n/g, "\n");
				value = value.replace(/\\r/g, "\r");
			}
			obj[key] = value;
		}
		return obj;
	}
	function _parseVault(options) {
		const vaultPath = _vaultPath(options);
		const result = DotenvModule.configDotenv({ path: vaultPath });
		if (!result.parsed) {
			const err = /* @__PURE__ */ new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
			err.code = "MISSING_DATA";
			throw err;
		}
		const keys = _dotenvKey(options).split(",");
		const length = keys.length;
		let decrypted;
		for (let i = 0; i < length; i++) try {
			const attrs = _instructions(result, keys[i].trim());
			decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
			break;
		} catch (error) {
			if (i + 1 >= length) throw error;
		}
		return DotenvModule.parse(decrypted);
	}
	function _warn(message) {
		console.log(`[dotenv@${version$1}][WARN] ${message}`);
	}
	function _debug(message) {
		console.log(`[dotenv@${version$1}][DEBUG] ${message}`);
	}
	function _dotenvKey(options) {
		if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) return options.DOTENV_KEY;
		if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) return process.env.DOTENV_KEY;
		return "";
	}
	function _instructions(result, dotenvKey) {
		let uri;
		try {
			uri = new URL(dotenvKey);
		} catch (error) {
			if (error.code === "ERR_INVALID_URL") {
				const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
				err.code = "INVALID_DOTENV_KEY";
				throw err;
			}
			throw error;
		}
		const key = uri.password;
		if (!key) {
			const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing key part");
			err.code = "INVALID_DOTENV_KEY";
			throw err;
		}
		const environment = uri.searchParams.get("environment");
		if (!environment) {
			const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing environment part");
			err.code = "INVALID_DOTENV_KEY";
			throw err;
		}
		const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
		const ciphertext = result.parsed[environmentKey];
		if (!ciphertext) {
			const err = /* @__PURE__ */ new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
			err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
			throw err;
		}
		return {
			ciphertext,
			key
		};
	}
	function _vaultPath(options) {
		let possibleVaultPath = null;
		if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
			for (const filepath of options.path) if (fs$1.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
		} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
		else possibleVaultPath = path.resolve(process.cwd(), ".env.vault");
		if (fs$1.existsSync(possibleVaultPath)) return possibleVaultPath;
		return null;
	}
	function _resolveHome(envPath) {
		return envPath[0] === "~" ? path.join(os.homedir(), envPath.slice(1)) : envPath;
	}
	function _configVault(options) {
		if (Boolean(options && options.debug)) _debug("Loading env from encrypted .env.vault");
		const parsed = DotenvModule._parseVault(options);
		let processEnv = process.env;
		if (options && options.processEnv != null) processEnv = options.processEnv;
		DotenvModule.populate(processEnv, parsed, options);
		return { parsed };
	}
	function configDotenv(options) {
		const dotenvPath = path.resolve(process.cwd(), ".env");
		let encoding = "utf8";
		const debug$1 = Boolean(options && options.debug);
		if (options && options.encoding) encoding = options.encoding;
		else if (debug$1) _debug("No encoding is specified. UTF-8 is used by default");
		let optionPaths = [dotenvPath];
		if (options && options.path) if (!Array.isArray(options.path)) optionPaths = [_resolveHome(options.path)];
		else {
			optionPaths = [];
			for (const filepath of options.path) optionPaths.push(_resolveHome(filepath));
		}
		let lastError;
		const parsedAll = {};
		for (const path$1 of optionPaths) try {
			const parsed = DotenvModule.parse(fs$1.readFileSync(path$1, { encoding }));
			DotenvModule.populate(parsedAll, parsed, options);
		} catch (e) {
			if (debug$1) _debug(`Failed to load ${path$1} ${e.message}`);
			lastError = e;
		}
		let processEnv = process.env;
		if (options && options.processEnv != null) processEnv = options.processEnv;
		DotenvModule.populate(processEnv, parsedAll, options);
		if (lastError) return {
			parsed: parsedAll,
			error: lastError
		};
		else return { parsed: parsedAll };
	}
	function config$1(options) {
		if (_dotenvKey(options).length === 0) return DotenvModule.configDotenv(options);
		const vaultPath = _vaultPath(options);
		if (!vaultPath) {
			_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
			return DotenvModule.configDotenv(options);
		}
		return DotenvModule._configVault(options);
	}
	function decrypt(encrypted, keyStr) {
		const key = Buffer.from(keyStr.slice(-64), "hex");
		let ciphertext = Buffer.from(encrypted, "base64");
		const nonce = ciphertext.subarray(0, 12);
		const authTag = ciphertext.subarray(-16);
		ciphertext = ciphertext.subarray(12, -16);
		try {
			const aesgcm = crypto.createDecipheriv("aes-256-gcm", key, nonce);
			aesgcm.setAuthTag(authTag);
			return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
		} catch (error) {
			const isRange = error instanceof RangeError;
			const invalidKeyLength = error.message === "Invalid key length";
			const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
			if (isRange || invalidKeyLength) {
				const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
				err.code = "INVALID_DOTENV_KEY";
				throw err;
			} else if (decryptionFailed) {
				const err = /* @__PURE__ */ new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
				err.code = "DECRYPTION_FAILED";
				throw err;
			} else throw error;
		}
	}
	function populate(processEnv, parsed, options = {}) {
		const debug$1 = Boolean(options && options.debug);
		const override = Boolean(options && options.override);
		if (typeof parsed !== "object") {
			const err = /* @__PURE__ */ new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
			err.code = "OBJECT_REQUIRED";
			throw err;
		}
		for (const key of Object.keys(parsed)) if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
			if (override === true) processEnv[key] = parsed[key];
			if (debug$1) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
			else _debug(`"${key}" is already defined and was NOT overwritten`);
		} else processEnv[key] = parsed[key];
	}
	const DotenvModule = {
		configDotenv,
		_configVault,
		_parseVault,
		config: config$1,
		decrypt,
		parse: parse$1,
		populate
	};
	module.exports.configDotenv = DotenvModule.configDotenv;
	module.exports._configVault = DotenvModule._configVault;
	module.exports._parseVault = DotenvModule._parseVault;
	module.exports.config = DotenvModule.config;
	module.exports.decrypt = DotenvModule.decrypt;
	module.exports.parse = DotenvModule.parse;
	module.exports.populate = DotenvModule.populate;
	module.exports = DotenvModule;
}) });

//#endregion
//#region ../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/package.json
var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/package.json": ((exports, module) => {
	module.exports = {
		"name": "dotenv-flow",
		"version": "4.1.0",
		"description": "Loads environment variables from `.env.[development|test|production][.local]` files",
		"keywords": [
			"dotenv",
			"node_env",
			"development",
			"test",
			"production",
			"local",
			"env",
			"environment",
			"variables"
		],
		"homepage": "https://github.com/kerimdzhanov/dotenv-flow#readme",
		"repository": {
			"type": "git",
			"url": "git+https://github.com/kerimdzhanov/dotenv-flow.git"
		},
		"bugs": { "url": "https://github.com/kerimdzhanov/dotenv-flow/issues" },
		"main": "lib/dotenv-flow.js",
		"types": "lib/dotenv-flow.d.ts",
		"exports": {
			".": "./lib/dotenv-flow.js",
			"./config": {
				"require": "./config.js",
				"node": "./config.js"
			},
			"./package.json": "./package.json"
		},
		"files": [
			"lib/cli-options.js",
			"lib/dotenv-flow.d.ts",
			"lib/env-options.js",
			"config.d.ts",
			"config.js"
		],
		"dependencies": { "dotenv": "^16.0.0" },
		"devDependencies": {
			"@types/node": "^20.6.2",
			"chai": "^4.3.7",
			"conventional-changelog-cli": "^2.0.35",
			"mocha": "^10.2.0",
			"sinon": "^15.2.0",
			"sinon-chai": "^3.7.0",
			"tmp": "^0.2.1",
			"typescript": "^5.2.2"
		},
		"engines": { "node": ">= 12.0.0" },
		"scripts": {
			"test": "yarn run test:unit && yarn run test:integration && yarn run test:types",
			"test:unit": "mocha -r mocha.conf.js test/unit/*.spec.js",
			"test:integration": "mocha -r mocha.conf.js test/integration/*.spec.{m,}js",
			"test:types": "tsc",
			"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
		},
		"author": "Dan Kerimdzhanov",
		"license": "MIT"
	};
}) });

//#endregion
//#region ../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/lib/dotenv-flow.js
var require_dotenv_flow = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/lib/dotenv-flow.js": ((exports, module) => {
	const fs = __require("fs");
	const p = __require("path");
	const dotenv$1 = require_main();
	const { version } = require_package();
	const DEFAULT_PATTERN = ".env[.node_env][.local]";
	const LOCAL_PLACEHOLDER_REGEX = /\[(\W*\blocal\b\W*)]/g;
	const NODE_ENV_PLACEHOLDER_REGEX = /\[(\W*\b)node_env(\b\W*)]/g;
	/**
	* Compose a filename from a given `patten`.
	*
	* @param {string} pattern
	* @param {object} [options]
	* @param {boolean} [options.local]
	* @param {string} [options.node_env]
	* @return {string} filename
	*/
	function composeFilename(pattern, options) {
		let filename = pattern;
		filename = filename.replace(LOCAL_PLACEHOLDER_REGEX, options && options.local ? "$1" : "");
		filename = filename.replace(NODE_ENV_PLACEHOLDER_REGEX, options && options.node_env ? `$1${options.node_env}$2` : "");
		return filename;
	}
	/**
	* Returns a list of existing `.env*` filenames depending on the given `options`.
	*
	* The resulting list is ordered by the env files'
	* variables overwriting priority from lowest to highest.
	*
	* This can also be referenced as "env files' environment cascade"
	* or "order of ascending priority."
	*
	* ⚠️ Note that the `.env.local` file is not listed for "test" environment,
	* since normally you expect tests to produce the same results for everyone.
	*
	* @param {object} [options] - `.env*` files listing options
	* @param {string} [options.node_env] - node environment (development/test/production/etc.)
	* @param {string} [options.path] - path to the working directory (default: `process.cwd()`)
	* @param {string} [options.pattern] - `.env*` files' naming convention pattern
	*                                       (default: ".env[.node_env][.local]")
	* @param {boolean} [options.debug] - turn on debug messages
	* @return {string[]}
	*/
	function listFiles(options = {}) {
		options.debug && debug("listing effective `.env*` files…");
		const { node_env, path: path$1 = process.cwd(), pattern = DEFAULT_PATTERN } = options;
		const hasLocalPlaceholder = LOCAL_PLACEHOLDER_REGEX.test(pattern);
		const filenames = {};
		if (pattern === DEFAULT_PATTERN) filenames[".env.defaults"] = ".env.defaults";
		filenames[".env"] = composeFilename(pattern);
		if (hasLocalPlaceholder) {
			const envlocal = composeFilename(pattern, { local: true });
			if (node_env !== "test") filenames[".env.local"] = envlocal;
			else if (options.debug && fs.existsSync(p.resolve(path$1, envlocal))) debug("[!] note that `%s` is being skipped for \"test\" environment", envlocal);
		}
		if (node_env && NODE_ENV_PLACEHOLDER_REGEX.test(pattern)) {
			filenames[".env.node_env"] = composeFilename(pattern, { node_env });
			if (hasLocalPlaceholder) filenames[".env.node_env.local"] = composeFilename(pattern, {
				node_env,
				local: true
			});
		}
		return [
			".env.defaults",
			".env",
			".env.local",
			".env.node_env",
			".env.node_env.local"
		].reduce((list, basename) => {
			if (!filenames[basename]) return list;
			const filename = p.resolve(path$1, filenames[basename]);
			if (fs.existsSync(filename)) {
				options.debug && debug(">> %s", filename);
				list.push(filename);
			}
			return list;
		}, []);
	}
	/**
	* Parses a given file or a list of files.
	*
	* When a list of filenames is given, the files will be parsed and merged in the same order as given.
	*
	* @param {string|string[]} filenames - filename or a list of filenames to parse and merge
	* @param {{ encoding?: string, debug?: boolean }} [options] - parse options
	* @return {Object<string, string>} the resulting map of `{ env_var: value }` as an object
	*/
	function parse(filenames, options = {}) {
		if (typeof filenames === "string") {
			options.debug && debug("parsing \"%s\"…", filenames);
			const parsed = dotenv$1.parse(fs.readFileSync(filenames, options.encoding && { encoding: options.encoding }));
			if (options.debug) Object.keys(parsed).forEach((varname) => debug(">> %s", varname));
			return parsed;
		}
		return filenames.reduce((result, filename) => {
			const parsed = parse(filename, options);
			if (options.debug) Object.keys(parsed).filter((varname) => result.hasOwnProperty(varname)).forEach((varname) => debug("`%s` is being overwritten by merge from \"%s\"", varname, filename));
			return Object.assign(result, parsed);
		}, {});
	}
	/**
	* Parses variables defined in given file(s) and assigns them to `process.env`.
	*
	* Variables that are already defined in `process.env` will not be overwritten,
	* thus giving a higher priority to environment variables predefined by the shell.
	*
	* If the loading is successful, an object with `parsed` property is returned.
	* The `parsed` property contains parsed variables' `key => value` pairs merged in order using
	* the "overwrite merge" strategy.
	*
	* If parsing fails for any of the given files, `process.env` is being left untouched,
	* and an object with `error` property is returned.
	* The `error` property, if present, references to the occurred error.
	*
	* @param {string|string[]} filenames - filename or a list of filenames to parse and merge
	* @param {object} [options] - file loading options
	* @param {string} [options.encoding="utf8"] - encoding of `.env*` files
	* @param {boolean} [options.debug=false] - turn on debug messages
	* @param {boolean} [options.silent=false] - suppress console errors and warnings
	* @return {{ error: Error } | { parsed: Object<string, string> }}
	*/
	function load(filenames, options = {}) {
		try {
			const parsed = parse(filenames, {
				encoding: options.encoding,
				debug: options.debug
			});
			options.debug && debug("safe-merging parsed environment variables into `process.env`…");
			for (const varname of Object.keys(parsed)) if (!process.env.hasOwnProperty(varname)) {
				options.debug && debug(">> process.env.%s", varname);
				process.env[varname] = parsed[varname];
			} else if (options.debug && process.env[varname] !== parsed[varname]) debug("environment variable `%s` is predefined and not being overwritten", varname);
			return { parsed };
		} catch (error) {
			return failure(error, options);
		}
	}
	/**
	* Unload variables defined in a given file(s) from `process.env`.
	*
	* This function can gracefully resolve the following issue:
	*
	* In some cases, the original "dotenv" library can be used by one of the dependent npm modules.
	* It causes calling the original `dotenv.config()` that loads the `.env` file from your project before you can call `dotenv-flow.config()`.
	* Such cases break `.env*` files priority because the previously loaded environment variables are treated as shell-defined thus having a higher priority.
	*
	* Unloading the previously loaded `.env` file can be activated when using the `dotenv-flow.config()` with the `purge_dotenv` option set to `true`.
	*
	* @param {string|string[]} filenames - filename or a list of filenames to unload
	* @param {object} [options] - `fs.readFileSync` options
	*/
	function unload(filenames, options = {}) {
		const parsed = parse(filenames, options);
		Object.keys(parsed).forEach((key) => {
			if (process.env[key] === parsed[key]) delete process.env[key];
		});
	}
	/**
	* Returns effective (computed) `node_env`.
	*
	* @param {object} [options]
	* @param {string} [options.node_env]
	* @param {string} [options.default_node_env]
	* @param {boolean} [options.debug]
	* @return {string|undefined} node_env
	*/
	function getEffectiveNodeEnv(options = {}) {
		if (options.node_env) {
			options.debug && debug(`operating in "${options.node_env}" environment (set by \`options.node_env\`)`);
			return options.node_env;
		}
		if (process.env.NODE_ENV) {
			options.debug && debug(`operating in "${process.env.NODE_ENV}" environment (as per \`process.env.NODE_ENV\`)`);
			return process.env.NODE_ENV;
		}
		if (options.default_node_env) {
			options.debug && debug(`operating in "${options.default_node_env}" environment (taken from \`options.default_node_env\`)`);
			return options.default_node_env;
		}
		options.debug && debug("operating in \"no environment\" mode (no environment-related options are set)");
	}
	const CONFIG_OPTION_KEYS = [
		"node_env",
		"default_node_env",
		"path",
		"pattern",
		"files",
		"encoding",
		"purge_dotenv",
		"silent"
	];
	/**
	* "dotenv-flow" initialization function (API entry point).
	*
	* Allows configuring dotenv-flow programmatically.
	*
	* @param {object} [options] - configuration options
	* @param {string} [options.node_env=process.env.NODE_ENV] - node environment (development/test/production/etc.)
	* @param {string} [options.default_node_env] - the default node environment
	* @param {string} [options.path=process.cwd()] - path to `.env*` files directory
	* @param {string} [options.pattern=".env[.node_env][.local]"] - `.env*` files' naming convention pattern
	* @param {string[]} [options.files] - an explicit list of `.env*` files to load (note that `options.[default_]node_env` and `options.pattern` are ignored in this case)
	* @param {string} [options.encoding="utf8"] - encoding of `.env*` files
	* @param {boolean} [options.purge_dotenv=false] - perform the `.env` file {@link unload}
	* @param {boolean} [options.debug=false] - turn on detailed logging to help debug why certain variables are not being set as you expect
	* @param {boolean} [options.silent=false] - suppress all kinds of warnings including ".env*" files' loading errors
	* @return {{ parsed?: object, error?: Error }} with a `parsed` key containing the loaded content or an `error` key with an error that is occurred
	*/
	function config(options = {}) {
		if (options.debug) {
			debug("initializing…");
			CONFIG_OPTION_KEYS.filter((key) => key in options).forEach((key) => debug(`| options.${key} =`, options[key]));
		}
		const { path: path$1 = process.cwd(), pattern = DEFAULT_PATTERN } = options;
		if (options.purge_dotenv) {
			options.debug && debug("`options.purge_dotenv` is enabled, unloading potentially pre-loaded `.env`…");
			const dotenvFile = p.resolve(path$1, ".env");
			try {
				fs.existsSync(dotenvFile) && unload(dotenvFile, { encoding: options.encoding });
			} catch (error) {
				!options.silent && warn("unloading failed: ", error);
			}
		}
		try {
			let filenames;
			if (options.files) {
				options.debug && debug("using explicit list of `.env*` files: %s…", options.files.join(", "));
				filenames = options.files.reduce((list, basename) => {
					const filename = p.resolve(path$1, basename);
					if (fs.existsSync(filename)) list.push(filename);
					else if (options.debug) debug(">> %s does not exist, skipping…", filename);
					return list;
				}, []);
			} else {
				const node_env = getEffectiveNodeEnv(options);
				filenames = listFiles({
					node_env,
					path: path$1,
					pattern,
					debug: options.debug
				});
				if (filenames.length === 0) {
					const _pattern = node_env ? pattern.replace(NODE_ENV_PLACEHOLDER_REGEX, `[$1${node_env}$2]`) : pattern;
					return failure(/* @__PURE__ */ new Error(`no ".env*" files matching pattern "${_pattern}" in "${path$1}" dir`), options);
				}
			}
			const result = load(filenames, {
				encoding: options.encoding,
				debug: options.debug,
				silent: options.silent
			});
			options.debug && debug("initialization completed.");
			return result;
		} catch (error) {
			return failure(error, options);
		}
	}
	function failure(error, options) {
		if (!options.silent) warn(`".env*" files loading failed: ${error.message || error}`);
		return { error };
	}
	function warn(message, error) {
		if (error) message += ": %s";
		console.warn(`[dotenv-flow@${version}]: ${message}`, error);
	}
	function debug(message, ...values) {
		console.debug(`[dotenv-flow@${version}]: ${message}`, ...values);
	}
	module.exports = {
		DEFAULT_PATTERN,
		listFiles,
		parse,
		load,
		unload,
		config
	};
}) });

//#endregion
//#region src/sandbox.ts
var import_cjs = require_cjs();
var import_dotenv_flow = /* @__PURE__ */ __toESM(require_dotenv_flow());
import_dotenv_flow.default.config({ silent: true });
async function main() {
	try {
		await (0, import_cjs.run)(app(), process.argv.slice(2));
	} catch (e) {
		if (e instanceof StyledError) {
			console.error(e.message);
			process.exit(1);
		}
		console.error(e);
		process.exit(1);
	}
}
main();

//#endregion
export {  };
//# sourceMappingURL=sandbox.mjs.map