@imfelixyeung/git-swarm 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +45 -14
  2. package/dist/cli.js +83 -18877
  3. package/dist/cli.js.map +162 -0
  4. package/package.json +2 -2
@@ -0,0 +1,162 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../node_modules/ms/index.js", "../node_modules/debug/src/common.js", "../node_modules/debug/src/browser.js", "../node_modules/debug/src/node.js", "../node_modules/debug/src/index.js", "../node_modules/@kwsites/file-exists/dist/src/index.js", "../node_modules/@kwsites/file-exists/dist/index.js", "../node_modules/@kwsites/promise-deferred/dist/index.js", "../node_modules/picomatch/lib/constants.js", "../node_modules/picomatch/lib/utils.js", "../node_modules/picomatch/lib/scan.js", "../node_modules/picomatch/lib/parse.js", "../node_modules/picomatch/lib/picomatch.js", "../node_modules/picomatch/index.js", "../node_modules/picocolors/picocolors.js", "../node_modules/lodash.chunk/index.js", "../node_modules/@babel/runtime/helpers/interopRequireDefault.js", "../node_modules/@babel/runtime/helpers/typeof.js", "../node_modules/@babel/runtime/helpers/toPrimitive.js", "../node_modules/@babel/runtime/helpers/toPropertyKey.js", "../node_modules/@babel/runtime/helpers/defineProperty.js", "../node_modules/@babel/runtime/helpers/classCallCheck.js", "../node_modules/@babel/runtime/helpers/createClass.js", "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js", "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js", "../node_modules/@babel/runtime/helpers/iterableToArray.js", "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js", "../node_modules/@babel/runtime/helpers/nonIterableSpread.js", "../node_modules/@babel/runtime/helpers/toConsumableArray.js", "../node_modules/jexl/dist/evaluator/handlers.js", "../node_modules/jexl/dist/evaluator/Evaluator.js", "../node_modules/jexl/dist/Lexer.js", "../node_modules/jexl/dist/parser/handlers.js", "../node_modules/jexl/dist/parser/states.js", "../node_modules/jexl/dist/parser/Parser.js", "../node_modules/jexl/dist/PromiseSync.js", "../node_modules/jexl/dist/Expression.js", "../node_modules/jexl/dist/grammar.js", "../node_modules/jexl/dist/Jexl.js", "../node_modules/cli-table3/src/debug.js", "../node_modules/ansi-regex/index.js", "../node_modules/strip-ansi/index.js", "../node_modules/is-fullwidth-code-point/index.js", "../node_modules/emoji-regex/index.js", "../node_modules/string-width/index.js", "../node_modules/cli-table3/src/utils.js", "../node_modules/@colors/colors/lib/styles.js", "../node_modules/@colors/colors/lib/system/has-flag.js", "../node_modules/@colors/colors/lib/system/supports-colors.js", "../node_modules/@colors/colors/lib/custom/trap.js", "../node_modules/@colors/colors/lib/custom/zalgo.js", "../node_modules/@colors/colors/lib/maps/america.js", "../node_modules/@colors/colors/lib/maps/zebra.js", "../node_modules/@colors/colors/lib/maps/rainbow.js", "../node_modules/@colors/colors/lib/maps/random.js", "../node_modules/@colors/colors/lib/colors.js", "../node_modules/@colors/colors/safe.js", "../node_modules/cli-table3/src/cell.js", "../node_modules/cli-table3/src/layout-manager.js", "../node_modules/cli-table3/src/table.js", "../node_modules/commander/lib/error.js", "../node_modules/commander/lib/argument.js", "../node_modules/commander/lib/command.js", "../node_modules/commander/lib/help.js", "../node_modules/commander/lib/option.js", "../node_modules/commander/lib/suggestSimilar.js", "../node_modules/commander/index.js", "../src/git/worker.ts", "../node_modules/yocto-queue/index.js", "../node_modules/p-limit/index.js", "../node_modules/simple-git/dist/esm/index.js", "../node_modules/@simple-git/args-pathspec/dist/index.mjs", "../node_modules/@simple-git/argv-parser/dist/index.mjs", "../src/git/discover.ts", "../node_modules/tinyglobby/dist/index.mjs", "../node_modules/fdir/dist/index.mjs", "../src/config/index.ts", "../node_modules/zod/v4/core/util.js", "../node_modules/zod/v4/core/core.js", "../node_modules/zod/v4/core/errors.js", "../node_modules/zod/v4/core/parse.js", "../node_modules/zod/v4/core/regexes.js", "../node_modules/zod/v4/core/checks.js", "../node_modules/zod/v4/core/doc.js", "../node_modules/zod/v4/core/versions.js", "../node_modules/zod/v4/core/schemas.js", "../node_modules/zod/v4/core/memoizer.js", "../node_modules/zod/v4/locales/en.js", "../node_modules/zod/v4/core/registries.js", "../node_modules/zod/v4/core/api.js", "../node_modules/zod/v4/core/to-json-schema.js", "../node_modules/zod/v4/core/json-schema-processors.js", "../node_modules/zod/v4/classic/errors.js", "../node_modules/zod/v4/classic/parse.js", "../node_modules/zod/v4/classic/schemas.js", "../src/utils/colour.ts", "../src/utils/filter-not-null.ts", "../src/utils/swarm-progress-bar.ts", "../src/utils/ansi.ts", "../src/git/filter.ts", "../src/git/remote.ts", "../src/utils/error.ts", "../src/utils/table.ts", "../src/program/commands/checkout/command.ts", "../node_modules/dedent/dist/dedent.mjs", "../src/program/commands/config/init/command.ts", "../src/program/commands/config/refresh/command.ts", "../src/program/commands/config/command.ts", "../src/program/commands/diff/command.ts", "../node_modules/pluralize-esm/dist/index.js", "../src/program/commands/doctor/command.ts", "../src/program/commands/exec/command.ts", "../src/program/commands/fetch/command.ts", "../src/program/commands/find-branch/command.ts", "../src/program/commands/grep/command.ts", "../src/program/commands/list/command.ts", "../node_modules/date-fns/constants.js", "../node_modules/date-fns/constructFrom.js", "../node_modules/date-fns/toDate.js", "../node_modules/date-fns/_lib/defaultOptions.js", "../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js", "../node_modules/date-fns/_lib/normalizeDates.js", "../node_modules/date-fns/compareAsc.js", "../node_modules/date-fns/constructNow.js", "../node_modules/date-fns/differenceInCalendarMonths.js", "../node_modules/date-fns/_lib/getRoundingMethod.js", "../node_modules/date-fns/differenceInMilliseconds.js", "../node_modules/date-fns/endOfDay.js", "../node_modules/date-fns/endOfMonth.js", "../node_modules/date-fns/isLastDayOfMonth.js", "../node_modules/date-fns/differenceInMonths.js", "../node_modules/date-fns/differenceInSeconds.js", "../node_modules/date-fns/locale/en-US/_lib/formatDistance.js", "../node_modules/date-fns/locale/_lib/buildFormatLongFn.js", "../node_modules/date-fns/locale/en-US/_lib/formatLong.js", "../node_modules/date-fns/locale/en-US/_lib/formatRelative.js", "../node_modules/date-fns/locale/_lib/buildLocalizeFn.js", "../node_modules/date-fns/locale/en-US/_lib/localize.js", "../node_modules/date-fns/locale/_lib/buildMatchFn.js", "../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js", "../node_modules/date-fns/locale/en-US/_lib/match.js", "../node_modules/date-fns/locale/en-US.js", "../node_modules/date-fns/formatDistance.js", "../node_modules/date-fns/formatDistanceToNow.js", "../src/program/commands/log/command.ts", "../src/program/commands/pull/command.ts", "../src/program/commands/remote/command.ts", "../src/program/commands/status/command.ts", "../src/program/options/parallel.ts", "../src/program/options/progress.ts", "../src/program/options/where.ts", "../src/program/index.ts", "../src/cli.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n",
6
+ "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n",
7
+ "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n",
8
+ "/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n",
9
+ "/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n",
10
+ "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = require(\"fs\");\nconst debug_1 = __importDefault(require(\"debug\"));\nconst log = debug_1.default('@kwsites/file-exists');\nfunction check(path, isFile, isDirectory) {\n log(`checking %s`, path);\n try {\n const stat = fs_1.statSync(path);\n if (stat.isFile() && isFile) {\n log(`[OK] path represents a file`);\n return true;\n }\n if (stat.isDirectory() && isDirectory) {\n log(`[OK] path represents a directory`);\n return true;\n }\n log(`[FAIL] path represents something other than a file or directory`);\n return false;\n }\n catch (e) {\n if (e.code === 'ENOENT') {\n log(`[FAIL] path is not accessible: %o`, e);\n return false;\n }\n log(`[FATAL] %o`, e);\n throw e;\n }\n}\n/**\n * Synchronous validation of a path existing either as a file or as a directory.\n *\n * @param {string} path The path to check\n * @param {number} type One or both of the exported numeric constants\n */\nfunction exists(path, type = exports.READABLE) {\n return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);\n}\nexports.exists = exists;\n/**\n * Constant representing a file\n */\nexports.FILE = 1;\n/**\n * Constant representing a folder\n */\nexports.FOLDER = 2;\n/**\n * Constant representing either a file or a folder\n */\nexports.READABLE = exports.FILE + exports.FOLDER;\n//# sourceMappingURL=index.js.map",
11
+ "\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./src\"));\n//# sourceMappingURL=index.js.map",
12
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDeferred = exports.deferred = void 0;\n/**\n * Creates a new `DeferredPromise`\n *\n * ```typescript\n import {deferred} from '@kwsites/promise-deferred`;\n ```\n */\nfunction deferred() {\n let done;\n let fail;\n let status = 'pending';\n const promise = new Promise((_done, _fail) => {\n done = _done;\n fail = _fail;\n });\n return {\n promise,\n done(result) {\n if (status === 'pending') {\n status = 'resolved';\n done(result);\n }\n },\n fail(error) {\n if (status === 'pending') {\n status = 'rejected';\n fail(error);\n }\n },\n get fulfilled() {\n return status !== 'pending';\n },\n get status() {\n return status;\n },\n };\n}\nexports.deferred = deferred;\n/**\n * Alias of the exported `deferred` function, to help consumers wanting to use `deferred` as the\n * local variable name rather than the factory import name, without needing to rename on import.\n *\n * ```typescript\n import {createDeferred} from '@kwsites/promise-deferred`;\n ```\n */\nexports.createDeferred = deferred;\n/**\n * Default export allows use as:\n *\n * ```typescript\n import deferred from '@kwsites/promise-deferred`;\n ```\n */\nexports.default = deferred;\n//# sourceMappingURL=index.js.map",
13
+ "'use strict';\n\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\nconst DEFAULT_MAX_EXTGLOB_RECURSION = 0;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\nconst SEP = '/';\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR,\n SEP\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,\n SEP: '\\\\'\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n __proto__: null,\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n DEFAULT_MAX_EXTGLOB_RECURSION,\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n __proto__: null,\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n",
14
+ "/*global navigator*/\n'use strict';\n\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.isWindows = () => {\n if (typeof navigator !== 'undefined' && navigator.platform) {\n const platform = navigator.platform.toLowerCase();\n return platform === 'win32' || platform === 'windows';\n }\n\n if (typeof process !== 'undefined' && process.platform) {\n return process.platform === 'win32';\n }\n\n return false;\n};\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n\nexports.basename = (path, { windows } = {}) => {\n const segs = path.split(windows ? /[\\\\/]/ : '/');\n const last = segs[segs.length - 1];\n\n if (last === '') {\n return segs[segs.length - 2];\n }\n\n return last;\n};\n",
15
+ "'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.tokens === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n let parens = 0;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_PARENTHESES) {\n parens++;\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n let parens = 1;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_PARENTHESES) {\n parens++;\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex !== undefined ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (i >= start) {\n parts.push(value);\n prevIndex = i;\n }\n }\n\n const n = prevIndex !== undefined ? prevIndex + 1 : start;\n const value = input.slice(n);\n parts.push(value);\n\n if (opts.tokens && prevIndex && prevIndex + 1 < input.length) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n",
16
+ "'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\nconst splitTopLevel = input => {\n const parts = [];\n let bracket = 0;\n let paren = 0;\n let quote = 0;\n let value = '';\n let escaped = false;\n\n for (const ch of input) {\n if (escaped === true) {\n value += ch;\n escaped = false;\n continue;\n }\n\n if (ch === '\\\\') {\n value += ch;\n escaped = true;\n continue;\n }\n\n if (ch === '\"') {\n quote = quote === 1 ? 0 : 1;\n value += ch;\n continue;\n }\n\n if (quote === 0) {\n if (ch === '[') {\n bracket++;\n } else if (ch === ']' && bracket > 0) {\n bracket--;\n } else if (bracket === 0) {\n if (ch === '(') {\n paren++;\n } else if (ch === ')' && paren > 0) {\n paren--;\n } else if (ch === '|' && paren === 0) {\n parts.push(value);\n value = '';\n continue;\n }\n }\n }\n\n value += ch;\n }\n\n parts.push(value);\n return parts;\n};\n\nconst isPlainBranch = branch => {\n let escaped = false;\n\n for (const ch of branch) {\n if (escaped === true) {\n escaped = false;\n continue;\n }\n\n if (ch === '\\\\') {\n escaped = true;\n continue;\n }\n\n if (/[?*+@!()[\\]{}]/.test(ch)) {\n return false;\n }\n }\n\n return true;\n};\n\nconst normalizeSimpleBranch = branch => {\n let value = branch.trim();\n let changed = true;\n\n while (changed === true) {\n changed = false;\n\n if (/^@\\([^\\\\()[\\]{}|]+\\)$/.test(value)) {\n value = value.slice(2, -1);\n changed = true;\n }\n }\n\n if (!isPlainBranch(value)) {\n return;\n }\n\n return value.replace(/\\\\(.)/g, '$1');\n};\n\nconst hasRepeatedCharPrefixOverlap = branches => {\n const values = branches.map(normalizeSimpleBranch).filter(Boolean);\n\n for (let i = 0; i < values.length; i++) {\n for (let j = i + 1; j < values.length; j++) {\n const a = values[i];\n const b = values[j];\n const char = a[0];\n\n if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {\n continue;\n }\n\n if (a === b || a.startsWith(b) || b.startsWith(a)) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nconst parseRepeatedExtglob = (pattern, requireEnd = true) => {\n if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') {\n return;\n }\n\n let bracket = 0;\n let paren = 0;\n let quote = 0;\n let escaped = false;\n\n for (let i = 1; i < pattern.length; i++) {\n const ch = pattern[i];\n\n if (escaped === true) {\n escaped = false;\n continue;\n }\n\n if (ch === '\\\\') {\n escaped = true;\n continue;\n }\n\n if (ch === '\"') {\n quote = quote === 1 ? 0 : 1;\n continue;\n }\n\n if (quote === 1) {\n continue;\n }\n\n if (ch === '[') {\n bracket++;\n continue;\n }\n\n if (ch === ']' && bracket > 0) {\n bracket--;\n continue;\n }\n\n if (bracket > 0) {\n continue;\n }\n\n if (ch === '(') {\n paren++;\n continue;\n }\n\n if (ch === ')') {\n paren--;\n\n if (paren === 0) {\n if (requireEnd === true && i !== pattern.length - 1) {\n return;\n }\n\n return {\n type: pattern[0],\n body: pattern.slice(2, i),\n end: i\n };\n }\n }\n }\n};\n\nconst buildCharClassStar = chars => {\n const source = chars.length === 1\n ? utils.escapeRegex(chars[0])\n : `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`;\n\n return `${source}*`;\n};\n\nconst getStarExtglobSequenceChars = pattern => {\n let index = 0;\n const chars = [];\n\n while (index < pattern.length) {\n const match = parseRepeatedExtglob(pattern.slice(index), false);\n\n if (!match || match.type !== '*') {\n return;\n }\n\n const branches = splitTopLevel(match.body).map(branch => branch.trim());\n if (branches.length !== 1) {\n return;\n }\n\n const branch = normalizeSimpleBranch(branches[0]);\n if (!branch || branch.length !== 1) {\n return;\n }\n\n chars.push(branch);\n index += match.end + 1;\n }\n\n if (chars.length < 1) {\n return;\n }\n\n return chars;\n};\n\nconst repeatedExtglobRecursion = pattern => {\n let depth = 0;\n let value = pattern.trim();\n let match = parseRepeatedExtglob(value);\n\n while (match) {\n depth++;\n value = match.body.trim();\n match = parseRepeatedExtglob(value);\n }\n\n return depth;\n};\n\nconst analyzeRepeatedExtglob = (body, options) => {\n if (options.maxExtglobRecursion === false) {\n return { risky: false };\n }\n\n const max =\n typeof options.maxExtglobRecursion === 'number'\n ? options.maxExtglobRecursion\n : constants.DEFAULT_MAX_EXTGLOB_RECURSION;\n\n const branches = splitTopLevel(body).map(branch => branch.trim());\n\n if (branches.length > 1) {\n if (\n branches.some(branch => branch === '') ||\n branches.some(branch => /^[*?]+$/.test(branch)) ||\n hasRepeatedCharPrefixOverlap(branches)\n ) {\n return { risky: true };\n }\n }\n\n // A repeated extglob is \"risky\" (prone to catastrophic backtracking) when a\n // branch is itself a `*(...)` sequence, since that nests an unbounded quantifier\n // inside the outer `+(...)`/`*(...)`. When *every* branch reduces to single\n // characters we can emit one flat, ReDoS-safe character class that preserves the\n // meaning of ALL branches (e.g. `+(*(a)|*(b))` -> `[ab]*`), rather than dropping\n // every branch but the first.\n const safeChars = [];\n let sawStarSequence = false;\n let combinable = true;\n\n for (const branch of branches) {\n const chars = getStarExtglobSequenceChars(branch);\n if (chars) {\n sawStarSequence = true;\n safeChars.push(...chars);\n continue;\n }\n\n const literal = normalizeSimpleBranch(branch);\n if (literal && literal.length === 1) {\n safeChars.push(literal);\n continue;\n }\n\n combinable = false;\n\n if (repeatedExtglobRecursion(branch) > max) {\n return { risky: true };\n }\n }\n\n if (sawStarSequence) {\n return combinable\n ? { risky: true, safeOutput: buildCharClassStar([...new Set(safeChars)]) }\n : { risky: true };\n }\n\n return { risky: false };\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(opts.windows);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.output = (prev.output || prev.value) + tok.value;\n prev.value += tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n token.startIndex = state.index;\n token.tokensIndex = tokens.length;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n const literal = input.slice(token.startIndex, state.index + 1);\n const body = input.slice(token.startIndex + 2, state.index);\n const analysis = analyzeRepeatedExtglob(body, opts);\n\n if ((token.type === 'plus' || token.type === 'star') && analysis.risky) {\n const safeOutput = analysis.safeOutput\n ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput)\n : undefined;\n const open = tokens[token.tokensIndex];\n\n open.type = 'text';\n open.value = literal;\n open.output = safeOutput || utils.escapeRegex(literal);\n\n for (let i = token.tokensIndex + 1; i < tokens.length; i++) {\n tokens[i].value = '';\n tokens[i].output = '';\n delete tokens[i].suffix;\n }\n\n state.output = token.output + open.output;\n state.backtrack = true;\n\n push({ type: 'paren', extglob: true, value, output: '' });\n decrement('parens');\n return;\n }\n\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n // A globstar followed only by balanced closing parens is at the logical end of patterns like\n // `test(/utils/**)` and `test?(/utils/**)`. Treat it as EOS so the trailing `/**` can match its\n // parent path, except in negated extglobs where that would change the exclusion semantics.\n const isEnd = eos() || (\n state.parens > 0\n && rest === ')'.repeat(state.parens)\n && !extglobs.some(extglob => extglob.type === 'negate')\n );\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && isEnd) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(opts.windows);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n",
17
+ "'use strict';\n\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n *\n * // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.\n * const picomatch = require('picomatch/posix');\n * // the same API, defaulting to posix paths\n * const isMatch = picomatch('a/*');\n * console.log(isMatch('a\\\\b')); //=> false\n * console.log(isMatch('a/b')); //=> true\n *\n * // you can still configure the matcher function to accept windows paths\n * const isMatch = picomatch('a/*', { options: windows });\n * console.log(isMatch('a\\\\b')); //=> true\n * console.log(isMatch('a/b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = opts.windows;\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = options && options.windows) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(utils.basename(input, { windows: posix }));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.makeRe(state[, options]);\n *\n * const result = picomatch.makeRe('*.js');\n * console.log(result);\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n",
18
+ "'use strict';\n\nconst pico = require('./lib/picomatch');\nconst utils = require('./lib/utils');\n\nfunction picomatch(glob, options, returnState = false) {\n // default to os.platform()\n if (options && (options.windows === null || options.windows === undefined)) {\n // don't mutate the original options object\n options = { ...options, windows: utils.isWindows() };\n }\n\n return pico(glob, options, returnState);\n}\n\nObject.assign(picomatch, pico);\nmodule.exports = picomatch;\n",
19
+ "let p = process || {}, argv = p.argv || [], env = p.env || {}\nlet isColorSupported =\n\t!(!!env.NO_COLOR || argv.includes(\"--no-color\")) &&\n\t(!!env.FORCE_COLOR || argv.includes(\"--color\") || p.platform === \"win32\" || ((p.stdout || {}).isTTY && env.TERM !== \"dumb\") || !!env.CI)\n\nlet formatter = (open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input, index = string.indexOf(close, open.length)\n\t\treturn ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet result = \"\", cursor = 0\n\tdo {\n\t\tresult += string.substring(cursor, index) + replace\n\t\tcursor = index + close.length\n\t\tindex = string.indexOf(close, cursor)\n\t} while (~index)\n\treturn result + string.substring(cursor)\n}\n\nlet createColors = (enabled = isColorSupported) => {\n\tlet f = enabled ? formatter : () => String\n\treturn {\n\t\tisColorSupported: enabled,\n\t\treset: f(\"\\x1b[0m\", \"\\x1b[0m\"),\n\t\tbold: f(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\"),\n\t\tdim: f(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\"),\n\t\titalic: f(\"\\x1b[3m\", \"\\x1b[23m\"),\n\t\tunderline: f(\"\\x1b[4m\", \"\\x1b[24m\"),\n\t\tinverse: f(\"\\x1b[7m\", \"\\x1b[27m\"),\n\t\thidden: f(\"\\x1b[8m\", \"\\x1b[28m\"),\n\t\tstrikethrough: f(\"\\x1b[9m\", \"\\x1b[29m\"),\n\n\t\tblack: f(\"\\x1b[30m\", \"\\x1b[39m\"),\n\t\tred: f(\"\\x1b[31m\", \"\\x1b[39m\"),\n\t\tgreen: f(\"\\x1b[32m\", \"\\x1b[39m\"),\n\t\tyellow: f(\"\\x1b[33m\", \"\\x1b[39m\"),\n\t\tblue: f(\"\\x1b[34m\", \"\\x1b[39m\"),\n\t\tmagenta: f(\"\\x1b[35m\", \"\\x1b[39m\"),\n\t\tcyan: f(\"\\x1b[36m\", \"\\x1b[39m\"),\n\t\twhite: f(\"\\x1b[37m\", \"\\x1b[39m\"),\n\t\tgray: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\n\t\tbgBlack: f(\"\\x1b[40m\", \"\\x1b[49m\"),\n\t\tbgRed: f(\"\\x1b[41m\", \"\\x1b[49m\"),\n\t\tbgGreen: f(\"\\x1b[42m\", \"\\x1b[49m\"),\n\t\tbgYellow: f(\"\\x1b[43m\", \"\\x1b[49m\"),\n\t\tbgBlue: f(\"\\x1b[44m\", \"\\x1b[49m\"),\n\t\tbgMagenta: f(\"\\x1b[45m\", \"\\x1b[49m\"),\n\t\tbgCyan: f(\"\\x1b[46m\", \"\\x1b[49m\"),\n\t\tbgWhite: f(\"\\x1b[47m\", \"\\x1b[49m\"),\n\n\t\tblackBright: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\t\tredBright: f(\"\\x1b[91m\", \"\\x1b[39m\"),\n\t\tgreenBright: f(\"\\x1b[92m\", \"\\x1b[39m\"),\n\t\tyellowBright: f(\"\\x1b[93m\", \"\\x1b[39m\"),\n\t\tblueBright: f(\"\\x1b[94m\", \"\\x1b[39m\"),\n\t\tmagentaBright: f(\"\\x1b[95m\", \"\\x1b[39m\"),\n\t\tcyanBright: f(\"\\x1b[96m\", \"\\x1b[39m\"),\n\t\twhiteBright: f(\"\\x1b[97m\", \"\\x1b[39m\"),\n\n\t\tbgBlackBright: f(\"\\x1b[100m\", \"\\x1b[49m\"),\n\t\tbgRedBright: f(\"\\x1b[101m\", \"\\x1b[49m\"),\n\t\tbgGreenBright: f(\"\\x1b[102m\", \"\\x1b[49m\"),\n\t\tbgYellowBright: f(\"\\x1b[103m\", \"\\x1b[49m\"),\n\t\tbgBlueBright: f(\"\\x1b[104m\", \"\\x1b[49m\"),\n\t\tbgMagentaBright: f(\"\\x1b[105m\", \"\\x1b[49m\"),\n\t\tbgCyanBright: f(\"\\x1b[106m\", \"\\x1b[49m\"),\n\t\tbgWhiteBright: f(\"\\x1b[107m\", \"\\x1b[49m\"),\n\t}\n}\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n",
20
+ "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\nfunction chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array ? array.length : 0;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = chunk;\n",
21
+ "function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
22
+ "function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
23
+ "var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
24
+ "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
25
+ "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
26
+ "function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
27
+ "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
28
+ "function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
29
+ "var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
30
+ "function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
31
+ "var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
32
+ "function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
33
+ "var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",
34
+ "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar poolNames = {\n functions: 'Jexl Function',\n transforms: 'Transform'\n};\n/**\n * Evaluates an ArrayLiteral by returning its value, with each element\n * independently run through the evaluator.\n * @param {{type: 'ObjectLiteral', value: <{}>}} ast An expression tree with an\n * ObjectLiteral as the top node\n * @returns {Promise.<[]>} resolves to a map contained evaluated values.\n * @private\n */\n\nexports.ArrayLiteral = function (ast) {\n return this.evalArray(ast.value);\n};\n/**\n * Evaluates a BinaryExpression node by running the Grammar's evaluator for\n * the given operator. Note that binary expressions support two types of\n * evaluators: `eval` is called with the left and right operands pre-evaluated.\n * `evalOnDemand`, if it exists, will be called with the left and right operands\n * each individually wrapped in an object with an \"eval\" function that returns\n * a promise with the resulting value. This allows the binary expression to\n * evaluate the operands conditionally.\n * @param {{type: 'BinaryExpression', operator: <string>, left: {},\n * right: {}}} ast An expression tree with a BinaryExpression as the top\n * node\n * @returns {Promise<*>} resolves with the value of the BinaryExpression.\n * @private\n */\n\n\nexports.BinaryExpression = function (ast) {\n var _this = this;\n\n var grammarOp = this._grammar.elements[ast.operator];\n\n if (grammarOp.evalOnDemand) {\n var wrap = function wrap(subAst) {\n return {\n eval: function _eval() {\n return _this.eval(subAst);\n }\n };\n };\n\n return grammarOp.evalOnDemand(wrap(ast.left), wrap(ast.right));\n }\n\n return this.Promise.all([this.eval(ast.left), this.eval(ast.right)]).then(function (arr) {\n return grammarOp.eval(arr[0], arr[1]);\n });\n};\n/**\n * Evaluates a ConditionalExpression node by first evaluating its test branch,\n * and resolving with the consequent branch if the test is truthy, or the\n * alternate branch if it is not. If there is no consequent branch, the test\n * result will be used instead.\n * @param {{type: 'ConditionalExpression', test: {}, consequent: {},\n * alternate: {}}} ast An expression tree with a ConditionalExpression as\n * the top node\n * @private\n */\n\n\nexports.ConditionalExpression = function (ast) {\n var _this2 = this;\n\n return this.eval(ast.test).then(function (res) {\n if (res) {\n if (ast.consequent) {\n return _this2.eval(ast.consequent);\n }\n\n return res;\n }\n\n return _this2.eval(ast.alternate);\n });\n};\n/**\n * Evaluates a FilterExpression by applying it to the subject value.\n * @param {{type: 'FilterExpression', relative: <boolean>, expr: {},\n * subject: {}}} ast An expression tree with a FilterExpression as the top\n * node\n * @returns {Promise<*>} resolves with the value of the FilterExpression.\n * @private\n */\n\n\nexports.FilterExpression = function (ast) {\n var _this3 = this;\n\n return this.eval(ast.subject).then(function (subject) {\n if (ast.relative) {\n return _this3._filterRelative(subject, ast.expr);\n }\n\n return _this3._filterStatic(subject, ast.expr);\n });\n};\n/**\n * Evaluates an Identifier by either stemming from the evaluated 'from'\n * expression tree or accessing the context provided when this Evaluator was\n * constructed.\n * @param {{type: 'Identifier', value: <string>, [from]: {}}} ast An expression\n * tree with an Identifier as the top node\n * @returns {Promise<*>|*} either the identifier's value, or a Promise that\n * will resolve with the identifier's value.\n * @private\n */\n\n\nexports.Identifier = function (ast) {\n if (!ast.from) {\n return ast.relative ? this._relContext[ast.value] : this._context[ast.value];\n }\n\n return this.eval(ast.from).then(function (context) {\n if (context === undefined || context === null) {\n return undefined;\n }\n\n if (Array.isArray(context)) {\n context = context[0];\n }\n\n return context[ast.value];\n });\n};\n/**\n * Evaluates a Literal by returning its value property.\n * @param {{type: 'Literal', value: <string|number|boolean>}} ast An expression\n * tree with a Literal as its only node\n * @returns {string|number|boolean} The value of the Literal node\n * @private\n */\n\n\nexports.Literal = function (ast) {\n return ast.value;\n};\n/**\n * Evaluates an ObjectLiteral by returning its value, with each key\n * independently run through the evaluator.\n * @param {{type: 'ObjectLiteral', value: <{}>}} ast An expression tree with an\n * ObjectLiteral as the top node\n * @returns {Promise<{}>} resolves to a map contained evaluated values.\n * @private\n */\n\n\nexports.ObjectLiteral = function (ast) {\n return this.evalMap(ast.value);\n};\n/**\n * Evaluates a FunctionCall node by applying the supplied arguments to a\n * function defined in one of the grammar's function pools.\n * @param {{type: 'FunctionCall', name: <string>}} ast An\n * expression tree with a FunctionCall as the top node\n * @returns {Promise<*>|*} the value of the function call, or a Promise that\n * will resolve with the resulting value.\n * @private\n */\n\n\nexports.FunctionCall = function (ast) {\n var poolName = poolNames[ast.pool];\n\n if (!poolName) {\n throw new Error(\"Corrupt AST: Pool '\".concat(ast.pool, \"' not found\"));\n }\n\n var pool = this._grammar[ast.pool];\n var func = pool[ast.name];\n\n if (!func) {\n throw new Error(\"\".concat(poolName, \" \").concat(ast.name, \" is not defined.\"));\n }\n\n return this.evalArray(ast.args || []).then(function (args) {\n return func.apply(void 0, (0, _toConsumableArray2.default)(args));\n });\n};\n/**\n * Evaluates a Unary expression by passing the right side through the\n * operator's eval function.\n * @param {{type: 'UnaryExpression', operator: <string>, right: {}}} ast An\n * expression tree with a UnaryExpression as the top node\n * @returns {Promise<*>} resolves with the value of the UnaryExpression.\n * @constructor\n */\n\n\nexports.UnaryExpression = function (ast) {\n var _this4 = this;\n\n return this.eval(ast.right).then(function (right) {\n return _this4._grammar.elements[ast.operator].eval(right);\n });\n};",
35
+ "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar handlers = require('./handlers');\n/**\n * The Evaluator takes a Jexl expression tree as generated by the\n * {@link Parser} and calculates its value within a given context. The\n * collection of transforms, context, and a relative context to be used as the\n * root for relative identifiers, are all specific to an Evaluator instance.\n * When any of these things change, a new instance is required. However, a\n * single instance can be used to simultaneously evaluate many different\n * expressions, and does not have to be reinstantiated for each.\n * @param {{}} grammar A grammar object against which to evaluate the expression\n * tree\n * @param {{}} [context] A map of variable keys to their values. This will be\n * accessed to resolve the value of each non-relative identifier. Any\n * Promise values will be passed to the expression as their resolved\n * value.\n * @param {{}|Array<{}|Array>} [relativeContext] A map or array to be accessed\n * to resolve the value of a relative identifier.\n * @param {function} promise A constructor for the Promise class to be used;\n * probably either Promise or PromiseSync.\n */\n\n\nvar Evaluator = /*#__PURE__*/function () {\n function Evaluator(grammar, context, relativeContext) {\n var promise = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Promise;\n (0, _classCallCheck2.default)(this, Evaluator);\n this._grammar = grammar;\n this._context = context || {};\n this._relContext = relativeContext || this._context;\n this.Promise = promise;\n }\n /**\n * Evaluates an expression tree within the configured context.\n * @param {{}} ast An expression tree object\n * @returns {Promise<*>} resolves with the resulting value of the expression.\n */\n\n\n (0, _createClass2.default)(Evaluator, [{\n key: \"eval\",\n value: function _eval(ast) {\n var _this = this;\n\n return this.Promise.resolve().then(function () {\n return handlers[ast.type].call(_this, ast);\n });\n }\n /**\n * Simultaneously evaluates each expression within an array, and delivers the\n * response as an array with the resulting values at the same indexes as their\n * originating expressions.\n * @param {Array<string>} arr An array of expression strings to be evaluated\n * @returns {Promise<Array<{}>>} resolves with the result array\n */\n\n }, {\n key: \"evalArray\",\n value: function evalArray(arr) {\n var _this2 = this;\n\n return this.Promise.all(arr.map(function (elem) {\n return _this2.eval(elem);\n }));\n }\n /**\n * Simultaneously evaluates each expression within a map, and delivers the\n * response as a map with the same keys, but with the evaluated result for each\n * as their value.\n * @param {{}} map A map of expression names to expression trees to be\n * evaluated\n * @returns {Promise<{}>} resolves with the result map.\n */\n\n }, {\n key: \"evalMap\",\n value: function evalMap(map) {\n var _this3 = this;\n\n var keys = Object.keys(map);\n var result = {};\n var asts = keys.map(function (key) {\n return _this3.eval(map[key]);\n });\n return this.Promise.all(asts).then(function (vals) {\n vals.forEach(function (val, idx) {\n result[keys[idx]] = val;\n });\n return result;\n });\n }\n /**\n * Applies a filter expression with relative identifier elements to a subject.\n * The intent is for the subject to be an array of subjects that will be\n * individually used as the relative context against the provided expression\n * tree. Only the elements whose expressions result in a truthy value will be\n * included in the resulting array.\n *\n * If the subject is not an array of values, it will be converted to a single-\n * element array before running the filter.\n * @param {*} subject The value to be filtered usually an array. If this value is\n * not an array, it will be converted to an array with this value as the\n * only element.\n * @param {{}} expr The expression tree to run against each subject. If the\n * tree evaluates to a truthy result, then the value will be included in\n * the returned array otherwise, it will be eliminated.\n * @returns {Promise<Array>} resolves with an array of values that passed the\n * expression filter.\n * @private\n */\n\n }, {\n key: \"_filterRelative\",\n value: function _filterRelative(subject, expr) {\n var _this4 = this;\n\n var promises = [];\n\n if (!Array.isArray(subject)) {\n subject = subject === undefined ? [] : [subject];\n }\n\n subject.forEach(function (elem) {\n var evalInst = new Evaluator(_this4._grammar, _this4._context, elem, _this4.Promise);\n promises.push(evalInst.eval(expr));\n });\n return this.Promise.all(promises).then(function (values) {\n var results = [];\n values.forEach(function (value, idx) {\n if (value) {\n results.push(subject[idx]);\n }\n });\n return results;\n });\n }\n /**\n * Applies a static filter expression to a subject value. If the filter\n * expression evaluates to boolean true, the subject is returned if false,\n * undefined.\n *\n * For any other resulting value of the expression, this function will attempt\n * to respond with the property at that name or index of the subject.\n * @param {*} subject The value to be filtered. Usually an Array (for which\n * the expression would generally resolve to a numeric index) or an\n * Object (for which the expression would generally resolve to a string\n * indicating a property name)\n * @param {{}} expr The expression tree to run against the subject\n * @returns {Promise<*>} resolves with the value of the drill-down.\n * @private\n */\n\n }, {\n key: \"_filterStatic\",\n value: function _filterStatic(subject, expr) {\n return this.eval(expr).then(function (res) {\n if (typeof res === 'boolean') {\n return res ? subject : undefined;\n }\n\n return subject[res];\n });\n }\n }]);\n return Evaluator;\n}();\n\nmodule.exports = Evaluator;",
36
+ "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar numericRegex = /^-?(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)$/;\nvar identRegex = /^[a-zA-Zа-яА-Я_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u00FF$][a-zA-Zа-яА-Я0-9_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u00FF$]*$/;\nvar escEscRegex = /\\\\\\\\/;\nvar whitespaceRegex = /^\\s*$/;\nvar preOpRegexElems = [// Strings\n\"'(?:(?:\\\\\\\\')|[^'])*'\", '\"(?:(?:\\\\\\\\\")|[^\"])*\"', // Whitespace\n'\\\\s+', // Booleans\n'\\\\btrue\\\\b', '\\\\bfalse\\\\b'];\nvar postOpRegexElems = [// Identifiers\n\"[a-zA-Z\\u0430-\\u044F\\u0410-\\u042F_\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\\\$][a-zA-Z0-9\\u0430-\\u044F\\u0410-\\u042F_\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\\\$]*\", // Numerics (without negative symbol)\n'(?:(?:[0-9]*\\\\.[0-9]+)|[0-9]+)'];\nvar minusNegatesAfter = ['binaryOp', 'unaryOp', 'openParen', 'openBracket', 'question', 'colon'];\n/**\n * Lexer is a collection of stateless, statically-accessed functions for the\n * lexical parsing of a Jexl string. Its responsibility is to identify the\n * \"parts of speech\" of a Jexl expression, and tokenize and label each, but\n * to do only the most minimal syntax checking; the only errors the Lexer\n * should be concerned with are if it's unable to identify the utility of\n * any of its tokens. Errors stemming from these tokens not being in a\n * sensible configuration should be left for the Parser to handle.\n * @type {{}}\n */\n\nvar Lexer = /*#__PURE__*/function () {\n function Lexer(grammar) {\n (0, _classCallCheck2.default)(this, Lexer);\n this._grammar = grammar;\n }\n /**\n * Splits a Jexl expression string into an array of expression elements.\n * @param {string} str A Jexl expression string\n * @returns {Array<string>} An array of substrings defining the functional\n * elements of the expression.\n */\n\n\n (0, _createClass2.default)(Lexer, [{\n key: \"getElements\",\n value: function getElements(str) {\n var regex = this._getSplitRegex();\n\n return str.split(regex).filter(function (elem) {\n // Remove empty strings\n return elem;\n });\n }\n /**\n * Converts an array of expression elements into an array of tokens. Note that\n * the resulting array may not equal the element array in length, as any\n * elements that consist only of whitespace get appended to the previous\n * token's \"raw\" property. For the structure of a token object, please see\n * {@link Lexer#tokenize}.\n * @param {Array<string>} elements An array of Jexl expression elements to be\n * converted to tokens\n * @returns {Array<{type, value, raw}>} an array of token objects.\n */\n\n }, {\n key: \"getTokens\",\n value: function getTokens(elements) {\n var tokens = [];\n var negate = false;\n\n for (var i = 0; i < elements.length; i++) {\n if (this._isWhitespace(elements[i])) {\n if (tokens.length) {\n tokens[tokens.length - 1].raw += elements[i];\n }\n } else if (elements[i] === '-' && this._isNegative(tokens)) {\n negate = true;\n } else {\n if (negate) {\n elements[i] = '-' + elements[i];\n negate = false;\n }\n\n tokens.push(this._createToken(elements[i]));\n }\n } // Catch a - at the end of the string. Let the parser handle that issue.\n\n\n if (negate) {\n tokens.push(this._createToken('-'));\n }\n\n return tokens;\n }\n /**\n * Converts a Jexl string into an array of tokens. Each token is an object\n * in the following format:\n *\n * {\n * type: <string>,\n * [name]: <string>,\n * value: <boolean|number|string>,\n * raw: <string>\n * }\n *\n * Type is one of the following:\n *\n * literal, identifier, binaryOp, unaryOp\n *\n * OR, if the token is a control character its type is the name of the element\n * defined in the Grammar.\n *\n * Name appears only if the token is a control string found in\n * {@link grammar#elements}, and is set to the name of the element.\n *\n * Value is the value of the token in the correct type (boolean or numeric as\n * appropriate). Raw is the string representation of this value taken directly\n * from the expression string, including any trailing spaces.\n * @param {string} str The Jexl string to be tokenized\n * @returns {Array<{type, value, raw}>} an array of token objects.\n * @throws {Error} if the provided string contains an invalid token.\n */\n\n }, {\n key: \"tokenize\",\n value: function tokenize(str) {\n var elements = this.getElements(str);\n return this.getTokens(elements);\n }\n /**\n * Creates a new token object from an element of a Jexl string. See\n * {@link Lexer#tokenize} for a description of the token object.\n * @param {string} element The element from which a token should be made\n * @returns {{value: number|boolean|string, [name]: string, type: string,\n * raw: string}} a token object describing the provided element.\n * @throws {Error} if the provided string is not a valid expression element.\n * @private\n */\n\n }, {\n key: \"_createToken\",\n value: function _createToken(element) {\n var token = {\n type: 'literal',\n value: element,\n raw: element\n };\n\n if (element[0] === '\"' || element[0] === \"'\") {\n token.value = this._unquote(element);\n } else if (element.match(numericRegex)) {\n token.value = parseFloat(element);\n } else if (element === 'true' || element === 'false') {\n token.value = element === 'true';\n } else if (this._grammar.elements[element]) {\n token.type = this._grammar.elements[element].type;\n } else if (element.match(identRegex)) {\n token.type = 'identifier';\n } else {\n throw new Error(\"Invalid expression token: \".concat(element));\n }\n\n return token;\n }\n /**\n * Escapes a string so that it can be treated as a string literal within a\n * regular expression.\n * @param {string} str The string to be escaped\n * @returns {string} the RegExp-escaped string.\n * @see https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions\n * @private\n */\n\n }, {\n key: \"_escapeRegExp\",\n value: function _escapeRegExp(str) {\n str = str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n if (str.match(identRegex)) {\n str = '\\\\b' + str + '\\\\b';\n }\n\n return str;\n }\n /**\n * Gets a RegEx object appropriate for splitting a Jexl string into its core\n * elements.\n * @returns {RegExp} An element-splitting RegExp object\n * @private\n */\n\n }, {\n key: \"_getSplitRegex\",\n value: function _getSplitRegex() {\n var _this = this;\n\n if (!this._splitRegex) {\n // Sort by most characters to least, then regex escape each\n var elemArray = Object.keys(this._grammar.elements).sort(function (a, b) {\n return b.length - a.length;\n }).map(function (elem) {\n return _this._escapeRegExp(elem);\n }, this);\n this._splitRegex = new RegExp('(' + [preOpRegexElems.join('|'), elemArray.join('|'), postOpRegexElems.join('|')].join('|') + ')');\n }\n\n return this._splitRegex;\n }\n /**\n * Determines whether the addition of a '-' token should be interpreted as a\n * negative symbol for an upcoming number, given an array of tokens already\n * processed.\n * @param {Array<Object>} tokens An array of tokens already processed\n * @returns {boolean} true if adding a '-' should be considered a negative\n * symbol; false otherwise\n * @private\n */\n\n }, {\n key: \"_isNegative\",\n value: function _isNegative(tokens) {\n if (!tokens.length) return true;\n return minusNegatesAfter.some(function (type) {\n return type === tokens[tokens.length - 1].type;\n });\n }\n /**\n * A utility function to determine if a string consists of only space\n * characters.\n * @param {string} str A string to be tested\n * @returns {boolean} true if the string is empty or consists of only spaces;\n * false otherwise.\n * @private\n */\n\n }, {\n key: \"_isWhitespace\",\n value: function _isWhitespace(str) {\n return !!str.match(whitespaceRegex);\n }\n /**\n * Removes the beginning and trailing quotes from a string, unescapes any\n * escaped quotes on its interior, and unescapes any escaped escape\n * characters. Note that this function is not defensive; it assumes that the\n * provided string is not empty, and that its first and last characters are\n * actually quotes.\n * @param {string} str A string whose first and last characters are quotes\n * @returns {string} a string with the surrounding quotes stripped and escapes\n * properly processed.\n * @private\n */\n\n }, {\n key: \"_unquote\",\n value: function _unquote(str) {\n var quote = str[0];\n var escQuoteRegex = new RegExp('\\\\\\\\' + quote, 'g');\n return str.substr(1, str.length - 2).replace(escQuoteRegex, quote).replace(escEscRegex, '\\\\');\n }\n }]);\n return Lexer;\n}();\n\nmodule.exports = Lexer;",
37
+ "\"use strict\";\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\n\n/**\n * Handles a subexpression that's used to define a transform argument's value.\n * @param {{type: <string>}} ast The subexpression tree\n */\nexports.argVal = function (ast) {\n if (ast) this._cursor.args.push(ast);\n};\n/**\n * Handles new array literals by adding them as a new node in the AST,\n * initialized with an empty array.\n */\n\n\nexports.arrayStart = function () {\n this._placeAtCursor({\n type: 'ArrayLiteral',\n value: []\n });\n};\n/**\n * Handles a subexpression representing an element of an array literal.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.arrayVal = function (ast) {\n if (ast) {\n this._cursor.value.push(ast);\n }\n};\n/**\n * Handles tokens of type 'binaryOp', indicating an operation that has two\n * inputs: a left side and a right side.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.binaryOp = function (token) {\n var precedence = this._grammar.elements[token.value].precedence || 0;\n var parent = this._cursor._parent;\n\n while (parent && parent.operator && this._grammar.elements[parent.operator].precedence >= precedence) {\n this._cursor = parent;\n parent = parent._parent;\n }\n\n var node = {\n type: 'BinaryExpression',\n operator: token.value,\n left: this._cursor\n };\n\n this._setParent(this._cursor, node);\n\n this._cursor = parent;\n\n this._placeAtCursor(node);\n};\n/**\n * Handles successive nodes in an identifier chain. More specifically, it\n * sets values that determine how the following identifier gets placed in the\n * AST.\n */\n\n\nexports.dot = function () {\n this._nextIdentEncapsulate = this._cursor && this._cursor.type !== 'UnaryExpression' && (this._cursor.type !== 'BinaryExpression' || this._cursor.type === 'BinaryExpression' && this._cursor.right);\n this._nextIdentRelative = !this._cursor || this._cursor && !this._nextIdentEncapsulate;\n\n if (this._nextIdentRelative) {\n this._relative = true;\n }\n};\n/**\n * Handles a subexpression used for filtering an array returned by an\n * identifier chain.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.filter = function (ast) {\n this._placeBeforeCursor({\n type: 'FilterExpression',\n expr: ast,\n relative: this._subParser.isRelative(),\n subject: this._cursor\n });\n};\n/**\n * Handles identifier tokens when used to indicate the name of a function to\n * be called.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.functionCall = function () {\n this._placeBeforeCursor({\n type: 'FunctionCall',\n name: this._cursor.value,\n args: [],\n pool: 'functions'\n });\n};\n/**\n * Handles identifier tokens by adding them as a new node in the AST.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.identifier = function (token) {\n var node = {\n type: 'Identifier',\n value: token.value\n };\n\n if (this._nextIdentEncapsulate) {\n node.from = this._cursor;\n\n this._placeBeforeCursor(node);\n\n this._nextIdentEncapsulate = false;\n } else {\n if (this._nextIdentRelative) {\n node.relative = true;\n this._nextIdentRelative = false;\n }\n\n this._placeAtCursor(node);\n }\n};\n/**\n * Handles literal values, such as strings, booleans, and numerics, by adding\n * them as a new node in the AST.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.literal = function (token) {\n this._placeAtCursor({\n type: 'Literal',\n value: token.value\n });\n};\n/**\n * Queues a new object literal key to be written once a value is collected.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.objKey = function (token) {\n this._curObjKey = token.value;\n};\n/**\n * Handles new object literals by adding them as a new node in the AST,\n * initialized with an empty object.\n */\n\n\nexports.objStart = function () {\n this._placeAtCursor({\n type: 'ObjectLiteral',\n value: {}\n });\n};\n/**\n * Handles an object value by adding its AST to the queued key on the object\n * literal node currently at the cursor.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.objVal = function (ast) {\n this._cursor.value[this._curObjKey] = ast;\n};\n/**\n * Handles traditional subexpressions, delineated with the groupStart and\n * groupEnd elements.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.subExpression = function (ast) {\n this._placeAtCursor(ast);\n};\n/**\n * Handles a completed alternate subexpression of a ternary operator.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.ternaryEnd = function (ast) {\n this._cursor.alternate = ast;\n};\n/**\n * Handles a completed consequent subexpression of a ternary operator.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.ternaryMid = function (ast) {\n this._cursor.consequent = ast;\n};\n/**\n * Handles the start of a new ternary expression by encapsulating the entire\n * AST in a ConditionalExpression node, and using the existing tree as the\n * test element.\n */\n\n\nexports.ternaryStart = function () {\n this._tree = {\n type: 'ConditionalExpression',\n test: this._tree\n };\n this._cursor = this._tree;\n};\n/**\n * Handles identifier tokens when used to indicate the name of a transform to\n * be applied.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.transform = function (token) {\n this._placeBeforeCursor({\n type: 'FunctionCall',\n name: token.value,\n args: [this._cursor],\n pool: 'transforms'\n });\n};\n/**\n * Handles token of type 'unaryOp', indicating that the operation has only\n * one input: a right side.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.unaryOp = function (token) {\n this._placeAtCursor({\n type: 'UnaryExpression',\n operator: token.value\n });\n};",
38
+ "\"use strict\";\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar h = require('./handlers');\n/**\n * A mapping of all states in the finite state machine to a set of instructions\n * for handling or transitioning into other states. Each state can be handled\n * in one of two schemes: a tokenType map, or a subHandler.\n *\n * Standard expression elements are handled through the tokenType object. This\n * is an object map of all legal token types to encounter in this state (and\n * any unexpected token types will generate a thrown error) to an options\n * object that defines how they're handled. The available options are:\n *\n * {string} toState: The name of the state to which to transition\n * immediately after handling this token\n * {string} handler: The handler function to call when this token type is\n * encountered in this state. If omitted, the default handler\n * matching the token's \"type\" property will be called. If the handler\n * function does not exist, no call will be made and no error will be\n * generated. This is useful for tokens whose sole purpose is to\n * transition to other states.\n *\n * States that consume a subexpression should define a subHandler, the\n * function to be called with an expression tree argument when the\n * subexpression is complete. Completeness is determined through the\n * endStates object, which maps tokens on which an expression should end to the\n * state to which to transition once the subHandler function has been called.\n *\n * Additionally, any state in which it is legal to mark the AST as completed\n * should have a 'completable' property set to boolean true. Attempting to\n * call {@link Parser#complete} in any state without this property will result\n * in a thrown Error.\n *\n * @type {{}}\n */\n\n\nexports.states = {\n expectOperand: {\n tokenTypes: {\n literal: {\n toState: 'expectBinOp'\n },\n identifier: {\n toState: 'identifier'\n },\n unaryOp: {},\n openParen: {\n toState: 'subExpression'\n },\n openCurl: {\n toState: 'expectObjKey',\n handler: h.objStart\n },\n dot: {\n toState: 'traverse'\n },\n openBracket: {\n toState: 'arrayVal',\n handler: h.arrayStart\n }\n }\n },\n expectBinOp: {\n tokenTypes: {\n binaryOp: {\n toState: 'expectOperand'\n },\n pipe: {\n toState: 'expectTransform'\n },\n dot: {\n toState: 'traverse'\n },\n question: {\n toState: 'ternaryMid',\n handler: h.ternaryStart\n }\n },\n completable: true\n },\n expectTransform: {\n tokenTypes: {\n identifier: {\n toState: 'postTransform',\n handler: h.transform\n }\n }\n },\n expectObjKey: {\n tokenTypes: {\n identifier: {\n toState: 'expectKeyValSep',\n handler: h.objKey\n },\n closeCurl: {\n toState: 'expectBinOp'\n }\n }\n },\n expectKeyValSep: {\n tokenTypes: {\n colon: {\n toState: 'objVal'\n }\n }\n },\n postTransform: {\n tokenTypes: {\n openParen: {\n toState: 'argVal'\n },\n binaryOp: {\n toState: 'expectOperand'\n },\n dot: {\n toState: 'traverse'\n },\n openBracket: {\n toState: 'filter'\n },\n pipe: {\n toState: 'expectTransform'\n }\n },\n completable: true\n },\n postArgs: {\n tokenTypes: {\n binaryOp: {\n toState: 'expectOperand'\n },\n dot: {\n toState: 'traverse'\n },\n openBracket: {\n toState: 'filter'\n },\n pipe: {\n toState: 'expectTransform'\n }\n },\n completable: true\n },\n identifier: {\n tokenTypes: {\n binaryOp: {\n toState: 'expectOperand'\n },\n dot: {\n toState: 'traverse'\n },\n openBracket: {\n toState: 'filter'\n },\n openParen: {\n toState: 'argVal',\n handler: h.functionCall\n },\n pipe: {\n toState: 'expectTransform'\n },\n question: {\n toState: 'ternaryMid',\n handler: h.ternaryStart\n }\n },\n completable: true\n },\n traverse: {\n tokenTypes: {\n identifier: {\n toState: 'identifier'\n }\n }\n },\n filter: {\n subHandler: h.filter,\n endStates: {\n closeBracket: 'identifier'\n }\n },\n subExpression: {\n subHandler: h.subExpression,\n endStates: {\n closeParen: 'expectBinOp'\n }\n },\n argVal: {\n subHandler: h.argVal,\n endStates: {\n comma: 'argVal',\n closeParen: 'postArgs'\n }\n },\n objVal: {\n subHandler: h.objVal,\n endStates: {\n comma: 'expectObjKey',\n closeCurl: 'expectBinOp'\n }\n },\n arrayVal: {\n subHandler: h.arrayVal,\n endStates: {\n comma: 'arrayVal',\n closeBracket: 'expectBinOp'\n }\n },\n ternaryMid: {\n subHandler: h.ternaryMid,\n endStates: {\n colon: 'ternaryEnd'\n }\n },\n ternaryEnd: {\n subHandler: h.ternaryEnd,\n completable: true\n }\n};",
39
+ "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar handlers = require('./handlers');\n\nvar states = require('./states').states;\n/**\n * The Parser is a state machine that converts tokens from the {@link Lexer}\n * into an Abstract Syntax Tree (AST), capable of being evaluated in any\n * context by the {@link Evaluator}. The Parser expects that all tokens\n * provided to it are legal and typed properly according to the grammar, but\n * accepts that the tokens may still be in an invalid order or in some other\n * unparsable configuration that requires it to throw an Error.\n * @param {{}} grammar The grammar object to use to parse Jexl strings\n * @param {string} [prefix] A string prefix to prepend to the expression string\n * for error messaging purposes. This is useful for when a new Parser is\n * instantiated to parse an subexpression, as the parent Parser's\n * expression string thus far can be passed for a more user-friendly\n * error message.\n * @param {{}} [stopMap] A mapping of token types to any truthy value. When the\n * token type is encountered, the parser will return the mapped value\n * instead of boolean false.\n */\n\n\nvar Parser = /*#__PURE__*/function () {\n function Parser(grammar, prefix, stopMap) {\n (0, _classCallCheck2.default)(this, Parser);\n this._grammar = grammar;\n this._state = 'expectOperand';\n this._tree = null;\n this._exprStr = prefix || '';\n this._relative = false;\n this._stopMap = stopMap || {};\n }\n /**\n * Processes a new token into the AST and manages the transitions of the state\n * machine.\n * @param {{type: <string>}} token A token object, as provided by the\n * {@link Lexer#tokenize} function.\n * @throws {Error} if a token is added when the Parser has been marked as\n * complete by {@link #complete}, or if an unexpected token type is added.\n * @returns {boolean|*} the stopState value if this parser encountered a token\n * in the stopState mapb false if tokens can continue.\n */\n\n\n (0, _createClass2.default)(Parser, [{\n key: \"addToken\",\n value: function addToken(token) {\n if (this._state === 'complete') {\n throw new Error('Cannot add a new token to a completed Parser');\n }\n\n var state = states[this._state];\n var startExpr = this._exprStr;\n this._exprStr += token.raw;\n\n if (state.subHandler) {\n if (!this._subParser) {\n this._startSubExpression(startExpr);\n }\n\n var stopState = this._subParser.addToken(token);\n\n if (stopState) {\n this._endSubExpression();\n\n if (this._parentStop) return stopState;\n this._state = stopState;\n }\n } else if (state.tokenTypes[token.type]) {\n var typeOpts = state.tokenTypes[token.type];\n var handleFunc = handlers[token.type];\n\n if (typeOpts.handler) {\n handleFunc = typeOpts.handler;\n }\n\n if (handleFunc) {\n handleFunc.call(this, token);\n }\n\n if (typeOpts.toState) {\n this._state = typeOpts.toState;\n }\n } else if (this._stopMap[token.type]) {\n return this._stopMap[token.type];\n } else {\n throw new Error(\"Token \".concat(token.raw, \" (\").concat(token.type, \") unexpected in expression: \").concat(this._exprStr));\n }\n\n return false;\n }\n /**\n * Processes an array of tokens iteratively through the {@link #addToken}\n * function.\n * @param {Array<{type: <string>}>} tokens An array of tokens, as provided by\n * the {@link Lexer#tokenize} function.\n */\n\n }, {\n key: \"addTokens\",\n value: function addTokens(tokens) {\n tokens.forEach(this.addToken, this);\n }\n /**\n * Marks this Parser instance as completed and retrieves the full AST.\n * @returns {{}|null} a full expression tree, ready for evaluation by the\n * {@link Evaluator#eval} function, or null if no tokens were passed to\n * the parser before complete was called\n * @throws {Error} if the parser is not in a state where it's legal to end\n * the expression, indicating that the expression is incomplete\n */\n\n }, {\n key: \"complete\",\n value: function complete() {\n if (this._cursor && !states[this._state].completable) {\n throw new Error(\"Unexpected end of expression: \".concat(this._exprStr));\n }\n\n if (this._subParser) {\n this._endSubExpression();\n }\n\n this._state = 'complete';\n return this._cursor ? this._tree : null;\n }\n /**\n * Indicates whether the expression tree contains a relative path identifier.\n * @returns {boolean} true if a relative identifier exists false otherwise.\n */\n\n }, {\n key: \"isRelative\",\n value: function isRelative() {\n return this._relative;\n }\n /**\n * Ends a subexpression by completing the subParser and passing its result\n * to the subHandler configured in the current state.\n * @private\n */\n\n }, {\n key: \"_endSubExpression\",\n value: function _endSubExpression() {\n states[this._state].subHandler.call(this, this._subParser.complete());\n\n this._subParser = null;\n }\n /**\n * Places a new tree node at the current position of the cursor (to the 'right'\n * property) and then advances the cursor to the new node. This function also\n * handles setting the parent of the new node.\n * @param {{type: <string>}} node A node to be added to the AST\n * @private\n */\n\n }, {\n key: \"_placeAtCursor\",\n value: function _placeAtCursor(node) {\n if (!this._cursor) {\n this._tree = node;\n } else {\n this._cursor.right = node;\n\n this._setParent(node, this._cursor);\n }\n\n this._cursor = node;\n }\n /**\n * Places a tree node before the current position of the cursor, replacing\n * the node that the cursor currently points to. This should only be called in\n * cases where the cursor is known to exist, and the provided node already\n * contains a pointer to what's at the cursor currently.\n * @param {{type: <string>}} node A node to be added to the AST\n * @private\n */\n\n }, {\n key: \"_placeBeforeCursor\",\n value: function _placeBeforeCursor(node) {\n this._cursor = this._cursor._parent;\n\n this._placeAtCursor(node);\n }\n /**\n * Sets the parent of a node by creating a non-enumerable _parent property\n * that points to the supplied parent argument.\n * @param {{type: <string>}} node A node of the AST on which to set a new\n * parent\n * @param {{type: <string>}} parent An existing node of the AST to serve as the\n * parent of the new node\n * @private\n */\n\n }, {\n key: \"_setParent\",\n value: function _setParent(node, parent) {\n Object.defineProperty(node, '_parent', {\n value: parent,\n writable: true\n });\n }\n /**\n * Prepares the Parser to accept a subexpression by (re)instantiating the\n * subParser.\n * @param {string} [exprStr] The expression string to prefix to the new Parser\n * @private\n */\n\n }, {\n key: \"_startSubExpression\",\n value: function _startSubExpression(exprStr) {\n var endStates = states[this._state].endStates;\n\n if (!endStates) {\n this._parentStop = true;\n endStates = this._stopMap;\n }\n\n this._subParser = new Parser(this._grammar, exprStr, endStates);\n }\n }]);\n return Parser;\n}();\n\nmodule.exports = Parser;",
40
+ "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar PromiseSync = /*#__PURE__*/function () {\n function PromiseSync(fn) {\n (0, _classCallCheck2.default)(this, PromiseSync);\n fn(this._resolve.bind(this), this._reject.bind(this));\n }\n\n (0, _createClass2.default)(PromiseSync, [{\n key: \"catch\",\n value: function _catch(rejected) {\n if (this.error) {\n try {\n this._resolve(rejected(this.error));\n } catch (e) {\n this._reject(e);\n }\n }\n\n return this;\n }\n }, {\n key: \"then\",\n value: function then(resolved, rejected) {\n if (!this.error) {\n try {\n this._resolve(resolved(this.value));\n } catch (e) {\n this._reject(e);\n }\n }\n\n if (rejected) this.catch(rejected);\n return this;\n }\n }, {\n key: \"_reject\",\n value: function _reject(error) {\n this.value = undefined;\n this.error = error;\n }\n }, {\n key: \"_resolve\",\n value: function _resolve(val) {\n if (val instanceof PromiseSync) {\n if (val.error) {\n this._reject(val.error);\n } else {\n this._resolve(val.value);\n }\n } else {\n this.value = val;\n this.error = undefined;\n }\n }\n }]);\n return PromiseSync;\n}();\n\nPromiseSync.all = function (vals) {\n return new PromiseSync(function (resolve) {\n var resolved = vals.map(function (val) {\n while (val instanceof PromiseSync) {\n if (val.error) throw Error(val.error);\n val = val.value;\n }\n\n return val;\n });\n resolve(resolved);\n });\n};\n\nPromiseSync.resolve = function (val) {\n return new PromiseSync(function (resolve) {\n return resolve(val);\n });\n};\n\nPromiseSync.reject = function (error) {\n return new PromiseSync(function (resolve, reject) {\n return reject(error);\n });\n};\n\nmodule.exports = PromiseSync;",
41
+ "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar Evaluator = require('./evaluator/Evaluator');\n\nvar Lexer = require('./Lexer');\n\nvar Parser = require('./parser/Parser');\n\nvar PromiseSync = require('./PromiseSync');\n\nvar Expression = /*#__PURE__*/function () {\n function Expression(grammar, exprStr) {\n (0, _classCallCheck2.default)(this, Expression);\n this._grammar = grammar;\n this._exprStr = exprStr;\n this._ast = null;\n }\n /**\n * Forces a compilation of the expression string that this Expression object\n * was constructed with. This function can be called multiple times; useful\n * if the language elements of the associated Jexl instance change.\n * @returns {Expression} this Expression instance, for convenience\n */\n\n\n (0, _createClass2.default)(Expression, [{\n key: \"compile\",\n value: function compile() {\n var lexer = new Lexer(this._grammar);\n var parser = new Parser(this._grammar);\n var tokens = lexer.tokenize(this._exprStr);\n parser.addTokens(tokens);\n this._ast = parser.complete();\n return this;\n }\n /**\n * Asynchronously evaluates the expression within an optional context.\n * @param {Object} [context] A mapping of variables to values, which will be\n * made accessible to the Jexl expression when evaluating it\n * @returns {Promise<*>} resolves with the result of the evaluation.\n */\n\n }, {\n key: \"eval\",\n value: function _eval() {\n var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this._eval(context, Promise);\n }\n /**\n * Synchronously evaluates the expression within an optional context.\n * @param {Object} [context] A mapping of variables to values, which will be\n * made accessible to the Jexl expression when evaluating it\n * @returns {*} the result of the evaluation.\n * @throws {*} on error\n */\n\n }, {\n key: \"evalSync\",\n value: function evalSync() {\n var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var res = this._eval(context, PromiseSync);\n\n if (res.error) throw res.error;\n return res.value;\n }\n }, {\n key: \"_eval\",\n value: function _eval(context, promise) {\n var _this = this;\n\n return promise.resolve().then(function () {\n var ast = _this._getAst();\n\n var evaluator = new Evaluator(_this._grammar, context, undefined, promise);\n return evaluator.eval(ast);\n });\n }\n }, {\n key: \"_getAst\",\n value: function _getAst() {\n if (!this._ast) this.compile();\n return this._ast;\n }\n }]);\n return Expression;\n}();\n\nmodule.exports = Expression;",
42
+ "\"use strict\";\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\n\n/* eslint eqeqeq:0 */\nexports.getGrammar = function () {\n return {\n /**\n * A map of all expression elements to their properties. Note that changes\n * here may require changes in the Lexer or Parser.\n * @type {{}}\n */\n elements: {\n '.': {\n type: 'dot'\n },\n '[': {\n type: 'openBracket'\n },\n ']': {\n type: 'closeBracket'\n },\n '|': {\n type: 'pipe'\n },\n '{': {\n type: 'openCurl'\n },\n '}': {\n type: 'closeCurl'\n },\n ':': {\n type: 'colon'\n },\n ',': {\n type: 'comma'\n },\n '(': {\n type: 'openParen'\n },\n ')': {\n type: 'closeParen'\n },\n '?': {\n type: 'question'\n },\n '+': {\n type: 'binaryOp',\n precedence: 30,\n eval: function _eval(left, right) {\n return left + right;\n }\n },\n '-': {\n type: 'binaryOp',\n precedence: 30,\n eval: function _eval(left, right) {\n return left - right;\n }\n },\n '*': {\n type: 'binaryOp',\n precedence: 40,\n eval: function _eval(left, right) {\n return left * right;\n }\n },\n '/': {\n type: 'binaryOp',\n precedence: 40,\n eval: function _eval(left, right) {\n return left / right;\n }\n },\n '//': {\n type: 'binaryOp',\n precedence: 40,\n eval: function _eval(left, right) {\n return Math.floor(left / right);\n }\n },\n '%': {\n type: 'binaryOp',\n precedence: 50,\n eval: function _eval(left, right) {\n return left % right;\n }\n },\n '^': {\n type: 'binaryOp',\n precedence: 50,\n eval: function _eval(left, right) {\n return Math.pow(left, right);\n }\n },\n '==': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left == right;\n }\n },\n '!=': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left != right;\n }\n },\n '>': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left > right;\n }\n },\n '>=': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left >= right;\n }\n },\n '<': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left < right;\n }\n },\n '<=': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left <= right;\n }\n },\n '&&': {\n type: 'binaryOp',\n precedence: 10,\n evalOnDemand: function evalOnDemand(left, right) {\n return left.eval().then(function (leftVal) {\n if (!leftVal) return leftVal;\n return right.eval();\n });\n }\n },\n '||': {\n type: 'binaryOp',\n precedence: 10,\n evalOnDemand: function evalOnDemand(left, right) {\n return left.eval().then(function (leftVal) {\n if (leftVal) return leftVal;\n return right.eval();\n });\n }\n },\n in: {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n if (typeof right === 'string') {\n return right.indexOf(left) !== -1;\n }\n\n if (Array.isArray(right)) {\n return right.some(function (elem) {\n return elem === left;\n });\n }\n\n return false;\n }\n },\n '!': {\n type: 'unaryOp',\n precedence: Infinity,\n eval: function _eval(right) {\n return !right;\n }\n }\n },\n\n /**\n * A map of function names to javascript functions. A Jexl function\n * takes zero ore more arguemnts:\n *\n * - {*} ...args: A variable number of arguments passed to this function.\n * All of these are pre-evaluated to their actual values before calling\n * the function.\n *\n * The Jexl function should return either the transformed value, or\n * a Promises/A+ Promise object that resolves with the value and rejects\n * or throws only when an unrecoverable error occurs. Functions should\n * generally return undefined when they don't make sense to be used on the\n * given value type, rather than throw/reject. An error is only\n * appropriate when the function would normally return a value, but\n * cannot due to some other failure.\n */\n functions: {},\n\n /**\n * A map of transform names to transform functions. A transform function\n * takes one ore more arguemnts:\n *\n * - {*} val: A value to be transformed\n * - {*} ...args: A variable number of arguments passed to this transform.\n * All of these are pre-evaluated to their actual values before calling\n * the function.\n *\n * The transform function should return either the transformed value, or\n * a Promises/A+ Promise object that resolves with the value and rejects\n * or throws only when an unrecoverable error occurs. Transforms should\n * generally return undefined when they don't make sense to be used on the\n * given value type, rather than throw/reject. An error is only\n * appropriate when the transform would normally return a value, but\n * cannot due to some other failure.\n */\n transforms: {}\n };\n};",
43
+ "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar Expression = require('./Expression');\n\nvar _require = require('./grammar'),\n getGrammar = _require.getGrammar;\n/**\n * Jexl is the Javascript Expression Language, capable of parsing and\n * evaluating basic to complex expression strings, combined with advanced\n * xpath-like drilldown into native Javascript objects.\n * @constructor\n */\n\n\nvar Jexl = /*#__PURE__*/function () {\n function Jexl() {\n (0, _classCallCheck2.default)(this, Jexl);\n // Allow expr to be called outside of the jexl context\n this.expr = this.expr.bind(this);\n this._grammar = getGrammar();\n }\n /**\n * Adds a binary operator to Jexl at the specified precedence. The higher the\n * precedence, the earlier the operator is applied in the order of operations.\n * For example, * has a higher precedence than +, because multiplication comes\n * before division.\n *\n * Please see grammar.js for a listing of all default operators and their\n * precedence values in order to choose the appropriate precedence for the\n * new operator.\n * @param {string} operator The operator string to be added\n * @param {number} precedence The operator's precedence\n * @param {function} fn A function to run to calculate the result. The function\n * will be called with two arguments: left and right, denoting the values\n * on either side of the operator. It should return either the resulting\n * value, or a Promise that resolves with the resulting value.\n * @param {boolean} [manualEval] If true, the `left` and `right` arguments\n * will be wrapped in objects with an `eval` function. Calling\n * left.eval() or right.eval() will return a promise that resolves to\n * that operand's actual value. This is useful to conditionally evaluate\n * operands.\n */\n\n\n (0, _createClass2.default)(Jexl, [{\n key: \"addBinaryOp\",\n value: function addBinaryOp(operator, precedence, fn, manualEval) {\n this._addGrammarElement(operator, (0, _defineProperty2.default)({\n type: 'binaryOp',\n precedence: precedence\n }, manualEval ? 'evalOnDemand' : 'eval', fn));\n }\n /**\n * Adds or replaces an expression function in this Jexl instance.\n * @param {string} name The name of the expression function, as it will be\n * used within Jexl expressions\n * @param {function} fn The javascript function to be executed when this\n * expression function is invoked. It will be provided with each argument\n * supplied in the expression, in the same order.\n */\n\n }, {\n key: \"addFunction\",\n value: function addFunction(name, fn) {\n this._grammar.functions[name] = fn;\n }\n /**\n * Syntactic sugar for calling {@link #addFunction} repeatedly. This function\n * accepts a map of one or more expression function names to their javascript\n * function counterpart.\n * @param {{}} map A map of expression function names to javascript functions\n */\n\n }, {\n key: \"addFunctions\",\n value: function addFunctions(map) {\n for (var key in map) {\n this._grammar.functions[key] = map[key];\n }\n }\n /**\n * Adds a unary operator to Jexl. Unary operators are currently only supported\n * on the left side of the value on which it will operate.\n * @param {string} operator The operator string to be added\n * @param {function} fn A function to run to calculate the result. The function\n * will be called with one argument: the literal value to the right of the\n * operator. It should return either the resulting value, or a Promise\n * that resolves with the resulting value.\n */\n\n }, {\n key: \"addUnaryOp\",\n value: function addUnaryOp(operator, fn) {\n this._addGrammarElement(operator, {\n type: 'unaryOp',\n weight: Infinity,\n eval: fn\n });\n }\n /**\n * Adds or replaces a transform function in this Jexl instance.\n * @param {string} name The name of the transform function, as it will be used\n * within Jexl expressions\n * @param {function} fn The function to be executed when this transform is\n * invoked. It will be provided with at least one argument:\n * - {*} value: The value to be transformed\n * - {...*} args: The arguments for this transform\n */\n\n }, {\n key: \"addTransform\",\n value: function addTransform(name, fn) {\n this._grammar.transforms[name] = fn;\n }\n /**\n * Syntactic sugar for calling {@link #addTransform} repeatedly. This function\n * accepts a map of one or more transform names to their transform function.\n * @param {{}} map A map of transform names to transform functions\n */\n\n }, {\n key: \"addTransforms\",\n value: function addTransforms(map) {\n for (var key in map) {\n this._grammar.transforms[key] = map[key];\n }\n }\n /**\n * Creates an Expression object from the given Jexl expression string, and\n * immediately compiles it. The returned Expression object can then be\n * evaluated multiple times with new contexts, without generating any\n * additional string processing overhead.\n * @param {string} expression The Jexl expression to be compiled\n * @returns {Expression} The compiled Expression object\n */\n\n }, {\n key: \"compile\",\n value: function compile(expression) {\n var exprObj = this.createExpression(expression);\n return exprObj.compile();\n }\n /**\n * Constructs an Expression object from a Jexl expression string.\n * @param {string} expression The Jexl expression to be wrapped in an\n * Expression object\n * @returns {Expression} The Expression object representing the given string\n */\n\n }, {\n key: \"createExpression\",\n value: function createExpression(expression) {\n return new Expression(this._grammar, expression);\n }\n /**\n * Retrieves a previously set expression function.\n * @param {string} name The name of the expression function\n * @returns {function} The expression function\n */\n\n }, {\n key: \"getFunction\",\n value: function getFunction(name) {\n return this._grammar.functions[name];\n }\n /**\n * Retrieves a previously set transform function.\n * @param {string} name The name of the transform function\n * @returns {function} The transform function\n */\n\n }, {\n key: \"getTransform\",\n value: function getTransform(name) {\n return this._grammar.transforms[name];\n }\n /**\n * Asynchronously evaluates a Jexl string within an optional context.\n * @param {string} expression The Jexl expression to be evaluated\n * @param {Object} [context] A mapping of variables to values, which will be\n * made accessible to the Jexl expression when evaluating it\n * @returns {Promise<*>} resolves with the result of the evaluation.\n */\n\n }, {\n key: \"eval\",\n value: function _eval(expression) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var exprObj = this.createExpression(expression);\n return exprObj.eval(context);\n }\n /**\n * Synchronously evaluates a Jexl string within an optional context.\n * @param {string} expression The Jexl expression to be evaluated\n * @param {Object} [context] A mapping of variables to values, which will be\n * made accessible to the Jexl expression when evaluating it\n * @returns {*} the result of the evaluation.\n * @throws {*} on error\n */\n\n }, {\n key: \"evalSync\",\n value: function evalSync(expression) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var exprObj = this.createExpression(expression);\n return exprObj.evalSync(context);\n }\n /**\n * A JavaScript template literal to allow expressions to be defined by the\n * syntax: expr`40 + 2`\n * @param {Array<string>} strs\n * @param {...any} args\n */\n\n }, {\n key: \"expr\",\n value: function expr(strs) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var exprStr = strs.reduce(function (acc, str, idx) {\n var arg = idx < args.length ? args[idx] : '';\n acc += str + arg;\n return acc;\n }, '');\n return this.createExpression(exprStr);\n }\n /**\n * Removes a binary or unary operator from the Jexl grammar.\n * @param {string} operator The operator string to be removed\n */\n\n }, {\n key: \"removeOp\",\n value: function removeOp(operator) {\n if (this._grammar.elements[operator] && (this._grammar.elements[operator].type === 'binaryOp' || this._grammar.elements[operator].type === 'unaryOp')) {\n delete this._grammar.elements[operator];\n }\n }\n /**\n * Adds an element to the grammar map used by this Jexl instance.\n * @param {string} str The key string to be added\n * @param {{type: <string>}} obj A map of configuration options for this\n * grammar element\n * @private\n */\n\n }, {\n key: \"_addGrammarElement\",\n value: function _addGrammarElement(str, obj) {\n this._grammar.elements[str] = obj;\n }\n }]);\n return Jexl;\n}();\n\nmodule.exports = new Jexl();\nmodule.exports.Jexl = Jexl;",
44
+ "let messages = [];\nlet level = 0;\n\nconst debug = (msg, min) => {\n if (level >= min) {\n messages.push(msg);\n }\n};\n\ndebug.WARN = 1;\ndebug.INFO = 2;\ndebug.DEBUG = 3;\n\ndebug.reset = () => {\n messages = [];\n};\n\ndebug.setDebugLevel = (v) => {\n level = v;\n};\n\ndebug.warn = (msg) => debug(msg, debug.WARN);\ndebug.info = (msg) => debug(msg, debug.INFO);\ndebug.debug = (msg) => debug(msg, debug.DEBUG);\n\ndebug.debugMessages = () => messages;\n\nmodule.exports = debug;\n",
45
+ "'use strict';\n\nmodule.exports = ({onlyFirst = false} = {}) => {\n\tconst pattern = [\n\t\t'[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n};\n",
46
+ "'use strict';\nconst ansiRegex = require('ansi-regex');\n\nmodule.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;\n",
47
+ "/* eslint-disable yoda */\n'use strict';\n\nconst isFullwidthCodePoint = codePoint => {\n\tif (Number.isNaN(codePoint)) {\n\t\treturn false;\n\t}\n\n\t// Code points are derived from:\n\t// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt\n\tif (\n\t\tcodePoint >= 0x1100 && (\n\t\t\tcodePoint <= 0x115F || // Hangul Jamo\n\t\t\tcodePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET\n\t\t\tcodePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET\n\t\t\t// CJK Radicals Supplement .. Enclosed CJK Letters and Months\n\t\t\t(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||\n\t\t\t// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A\n\t\t\t(0x3250 <= codePoint && codePoint <= 0x4DBF) ||\n\t\t\t// CJK Unified Ideographs .. Yi Radicals\n\t\t\t(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||\n\t\t\t// Hangul Jamo Extended-A\n\t\t\t(0xA960 <= codePoint && codePoint <= 0xA97C) ||\n\t\t\t// Hangul Syllables\n\t\t\t(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||\n\t\t\t// CJK Compatibility Ideographs\n\t\t\t(0xF900 <= codePoint && codePoint <= 0xFAFF) ||\n\t\t\t// Vertical Forms\n\t\t\t(0xFE10 <= codePoint && codePoint <= 0xFE19) ||\n\t\t\t// CJK Compatibility Forms .. Small Form Variants\n\t\t\t(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||\n\t\t\t// Halfwidth and Fullwidth Forms\n\t\t\t(0xFF01 <= codePoint && codePoint <= 0xFF60) ||\n\t\t\t(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||\n\t\t\t// Kana Supplement\n\t\t\t(0x1B000 <= codePoint && codePoint <= 0x1B001) ||\n\t\t\t// Enclosed Ideographic Supplement\n\t\t\t(0x1F200 <= codePoint && codePoint <= 0x1F251) ||\n\t\t\t// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane\n\t\t\t(0x20000 <= codePoint && codePoint <= 0x3FFFD)\n\t\t)\n\t) {\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nmodule.exports = isFullwidthCodePoint;\nmodule.exports.default = isFullwidthCodePoint;\n",
48
+ "\"use strict\";\n\nmodule.exports = function () {\n // https://mths.be/emoji\n return /\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F|\\uD83D\\uDC68(?:\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C\\uDFFB|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83D[\\uDC66\\uDC67]|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C[\\uDFFB-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)\\uD83C\\uDFFB|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83D\\uDC69(?:\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\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\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|(?:(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)\\uFE0F|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDE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\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5\\uDEEB\\uDEEC\\uDEF4-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g;\n};\n",
49
+ "'use strict';\nconst stripAnsi = require('strip-ansi');\nconst isFullwidthCodePoint = require('is-fullwidth-code-point');\nconst emojiRegex = require('emoji-regex');\n\nconst stringWidth = string => {\n\tif (typeof string !== 'string' || string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tstring = stripAnsi(string);\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tstring = string.replace(emojiRegex(), ' ');\n\n\tlet width = 0;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst code = string.codePointAt(i);\n\n\t\t// Ignore control characters\n\t\tif (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore combining characters\n\t\tif (code >= 0x300 && code <= 0x36F) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Surrogates\n\t\tif (code > 0xFFFF) {\n\t\t\ti++;\n\t\t}\n\n\t\twidth += isFullwidthCodePoint(code) ? 2 : 1;\n\t}\n\n\treturn width;\n};\n\nmodule.exports = stringWidth;\n// TODO: remove this in the next major version\nmodule.exports.default = stringWidth;\n",
50
+ "const stringWidth = require('string-width');\n\nfunction codeRegex(capture) {\n return capture ? /\\u001b\\[((?:\\d*;){0,5}\\d*)m/g : /\\u001b\\[(?:\\d*;){0,5}\\d*m/g;\n}\n\nfunction strlen(str) {\n let code = codeRegex();\n let stripped = ('' + str).replace(code, '');\n let split = stripped.split('\\n');\n return split.reduce(function (memo, s) {\n return stringWidth(s) > memo ? stringWidth(s) : memo;\n }, 0);\n}\n\nfunction repeat(str, times) {\n return Array(times + 1).join(str);\n}\n\nfunction pad(str, len, pad, dir) {\n let length = strlen(str);\n if (len + 1 >= length) {\n let padlen = len - length;\n switch (dir) {\n case 'right': {\n str = repeat(pad, padlen) + str;\n break;\n }\n case 'center': {\n let right = Math.ceil(padlen / 2);\n let left = padlen - right;\n str = repeat(pad, left) + str + repeat(pad, right);\n break;\n }\n default: {\n str = str + repeat(pad, padlen);\n break;\n }\n }\n }\n return str;\n}\n\nlet codeCache = {};\n\nfunction addToCodeCache(name, on, off) {\n on = '\\u001b[' + on + 'm';\n off = '\\u001b[' + off + 'm';\n codeCache[on] = { set: name, to: true };\n codeCache[off] = { set: name, to: false };\n codeCache[name] = { on: on, off: off };\n}\n\n//https://github.com/Marak/colors.js/blob/master/lib/styles.js\naddToCodeCache('bold', 1, 22);\naddToCodeCache('italics', 3, 23);\naddToCodeCache('underline', 4, 24);\naddToCodeCache('inverse', 7, 27);\naddToCodeCache('strikethrough', 9, 29);\n\nfunction updateState(state, controlChars) {\n let controlCode = controlChars[1] ? parseInt(controlChars[1].split(';')[0]) : 0;\n if ((controlCode >= 30 && controlCode <= 39) || (controlCode >= 90 && controlCode <= 97)) {\n state.lastForegroundAdded = controlChars[0];\n return;\n }\n if ((controlCode >= 40 && controlCode <= 49) || (controlCode >= 100 && controlCode <= 107)) {\n state.lastBackgroundAdded = controlChars[0];\n return;\n }\n if (controlCode === 0) {\n for (let i in state) {\n /* istanbul ignore else */\n if (Object.prototype.hasOwnProperty.call(state, i)) {\n delete state[i];\n }\n }\n return;\n }\n let info = codeCache[controlChars[0]];\n if (info) {\n state[info.set] = info.to;\n }\n}\n\nfunction readState(line) {\n let code = codeRegex(true);\n let controlChars = code.exec(line);\n let state = {};\n while (controlChars !== null) {\n updateState(state, controlChars);\n controlChars = code.exec(line);\n }\n return state;\n}\n\nfunction unwindState(state, ret) {\n let lastBackgroundAdded = state.lastBackgroundAdded;\n let lastForegroundAdded = state.lastForegroundAdded;\n\n delete state.lastBackgroundAdded;\n delete state.lastForegroundAdded;\n\n Object.keys(state).forEach(function (key) {\n if (state[key]) {\n ret += codeCache[key].off;\n }\n });\n\n if (lastBackgroundAdded && lastBackgroundAdded != '\\u001b[49m') {\n ret += '\\u001b[49m';\n }\n if (lastForegroundAdded && lastForegroundAdded != '\\u001b[39m') {\n ret += '\\u001b[39m';\n }\n\n return ret;\n}\n\nfunction rewindState(state, ret) {\n let lastBackgroundAdded = state.lastBackgroundAdded;\n let lastForegroundAdded = state.lastForegroundAdded;\n\n delete state.lastBackgroundAdded;\n delete state.lastForegroundAdded;\n\n Object.keys(state).forEach(function (key) {\n if (state[key]) {\n ret = codeCache[key].on + ret;\n }\n });\n\n if (lastBackgroundAdded && lastBackgroundAdded != '\\u001b[49m') {\n ret = lastBackgroundAdded + ret;\n }\n if (lastForegroundAdded && lastForegroundAdded != '\\u001b[39m') {\n ret = lastForegroundAdded + ret;\n }\n\n return ret;\n}\n\nfunction truncateWidth(str, desiredLength) {\n if (str.length === strlen(str)) {\n return str.substr(0, desiredLength);\n }\n\n while (strlen(str) > desiredLength) {\n str = str.slice(0, -1);\n }\n\n return str;\n}\n\nfunction truncateWidthWithAnsi(str, desiredLength) {\n let code = codeRegex(true);\n let split = str.split(codeRegex());\n let splitIndex = 0;\n let retLen = 0;\n let ret = '';\n let myArray;\n let state = {};\n\n while (retLen < desiredLength) {\n myArray = code.exec(str);\n let toAdd = split[splitIndex];\n splitIndex++;\n if (retLen + strlen(toAdd) > desiredLength) {\n toAdd = truncateWidth(toAdd, desiredLength - retLen);\n }\n ret += toAdd;\n retLen += strlen(toAdd);\n\n if (retLen < desiredLength) {\n if (!myArray) {\n break;\n } // full-width chars may cause a whitespace which cannot be filled\n ret += myArray[0];\n updateState(state, myArray);\n }\n }\n\n return unwindState(state, ret);\n}\n\nfunction truncate(str, desiredLength, truncateChar) {\n truncateChar = truncateChar || '…';\n let lengthOfStr = strlen(str);\n if (lengthOfStr <= desiredLength) {\n return str;\n }\n desiredLength -= strlen(truncateChar);\n\n let ret = truncateWidthWithAnsi(str, desiredLength);\n\n ret += truncateChar;\n\n const hrefTag = '\\x1B]8;;\\x07';\n\n if (str.includes(hrefTag) && !ret.includes(hrefTag)) {\n ret += hrefTag;\n }\n\n return ret;\n}\n\nfunction defaultOptions() {\n return {\n chars: {\n top: '─',\n 'top-mid': '┬',\n 'top-left': '┌',\n 'top-right': '┐',\n bottom: '─',\n 'bottom-mid': '┴',\n 'bottom-left': '└',\n 'bottom-right': '┘',\n left: '│',\n 'left-mid': '├',\n mid: '─',\n 'mid-mid': '┼',\n right: '│',\n 'right-mid': '┤',\n middle: '│',\n },\n truncate: '…',\n colWidths: [],\n rowHeights: [],\n colAligns: [],\n rowAligns: [],\n style: {\n 'padding-left': 1,\n 'padding-right': 1,\n head: ['red'],\n border: ['grey'],\n compact: false,\n },\n head: [],\n };\n}\n\nfunction mergeOptions(options, defaults) {\n options = options || {};\n defaults = defaults || defaultOptions();\n let ret = Object.assign({}, defaults, options);\n ret.chars = Object.assign({}, defaults.chars, options.chars);\n ret.style = Object.assign({}, defaults.style, options.style);\n return ret;\n}\n\n// Wrap on word boundary\nfunction wordWrap(maxLength, input) {\n let lines = [];\n let split = input.split(/(\\s+)/g);\n let line = [];\n let lineLength = 0;\n let whitespace;\n for (let i = 0; i < split.length; i += 2) {\n let word = split[i];\n let newLength = lineLength + strlen(word);\n if (lineLength > 0 && whitespace) {\n newLength += whitespace.length;\n }\n if (newLength > maxLength) {\n if (lineLength !== 0) {\n lines.push(line.join(''));\n }\n line = [word];\n lineLength = strlen(word);\n } else {\n line.push(whitespace || '', word);\n lineLength = newLength;\n }\n whitespace = split[i + 1];\n }\n if (lineLength) {\n lines.push(line.join(''));\n }\n return lines;\n}\n\n// Wrap text (ignoring word boundaries)\nfunction textWrap(maxLength, input) {\n let lines = [];\n let line = '';\n function pushLine(str, ws) {\n if (line.length && ws) line += ws;\n line += str;\n while (line.length > maxLength) {\n lines.push(line.slice(0, maxLength));\n line = line.slice(maxLength);\n }\n }\n let split = input.split(/(\\s+)/g);\n for (let i = 0; i < split.length; i += 2) {\n pushLine(split[i], i && split[i - 1]);\n }\n if (line.length) lines.push(line);\n return lines;\n}\n\nfunction multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {\n let output = [];\n input = input.split('\\n');\n const handler = wrapOnWordBoundary ? wordWrap : textWrap;\n for (let i = 0; i < input.length; i++) {\n output.push.apply(output, handler(maxLength, input[i]));\n }\n return output;\n}\n\nfunction colorizeLines(input) {\n let state = {};\n let output = [];\n for (let i = 0; i < input.length; i++) {\n let line = rewindState(state, input[i]);\n state = readState(line);\n let temp = Object.assign({}, state);\n output.push(unwindState(temp, line));\n }\n return output;\n}\n\n/**\n * Credit: Matheus Sampaio https://github.com/matheussampaio\n */\nfunction hyperlink(url, text) {\n const OSC = '\\u001B]';\n const BEL = '\\u0007';\n const SEP = ';';\n\n return [OSC, '8', SEP, SEP, url || text, BEL, text, OSC, '8', SEP, SEP, BEL].join('');\n}\n\nmodule.exports = {\n strlen: strlen,\n repeat: repeat,\n pad: pad,\n truncate: truncate,\n mergeOptions: mergeOptions,\n wordWrap: multiLineWordWrap,\n colorizeLines: colorizeLines,\n hyperlink,\n};\n",
51
+ "/*\nThe MIT License (MIT)\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\nvar styles = {};\nmodule['exports'] = styles;\n\nvar codes = {\n reset: [0, 0],\n\n bold: [1, 22],\n dim: [2, 22],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n grey: [90, 39],\n\n brightRed: [91, 39],\n brightGreen: [92, 39],\n brightYellow: [93, 39],\n brightBlue: [94, 39],\n brightMagenta: [95, 39],\n brightCyan: [96, 39],\n brightWhite: [97, 39],\n\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n bgGray: [100, 49],\n bgGrey: [100, 49],\n\n bgBrightRed: [101, 49],\n bgBrightGreen: [102, 49],\n bgBrightYellow: [103, 49],\n bgBrightBlue: [104, 49],\n bgBrightMagenta: [105, 49],\n bgBrightCyan: [106, 49],\n bgBrightWhite: [107, 49],\n\n // legacy styles for colors pre v1.0.0\n blackBG: [40, 49],\n redBG: [41, 49],\n greenBG: [42, 49],\n yellowBG: [43, 49],\n blueBG: [44, 49],\n magentaBG: [45, 49],\n cyanBG: [46, 49],\n whiteBG: [47, 49],\n\n};\n\nObject.keys(codes).forEach(function(key) {\n var val = codes[key];\n var style = styles[key] = [];\n style.open = '\\u001b[' + val[0] + 'm';\n style.close = '\\u001b[' + val[1] + 'm';\n});\n",
52
+ "/*\nMIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n'use strict';\n\nmodule.exports = function(flag, argv) {\n argv = argv || process.argv;\n\n var terminatorPos = argv.indexOf('--');\n var prefix = /^-{1,2}/.test(flag) ? '' : '--';\n var pos = argv.indexOf(prefix + flag);\n\n return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n",
53
+ "/*\nThe MIT License (MIT)\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\n'use strict';\n\nvar os = require('os');\nvar hasFlag = require('./has-flag.js');\n\nvar env = process.env;\n\nvar forceColor = void 0;\nif (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {\n forceColor = false;\n} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true')\n || hasFlag('color=always')) {\n forceColor = true;\n}\nif ('FORCE_COLOR' in env) {\n forceColor = env.FORCE_COLOR.length === 0\n || parseInt(env.FORCE_COLOR, 10) !== 0;\n}\n\nfunction translateLevel(level) {\n if (level === 0) {\n return false;\n }\n\n return {\n level: level,\n hasBasic: true,\n has256: level >= 2,\n has16m: level >= 3,\n };\n}\n\nfunction supportsColor(stream) {\n if (forceColor === false) {\n return 0;\n }\n\n if (hasFlag('color=16m') || hasFlag('color=full')\n || hasFlag('color=truecolor')) {\n return 3;\n }\n\n if (hasFlag('color=256')) {\n return 2;\n }\n\n if (stream && !stream.isTTY && forceColor !== true) {\n return 0;\n }\n\n var min = forceColor ? 1 : 0;\n\n if (process.platform === 'win32') {\n // Node.js 7.5.0 is the first version of Node.js to include a patch to\n // libuv that enables 256 color output on Windows. Anything earlier and it\n // won't work. However, here we target Node.js 8 at minimum as it is an LTS\n // release, and Node.js 7 is not. Windows 10 build 10586 is the first\n // Windows release that supports 256 colors. Windows 10 build 14931 is the\n // first release that supports 16m/TrueColor.\n var osRelease = os.release().split('.');\n if (Number(process.versions.node.split('.')[0]) >= 8\n && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {\n return Number(osRelease[2]) >= 14931 ? 3 : 2;\n }\n\n return 1;\n }\n\n if ('CI' in env) {\n if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) {\n return sign in env;\n }) || env.CI_NAME === 'codeship') {\n return 1;\n }\n\n return min;\n }\n\n if ('TEAMCITY_VERSION' in env) {\n return (/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0\n );\n }\n\n if ('TERM_PROGRAM' in env) {\n var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n switch (env.TERM_PROGRAM) {\n case 'iTerm.app':\n return version >= 3 ? 3 : 2;\n case 'Hyper':\n return 3;\n case 'Apple_Terminal':\n return 2;\n // No default\n }\n }\n\n if (/-256(color)?$/i.test(env.TERM)) {\n return 2;\n }\n\n if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n return 1;\n }\n\n if ('COLORTERM' in env) {\n return 1;\n }\n\n if (env.TERM === 'dumb') {\n return min;\n }\n\n return min;\n}\n\nfunction getSupportLevel(stream) {\n var level = supportsColor(stream);\n return translateLevel(level);\n}\n\nmodule.exports = {\n supportsColor: getSupportLevel,\n stdout: getSupportLevel(process.stdout),\n stderr: getSupportLevel(process.stderr),\n};\n",
54
+ "module['exports'] = function runTheTrap(text, options) {\n var result = '';\n text = text || 'Run the trap, drop the bass';\n text = text.split('');\n var trap = {\n a: ['\\u0040', '\\u0104', '\\u023a', '\\u0245', '\\u0394', '\\u039b', '\\u0414'],\n b: ['\\u00df', '\\u0181', '\\u0243', '\\u026e', '\\u03b2', '\\u0e3f'],\n c: ['\\u00a9', '\\u023b', '\\u03fe'],\n d: ['\\u00d0', '\\u018a', '\\u0500', '\\u0501', '\\u0502', '\\u0503'],\n e: ['\\u00cb', '\\u0115', '\\u018e', '\\u0258', '\\u03a3', '\\u03be', '\\u04bc',\n '\\u0a6c'],\n f: ['\\u04fa'],\n g: ['\\u0262'],\n h: ['\\u0126', '\\u0195', '\\u04a2', '\\u04ba', '\\u04c7', '\\u050a'],\n i: ['\\u0f0f'],\n j: ['\\u0134'],\n k: ['\\u0138', '\\u04a0', '\\u04c3', '\\u051e'],\n l: ['\\u0139'],\n m: ['\\u028d', '\\u04cd', '\\u04ce', '\\u0520', '\\u0521', '\\u0d69'],\n n: ['\\u00d1', '\\u014b', '\\u019d', '\\u0376', '\\u03a0', '\\u048a'],\n o: ['\\u00d8', '\\u00f5', '\\u00f8', '\\u01fe', '\\u0298', '\\u047a', '\\u05dd',\n '\\u06dd', '\\u0e4f'],\n p: ['\\u01f7', '\\u048e'],\n q: ['\\u09cd'],\n r: ['\\u00ae', '\\u01a6', '\\u0210', '\\u024c', '\\u0280', '\\u042f'],\n s: ['\\u00a7', '\\u03de', '\\u03df', '\\u03e8'],\n t: ['\\u0141', '\\u0166', '\\u0373'],\n u: ['\\u01b1', '\\u054d'],\n v: ['\\u05d8'],\n w: ['\\u0428', '\\u0460', '\\u047c', '\\u0d70'],\n x: ['\\u04b2', '\\u04fe', '\\u04fc', '\\u04fd'],\n y: ['\\u00a5', '\\u04b0', '\\u04cb'],\n z: ['\\u01b5', '\\u0240'],\n };\n text.forEach(function(c) {\n c = c.toLowerCase();\n var chars = trap[c] || [' '];\n var rand = Math.floor(Math.random() * chars.length);\n if (typeof trap[c] !== 'undefined') {\n result += trap[c][rand];\n } else {\n result += c;\n }\n });\n return result;\n};\n",
55
+ "// please no\nmodule['exports'] = function zalgo(text, options) {\n text = text || ' he is here ';\n var soul = {\n 'up': [\n '̍', '̎', '̄', '̅',\n '̿', '̑', '̆', '̐',\n '͒', '͗', '͑', '̇',\n '̈', '̊', '͂', '̓',\n '̈', '͊', '͋', '͌',\n '̃', '̂', '̌', '͐',\n '̀', '́', '̋', '̏',\n '̒', '̓', '̔', '̽',\n '̉', 'ͣ', 'ͤ', 'ͥ',\n 'ͦ', 'ͧ', 'ͨ', 'ͩ',\n 'ͪ', 'ͫ', 'ͬ', 'ͭ',\n 'ͮ', 'ͯ', '̾', '͛',\n '͆', '̚',\n ],\n 'down': [\n '̖', '̗', '̘', '̙',\n '̜', '̝', '̞', '̟',\n '̠', '̤', '̥', '̦',\n '̩', '̪', '̫', '̬',\n '̭', '̮', '̯', '̰',\n '̱', '̲', '̳', '̹',\n '̺', '̻', '̼', 'ͅ',\n '͇', '͈', '͉', '͍',\n '͎', '͓', '͔', '͕',\n '͖', '͙', '͚', '̣',\n ],\n 'mid': [\n '̕', '̛', '̀', '́',\n '͘', '̡', '̢', '̧',\n '̨', '̴', '̵', '̶',\n '͜', '͝', '͞',\n '͟', '͠', '͢', '̸',\n '̷', '͡', ' ҉',\n ],\n };\n var all = [].concat(soul.up, soul.down, soul.mid);\n\n function randomNumber(range) {\n var r = Math.floor(Math.random() * range);\n return r;\n }\n\n function isChar(character) {\n var bool = false;\n all.filter(function(i) {\n bool = (i === character);\n });\n return bool;\n }\n\n\n function heComes(text, options) {\n var result = '';\n var counts;\n var l;\n options = options || {};\n options['up'] =\n typeof options['up'] !== 'undefined' ? options['up'] : true;\n options['mid'] =\n typeof options['mid'] !== 'undefined' ? options['mid'] : true;\n options['down'] =\n typeof options['down'] !== 'undefined' ? options['down'] : true;\n options['size'] =\n typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';\n text = text.split('');\n for (l in text) {\n if (isChar(l)) {\n continue;\n }\n result = result + text[l];\n counts = {'up': 0, 'down': 0, 'mid': 0};\n switch (options.size) {\n case 'mini':\n counts.up = randomNumber(8);\n counts.mid = randomNumber(2);\n counts.down = randomNumber(8);\n break;\n case 'maxi':\n counts.up = randomNumber(16) + 3;\n counts.mid = randomNumber(4) + 1;\n counts.down = randomNumber(64) + 3;\n break;\n default:\n counts.up = randomNumber(8) + 1;\n counts.mid = randomNumber(6) / 2;\n counts.down = randomNumber(8) + 1;\n break;\n }\n\n var arr = ['up', 'mid', 'down'];\n for (var d in arr) {\n var index = arr[d];\n for (var i = 0; i <= counts[index]; i++) {\n if (options[index]) {\n result = result + soul[index][randomNumber(soul[index].length)];\n }\n }\n }\n }\n return result;\n }\n // don't summon him\n return heComes(text, options);\n};\n\n",
56
+ "module['exports'] = function(colors) {\n return function(letter, i, exploded) {\n if (letter === ' ') return letter;\n switch (i%3) {\n case 0: return colors.red(letter);\n case 1: return colors.white(letter);\n case 2: return colors.blue(letter);\n }\n };\n};\n",
57
+ "module['exports'] = function(colors) {\n return function(letter, i, exploded) {\n return i % 2 === 0 ? letter : colors.inverse(letter);\n };\n};\n",
58
+ "module['exports'] = function(colors) {\n // RoY G BiV\n var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta'];\n return function(letter, i, exploded) {\n if (letter === ' ') {\n return letter;\n } else {\n return colors[rainbowColors[i++ % rainbowColors.length]](letter);\n }\n };\n};\n\n",
59
+ "module['exports'] = function(colors) {\n var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',\n 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed',\n 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta'];\n return function(letter, i, exploded) {\n return letter === ' ' ? letter :\n colors[\n available[Math.round(Math.random() * (available.length - 2))]\n ](letter);\n };\n};\n",
60
+ "/*\n\nThe MIT License (MIT)\n\nOriginal Library\n - Copyright (c) Marak Squires\n\nAdditional functionality\n - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\nvar colors = {};\nmodule['exports'] = colors;\n\ncolors.themes = {};\n\nvar util = require('util');\nvar ansiStyles = colors.styles = require('./styles');\nvar defineProps = Object.defineProperties;\nvar newLineRegex = new RegExp(/[\\r\\n]+/g);\n\ncolors.supportsColor = require('./system/supports-colors').supportsColor;\n\nif (typeof colors.enabled === 'undefined') {\n colors.enabled = colors.supportsColor() !== false;\n}\n\ncolors.enable = function() {\n colors.enabled = true;\n};\n\ncolors.disable = function() {\n colors.enabled = false;\n};\n\ncolors.stripColors = colors.strip = function(str) {\n return ('' + str).replace(/\\x1B\\[\\d+m/g, '');\n};\n\n// eslint-disable-next-line no-unused-vars\nvar stylize = colors.stylize = function stylize(str, style) {\n if (!colors.enabled) {\n return str+'';\n }\n\n var styleMap = ansiStyles[style];\n\n // Stylize should work for non-ANSI styles, too\n if (!styleMap && style in colors) {\n // Style maps like trap operate as functions on strings;\n // they don't have properties like open or close.\n return colors[style](str);\n }\n\n return styleMap.open + str + styleMap.close;\n};\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\nvar escapeStringRegexp = function(str) {\n if (typeof str !== 'string') {\n throw new TypeError('Expected a string');\n }\n return str.replace(matchOperatorsRe, '\\\\$&');\n};\n\nfunction build(_styles) {\n var builder = function builder() {\n return applyStyle.apply(builder, arguments);\n };\n builder._styles = _styles;\n // __proto__ is used because we must return a function, but there is\n // no way to create a function with a different prototype.\n builder.__proto__ = proto;\n return builder;\n}\n\nvar styles = (function() {\n var ret = {};\n ansiStyles.grey = ansiStyles.gray;\n Object.keys(ansiStyles).forEach(function(key) {\n ansiStyles[key].closeRe =\n new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n ret[key] = {\n get: function() {\n return build(this._styles.concat(key));\n },\n };\n });\n return ret;\n})();\n\nvar proto = defineProps(function colors() {}, styles);\n\nfunction applyStyle() {\n var args = Array.prototype.slice.call(arguments);\n\n var str = args.map(function(arg) {\n // Use weak equality check so we can colorize null/undefined in safe mode\n if (arg != null && arg.constructor === String) {\n return arg;\n } else {\n return util.inspect(arg);\n }\n }).join(' ');\n\n if (!colors.enabled || !str) {\n return str;\n }\n\n var newLinesPresent = str.indexOf('\\n') != -1;\n\n var nestedStyles = this._styles;\n\n var i = nestedStyles.length;\n while (i--) {\n var code = ansiStyles[nestedStyles[i]];\n str = code.open + str.replace(code.closeRe, code.open) + code.close;\n if (newLinesPresent) {\n str = str.replace(newLineRegex, function(match) {\n return code.close + match + code.open;\n });\n }\n }\n\n return str;\n}\n\ncolors.setTheme = function(theme) {\n if (typeof theme === 'string') {\n console.log('colors.setTheme now only accepts an object, not a string. ' +\n 'If you are trying to set a theme from a file, it is now your (the ' +\n 'caller\\'s) responsibility to require the file. The old syntax ' +\n 'looked like colors.setTheme(__dirname + ' +\n '\\'/../themes/generic-logging.js\\'); The new syntax looks like '+\n 'colors.setTheme(require(__dirname + ' +\n '\\'/../themes/generic-logging.js\\'));');\n return;\n }\n for (var style in theme) {\n (function(style) {\n colors[style] = function(str) {\n if (typeof theme[style] === 'object') {\n var out = str;\n for (var i in theme[style]) {\n out = colors[theme[style][i]](out);\n }\n return out;\n }\n return colors[theme[style]](str);\n };\n })(style);\n }\n};\n\nfunction init() {\n var ret = {};\n Object.keys(styles).forEach(function(name) {\n ret[name] = {\n get: function() {\n return build([name]);\n },\n };\n });\n return ret;\n}\n\nvar sequencer = function sequencer(map, str) {\n var exploded = str.split('');\n exploded = exploded.map(map);\n return exploded.join('');\n};\n\n// custom formatter methods\ncolors.trap = require('./custom/trap');\ncolors.zalgo = require('./custom/zalgo');\n\n// maps\ncolors.maps = {};\ncolors.maps.america = require('./maps/america')(colors);\ncolors.maps.zebra = require('./maps/zebra')(colors);\ncolors.maps.rainbow = require('./maps/rainbow')(colors);\ncolors.maps.random = require('./maps/random')(colors);\n\nfor (var map in colors.maps) {\n (function(map) {\n colors[map] = function(str) {\n return sequencer(colors.maps[map], str);\n };\n })(map);\n}\n\ndefineProps(colors, init());\n",
61
+ "//\n// Remark: Requiring this file will use the \"safe\" colors API,\n// which will not touch String.prototype.\n//\n// var colors = require('colors/safe');\n// colors.red(\"foo\")\n//\n//\nvar colors = require('./lib/colors');\nmodule['exports'] = colors;\n",
62
+ "const { info, debug } = require('./debug');\nconst utils = require('./utils');\n\nclass Cell {\n /**\n * A representation of a cell within the table.\n * Implementations must have `init` and `draw` methods,\n * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.\n * @param options\n * @constructor\n */\n constructor(options) {\n this.setOptions(options);\n\n /**\n * Each cell will have it's `x` and `y` values set by the `layout-manager` prior to\n * `init` being called;\n * @type {Number}\n */\n this.x = null;\n this.y = null;\n }\n\n setOptions(options) {\n if (['boolean', 'number', 'bigint', 'string'].indexOf(typeof options) !== -1) {\n options = { content: '' + options };\n }\n options = options || {};\n this.options = options;\n let content = options.content;\n if (['boolean', 'number', 'bigint', 'string'].indexOf(typeof content) !== -1) {\n this.content = String(content);\n } else if (!content) {\n this.content = this.options.href || '';\n } else {\n throw new Error('Content needs to be a primitive, got: ' + typeof content);\n }\n this.colSpan = options.colSpan || 1;\n this.rowSpan = options.rowSpan || 1;\n if (this.options.href) {\n Object.defineProperty(this, 'href', {\n get() {\n return this.options.href;\n },\n });\n }\n }\n\n mergeTableOptions(tableOptions, cells) {\n this.cells = cells;\n\n let optionsChars = this.options.chars || {};\n let tableChars = tableOptions.chars;\n let chars = (this.chars = {});\n CHAR_NAMES.forEach(function (name) {\n setOption(optionsChars, tableChars, name, chars);\n });\n\n this.truncate = this.options.truncate || tableOptions.truncate;\n\n let style = (this.options.style = this.options.style || {});\n let tableStyle = tableOptions.style;\n setOption(style, tableStyle, 'padding-left', this);\n setOption(style, tableStyle, 'padding-right', this);\n this.head = style.head || tableStyle.head;\n this.border = style.border || tableStyle.border;\n\n this.fixedWidth = tableOptions.colWidths[this.x];\n this.lines = this.computeLines(tableOptions);\n\n this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;\n this.desiredHeight = this.lines.length;\n }\n\n computeLines(tableOptions) {\n const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;\n const { wordWrap = tableWordWrap } = this.options;\n if (this.fixedWidth && wordWrap) {\n this.fixedWidth -= this.paddingLeft + this.paddingRight;\n if (this.colSpan) {\n let i = 1;\n while (i < this.colSpan) {\n this.fixedWidth += tableOptions.colWidths[this.x + i];\n i++;\n }\n }\n const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;\n const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;\n return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));\n }\n return this.wrapLines(this.content.split('\\n'));\n }\n\n wrapLines(computedLines) {\n const lines = utils.colorizeLines(computedLines);\n if (this.href) {\n return lines.map((line) => utils.hyperlink(this.href, line));\n }\n return lines;\n }\n\n /**\n * Initializes the Cells data structure.\n *\n * @param tableOptions - A fully populated set of tableOptions.\n * In addition to the standard default values, tableOptions must have fully populated the\n * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number\n * of columns or rows (respectively) in this table, and each array item must be a Number.\n *\n */\n init(tableOptions) {\n let x = this.x;\n let y = this.y;\n this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);\n this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);\n this.width = this.widths.reduce(sumPlusOne, -1);\n this.height = this.heights.reduce(sumPlusOne, -1);\n\n this.hAlign = this.options.hAlign || tableOptions.colAligns[x];\n this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];\n\n this.drawRight = x + this.colSpan == tableOptions.colWidths.length;\n }\n\n /**\n * Draws the given line of the cell.\n * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.\n * @param lineNum - can be `top`, `bottom` or a numerical line number.\n * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how\n * many rows below it's being called from. Otherwise it's undefined.\n * @returns {String} The representation of this line.\n */\n draw(lineNum, spanningCell) {\n if (lineNum == 'top') return this.drawTop(this.drawRight);\n if (lineNum == 'bottom') return this.drawBottom(this.drawRight);\n let content = utils.truncate(this.content, 10, this.truncate);\n if (!lineNum) {\n info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);\n } else {\n // debug(`${lineNum}-${this.x}: 1x${this.colSpan} RowSpanCell ${content}`);\n }\n let padLen = Math.max(this.height - this.lines.length, 0);\n let padTop;\n switch (this.vAlign) {\n case 'center':\n padTop = Math.ceil(padLen / 2);\n break;\n case 'bottom':\n padTop = padLen;\n break;\n default:\n padTop = 0;\n }\n if (lineNum < padTop || lineNum >= padTop + this.lines.length) {\n return this.drawEmpty(this.drawRight, spanningCell);\n }\n let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;\n return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);\n }\n\n /**\n * Renders the top line of the cell.\n * @param drawRight - true if this method should render the right edge of the cell.\n * @returns {String}\n */\n drawTop(drawRight) {\n let content = [];\n if (this.cells) {\n //TODO: cells should always exist - some tests don't fill it in though\n this.widths.forEach(function (width, index) {\n content.push(this._topLeftChar(index));\n content.push(utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'], width));\n }, this);\n } else {\n content.push(this._topLeftChar(0));\n content.push(utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'], this.width));\n }\n if (drawRight) {\n content.push(this.chars[this.y == 0 ? 'topRight' : 'rightMid']);\n }\n return this.wrapWithStyleColors('border', content.join(''));\n }\n\n _topLeftChar(offset) {\n let x = this.x + offset;\n let leftChar;\n if (this.y == 0) {\n leftChar = x == 0 ? 'topLeft' : offset == 0 ? 'topMid' : 'top';\n } else {\n if (x == 0) {\n leftChar = 'leftMid';\n } else {\n leftChar = offset == 0 ? 'midMid' : 'bottomMid';\n if (this.cells) {\n //TODO: cells should always exist - some tests don't fill it in though\n let spanAbove = this.cells[this.y - 1][x] instanceof Cell.ColSpanCell;\n if (spanAbove) {\n leftChar = offset == 0 ? 'topMid' : 'mid';\n }\n if (offset == 0) {\n let i = 1;\n while (this.cells[this.y][x - i] instanceof Cell.ColSpanCell) {\n i++;\n }\n if (this.cells[this.y][x - i] instanceof Cell.RowSpanCell) {\n leftChar = 'leftMid';\n }\n }\n }\n }\n }\n return this.chars[leftChar];\n }\n\n wrapWithStyleColors(styleProperty, content) {\n if (this[styleProperty] && this[styleProperty].length) {\n try {\n let colors = require('@colors/colors/safe');\n for (let i = this[styleProperty].length - 1; i >= 0; i--) {\n colors = colors[this[styleProperty][i]];\n }\n return colors(content);\n } catch (e) {\n return content;\n }\n } else {\n return content;\n }\n }\n\n /**\n * Renders a line of text.\n * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.\n * There may be top-padding above the first line of text.\n * @param drawRight - true if this method should render the right edge of the cell.\n * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even\n * if the text fits. This is used when the cell is vertically truncated. If `false` the text should\n * only include the truncation symbol if the text will not fit horizontally within the cell width.\n * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.\n * @returns {String}\n */\n drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {\n let left = this.chars[this.x == 0 ? 'left' : 'middle'];\n if (this.x && spanningCell && this.cells) {\n let cellLeft = this.cells[this.y + spanningCell][this.x - 1];\n while (cellLeft instanceof ColSpanCell) {\n cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];\n }\n if (!(cellLeft instanceof RowSpanCell)) {\n left = this.chars['rightMid'];\n }\n }\n let leftPadding = utils.repeat(' ', this.paddingLeft);\n let right = drawRight ? this.chars['right'] : '';\n let rightPadding = utils.repeat(' ', this.paddingRight);\n let line = this.lines[lineNum];\n let len = this.width - (this.paddingLeft + this.paddingRight);\n if (forceTruncationSymbol) line += this.truncate || '…';\n let content = utils.truncate(line, len, this.truncate);\n content = utils.pad(content, len, ' ', this.hAlign);\n content = leftPadding + content + rightPadding;\n return this.stylizeLine(left, content, right);\n }\n\n stylizeLine(left, content, right) {\n left = this.wrapWithStyleColors('border', left);\n right = this.wrapWithStyleColors('border', right);\n if (this.y === 0) {\n content = this.wrapWithStyleColors('head', content);\n }\n return left + content + right;\n }\n\n /**\n * Renders the bottom line of the cell.\n * @param drawRight - true if this method should render the right edge of the cell.\n * @returns {String}\n */\n drawBottom(drawRight) {\n let left = this.chars[this.x == 0 ? 'bottomLeft' : 'bottomMid'];\n let content = utils.repeat(this.chars.bottom, this.width);\n let right = drawRight ? this.chars['bottomRight'] : '';\n return this.wrapWithStyleColors('border', left + content + right);\n }\n\n /**\n * Renders a blank line of text within the cell. Used for top and/or bottom padding.\n * @param drawRight - true if this method should render the right edge of the cell.\n * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.\n * @returns {String}\n */\n drawEmpty(drawRight, spanningCell) {\n let left = this.chars[this.x == 0 ? 'left' : 'middle'];\n if (this.x && spanningCell && this.cells) {\n let cellLeft = this.cells[this.y + spanningCell][this.x - 1];\n while (cellLeft instanceof ColSpanCell) {\n cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];\n }\n if (!(cellLeft instanceof RowSpanCell)) {\n left = this.chars['rightMid'];\n }\n }\n let right = drawRight ? this.chars['right'] : '';\n let content = utils.repeat(' ', this.width);\n return this.stylizeLine(left, content, right);\n }\n}\n\nclass ColSpanCell {\n /**\n * A Cell that doesn't do anything. It just draws empty lines.\n * Used as a placeholder in column spanning.\n * @constructor\n */\n constructor() {}\n\n draw(lineNum) {\n if (typeof lineNum === 'number') {\n debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);\n }\n return '';\n }\n\n init() {}\n\n mergeTableOptions() {}\n}\n\nclass RowSpanCell {\n /**\n * A placeholder Cell for a Cell that spans multiple rows.\n * It delegates rendering to the original cell, but adds the appropriate offset.\n * @param originalCell\n * @constructor\n */\n constructor(originalCell) {\n this.originalCell = originalCell;\n }\n\n init(tableOptions) {\n let y = this.y;\n let originalY = this.originalCell.y;\n this.cellOffset = y - originalY;\n this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);\n }\n\n draw(lineNum) {\n if (lineNum == 'top') {\n return this.originalCell.draw(this.offset, this.cellOffset);\n }\n if (lineNum == 'bottom') {\n return this.originalCell.draw('bottom');\n }\n debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);\n return this.originalCell.draw(this.offset + 1 + lineNum);\n }\n\n mergeTableOptions() {}\n}\n\nfunction firstDefined(...args) {\n return args.filter((v) => v !== undefined && v !== null).shift();\n}\n\n// HELPER FUNCTIONS\nfunction setOption(objA, objB, nameB, targetObj) {\n let nameA = nameB.split('-');\n if (nameA.length > 1) {\n nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);\n nameA = nameA.join('');\n targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);\n } else {\n targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);\n }\n}\n\nfunction findDimension(dimensionTable, startingIndex, span) {\n let ret = dimensionTable[startingIndex];\n for (let i = 1; i < span; i++) {\n ret += 1 + dimensionTable[startingIndex + i];\n }\n return ret;\n}\n\nfunction sumPlusOne(a, b) {\n return a + b + 1;\n}\n\nlet CHAR_NAMES = [\n 'top',\n 'top-mid',\n 'top-left',\n 'top-right',\n 'bottom',\n 'bottom-mid',\n 'bottom-left',\n 'bottom-right',\n 'left',\n 'left-mid',\n 'mid',\n 'mid-mid',\n 'right',\n 'right-mid',\n 'middle',\n];\n\nmodule.exports = Cell;\nmodule.exports.ColSpanCell = ColSpanCell;\nmodule.exports.RowSpanCell = RowSpanCell;\n",
63
+ "const { warn, debug } = require('./debug');\nconst Cell = require('./cell');\nconst { ColSpanCell, RowSpanCell } = Cell;\n\n(function () {\n function next(alloc, col) {\n if (alloc[col] > 0) {\n return next(alloc, col + 1);\n }\n return col;\n }\n\n function layoutTable(table) {\n let alloc = {};\n table.forEach(function (row, rowIndex) {\n let col = 0;\n row.forEach(function (cell) {\n cell.y = rowIndex;\n // Avoid erroneous call to next() on first row\n cell.x = rowIndex ? next(alloc, col) : col;\n const rowSpan = cell.rowSpan || 1;\n const colSpan = cell.colSpan || 1;\n if (rowSpan > 1) {\n for (let cs = 0; cs < colSpan; cs++) {\n alloc[cell.x + cs] = rowSpan;\n }\n }\n col = cell.x + colSpan;\n });\n Object.keys(alloc).forEach((idx) => {\n alloc[idx]--;\n if (alloc[idx] < 1) delete alloc[idx];\n });\n });\n }\n\n function maxWidth(table) {\n let mw = 0;\n table.forEach(function (row) {\n row.forEach(function (cell) {\n mw = Math.max(mw, cell.x + (cell.colSpan || 1));\n });\n });\n return mw;\n }\n\n function maxHeight(table) {\n return table.length;\n }\n\n function cellsConflict(cell1, cell2) {\n let yMin1 = cell1.y;\n let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);\n let yMin2 = cell2.y;\n let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);\n let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);\n\n let xMin1 = cell1.x;\n let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);\n let xMin2 = cell2.x;\n let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);\n let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);\n\n return yConflict && xConflict;\n }\n\n function conflictExists(rows, x, y) {\n let i_max = Math.min(rows.length - 1, y);\n let cell = { x: x, y: y };\n for (let i = 0; i <= i_max; i++) {\n let row = rows[i];\n for (let j = 0; j < row.length; j++) {\n if (cellsConflict(cell, row[j])) {\n return true;\n }\n }\n }\n return false;\n }\n\n function allBlank(rows, y, xMin, xMax) {\n for (let x = xMin; x < xMax; x++) {\n if (conflictExists(rows, x, y)) {\n return false;\n }\n }\n return true;\n }\n\n function addRowSpanCells(table) {\n table.forEach(function (row, rowIndex) {\n row.forEach(function (cell) {\n for (let i = 1; i < cell.rowSpan; i++) {\n let rowSpanCell = new RowSpanCell(cell);\n rowSpanCell.x = cell.x;\n rowSpanCell.y = cell.y + i;\n rowSpanCell.colSpan = cell.colSpan;\n insertCell(rowSpanCell, table[rowIndex + i]);\n }\n });\n });\n }\n\n function addColSpanCells(cellRows) {\n for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {\n let cellColumns = cellRows[rowIndex];\n for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {\n let cell = cellColumns[columnIndex];\n for (let k = 1; k < cell.colSpan; k++) {\n let colSpanCell = new ColSpanCell();\n colSpanCell.x = cell.x + k;\n colSpanCell.y = cell.y;\n cellColumns.splice(columnIndex + 1, 0, colSpanCell);\n }\n }\n }\n }\n\n function insertCell(cell, row) {\n let x = 0;\n while (x < row.length && row[x].x < cell.x) {\n x++;\n }\n row.splice(x, 0, cell);\n }\n\n function fillInTable(table) {\n let h_max = maxHeight(table);\n let w_max = maxWidth(table);\n debug(`Max rows: ${h_max}; Max cols: ${w_max}`);\n for (let y = 0; y < h_max; y++) {\n for (let x = 0; x < w_max; x++) {\n if (!conflictExists(table, x, y)) {\n let opts = { x: x, y: y, colSpan: 1, rowSpan: 1 };\n x++;\n while (x < w_max && !conflictExists(table, x, y)) {\n opts.colSpan++;\n x++;\n }\n let y2 = y + 1;\n while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {\n opts.rowSpan++;\n y2++;\n }\n let cell = new Cell(opts);\n cell.x = opts.x;\n cell.y = opts.y;\n warn(`Missing cell at ${cell.y}-${cell.x}.`);\n insertCell(cell, table[y]);\n }\n }\n }\n }\n\n function generateCells(rows) {\n return rows.map(function (row) {\n if (!Array.isArray(row)) {\n let key = Object.keys(row)[0];\n row = row[key];\n if (Array.isArray(row)) {\n row = row.slice();\n row.unshift(key);\n } else {\n row = [key, row];\n }\n }\n return row.map(function (cell) {\n return new Cell(cell);\n });\n });\n }\n\n function makeTableLayout(rows) {\n let cellRows = generateCells(rows);\n layoutTable(cellRows);\n fillInTable(cellRows);\n addRowSpanCells(cellRows);\n addColSpanCells(cellRows);\n return cellRows;\n }\n\n module.exports = {\n makeTableLayout: makeTableLayout,\n layoutTable: layoutTable,\n addRowSpanCells: addRowSpanCells,\n maxWidth: maxWidth,\n fillInTable: fillInTable,\n computeWidths: makeComputeWidths('colSpan', 'desiredWidth', 'x', 1),\n computeHeights: makeComputeWidths('rowSpan', 'desiredHeight', 'y', 1),\n };\n})();\n\nfunction makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {\n return function (vals, table) {\n let result = [];\n let spanners = [];\n let auto = {};\n table.forEach(function (row) {\n row.forEach(function (cell) {\n if ((cell[colSpan] || 1) > 1) {\n spanners.push(cell);\n } else {\n result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);\n }\n });\n });\n\n vals.forEach(function (val, index) {\n if (typeof val === 'number') {\n result[index] = val;\n }\n });\n\n //spanners.forEach(function(cell){\n for (let k = spanners.length - 1; k >= 0; k--) {\n let cell = spanners[k];\n let span = cell[colSpan];\n let col = cell[x];\n let existingWidth = result[col];\n let editableCols = typeof vals[col] === 'number' ? 0 : 1;\n if (typeof existingWidth === 'number') {\n for (let i = 1; i < span; i++) {\n existingWidth += 1 + result[col + i];\n if (typeof vals[col + i] !== 'number') {\n editableCols++;\n }\n }\n } else {\n existingWidth = desiredWidth === 'desiredWidth' ? cell.desiredWidth - 1 : 1;\n if (!auto[col] || auto[col] < existingWidth) {\n auto[col] = existingWidth;\n }\n }\n\n if (cell[desiredWidth] > existingWidth) {\n let i = 0;\n while (editableCols > 0 && cell[desiredWidth] > existingWidth) {\n if (typeof vals[col + i] !== 'number') {\n let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);\n existingWidth += dif;\n result[col + i] += dif;\n editableCols--;\n }\n i++;\n }\n }\n }\n\n Object.assign(vals, result, auto);\n for (let j = 0; j < vals.length; j++) {\n vals[j] = Math.max(forcedMin, vals[j] || 0);\n }\n };\n}\n",
64
+ "const debug = require('./debug');\nconst utils = require('./utils');\nconst tableLayout = require('./layout-manager');\n\nclass Table extends Array {\n constructor(opts) {\n super();\n\n const options = utils.mergeOptions(opts);\n Object.defineProperty(this, 'options', {\n value: options,\n enumerable: options.debug,\n });\n\n if (options.debug) {\n switch (typeof options.debug) {\n case 'boolean':\n debug.setDebugLevel(debug.WARN);\n break;\n case 'number':\n debug.setDebugLevel(options.debug);\n break;\n case 'string':\n debug.setDebugLevel(parseInt(options.debug, 10));\n break;\n default:\n debug.setDebugLevel(debug.WARN);\n debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);\n }\n Object.defineProperty(this, 'messages', {\n get() {\n return debug.debugMessages();\n },\n });\n }\n }\n\n toString() {\n let array = this;\n let headersPresent = this.options.head && this.options.head.length;\n if (headersPresent) {\n array = [this.options.head];\n if (this.length) {\n array.push.apply(array, this);\n }\n } else {\n this.options.style.head = [];\n }\n\n let cells = tableLayout.makeTableLayout(array);\n\n cells.forEach(function (row) {\n row.forEach(function (cell) {\n cell.mergeTableOptions(this.options, cells);\n }, this);\n }, this);\n\n tableLayout.computeWidths(this.options.colWidths, cells);\n tableLayout.computeHeights(this.options.rowHeights, cells);\n\n cells.forEach(function (row) {\n row.forEach(function (cell) {\n cell.init(this.options);\n }, this);\n }, this);\n\n let result = [];\n\n for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {\n let row = cells[rowIndex];\n let heightOfRow = this.options.rowHeights[rowIndex];\n\n if (rowIndex === 0 || !this.options.style.compact || (rowIndex == 1 && headersPresent)) {\n doDraw(row, 'top', result);\n }\n\n for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {\n doDraw(row, lineNum, result);\n }\n\n if (rowIndex + 1 == cells.length) {\n doDraw(row, 'bottom', result);\n }\n }\n\n return result.join('\\n');\n }\n\n get width() {\n let str = this.toString().split('\\n');\n return str[0].length;\n }\n}\n\nTable.reset = () => debug.reset();\n\nfunction doDraw(row, lineNum, result) {\n let line = [];\n row.forEach(function (cell) {\n line.push(cell.draw(lineNum));\n });\n let str = line.join('');\n if (str.length) result.push(str);\n}\n\nmodule.exports = Table;\n",
65
+ "/**\n * CommanderError class\n */\nexport class CommanderError extends Error {\n /**\n * Constructs the CommanderError class\n * @param {number} exitCode suggested exit code which could be used with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n */\n constructor(exitCode, code, message) {\n super(message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n this.code = code;\n this.exitCode = exitCode;\n this.nestedError = undefined;\n }\n}\n\n/**\n * InvalidArgumentError class\n */\nexport class InvalidArgumentError extends CommanderError {\n /**\n * Constructs the InvalidArgumentError class\n * @param {string} [message] explanation of why argument is invalid\n */\n constructor(message) {\n super(1, 'commander.invalidArgument', message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n }\n}\n",
66
+ "import { InvalidArgumentError } from './error.js';\n\nexport class Argument {\n /**\n * Initialize a new command argument with the given name and description.\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @param {string} name\n * @param {string} [description]\n */\n\n constructor(name, description) {\n this.description = description || '';\n this.variadic = false;\n this.parseArg = undefined;\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.argChoices = undefined;\n\n switch (name[0]) {\n case '<': // e.g. <required>\n this.required = true;\n this._name = name.slice(1, -1);\n break;\n case '[': // e.g. [optional]\n this.required = false;\n this._name = name.slice(1, -1);\n break;\n default:\n this.required = true;\n this._name = name;\n break;\n }\n\n if (this._name.endsWith('...')) {\n this.variadic = true;\n this._name = this._name.slice(0, -3);\n }\n }\n\n /**\n * Return argument name.\n *\n * @return {string}\n */\n\n name() {\n return this._name;\n }\n\n /**\n * @package\n */\n\n _collectValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n previous.push(value);\n return previous;\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Argument}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI command arguments into argument values.\n *\n * @param {Function} [fn]\n * @return {Argument}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Only allow argument value to be one of choices.\n *\n * @param {string[]} values\n * @return {Argument}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(\n `Allowed choices are ${this.argChoices.join(', ')}.`,\n );\n }\n if (this.variadic) {\n return this._collectValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Make argument required.\n *\n * @returns {Argument}\n */\n argRequired() {\n this.required = true;\n return this;\n }\n\n /**\n * Make argument optional.\n *\n * @returns {Argument}\n */\n argOptional() {\n this.required = false;\n return this;\n }\n}\n\n/**\n * Takes an argument and returns its human readable equivalent for help usage.\n *\n * @param {Argument} arg\n * @return {string}\n * @private\n */\n\nexport function humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';\n}\n",
67
+ "import { EventEmitter } from 'node:events';\nimport childProcess from 'node:child_process';\nimport path from 'node:path';\nimport fs from 'node:fs';\nimport process from 'node:process';\nimport { stripVTControlCharacters } from 'node:util';\n\nimport { Argument, humanReadableArgName } from './argument.js';\nimport { CommanderError } from './error.js';\nimport { Help } from './help.js';\nimport { Option, DualOptions } from './option.js';\nimport { suggestSimilar } from './suggestSimilar.js';\n\nexport class Command extends EventEmitter {\n /**\n * Initialize a new `Command`.\n *\n * @param {string} [name]\n */\n\n constructor(name) {\n super();\n /** @type {Command[]} */\n this.commands = [];\n /** @type {Option[]} */\n this.options = [];\n this.parent = null;\n this._allowUnknownOption = false;\n this._allowExcessArguments = false;\n /** @type {Argument[]} */\n this.registeredArguments = [];\n this._args = this.registeredArguments; // deprecated old name\n /** @type {string[]} */\n this.args = []; // cli args with options removed\n this.rawArgs = [];\n this.processedArgs = []; // like .args but after custom processing and collecting variadic\n this._scriptPath = null;\n this._name = name || '';\n this._optionValues = {};\n this._optionValueSources = {}; // default, env, cli etc\n this._storeOptionsAsProperties = false;\n this._actionHandler = null;\n this._executableHandler = false;\n this._executableFile = null; // custom name for executable\n this._executableDir = null; // custom search directory for subcommands\n this._defaultCommandName = null;\n this._exitCallback = null;\n this._aliases = [];\n this._combineFlagAndOptionalValue = true;\n this._description = '';\n this._summary = '';\n this._argsDescription = undefined; // legacy\n this._enablePositionalOptions = false;\n this._passThroughOptions = false;\n this._lifeCycleHooks = {}; // a hash of arrays\n /** @type {(boolean | string)} */\n this._showHelpAfterError = false;\n this._showSuggestionAfterError = true;\n this._savedState = null; // used in save/restoreStateBeforeParse\n\n // see configureOutput() for docs\n this._outputConfiguration = {\n writeOut: (str) => process.stdout.write(str),\n writeErr: (str) => process.stderr.write(str),\n outputError: (str, write) => write(str),\n getOutHelpWidth: () =>\n process.stdout.isTTY ? process.stdout.columns : undefined,\n getErrHelpWidth: () =>\n process.stderr.isTTY ? process.stderr.columns : undefined,\n getOutHasColors: () =>\n useColor() ?? (process.stdout.isTTY && process.stdout.hasColors?.()),\n getErrHasColors: () =>\n useColor() ?? (process.stderr.isTTY && process.stderr.hasColors?.()),\n stripColor: (str) => stripVTControlCharacters(str),\n };\n\n this._hidden = false;\n /** @type {(Option | null | undefined)} */\n this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled.\n this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited\n /** @type {Command} */\n this._helpCommand = undefined; // lazy initialised, inherited\n this._helpConfiguration = {};\n /** @type {string | undefined} */\n this._helpGroupHeading = undefined; // soft initialised when added to parent\n /** @type {string | undefined} */\n this._defaultCommandGroup = undefined;\n /** @type {string | undefined} */\n this._defaultOptionGroup = undefined;\n }\n\n /**\n * Copy settings that are useful to have in common across root command and subcommands.\n *\n * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)\n *\n * @param {Command} sourceCommand\n * @return {Command} `this` command for chaining\n */\n copyInheritedSettings(sourceCommand) {\n this._outputConfiguration = sourceCommand._outputConfiguration;\n this._helpOption = sourceCommand._helpOption;\n this._helpCommand = sourceCommand._helpCommand;\n this._helpConfiguration = sourceCommand._helpConfiguration;\n this._exitCallback = sourceCommand._exitCallback;\n this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;\n this._combineFlagAndOptionalValue =\n sourceCommand._combineFlagAndOptionalValue;\n this._allowExcessArguments = sourceCommand._allowExcessArguments;\n this._enablePositionalOptions = sourceCommand._enablePositionalOptions;\n this._showHelpAfterError = sourceCommand._showHelpAfterError;\n this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;\n\n return this;\n }\n\n /**\n * @returns {Command[]}\n * @private\n */\n\n _getCommandAndAncestors() {\n const result = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n for (let command = this; command; command = command.parent) {\n result.push(command);\n }\n return result;\n }\n\n /**\n * Define a command.\n *\n * There are two styles of command: pay attention to where to put the description.\n *\n * @example\n * // Command implemented using action handler (description is supplied separately to `.command`)\n * program\n * .command('clone <source> [destination]')\n * .description('clone a repository into a newly created directory')\n * .action((source, destination) => {\n * console.log('clone command called');\n * });\n *\n * // Command implemented using separate executable file (description is second parameter to `.command`)\n * program\n * .command('start <service>', 'start named service')\n * .command('stop [service]', 'stop named service, or all if no name supplied');\n *\n * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`\n * @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)\n * @param {object} [execOpts] - configuration options (for executable)\n * @return {Command} returns new command for action handler, or `this` for executable command\n */\n\n command(nameAndArgs, actionOptsOrExecDesc, execOpts) {\n let desc = actionOptsOrExecDesc;\n let opts = execOpts;\n if (typeof desc === 'object' && desc !== null) {\n opts = desc;\n desc = null;\n }\n opts = opts || {};\n const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);\n\n const cmd = this.createCommand(name);\n if (desc) {\n cmd.description(desc);\n cmd._executableHandler = true;\n }\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden\n cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor\n if (args) cmd.arguments(args);\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd.copyInheritedSettings(this);\n\n if (desc) return this;\n return cmd;\n }\n\n /**\n * Factory routine to create a new unattached command.\n *\n * See .command() for creating an attached subcommand, which uses this routine to\n * create the command. You can override createCommand to customise subcommands.\n *\n * @param {string} [name]\n * @return {Command} new command\n */\n\n createCommand(name) {\n return new Command(name);\n }\n\n /**\n * You can customise the help with a subclass of Help by overriding createHelp,\n * or by overriding Help properties using configureHelp().\n *\n * @return {Help}\n */\n\n createHelp() {\n return Object.assign(new Help(), this.configureHelp());\n }\n\n /**\n * You can customise the help by overriding Help properties using configureHelp(),\n * or with a subclass of Help by overriding createHelp().\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureHelp(configuration) {\n if (configuration === undefined) return this._helpConfiguration;\n\n this._helpConfiguration = configuration;\n return this;\n }\n\n /**\n * The default output goes to stdout and stderr. You can customise this for special\n * applications. You can also customise the display of errors by overriding outputError.\n *\n * The configuration properties are all functions:\n *\n * // change how output being written, defaults to stdout and stderr\n * writeOut(str)\n * writeErr(str)\n * // change how output being written for errors, defaults to writeErr\n * outputError(str, write) // used for displaying errors and not used for displaying help\n * // specify width for wrapping help\n * getOutHelpWidth()\n * getErrHelpWidth()\n * // color support, currently only used with Help\n * getOutHasColors()\n * getErrHasColors()\n * stripColor() // used to remove ANSI escape codes if output does not have colors\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureOutput(configuration) {\n if (configuration === undefined) return this._outputConfiguration;\n\n this._outputConfiguration = {\n ...this._outputConfiguration,\n ...configuration,\n };\n return this;\n }\n\n /**\n * Display the help or a custom message after an error occurs.\n *\n * @param {(boolean|string)} [displayHelp]\n * @return {Command} `this` command for chaining\n */\n showHelpAfterError(displayHelp = true) {\n if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;\n this._showHelpAfterError = displayHelp;\n return this;\n }\n\n /**\n * Display suggestion of similar commands for unknown commands, or options for unknown options.\n *\n * @param {boolean} [displaySuggestion]\n * @return {Command} `this` command for chaining\n */\n showSuggestionAfterError(displaySuggestion = true) {\n this._showSuggestionAfterError = !!displaySuggestion;\n return this;\n }\n\n /**\n * Add a prepared subcommand.\n *\n * See .command() for creating an attached subcommand which inherits settings from its parent.\n *\n * @param {Command} cmd - new subcommand\n * @param {object} [opts] - configuration options\n * @return {Command} `this` command for chaining\n */\n\n addCommand(cmd, opts) {\n if (!cmd._name) {\n throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`);\n }\n\n opts = opts || {};\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation\n\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd._checkForBrokenPassThrough();\n\n return this;\n }\n\n /**\n * Factory routine to create a new unattached argument.\n *\n * See .argument() for creating an attached argument, which uses this routine to\n * create the argument. You can override createArgument to return a custom argument.\n *\n * @param {string} name\n * @param {string} [description]\n * @return {Argument} new argument\n */\n\n createArgument(name, description) {\n return new Argument(name, description);\n }\n\n /**\n * Define argument syntax for command.\n *\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @example\n * program.argument('<input-file>');\n * program.argument('[output-file]');\n *\n * @param {string} name\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom argument processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n argument(name, description, parseArg, defaultValue) {\n const argument = this.createArgument(name, description);\n if (typeof parseArg === 'function') {\n argument.default(defaultValue).argParser(parseArg);\n } else {\n argument.default(parseArg);\n }\n this.addArgument(argument);\n return this;\n }\n\n /**\n * Define argument syntax for command, adding multiple at once (without descriptions).\n *\n * See also .argument().\n *\n * @example\n * program.arguments('<cmd> [env]');\n *\n * @param {string} names\n * @return {Command} `this` command for chaining\n */\n\n arguments(names) {\n names\n .trim()\n .split(/ +/)\n .forEach((detail) => {\n this.argument(detail);\n });\n return this;\n }\n\n /**\n * Define argument syntax for command, adding a prepared argument.\n *\n * @param {Argument} argument\n * @return {Command} `this` command for chaining\n */\n addArgument(argument) {\n const previousArgument = this.registeredArguments.slice(-1)[0];\n if (previousArgument?.variadic) {\n throw new Error(\n `only the last argument can be variadic '${previousArgument.name()}'`,\n );\n }\n if (\n argument.required &&\n argument.defaultValue !== undefined &&\n argument.parseArg === undefined\n ) {\n throw new Error(\n `a default value for a required argument is never used: '${argument.name()}'`,\n );\n }\n this.registeredArguments.push(argument);\n return this;\n }\n\n /**\n * Customise or override default help command. By default a help command is automatically added if your command has subcommands.\n *\n * @example\n * program.helpCommand('help [cmd]');\n * program.helpCommand('help [cmd]', 'show help');\n * program.helpCommand(false); // suppress default help command\n * program.helpCommand(true); // add help command even if no subcommands\n *\n * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added\n * @param {string} [description] - custom description\n * @return {Command} `this` command for chaining\n */\n\n helpCommand(enableOrNameAndArgs, description) {\n if (typeof enableOrNameAndArgs === 'boolean') {\n this._addImplicitHelpCommand = enableOrNameAndArgs;\n if (enableOrNameAndArgs && this._defaultCommandGroup) {\n // make the command to store the group\n this._initCommandGroup(this._getHelpCommand());\n }\n return this;\n }\n\n const nameAndArgs = enableOrNameAndArgs ?? 'help [command]';\n const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);\n const helpDescription = description ?? 'display help for command';\n\n const helpCommand = this.createCommand(helpName);\n helpCommand.helpOption(false);\n if (helpArgs) helpCommand.arguments(helpArgs);\n if (helpDescription) helpCommand.description(helpDescription);\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n // init group unless lazy create\n if (enableOrNameAndArgs || description) this._initCommandGroup(helpCommand);\n\n return this;\n }\n\n /**\n * Add prepared custom help command.\n *\n * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`\n * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only\n * @return {Command} `this` command for chaining\n */\n addHelpCommand(helpCommand, deprecatedDescription) {\n // If not passed an object, call through to helpCommand for backwards compatibility,\n // as addHelpCommand was originally used like helpCommand is now.\n if (typeof helpCommand !== 'object') {\n this.helpCommand(helpCommand, deprecatedDescription);\n return this;\n }\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n this._initCommandGroup(helpCommand);\n return this;\n }\n\n /**\n * Lazy create help command.\n *\n * @return {(Command|null)}\n * @package\n */\n _getHelpCommand() {\n const hasImplicitHelpCommand =\n this._addImplicitHelpCommand ??\n (this.commands.length &&\n !this._actionHandler &&\n !this._findCommand('help'));\n\n if (hasImplicitHelpCommand) {\n if (this._helpCommand === undefined) {\n this.helpCommand(undefined, undefined); // use default name and description\n }\n return this._helpCommand;\n }\n return null;\n }\n\n /**\n * Add hook for life cycle event.\n *\n * @param {string} event\n * @param {Function} listener\n * @return {Command} `this` command for chaining\n */\n\n hook(event, listener) {\n const allowedValues = ['preSubcommand', 'preAction', 'postAction'];\n if (!allowedValues.includes(event)) {\n throw new Error(`Unexpected value for event passed to hook : '${event}'.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n if (this._lifeCycleHooks[event]) {\n this._lifeCycleHooks[event].push(listener);\n } else {\n this._lifeCycleHooks[event] = [listener];\n }\n return this;\n }\n\n /**\n * Register callback to use as replacement for calling process.exit.\n *\n * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing\n * @return {Command} `this` command for chaining\n */\n\n exitOverride(fn) {\n if (fn) {\n this._exitCallback = fn;\n } else {\n this._exitCallback = (err) => {\n if (err.code !== 'commander.executeSubCommandAsync') {\n throw err;\n } else {\n // Async callback from spawn events, not useful to throw.\n }\n };\n }\n return this;\n }\n\n /**\n * Call process.exit, and _exitCallback if defined.\n *\n * @param {number} exitCode exit code for using with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @return never\n * @private\n */\n\n _exit(exitCode, code, message) {\n if (this._exitCallback) {\n this._exitCallback(new CommanderError(exitCode, code, message));\n // Expecting this line is not reached.\n }\n process.exit(exitCode);\n }\n\n /**\n * Register callback `fn` for the command.\n *\n * @example\n * program\n * .command('serve')\n * .description('start service')\n * .action(function() {\n * // do work here\n * });\n *\n * @param {Function} fn\n * @return {Command} `this` command for chaining\n */\n\n action(fn) {\n const listener = (args) => {\n // The .action callback takes an extra parameter which is the command or options.\n const expectedArgsCount = this.registeredArguments.length;\n const actionArgs = args.slice(0, expectedArgsCount);\n if (this._storeOptionsAsProperties) {\n actionArgs[expectedArgsCount] = this; // backwards compatible \"options\"\n } else {\n actionArgs[expectedArgsCount] = this.opts();\n }\n actionArgs.push(this);\n\n return fn.apply(this, actionArgs);\n };\n this._actionHandler = listener;\n return this;\n }\n\n /**\n * Factory routine to create a new unattached option.\n *\n * See .option() for creating an attached option, which uses this routine to\n * create the option. You can override createOption to return a custom option.\n *\n * @param {string} flags\n * @param {string} [description]\n * @return {Option} new option\n */\n\n createOption(flags, description) {\n return new Option(flags, description);\n }\n\n /**\n * Wrap parseArgs to catch 'commander.invalidArgument'.\n *\n * @param {(Option | Argument)} target\n * @param {string} value\n * @param {*} previous\n * @param {string} invalidArgumentMessage\n * @private\n */\n\n _callParseArg(target, value, previous, invalidArgumentMessage) {\n try {\n return target.parseArg(value, previous);\n } catch (err) {\n if (err.code === 'commander.invalidArgument') {\n const message = `${invalidArgumentMessage} ${err.message}`;\n this.error(message, { exitCode: err.exitCode, code: err.code });\n }\n throw err;\n }\n }\n\n /**\n * Check for option flag conflicts.\n * Register option if no conflicts found, or throw on conflict.\n *\n * @param {Option} option\n * @private\n */\n\n _registerOption(option) {\n const matchingOption =\n (option.short && this._findOption(option.short)) ||\n (option.long && this._findOption(option.long));\n if (matchingOption) {\n const matchingFlag =\n option.long && this._findOption(option.long)\n ? option.long\n : option.short;\n throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'\n- already used by option '${matchingOption.flags}'`);\n }\n\n this._initOptionGroup(option);\n this.options.push(option);\n }\n\n /**\n * Check for command name and alias conflicts with existing commands.\n * Register command if no conflicts found, or throw on conflict.\n *\n * @param {Command} command\n * @private\n */\n\n _registerCommand(command) {\n const knownBy = (cmd) => {\n return [cmd.name()].concat(cmd.aliases());\n };\n\n const alreadyUsed = knownBy(command).find((name) =>\n this._findCommand(name),\n );\n if (alreadyUsed) {\n const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|');\n const newCmd = knownBy(command).join('|');\n throw new Error(\n `cannot add command '${newCmd}' as already have command '${existingCmd}'`,\n );\n }\n\n this._initCommandGroup(command);\n this.commands.push(command);\n }\n\n /**\n * Add an option.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addOption(option) {\n this._registerOption(option);\n\n const oname = option.name();\n const name = option.attributeName();\n\n // store default value\n if (option.defaultValue !== undefined) {\n this.setOptionValueWithSource(name, option.defaultValue, 'default');\n }\n\n // handler for cli and env supplied values\n const handleOptionValue = (val, invalidValueMessage, valueSource) => {\n // val is null for optional option used without an optional-argument.\n // val is undefined for boolean and negated option.\n if (val == null && option.presetArg !== undefined) {\n val = option.presetArg;\n }\n\n // custom processing\n const oldValue = this.getOptionValue(name);\n if (val !== null && option.parseArg) {\n val = this._callParseArg(option, val, oldValue, invalidValueMessage);\n } else if (val !== null && option.variadic) {\n val = option._collectValue(val, oldValue);\n }\n\n // Fill-in appropriate missing values. Long winded but easy to follow.\n if (val == null) {\n if (option.negate) {\n val = false;\n } else if (option.isBoolean() || option.optional) {\n val = true;\n } else {\n val = ''; // not normal, parseArg might have failed or be a mock function for testing\n }\n }\n this.setOptionValueWithSource(name, val, valueSource);\n };\n\n this.on('option:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'cli');\n });\n\n if (option.envVar) {\n this.on('optionEnv:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'env');\n });\n }\n\n return this;\n }\n\n /**\n * Internal implementation shared by .option() and .requiredOption()\n *\n * @return {Command} `this` command for chaining\n * @private\n */\n _optionEx(config, flags, description, fn, defaultValue) {\n if (typeof flags === 'object' && flags instanceof Option) {\n throw new Error(\n 'To add an Option object use addOption() instead of option() or requiredOption()',\n );\n }\n const option = this.createOption(flags, description);\n option.makeOptionMandatory(!!config.mandatory);\n if (typeof fn === 'function') {\n option.default(defaultValue).argParser(fn);\n } else if (fn instanceof RegExp) {\n // deprecated\n const regex = fn;\n fn = (val, def) => {\n const m = regex.exec(val);\n return m ? m[0] : def;\n };\n option.default(defaultValue).argParser(fn);\n } else {\n option.default(fn);\n }\n\n return this.addOption(option);\n }\n\n /**\n * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required\n * option-argument is indicated by `<>` and an optional option-argument by `[]`.\n *\n * See the README for more details, and see also addOption() and requiredOption().\n *\n * @example\n * program\n * .option('-p, --pepper', 'add pepper')\n * .option('--pt, --pizza-type <TYPE>', 'type of pizza') // required option-argument\n * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default\n * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n option(flags, description, parseArg, defaultValue) {\n return this._optionEx({}, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Add a required option which must have a value after parsing. This usually means\n * the option must be specified on the command line. (Otherwise the same as .option().)\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n requiredOption(flags, description, parseArg, defaultValue) {\n return this._optionEx(\n { mandatory: true },\n flags,\n description,\n parseArg,\n defaultValue,\n );\n }\n\n /**\n * Alter parsing of short flags with optional values.\n *\n * @example\n * // for `.option('-f,--flag [value]'):\n * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour\n * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n *\n * @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag.\n * @return {Command} `this` command for chaining\n */\n combineFlagAndOptionalValue(combine = true) {\n this._combineFlagAndOptionalValue = !!combine;\n return this;\n }\n\n /**\n * Allow unknown options on the command line.\n *\n * @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options.\n * @return {Command} `this` command for chaining\n */\n allowUnknownOption(allowUnknown = true) {\n this._allowUnknownOption = !!allowUnknown;\n return this;\n }\n\n /**\n * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n *\n * @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments.\n * @return {Command} `this` command for chaining\n */\n allowExcessArguments(allowExcess = true) {\n this._allowExcessArguments = !!allowExcess;\n return this;\n }\n\n /**\n * Enable positional options. Positional means global options are specified before subcommands which lets\n * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n * The default behaviour is non-positional and global options may appear anywhere on the command line.\n *\n * @param {boolean} [positional]\n * @return {Command} `this` command for chaining\n */\n enablePositionalOptions(positional = true) {\n this._enablePositionalOptions = !!positional;\n return this;\n }\n\n /**\n * Pass through options that come after command-arguments rather than treat them as command-options,\n * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n * positional options to have been enabled on the program (parent commands).\n * The default behaviour is non-positional and options may appear before or after command-arguments.\n *\n * @param {boolean} [passThrough] for unknown options.\n * @return {Command} `this` command for chaining\n */\n passThroughOptions(passThrough = true) {\n this._passThroughOptions = !!passThrough;\n this._checkForBrokenPassThrough();\n return this;\n }\n\n /**\n * @private\n */\n\n _checkForBrokenPassThrough() {\n if (\n this.parent &&\n this._passThroughOptions &&\n !this.parent._enablePositionalOptions\n ) {\n throw new Error(\n `passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`,\n );\n }\n }\n\n /**\n * Whether to store option values as properties on command object,\n * or store separately (specify false). In both cases the option values can be accessed using .opts().\n *\n * @param {boolean} [storeAsProperties=true]\n * @return {Command} `this` command for chaining\n */\n\n storeOptionsAsProperties(storeAsProperties = true) {\n if (this.options.length) {\n throw new Error('call .storeOptionsAsProperties() before adding options');\n }\n if (Object.keys(this._optionValues).length) {\n throw new Error(\n 'call .storeOptionsAsProperties() before setting option values',\n );\n }\n this._storeOptionsAsProperties = !!storeAsProperties;\n return this;\n }\n\n /**\n * Retrieve option value.\n *\n * @param {string} key\n * @return {object} value\n */\n\n getOptionValue(key) {\n if (this._storeOptionsAsProperties) {\n return this[key];\n }\n return this._optionValues[key];\n }\n\n /**\n * Store option value.\n *\n * @param {string} key\n * @param {object} value\n * @return {Command} `this` command for chaining\n */\n\n setOptionValue(key, value) {\n return this.setOptionValueWithSource(key, value, undefined);\n }\n\n /**\n * Store option value and where the value came from.\n *\n * @param {string} key\n * @param {object} value\n * @param {string} source - expected values are default/config/env/cli/implied\n * @return {Command} `this` command for chaining\n */\n\n setOptionValueWithSource(key, value, source) {\n if (this._storeOptionsAsProperties) {\n this[key] = value;\n } else {\n this._optionValues[key] = value;\n }\n this._optionValueSources[key] = source;\n return this;\n }\n\n /**\n * Get source of option value.\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSource(key) {\n return this._optionValueSources[key];\n }\n\n /**\n * Get source of option value. See also .optsWithGlobals().\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSourceWithGlobals(key) {\n // global overwrites local, like optsWithGlobals\n let source;\n this._getCommandAndAncestors().forEach((cmd) => {\n if (cmd.getOptionValueSource(key) !== undefined) {\n source = cmd.getOptionValueSource(key);\n }\n });\n return source;\n }\n\n /**\n * Get user arguments from implied or explicit arguments.\n * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.\n *\n * @private\n */\n\n _prepareUserArgs(argv, parseOptions) {\n if (argv !== undefined && !Array.isArray(argv)) {\n throw new Error('first parameter to parse must be array or undefined');\n }\n parseOptions = parseOptions || {};\n\n // auto-detect argument conventions if nothing supplied\n if (argv === undefined && parseOptions.from === undefined) {\n if (process.versions?.electron) {\n parseOptions.from = 'electron';\n }\n // check node specific options for scenarios where user CLI args follow executable without scriptname\n const execArgv = process.execArgv ?? [];\n if (\n execArgv.includes('-e') ||\n execArgv.includes('--eval') ||\n execArgv.includes('-p') ||\n execArgv.includes('--print')\n ) {\n parseOptions.from = 'eval'; // internal usage, not documented\n }\n }\n\n // default to using process.argv\n if (argv === undefined) {\n argv = process.argv;\n }\n this.rawArgs = argv.slice();\n\n // extract the user args and scriptPath\n let userArgs;\n switch (parseOptions.from) {\n case undefined:\n case 'node':\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n break;\n case 'electron':\n // @ts-ignore: because defaultApp is an unknown property\n if (process.defaultApp) {\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n } else {\n userArgs = argv.slice(1);\n }\n break;\n case 'user':\n userArgs = argv.slice(0);\n break;\n case 'eval':\n userArgs = argv.slice(1);\n break;\n default:\n throw new Error(\n `unexpected parse option { from: '${parseOptions.from}' }`,\n );\n }\n\n // Find default name for program from arguments.\n if (!this._name && this._scriptPath)\n this.nameFromFilename(this._scriptPath);\n this._name = this._name || 'program';\n\n return userArgs;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Use parseAsync instead of parse if any of your action handlers are async.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * program.parse(); // parse process.argv and auto-detect electron and special node flags\n * program.parse(process.argv); // assume argv[0] is app and argv[1] is script\n * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv] - optional, defaults to process.argv\n * @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron\n * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'\n * @return {Command} `this` command for chaining\n */\n\n parse(argv, parseOptions) {\n this._prepareForParse();\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags\n * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script\n * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv]\n * @param {object} [parseOptions]\n * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'\n * @return {Promise}\n */\n\n async parseAsync(argv, parseOptions) {\n this._prepareForParse();\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n await this._parseCommand([], userArgs);\n\n return this;\n }\n\n _prepareForParse() {\n // Save the state the first time, then restore the state before each subsequent parse.\n if (this._savedState === null) {\n // Do the special default of lone negated option to true, now that we have all the options.\n // Filter for negated options that have not been processed already.\n this.options\n .filter(\n (option) =>\n option.negate &&\n option.defaultValue === undefined &&\n this.getOptionValue(option.attributeName()) === undefined,\n )\n .forEach((option) => {\n // check for lone negated option: --no-foo without a --foo option\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(\n option.attributeName(),\n true,\n 'default',\n );\n }\n });\n\n this.saveStateBeforeParse();\n } else {\n this.restoreStateBeforeParse();\n }\n }\n\n /**\n * Called the first time parse is called to save state and allow a restore before subsequent calls to parse.\n * Not usually called directly, but available for subclasses to save their custom state.\n *\n * This is called in a lazy way. Only commands used in parsing chain will have state saved.\n */\n saveStateBeforeParse() {\n this._savedState = {\n // name is stable if supplied by author, but may be unspecified for root command and deduced during parsing\n _name: this._name,\n // option values before parse have default values (including false for negated options)\n // shallow clones\n _optionValues: { ...this._optionValues },\n _optionValueSources: { ...this._optionValueSources },\n };\n }\n\n /**\n * Restore state before parse for calls after the first.\n * Not usually called directly, but available for subclasses to save their custom state.\n *\n * This is called in a lazy way. Only commands used in parsing chain will have state restored.\n */\n restoreStateBeforeParse() {\n if (this._storeOptionsAsProperties)\n throw new Error(`Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties`);\n\n // clear state from _prepareUserArgs\n this._name = this._savedState._name;\n this._scriptPath = null;\n this.rawArgs = [];\n // clear state from setOptionValueWithSource\n this._optionValues = { ...this._savedState._optionValues };\n this._optionValueSources = { ...this._savedState._optionValueSources };\n // clear state from _parseCommand\n this.args = [];\n // clear state from _processArguments\n this.processedArgs = [];\n }\n\n /**\n * Throw if expected executable is missing. Add lots of help for author.\n *\n * @param {string} executableFile\n * @param {string} executableDir\n * @param {string} subcommandName\n */\n _checkForMissingExecutable(executableFile, executableDir, subcommandName) {\n if (fs.existsSync(executableFile)) return;\n\n const executableDirMessage = executableDir\n ? `searched for local subcommand relative to directory '${executableDir}'`\n : 'no directory for search for local subcommand, use .executableDir() to supply a custom directory';\n const executableMissing = `'${executableFile}' does not exist\n - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${executableDirMessage}`;\n throw new Error(executableMissing);\n }\n\n /**\n * Execute a sub-command executable.\n *\n * @private\n */\n\n _executeSubCommand(subcommand, args) {\n args = args.slice();\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n function findFile(baseDir, baseName) {\n // Look for specified file\n const localBin = path.resolve(baseDir, baseName);\n if (fs.existsSync(localBin)) return localBin;\n\n // Stop looking if candidate already has an expected extension.\n if (sourceExt.includes(path.extname(baseName))) return undefined;\n\n // Try all the extensions.\n const foundExt = sourceExt.find((ext) =>\n fs.existsSync(`${localBin}${ext}`),\n );\n if (foundExt) return `${localBin}${foundExt}`;\n\n return undefined;\n }\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // executableFile and executableDir might be full path, or just a name\n let executableFile =\n subcommand._executableFile || `${this._name}-${subcommand._name}`;\n let executableDir = this._executableDir || '';\n if (this._scriptPath) {\n let resolvedScriptPath; // resolve possible symlink for installed npm binary\n try {\n resolvedScriptPath = fs.realpathSync(this._scriptPath);\n } catch {\n resolvedScriptPath = this._scriptPath;\n }\n executableDir = path.resolve(\n path.dirname(resolvedScriptPath),\n executableDir,\n );\n }\n\n // Look for a local file in preference to a command in PATH.\n if (executableDir) {\n let localFile = findFile(executableDir, executableFile);\n\n // Legacy search using prefix of script name instead of command name\n if (!localFile && !subcommand._executableFile && this._scriptPath) {\n const legacyName = path.basename(\n this._scriptPath,\n path.extname(this._scriptPath),\n );\n if (legacyName !== this._name) {\n localFile = findFile(\n executableDir,\n `${legacyName}-${subcommand._name}`,\n );\n }\n }\n executableFile = localFile || executableFile;\n }\n\n const launchWithNode = sourceExt.includes(path.extname(executableFile));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' });\n }\n } else {\n this._checkForMissingExecutable(\n executableFile,\n executableDir,\n subcommand._name,\n );\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n if (!proc.killed) {\n // testing mainly to avoid leak warnings during unit tests with mocked spawn\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n // @ts-ignore because signals not typed to known strings\n proc.kill(signal);\n }\n });\n });\n }\n\n // By default terminate process when spawned process terminates.\n const exitCallback = this._exitCallback;\n proc.on('close', (code) => {\n code = code ?? 1; // code is null if spawned process terminated due to a signal\n if (!exitCallback) {\n process.exit(code);\n } else {\n exitCallback(\n new CommanderError(\n code,\n 'commander.executeSubCommandAsync',\n '(close)',\n ),\n );\n }\n });\n proc.on('error', (err) => {\n // @ts-ignore: because err.code is an unknown property\n if (err.code === 'ENOENT') {\n this._checkForMissingExecutable(\n executableFile,\n executableDir,\n subcommand._name,\n );\n // @ts-ignore: because err.code is an unknown property\n } else if (err.code === 'EACCES') {\n throw new Error(`'${executableFile}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(\n 1,\n 'commander.executeSubCommandAsync',\n '(error)',\n );\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }\n\n /**\n * @private\n */\n\n _dispatchSubcommand(commandName, operands, unknown) {\n const subCommand = this._findCommand(commandName);\n if (!subCommand) this.help({ error: true });\n\n subCommand._prepareForParse();\n let promiseChain;\n promiseChain = this._chainOrCallSubCommandHook(\n promiseChain,\n subCommand,\n 'preSubcommand',\n );\n promiseChain = this._chainOrCall(promiseChain, () => {\n if (subCommand._executableHandler) {\n this._executeSubCommand(subCommand, operands.concat(unknown));\n } else {\n return subCommand._parseCommand(operands, unknown);\n }\n });\n return promiseChain;\n }\n\n /**\n * Invoke help directly if possible, or dispatch if necessary.\n * e.g. help foo\n *\n * @private\n */\n\n _dispatchHelpCommand(subcommandName) {\n if (!subcommandName) {\n this.help();\n }\n const subCommand = this._findCommand(subcommandName);\n if (subCommand && !subCommand._executableHandler) {\n subCommand.help();\n }\n\n // Fallback to parsing the help flag to invoke the help.\n return this._dispatchSubcommand(\n subcommandName,\n [],\n [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'],\n );\n }\n\n /**\n * Check this.args against expected this.registeredArguments.\n *\n * @private\n */\n\n _checkNumberOfArguments() {\n // too few\n this.registeredArguments.forEach((arg, i) => {\n if (arg.required && this.args[i] == null) {\n this.missingArgument(arg.name());\n }\n });\n // too many\n if (\n this.registeredArguments.length > 0 &&\n this.registeredArguments[this.registeredArguments.length - 1].variadic\n ) {\n return;\n }\n if (this.args.length > this.registeredArguments.length) {\n this._excessArguments(this.args);\n }\n }\n\n /**\n * Process this.args using this.registeredArguments and save as this.processedArgs!\n *\n * @private\n */\n\n _processArguments() {\n const myParseArg = (argument, value, previous) => {\n // Extra processing for nice error message on parsing failure.\n let parsedValue = value;\n if (value !== null && argument.parseArg) {\n const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;\n parsedValue = this._callParseArg(\n argument,\n value,\n previous,\n invalidValueMessage,\n );\n }\n return parsedValue;\n };\n\n this._checkNumberOfArguments();\n\n const processedArgs = [];\n this.registeredArguments.forEach((declaredArg, index) => {\n let value = declaredArg.defaultValue;\n if (declaredArg.variadic) {\n // Collect together remaining arguments for passing together as an array.\n if (index < this.args.length) {\n value = this.args.slice(index);\n if (declaredArg.parseArg) {\n value = value.reduce((processed, v) => {\n return myParseArg(declaredArg, v, processed);\n }, declaredArg.defaultValue);\n }\n } else if (value === undefined) {\n value = [];\n }\n } else if (index < this.args.length) {\n value = this.args[index];\n if (declaredArg.parseArg) {\n value = myParseArg(declaredArg, value, declaredArg.defaultValue);\n }\n }\n processedArgs[index] = value;\n });\n this.processedArgs = processedArgs;\n }\n\n /**\n * Once we have a promise we chain, but call synchronously until then.\n *\n * @param {(Promise|undefined)} promise\n * @param {Function} fn\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCall(promise, fn) {\n // thenable\n if (promise?.then && typeof promise.then === 'function') {\n // already have a promise, chain callback\n return promise.then(() => fn());\n }\n // callback might return a promise\n return fn();\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallHooks(promise, event) {\n let result = promise;\n const hooks = [];\n this._getCommandAndAncestors()\n .reverse()\n .filter((cmd) => cmd._lifeCycleHooks[event] !== undefined)\n .forEach((hookedCommand) => {\n hookedCommand._lifeCycleHooks[event].forEach((callback) => {\n hooks.push({ hookedCommand, callback });\n });\n });\n if (event === 'postAction') {\n hooks.reverse();\n }\n\n hooks.forEach((hookDetail) => {\n result = this._chainOrCall(result, () => {\n return hookDetail.callback(hookDetail.hookedCommand, this);\n });\n });\n return result;\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {Command} subCommand\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallSubCommandHook(promise, subCommand, event) {\n let result = promise;\n if (this._lifeCycleHooks[event] !== undefined) {\n this._lifeCycleHooks[event].forEach((hook) => {\n result = this._chainOrCall(result, () => {\n return hook(this, subCommand);\n });\n });\n }\n return result;\n }\n\n /**\n * Process arguments in context of this command.\n * Returns action result, in case it is a promise.\n *\n * @private\n */\n\n _parseCommand(operands, unknown) {\n const parsed = this.parseOptions(unknown);\n this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env\n this._parseOptionsImplied();\n operands = operands.concat(parsed.operands);\n unknown = parsed.unknown;\n this.args = operands.concat(unknown);\n\n if (operands && this._findCommand(operands[0])) {\n return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);\n }\n if (\n this._getHelpCommand() &&\n operands[0] === this._getHelpCommand().name()\n ) {\n return this._dispatchHelpCommand(operands[1]);\n }\n if (this._defaultCommandName) {\n this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command\n return this._dispatchSubcommand(\n this._defaultCommandName,\n operands,\n unknown,\n );\n }\n if (\n this.commands.length &&\n this.args.length === 0 &&\n !this._actionHandler &&\n !this._defaultCommandName\n ) {\n // probably missing subcommand and no handler, user needs help (and exit)\n this.help({ error: true });\n }\n\n this._outputHelpIfRequested(parsed.unknown);\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // We do not always call this check to avoid masking a \"better\" error, like unknown command.\n const checkForUnknownOptions = () => {\n if (parsed.unknown.length > 0) {\n this.unknownOption(parsed.unknown[0]);\n }\n };\n\n const commandEvent = `command:${this.name()}`;\n if (this._actionHandler) {\n checkForUnknownOptions();\n this._processArguments();\n\n let promiseChain;\n promiseChain = this._chainOrCallHooks(promiseChain, 'preAction');\n promiseChain = this._chainOrCall(promiseChain, () =>\n this._actionHandler(this.processedArgs),\n );\n if (this.parent) {\n promiseChain = this._chainOrCall(promiseChain, () => {\n this.parent.emit(commandEvent, operands, unknown); // legacy\n });\n }\n promiseChain = this._chainOrCallHooks(promiseChain, 'postAction');\n return promiseChain;\n }\n if (this.parent?.listenerCount(commandEvent)) {\n checkForUnknownOptions();\n this._processArguments();\n this.parent.emit(commandEvent, operands, unknown); // legacy\n } else if (operands.length) {\n if (this._findCommand('*')) {\n // legacy default command\n return this._dispatchSubcommand('*', operands, unknown);\n }\n if (this.listenerCount('command:*')) {\n // skip option check, emit event for possible misspelling suggestion\n this.emit('command:*', operands, unknown);\n } else if (this.commands.length) {\n this.unknownCommand();\n } else {\n checkForUnknownOptions();\n this._processArguments();\n }\n } else if (this.commands.length) {\n checkForUnknownOptions();\n // This command has subcommands and nothing hooked up at this level, so display help (and exit).\n this.help({ error: true });\n } else {\n checkForUnknownOptions();\n this._processArguments();\n // fall through for caller to handle after calling .parse()\n }\n }\n\n /**\n * Find matching command.\n *\n * @private\n * @return {Command | undefined}\n */\n _findCommand(name) {\n if (!name) return undefined;\n return this.commands.find(\n (cmd) => cmd._name === name || cmd._aliases.includes(name),\n );\n }\n\n /**\n * Return an option matching `arg` if any.\n *\n * @param {string} arg\n * @return {Option}\n * @package\n */\n\n _findOption(arg) {\n return this.options.find((option) => option.is(arg));\n }\n\n /**\n * Display an error message if a mandatory option does not have a value.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n\n _checkForMissingMandatoryOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd.options.forEach((anOption) => {\n if (\n anOption.mandatory &&\n cmd.getOptionValue(anOption.attributeName()) === undefined\n ) {\n cmd.missingMandatoryOptionValue(anOption);\n }\n });\n });\n }\n\n /**\n * Display an error message if conflicting options are used together in this.\n *\n * @private\n */\n _checkForConflictingLocalOptions() {\n const definedNonDefaultOptions = this.options.filter((option) => {\n const optionKey = option.attributeName();\n if (this.getOptionValue(optionKey) === undefined) {\n return false;\n }\n return this.getOptionValueSource(optionKey) !== 'default';\n });\n\n const optionsWithConflicting = definedNonDefaultOptions.filter(\n (option) => option.conflictsWith.length > 0,\n );\n\n optionsWithConflicting.forEach((option) => {\n const conflictingAndDefined = definedNonDefaultOptions.find((defined) =>\n option.conflictsWith.includes(defined.attributeName()),\n );\n if (conflictingAndDefined) {\n this._conflictingOption(option, conflictingAndDefined);\n }\n });\n }\n\n /**\n * Display an error message if conflicting options are used together.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n _checkForConflictingOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd._checkForConflictingLocalOptions();\n });\n }\n\n /**\n * Parse options from `argv` removing known options,\n * and return argv split into operands and unknown arguments.\n *\n * Side effects: modifies command by storing options. Does not reset state if called again.\n *\n * Examples:\n *\n * argv => operands, unknown\n * --known kkk op => [op], []\n * op --known kkk => [op], []\n * sub --unknown uuu op => [sub], [--unknown uuu op]\n * sub -- --unknown uuu op => [sub --unknown uuu op], []\n *\n * @param {string[]} args\n * @return {{operands: string[], unknown: string[]}}\n */\n\n parseOptions(args) {\n const operands = []; // operands, not options or values\n const unknown = []; // first unknown option and remaining unknown args\n let dest = operands;\n\n function maybeOption(arg) {\n return arg.length > 1 && arg[0] === '-';\n }\n\n const negativeNumberArg = (arg) => {\n // return false if not a negative number\n if (!/^-(\\d+|\\d*\\.\\d+)(e[+-]?\\d+)?$/.test(arg)) return false;\n // negative number is ok unless digit used as an option in command hierarchy\n return !this._getCommandAndAncestors().some((cmd) =>\n cmd.options\n .map((opt) => opt.short)\n .some((short) => /^-\\d$/.test(short)),\n );\n };\n\n // parse options\n let activeVariadicOption = null;\n let activeGroup = null; // working through group of short options, like -abc\n let i = 0;\n while (i < args.length || activeGroup) {\n const arg = activeGroup ?? args[i++];\n activeGroup = null;\n\n // literal\n if (arg === '--') {\n if (dest === unknown) dest.push(arg);\n dest.push(...args.slice(i));\n break;\n }\n\n if (\n activeVariadicOption &&\n (!maybeOption(arg) || negativeNumberArg(arg))\n ) {\n this.emit(`option:${activeVariadicOption.name()}`, arg);\n continue;\n }\n activeVariadicOption = null;\n\n if (maybeOption(arg)) {\n const option = this._findOption(arg);\n // recognised option, call listener to assign value with possible custom processing\n if (option) {\n if (option.required) {\n const value = args[i++];\n if (value === undefined) this.optionMissingArgument(option);\n this.emit(`option:${option.name()}`, value);\n } else if (option.optional) {\n let value = null;\n // historical behaviour is optional value is following arg unless an option\n if (\n i < args.length &&\n (!maybeOption(args[i]) || negativeNumberArg(args[i]))\n ) {\n value = args[i++];\n }\n this.emit(`option:${option.name()}`, value);\n } else {\n // boolean flag\n this.emit(`option:${option.name()}`);\n }\n activeVariadicOption = option.variadic ? option : null;\n continue;\n }\n }\n\n // Look for combo options following single dash, eat first one if known.\n if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {\n const option = this._findOption(`-${arg[1]}`);\n if (option) {\n if (\n option.required ||\n (option.optional && this._combineFlagAndOptionalValue)\n ) {\n // option with value following in same argument\n this.emit(`option:${option.name()}`, arg.slice(2));\n } else {\n // boolean option\n this.emit(`option:${option.name()}`);\n // remove the processed option and keep processing group\n activeGroup = `-${arg.slice(2)}`;\n }\n continue;\n }\n }\n\n // Look for known long flag with value, like --foo=bar\n if (/^--[^=]+=/.test(arg)) {\n const index = arg.indexOf('=');\n const option = this._findOption(arg.slice(0, index));\n if (option && (option.required || option.optional)) {\n this.emit(`option:${option.name()}`, arg.slice(index + 1));\n continue;\n }\n }\n\n // Not a recognised option by this command.\n // Might be a command-argument, or subcommand option, or unknown option, or help command or option.\n\n // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.\n // A negative number in a leaf command is not an unknown option.\n if (\n dest === operands &&\n maybeOption(arg) &&\n !(this.commands.length === 0 && negativeNumberArg(arg))\n ) {\n dest = unknown;\n }\n\n // If using positionalOptions, stop processing our options at subcommand.\n if (\n (this._enablePositionalOptions || this._passThroughOptions) &&\n operands.length === 0 &&\n unknown.length === 0\n ) {\n if (this._findCommand(arg)) {\n operands.push(arg);\n unknown.push(...args.slice(i));\n break;\n } else if (\n this._getHelpCommand() &&\n arg === this._getHelpCommand().name()\n ) {\n operands.push(arg, ...args.slice(i));\n break;\n } else if (this._defaultCommandName) {\n unknown.push(arg, ...args.slice(i));\n break;\n }\n }\n\n // If using passThroughOptions, stop processing options at first command-argument.\n if (this._passThroughOptions) {\n dest.push(arg, ...args.slice(i));\n break;\n }\n\n // add arg\n dest.push(arg);\n }\n\n return { operands, unknown };\n }\n\n /**\n * Return an object containing local option values as key-value pairs.\n *\n * @return {object}\n */\n opts() {\n if (this._storeOptionsAsProperties) {\n // Preserve original behaviour so backwards compatible when still using properties\n const result = {};\n const len = this.options.length;\n\n for (let i = 0; i < len; i++) {\n const key = this.options[i].attributeName();\n result[key] =\n key === this._versionOptionName ? this._version : this[key];\n }\n return result;\n }\n\n return this._optionValues;\n }\n\n /**\n * Return an object containing merged local and global option values as key-value pairs.\n *\n * @return {object}\n */\n optsWithGlobals() {\n // globals overwrite locals\n return this._getCommandAndAncestors().reduce(\n (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),\n {},\n );\n }\n\n /**\n * Display error message and exit (or call exitOverride).\n *\n * @param {string} message\n * @param {object} [errorOptions]\n * @param {string} [errorOptions.code] - an id string representing the error\n * @param {number} [errorOptions.exitCode] - used with process.exit\n */\n error(message, errorOptions) {\n // output handling\n this._outputConfiguration.outputError(\n `${message}\\n`,\n this._outputConfiguration.writeErr,\n );\n if (typeof this._showHelpAfterError === 'string') {\n this._outputConfiguration.writeErr(`${this._showHelpAfterError}\\n`);\n } else if (this._showHelpAfterError) {\n this._outputConfiguration.writeErr('\\n');\n this.outputHelp({ error: true });\n }\n\n // exit handling\n const config = errorOptions || {};\n const exitCode = config.exitCode || 1;\n const code = config.code || 'commander.error';\n this._exit(exitCode, code, message);\n }\n\n /**\n * Apply any option related environment variables, if option does\n * not have a value from cli or client code.\n *\n * @private\n */\n _parseOptionsEnv() {\n this.options.forEach((option) => {\n if (option.envVar && option.envVar in process.env) {\n const optionKey = option.attributeName();\n // Priority check. Do not overwrite cli or options from unknown source (client-code).\n if (\n this.getOptionValue(optionKey) === undefined ||\n ['default', 'config', 'env'].includes(\n this.getOptionValueSource(optionKey),\n )\n ) {\n if (option.required || option.optional) {\n // option can take a value\n // keep very simple, optional always takes value\n this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);\n } else {\n // boolean\n // keep very simple, only care that envVar defined and not the value\n this.emit(`optionEnv:${option.name()}`);\n }\n }\n }\n });\n }\n\n /**\n * Apply any implied option values, if option is undefined or default value.\n *\n * @private\n */\n _parseOptionsImplied() {\n const dualHelper = new DualOptions(this.options);\n const hasCustomOptionValue = (optionKey) => {\n return (\n this.getOptionValue(optionKey) !== undefined &&\n !['default', 'implied'].includes(this.getOptionValueSource(optionKey))\n );\n };\n this.options\n .filter(\n (option) =>\n option.implied !== undefined &&\n hasCustomOptionValue(option.attributeName()) &&\n dualHelper.valueFromOption(\n this.getOptionValue(option.attributeName()),\n option,\n ),\n )\n .forEach((option) => {\n Object.keys(option.implied)\n .filter((impliedKey) => !hasCustomOptionValue(impliedKey))\n .forEach((impliedKey) => {\n this.setOptionValueWithSource(\n impliedKey,\n option.implied[impliedKey],\n 'implied',\n );\n });\n });\n }\n\n /**\n * Argument `name` is missing.\n *\n * @param {string} name\n * @private\n */\n\n missingArgument(name) {\n const message = `error: missing required argument '${name}'`;\n this.error(message, { code: 'commander.missingArgument' });\n }\n\n /**\n * `Option` is missing an argument.\n *\n * @param {Option} option\n * @private\n */\n\n optionMissingArgument(option) {\n const message = `error: option '${option.flags}' argument missing`;\n this.error(message, { code: 'commander.optionMissingArgument' });\n }\n\n /**\n * `Option` does not have a value, and is a mandatory option.\n *\n * @param {Option} option\n * @private\n */\n\n missingMandatoryOptionValue(option) {\n const message = `error: required option '${option.flags}' not specified`;\n this.error(message, { code: 'commander.missingMandatoryOptionValue' });\n }\n\n /**\n * `Option` conflicts with another option.\n *\n * @param {Option} option\n * @param {Option} conflictingOption\n * @private\n */\n _conflictingOption(option, conflictingOption) {\n // The calling code does not know whether a negated option is the source of the\n // value, so do some work to take an educated guess.\n const findBestOptionFromValue = (option) => {\n const optionKey = option.attributeName();\n const optionValue = this.getOptionValue(optionKey);\n const negativeOption = this.options.find(\n (target) => target.negate && optionKey === target.attributeName(),\n );\n const positiveOption = this.options.find(\n (target) => !target.negate && optionKey === target.attributeName(),\n );\n if (\n negativeOption &&\n ((negativeOption.presetArg === undefined && optionValue === false) ||\n (negativeOption.presetArg !== undefined &&\n optionValue === negativeOption.presetArg))\n ) {\n return negativeOption;\n }\n return positiveOption || option;\n };\n\n const getErrorMessage = (option) => {\n const bestOption = findBestOptionFromValue(option);\n const optionKey = bestOption.attributeName();\n const source = this.getOptionValueSource(optionKey);\n if (source === 'env') {\n return `environment variable '${bestOption.envVar}'`;\n }\n return `option '${bestOption.flags}'`;\n };\n\n const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;\n this.error(message, { code: 'commander.conflictingOption' });\n }\n\n /**\n * Unknown option `flag`.\n *\n * @param {string} flag\n * @private\n */\n\n unknownOption(flag) {\n if (this._allowUnknownOption) return;\n let suggestion = '';\n\n if (flag.startsWith('--') && this._showSuggestionAfterError) {\n // Looping to pick up the global options too\n let candidateFlags = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n do {\n const moreFlags = command\n .createHelp()\n .visibleOptions(command)\n .filter((option) => option.long)\n .map((option) => option.long);\n candidateFlags = candidateFlags.concat(moreFlags);\n command = command.parent;\n } while (command && !command._enablePositionalOptions);\n suggestion = suggestSimilar(flag, candidateFlags);\n }\n\n const message = `error: unknown option '${flag}'${suggestion}`;\n this.error(message, { code: 'commander.unknownOption' });\n }\n\n /**\n * Excess arguments, more than expected.\n *\n * @param {string[]} receivedArgs\n * @private\n */\n\n _excessArguments(receivedArgs) {\n if (this._allowExcessArguments) return;\n\n const expected = this.registeredArguments.length;\n const s = expected === 1 ? '' : 's';\n const received = receivedArgs.length;\n const forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const details = receivedArgs.join(', ');\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${received}: ${details}.`;\n this.error(message, { code: 'commander.excessArguments' });\n }\n\n /**\n * Unknown command.\n *\n * @private\n */\n\n unknownCommand() {\n const unknownName = this.args[0];\n let suggestion = '';\n\n if (this._showSuggestionAfterError) {\n const candidateNames = [];\n this.createHelp()\n .visibleCommands(this)\n .forEach((command) => {\n candidateNames.push(command.name());\n // just visible alias\n if (command.alias()) candidateNames.push(command.alias());\n });\n suggestion = suggestSimilar(unknownName, candidateNames);\n }\n\n const message = `error: unknown command '${unknownName}'${suggestion}`;\n this.error(message, { code: 'commander.unknownCommand' });\n }\n\n /**\n * Get or set the program version.\n *\n * This method auto-registers the \"-V, --version\" option which will print the version number.\n *\n * You can optionally supply the flags and description to override the defaults.\n *\n * @param {string} [str]\n * @param {string} [flags]\n * @param {string} [description]\n * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments\n */\n\n version(str, flags, description) {\n if (str === undefined) return this._version;\n this._version = str;\n flags = flags || '-V, --version';\n description = description || 'output the version number';\n const versionOption = this.createOption(flags, description);\n this._versionOptionName = versionOption.attributeName();\n this._registerOption(versionOption);\n\n this.on('option:' + versionOption.name(), () => {\n this._outputConfiguration.writeOut(`${str}\\n`);\n this._exit(0, 'commander.version', str);\n });\n return this;\n }\n\n /**\n * Set the description.\n *\n * @param {string} [str]\n * @param {object} [argsDescription]\n * @return {(string|Command)}\n */\n description(str, argsDescription) {\n if (str === undefined && argsDescription === undefined)\n return this._description;\n this._description = str;\n if (argsDescription) {\n this._argsDescription = argsDescription;\n }\n return this;\n }\n\n /**\n * Set the summary. Used when listed as subcommand of parent.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n summary(str) {\n if (str === undefined) return this._summary;\n this._summary = str;\n return this;\n }\n\n /**\n * Set an alias for the command.\n *\n * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n *\n * @param {string} [alias]\n * @return {(string|Command)}\n */\n\n alias(alias) {\n if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility\n\n /** @type {Command} */\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n if (\n this.commands.length !== 0 &&\n this.commands[this.commands.length - 1]._executableHandler\n ) {\n // assume adding alias for last added executable subcommand, rather than this\n command = this.commands[this.commands.length - 1];\n }\n\n if (alias === command._name)\n throw new Error(\"Command alias can't be the same as its name\");\n const matchingCommand = this.parent?._findCommand(alias);\n if (matchingCommand) {\n // c.f. _registerCommand\n const existingCmd = [matchingCommand.name()]\n .concat(matchingCommand.aliases())\n .join('|');\n throw new Error(\n `cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`,\n );\n }\n\n command._aliases.push(alias);\n return this;\n }\n\n /**\n * Set aliases for the command.\n *\n * Only the first alias is shown in the auto-generated help.\n *\n * @param {string[]} [aliases]\n * @return {(string[]|Command)}\n */\n\n aliases(aliases) {\n // Getter for the array of aliases is the main reason for having aliases() in addition to alias().\n if (aliases === undefined) return this._aliases;\n\n aliases.forEach((alias) => this.alias(alias));\n return this;\n }\n\n /**\n * Set / get the command usage `str`.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n usage(str) {\n if (str === undefined) {\n if (this._usage) return this._usage;\n\n const args = this.registeredArguments.map((arg) => {\n return humanReadableArgName(arg);\n });\n return []\n .concat(\n this.options.length || this._helpOption !== null ? '[options]' : [],\n this.commands.length ? '[command]' : [],\n this.registeredArguments.length ? args : [],\n )\n .join(' ');\n }\n\n this._usage = str;\n return this;\n }\n\n /**\n * Get or set the name of the command.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n name(str) {\n if (str === undefined) return this._name;\n this._name = str;\n return this;\n }\n\n /**\n * Set/get the help group heading for this subcommand in parent command's help.\n *\n * @param {string} [heading]\n * @return {Command | string}\n */\n\n helpGroup(heading) {\n if (heading === undefined) return this._helpGroupHeading ?? '';\n this._helpGroupHeading = heading;\n return this;\n }\n\n /**\n * Set/get the default help group heading for subcommands added to this command.\n * (This does not override a group set directly on the subcommand using .helpGroup().)\n *\n * @example\n * program.commandsGroup('Development Commands:);\n * program.command('watch')...\n * program.command('lint')...\n * ...\n *\n * @param {string} [heading]\n * @returns {Command | string}\n */\n commandsGroup(heading) {\n if (heading === undefined) return this._defaultCommandGroup ?? '';\n this._defaultCommandGroup = heading;\n return this;\n }\n\n /**\n * Set/get the default help group heading for options added to this command.\n * (This does not override a group set directly on the option using .helpGroup().)\n *\n * @example\n * program\n * .optionsGroup('Development Options:')\n * .option('-d, --debug', 'output extra debugging')\n * .option('-p, --profile', 'output profiling information')\n *\n * @param {string} [heading]\n * @returns {Command | string}\n */\n optionsGroup(heading) {\n if (heading === undefined) return this._defaultOptionGroup ?? '';\n this._defaultOptionGroup = heading;\n return this;\n }\n\n /**\n * @param {Option} option\n * @private\n */\n _initOptionGroup(option) {\n if (this._defaultOptionGroup && !option.helpGroupHeading)\n option.helpGroup(this._defaultOptionGroup);\n }\n\n /**\n * @param {Command} cmd\n * @private\n */\n _initCommandGroup(cmd) {\n if (this._defaultCommandGroup && !cmd.helpGroup())\n cmd.helpGroup(this._defaultCommandGroup);\n }\n\n /**\n * Set the name of the command from script filename, such as process.argv[1],\n * or import.meta.filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(import.meta.filename);\n *\n * @param {string} filename\n * @return {Command}\n */\n\n nameFromFilename(filename) {\n this._name = path.basename(filename, path.extname(filename));\n\n return this;\n }\n\n /**\n * Get or set the directory for searching for executable subcommands of this command.\n *\n * @example\n * program.executableDir(import.meta.dirname);\n * // or\n * program.executableDir('subcommands');\n *\n * @param {string} [path]\n * @return {(string|null|Command)}\n */\n\n executableDir(path) {\n if (path === undefined) return this._executableDir;\n this._executableDir = path;\n return this;\n }\n\n /**\n * Return program help documentation.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout\n * @return {string}\n */\n\n helpInformation(contextOptions) {\n const helper = this.createHelp();\n const context = this._getOutputContext(contextOptions);\n helper.prepareContext({\n error: context.error,\n helpWidth: context.helpWidth,\n outputHasColors: context.hasColors,\n });\n const text = helper.formatHelp(this, helper);\n if (context.hasColors) return text;\n return this._outputConfiguration.stripColor(text);\n }\n\n /**\n * @typedef HelpContext\n * @type {object}\n * @property {boolean} error\n * @property {number} helpWidth\n * @property {boolean} hasColors\n * @property {function} write - includes stripColor if needed\n *\n * @returns {HelpContext}\n * @private\n */\n\n _getOutputContext(contextOptions) {\n contextOptions = contextOptions || {};\n const error = !!contextOptions.error;\n let baseWrite;\n let hasColors;\n let helpWidth;\n if (error) {\n baseWrite = (str) => this._outputConfiguration.writeErr(str);\n hasColors = this._outputConfiguration.getErrHasColors();\n helpWidth = this._outputConfiguration.getErrHelpWidth();\n } else {\n baseWrite = (str) => this._outputConfiguration.writeOut(str);\n hasColors = this._outputConfiguration.getOutHasColors();\n helpWidth = this._outputConfiguration.getOutHelpWidth();\n }\n const write = (str) => {\n if (!hasColors) str = this._outputConfiguration.stripColor(str);\n return baseWrite(str);\n };\n return { error, write, hasColors, helpWidth };\n }\n\n /**\n * Output help information for this command.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n outputHelp(contextOptions) {\n let deprecatedCallback;\n if (typeof contextOptions === 'function') {\n deprecatedCallback = contextOptions;\n contextOptions = undefined;\n }\n\n const outputContext = this._getOutputContext(contextOptions);\n /** @type {HelpTextEventContext} */\n const eventContext = {\n error: outputContext.error,\n write: outputContext.write,\n command: this,\n };\n\n this._getCommandAndAncestors()\n .reverse()\n .forEach((command) => command.emit('beforeAllHelp', eventContext));\n this.emit('beforeHelp', eventContext);\n\n let helpInformation = this.helpInformation({ error: outputContext.error });\n if (deprecatedCallback) {\n helpInformation = deprecatedCallback(helpInformation);\n if (\n typeof helpInformation !== 'string' &&\n !Buffer.isBuffer(helpInformation)\n ) {\n throw new Error('outputHelp callback must return a string or a Buffer');\n }\n }\n outputContext.write(helpInformation);\n\n if (this._getHelpOption()?.long) {\n this.emit(this._getHelpOption().long); // deprecated\n }\n this.emit('afterHelp', eventContext);\n this._getCommandAndAncestors().forEach((command) =>\n command.emit('afterAllHelp', eventContext),\n );\n }\n\n /**\n * You can pass in flags and a description to customise the built-in help option.\n * Pass in false to disable the built-in help option.\n *\n * @example\n * program.helpOption('-?, --help' 'show help'); // customise\n * program.helpOption(false); // disable\n *\n * @param {(string | boolean)} flags\n * @param {string} [description]\n * @return {Command} `this` command for chaining\n */\n\n helpOption(flags, description) {\n // Support enabling/disabling built-in help option.\n if (typeof flags === 'boolean') {\n if (flags) {\n if (this._helpOption === null) this._helpOption = undefined; // reenable\n if (this._defaultOptionGroup) {\n // make the option to store the group\n this._initOptionGroup(this._getHelpOption());\n }\n } else {\n this._helpOption = null; // disable\n }\n return this;\n }\n\n // Customise flags and description.\n this._helpOption = this.createOption(\n flags ?? '-h, --help',\n description ?? 'display help for command',\n );\n // init group unless lazy create\n if (flags || description) this._initOptionGroup(this._helpOption);\n\n return this;\n }\n\n /**\n * Lazy create help option.\n * Returns null if has been disabled with .helpOption(false).\n *\n * @returns {(Option | null)} the help option\n * @package\n */\n _getHelpOption() {\n // Lazy create help option on demand.\n if (this._helpOption === undefined) {\n this.helpOption(undefined, undefined);\n }\n return this._helpOption;\n }\n\n /**\n * Supply your own option to use for the built-in help option.\n * This is an alternative to using helpOption() to customise the flags and description etc.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addHelpOption(option) {\n this._helpOption = option;\n this._initOptionGroup(option);\n return this;\n }\n\n /**\n * Output help information and exit.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n help(contextOptions) {\n this.outputHelp(contextOptions);\n let exitCode = Number(process.exitCode ?? 0); // process.exitCode does allow a string or an integer, but we prefer just a number\n if (\n exitCode === 0 &&\n contextOptions &&\n typeof contextOptions !== 'function' &&\n contextOptions.error\n ) {\n exitCode = 1;\n }\n // message: do not have all displayed text available so only passing placeholder.\n this._exit(exitCode, 'commander.help', '(outputHelp)');\n }\n\n /**\n * // Do a little typing to coordinate emit and listener for the help text events.\n * @typedef HelpTextEventContext\n * @type {object}\n * @property {boolean} error\n * @property {Command} command\n * @property {function} write\n */\n\n /**\n * Add additional text to be displayed with the built-in help.\n *\n * Position is 'before' or 'after' to affect just this command,\n * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n *\n * @param {string} position - before or after built-in help\n * @param {(string | Function)} text - string to add, or a function returning a string\n * @return {Command} `this` command for chaining\n */\n\n addHelpText(position, text) {\n const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];\n if (!allowedValues.includes(position)) {\n throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n\n const helpEvent = `${position}Help`;\n this.on(helpEvent, (/** @type {HelpTextEventContext} */ context) => {\n let helpStr;\n if (typeof text === 'function') {\n helpStr = text({ error: context.error, command: context.command });\n } else {\n helpStr = text;\n }\n // Ignore falsy value when nothing to output.\n if (helpStr) {\n context.write(`${helpStr}\\n`);\n }\n });\n return this;\n }\n\n /**\n * Output help information if help flags specified\n *\n * @param {Array} args - array of options to search for help flags\n * @private\n */\n\n _outputHelpIfRequested(args) {\n const helpOption = this._getHelpOption();\n const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));\n if (helpRequested) {\n this.outputHelp();\n // (Do not have all displayed text available so only passing placeholder.)\n this._exit(0, 'commander.helpDisplayed', '(outputHelp)');\n }\n }\n}\n\n/**\n * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).\n *\n * @param {string[]} args - array of arguments from node.execArgv\n * @returns {string[]}\n * @private\n */\n\nfunction incrementNodeInspectorPort(args) {\n // Testing for these options:\n // --inspect[=[host:]port]\n // --inspect-brk[=[host:]port]\n // --inspect-port=[host:]port\n return args.map((arg) => {\n if (!arg.startsWith('--inspect')) {\n return arg;\n }\n let debugOption;\n let debugHost = '127.0.0.1';\n let debugPort = '9229';\n let match;\n if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {\n // e.g. --inspect\n debugOption = match[1];\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null\n ) {\n debugOption = match[1];\n if (/^\\d+$/.test(match[3])) {\n // e.g. --inspect=1234\n debugPort = match[3];\n } else {\n // e.g. --inspect=localhost\n debugHost = match[3];\n }\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\\d+)$/)) !== null\n ) {\n // e.g. --inspect=localhost:1234\n debugOption = match[1];\n debugHost = match[3];\n debugPort = match[4];\n }\n\n if (debugOption && debugPort !== '0') {\n return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;\n }\n return arg;\n });\n}\n\n/**\n * Exported for using from tests, not otherwise used outside this file.\n *\n * @returns {boolean | undefined}\n * @package\n */\nexport function useColor() {\n // Test for common conventions.\n // NB: the observed behaviour is in combination with how author adds color! For example:\n // - we do not test NODE_DISABLE_COLORS, but util:styletext does\n // - we do test NO_COLOR, but Chalk does not\n //\n // References:\n // https://no-color.org\n // https://bixense.com/clicolors/\n // https://github.com/nodejs/node/blob/0a00217a5f67ef4a22384cfc80eb6dd9a917fdc1/lib/internal/tty.js#L109\n // https://github.com/chalk/supports-color/blob/c214314a14bcb174b12b3014b2b0a8de375029ae/index.js#L33\n // (https://force-color.org recent web page from 2023, does not match major javascript implementations)\n\n if (\n process.env.NO_COLOR ||\n process.env.FORCE_COLOR === '0' ||\n process.env.FORCE_COLOR === 'false'\n )\n return false;\n if (process.env.FORCE_COLOR || process.env.CLICOLOR_FORCE !== undefined)\n return true;\n return undefined;\n}\n",
68
+ "import { humanReadableArgName } from './argument.js';\nimport { stripVTControlCharacters } from 'node:util';\n\n/**\n * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`\n * https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types\n * @typedef { import(\"./argument.js\").Argument } Argument\n * @typedef { import(\"./command.js\").Command } Command\n * @typedef { import(\"./option.js\").Option } Option\n */\n\n// Although this is a class, methods are static in style to allow override using subclass or just functions.\nexport class Help {\n constructor() {\n this.helpWidth = undefined;\n this.minWidthToWrap = 40;\n this.sortSubcommands = false;\n this.sortOptions = false;\n this.showGlobalOptions = false;\n }\n\n /**\n * prepareContext is called by Commander after applying overrides from `Command.configureHelp()`\n * and just before calling `formatHelp()`.\n *\n * Commander just uses the helpWidth and the rest is provided for optional use by more complex subclasses.\n *\n * @param {{ error?: boolean, helpWidth?: number, outputHasColors?: boolean }} contextOptions\n */\n prepareContext(contextOptions) {\n this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;\n }\n\n /**\n * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n *\n * @param {Command} cmd\n * @returns {Command[]}\n */\n\n visibleCommands(cmd) {\n const visibleCommands = cmd.commands.filter((cmd) => !cmd._hidden);\n const helpCommand = cmd._getHelpCommand();\n if (helpCommand && !helpCommand._hidden) {\n visibleCommands.push(helpCommand);\n }\n if (this.sortSubcommands) {\n visibleCommands.sort((a, b) => {\n // @ts-ignore: because overloaded return type\n return a.name().localeCompare(b.name());\n });\n }\n return visibleCommands;\n }\n\n /**\n * Compare options for sort.\n *\n * @param {Option} a\n * @param {Option} b\n * @returns {number}\n */\n compareOptions(a, b) {\n const getSortKey = (option) => {\n // WYSIWYG for order displayed in help. Short used for comparison if present. No special handling for negated.\n return option.short\n ? option.short.replace(/^-/, '')\n : option.long.replace(/^--/, '');\n };\n return getSortKey(a).localeCompare(getSortKey(b));\n }\n\n /**\n * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleOptions(cmd) {\n const visibleOptions = cmd.options.filter((option) => !option.hidden);\n // Built-in help option.\n const helpOption = cmd._getHelpOption();\n if (helpOption && !helpOption.hidden) {\n // Automatically hide conflicting flags. Bit dubious but a historical behaviour that is convenient for single-command programs.\n const removeShort = helpOption.short && cmd._findOption(helpOption.short);\n const removeLong = helpOption.long && cmd._findOption(helpOption.long);\n if (!removeShort && !removeLong) {\n visibleOptions.push(helpOption); // no changes needed\n } else if (helpOption.long && !removeLong) {\n visibleOptions.push(\n cmd.createOption(helpOption.long, helpOption.description),\n );\n } else if (helpOption.short && !removeShort) {\n visibleOptions.push(\n cmd.createOption(helpOption.short, helpOption.description),\n );\n }\n }\n if (this.sortOptions) {\n visibleOptions.sort(this.compareOptions);\n }\n return visibleOptions;\n }\n\n /**\n * Get an array of the visible global options. (Not including help.)\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleGlobalOptions(cmd) {\n if (!this.showGlobalOptions) return [];\n\n const globalOptions = [];\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n const visibleOptions = ancestorCmd.options.filter(\n (option) => !option.hidden,\n );\n globalOptions.push(...visibleOptions);\n }\n if (this.sortOptions) {\n globalOptions.sort(this.compareOptions);\n }\n return globalOptions;\n }\n\n /**\n * Get an array of the arguments if any have a description.\n *\n * @param {Command} cmd\n * @returns {Argument[]}\n */\n\n visibleArguments(cmd) {\n // Side effect! Apply the legacy descriptions before the arguments are displayed.\n if (cmd._argsDescription) {\n cmd.registeredArguments.forEach((argument) => {\n argument.description =\n argument.description || cmd._argsDescription[argument.name()] || '';\n });\n }\n\n // If there are any arguments with a description then return all the arguments.\n if (cmd.registeredArguments.find((argument) => argument.description)) {\n return cmd.registeredArguments;\n }\n return [];\n }\n\n /**\n * Get the command term to show in the list of subcommands.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandTerm(cmd) {\n // Legacy. Ignores custom usage string, and nested commands.\n const args = cmd.registeredArguments\n .map((arg) => humanReadableArgName(arg))\n .join(' ');\n return (\n cmd._name +\n (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +\n (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option\n (args ? ' ' + args : '')\n );\n }\n\n /**\n * Get the option term to show in the list of options.\n *\n * @param {Option} option\n * @returns {string}\n */\n\n optionTerm(option) {\n return option.flags;\n }\n\n /**\n * Get the argument term to show in the list of arguments.\n *\n * @param {Argument} argument\n * @returns {string}\n */\n\n argumentTerm(argument) {\n return argument.name();\n }\n\n /**\n * Get the longest command term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestSubcommandTermLength(cmd, helper) {\n return helper.visibleCommands(cmd).reduce((max, command) => {\n return Math.max(\n max,\n this.displayWidth(\n helper.styleSubcommandTerm(helper.subcommandTerm(command)),\n ),\n );\n }, 0);\n }\n\n /**\n * Get the longest option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestOptionTermLength(cmd, helper) {\n return helper.visibleOptions(cmd).reduce((max, option) => {\n return Math.max(\n max,\n this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option))),\n );\n }, 0);\n }\n\n /**\n * Get the longest global option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestGlobalOptionTermLength(cmd, helper) {\n return helper.visibleGlobalOptions(cmd).reduce((max, option) => {\n return Math.max(\n max,\n this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option))),\n );\n }, 0);\n }\n\n /**\n * Get the longest argument term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestArgumentTermLength(cmd, helper) {\n return helper.visibleArguments(cmd).reduce((max, argument) => {\n return Math.max(\n max,\n this.displayWidth(\n helper.styleArgumentTerm(helper.argumentTerm(argument)),\n ),\n );\n }, 0);\n }\n\n /**\n * Get the command usage to be displayed at the top of the built-in help.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandUsage(cmd) {\n // Usage\n let cmdName = cmd._name;\n if (cmd._aliases[0]) {\n cmdName = cmdName + '|' + cmd._aliases[0];\n }\n let ancestorCmdNames = '';\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n ancestorCmdNames = ancestorCmd.name() + ' ' + ancestorCmdNames;\n }\n return ancestorCmdNames + cmdName + ' ' + cmd.usage();\n }\n\n /**\n * Get the description for the command.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandDescription(cmd) {\n // @ts-ignore: because overloaded return type\n return cmd.description();\n }\n\n /**\n * Get the subcommand summary to show in the list of subcommands.\n * (Fallback to description for backwards compatibility.)\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandDescription(cmd) {\n // @ts-ignore: because overloaded return type\n return cmd.summary() || cmd.description();\n }\n\n /**\n * Get the option description to show in the list of options.\n *\n * @param {Option} option\n * @return {string}\n */\n\n optionDescription(option) {\n const extraInfo = [];\n\n if (option.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`,\n );\n }\n if (option.defaultValue !== undefined) {\n // default for boolean and negated more for programmer than end user,\n // but show true/false for boolean option as may be for hand-rolled env or config processing.\n const showDefault =\n option.required ||\n option.optional ||\n (option.isBoolean() && typeof option.defaultValue === 'boolean');\n if (showDefault) {\n extraInfo.push(\n `default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`,\n );\n }\n }\n // preset for boolean and negated are more for programmer than end user\n if (option.presetArg !== undefined && option.optional) {\n extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);\n }\n if (option.envVar !== undefined) {\n extraInfo.push(`env: ${option.envVar}`);\n }\n if (extraInfo.length > 0) {\n const extraDescription = `(${extraInfo.join(', ')})`;\n if (option.description) {\n return `${option.description} ${extraDescription}`;\n }\n return extraDescription;\n }\n\n return option.description;\n }\n\n /**\n * Get the argument description to show in the list of arguments.\n *\n * @param {Argument} argument\n * @return {string}\n */\n\n argumentDescription(argument) {\n const extraInfo = [];\n if (argument.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`,\n );\n }\n if (argument.defaultValue !== undefined) {\n extraInfo.push(\n `default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`,\n );\n }\n if (extraInfo.length > 0) {\n const extraDescription = `(${extraInfo.join(', ')})`;\n if (argument.description) {\n return `${argument.description} ${extraDescription}`;\n }\n return extraDescription;\n }\n return argument.description;\n }\n\n /**\n * Format a list of items, given a heading and an array of formatted items.\n *\n * @param {string} heading\n * @param {string[]} items\n * @param {Help} helper\n * @returns string[]\n */\n formatItemList(heading, items, helper) {\n if (items.length === 0) return [];\n\n return [helper.styleTitle(heading), ...items, ''];\n }\n\n /**\n * Group items by their help group heading.\n *\n * @param {Command[] | Option[]} unsortedItems\n * @param {Command[] | Option[]} visibleItems\n * @param {Function} getGroup\n * @returns {Map<string, Command[] | Option[]>}\n */\n groupItems(unsortedItems, visibleItems, getGroup) {\n const result = new Map();\n // Add groups in order of appearance in unsortedItems.\n unsortedItems.forEach((item) => {\n const group = getGroup(item);\n if (!result.has(group)) result.set(group, []);\n });\n // Add items in order of appearance in visibleItems.\n visibleItems.forEach((item) => {\n const group = getGroup(item);\n if (!result.has(group)) {\n result.set(group, []);\n }\n result.get(group).push(item);\n });\n return result;\n }\n\n /**\n * Generate the built-in help text.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {string}\n */\n\n formatHelp(cmd, helper) {\n const termWidth = helper.padWidth(cmd, helper);\n const helpWidth = helper.helpWidth ?? 80; // in case prepareContext() was not called\n\n function callFormatItem(term, description) {\n return helper.formatItem(term, termWidth, description, helper);\n }\n\n // Usage\n let output = [\n `${helper.styleTitle('Usage:')} ${helper.styleUsage(helper.commandUsage(cmd))}`,\n '',\n ];\n\n // Description\n const commandDescription = helper.commandDescription(cmd);\n if (commandDescription.length > 0) {\n output = output.concat([\n helper.boxWrap(\n helper.styleCommandDescription(commandDescription),\n helpWidth,\n ),\n '',\n ]);\n }\n\n // Arguments\n const argumentList = helper.visibleArguments(cmd).map((argument) => {\n return callFormatItem(\n helper.styleArgumentTerm(helper.argumentTerm(argument)),\n helper.styleArgumentDescription(helper.argumentDescription(argument)),\n );\n });\n output = output.concat(\n this.formatItemList('Arguments:', argumentList, helper),\n );\n\n // Options\n const optionGroups = this.groupItems(\n cmd.options,\n helper.visibleOptions(cmd),\n (option) => option.helpGroupHeading ?? 'Options:',\n );\n optionGroups.forEach((options, group) => {\n const optionList = options.map((option) => {\n return callFormatItem(\n helper.styleOptionTerm(helper.optionTerm(option)),\n helper.styleOptionDescription(helper.optionDescription(option)),\n );\n });\n output = output.concat(this.formatItemList(group, optionList, helper));\n });\n\n if (helper.showGlobalOptions) {\n const globalOptionList = helper\n .visibleGlobalOptions(cmd)\n .map((option) => {\n return callFormatItem(\n helper.styleOptionTerm(helper.optionTerm(option)),\n helper.styleOptionDescription(helper.optionDescription(option)),\n );\n });\n output = output.concat(\n this.formatItemList('Global Options:', globalOptionList, helper),\n );\n }\n\n // Commands\n const commandGroups = this.groupItems(\n cmd.commands,\n helper.visibleCommands(cmd),\n (sub) => sub.helpGroup() || 'Commands:',\n );\n commandGroups.forEach((commands, group) => {\n const commandList = commands.map((sub) => {\n return callFormatItem(\n helper.styleSubcommandTerm(helper.subcommandTerm(sub)),\n helper.styleSubcommandDescription(helper.subcommandDescription(sub)),\n );\n });\n output = output.concat(this.formatItemList(group, commandList, helper));\n });\n\n return output.join('\\n');\n }\n\n /**\n * Return display width of string, ignoring ANSI escape sequences. Used in padding and wrapping calculations.\n *\n * @param {string} str\n * @returns {number}\n */\n displayWidth(str) {\n return stripVTControlCharacters(str).length;\n }\n\n /**\n * Style the title for displaying in the help. Called with 'Usage:', 'Options:', etc.\n *\n * @param {string} str\n * @returns {string}\n */\n styleTitle(str) {\n return str;\n }\n\n styleUsage(str) {\n // Usage has lots of parts the user might like to color separately! Assume default usage string which is formed like:\n // command subcommand [options] [command] <foo> [bar]\n return str\n .split(' ')\n .map((word) => {\n if (word === '[options]') return this.styleOptionText(word);\n if (word === '[command]') return this.styleSubcommandText(word);\n if (word[0] === '[' || word[0] === '<')\n return this.styleArgumentText(word);\n return this.styleCommandText(word); // Restrict to initial words?\n })\n .join(' ');\n }\n styleCommandDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleOptionDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleSubcommandDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleArgumentDescription(str) {\n return this.styleDescriptionText(str);\n }\n styleDescriptionText(str) {\n return str;\n }\n styleOptionTerm(str) {\n return this.styleOptionText(str);\n }\n styleSubcommandTerm(str) {\n // This is very like usage with lots of parts! Assume default string which is formed like:\n // subcommand [options] <foo> [bar]\n return str\n .split(' ')\n .map((word) => {\n if (word === '[options]') return this.styleOptionText(word);\n if (word[0] === '[' || word[0] === '<')\n return this.styleArgumentText(word);\n return this.styleSubcommandText(word); // Restrict to initial words?\n })\n .join(' ');\n }\n styleArgumentTerm(str) {\n return this.styleArgumentText(str);\n }\n styleOptionText(str) {\n return str;\n }\n styleArgumentText(str) {\n return str;\n }\n styleSubcommandText(str) {\n return str;\n }\n styleCommandText(str) {\n return str;\n }\n\n /**\n * Calculate the pad width from the maximum term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n padWidth(cmd, helper) {\n return Math.max(\n helper.longestOptionTermLength(cmd, helper),\n helper.longestGlobalOptionTermLength(cmd, helper),\n helper.longestSubcommandTermLength(cmd, helper),\n helper.longestArgumentTermLength(cmd, helper),\n );\n }\n\n /**\n * Detect manually wrapped and indented strings by checking for line break followed by whitespace.\n *\n * @param {string} str\n * @returns {boolean}\n */\n preformatted(str) {\n return /\\n[^\\S\\r\\n]/.test(str);\n }\n\n /**\n * Format the \"item\", which consists of a term and description. Pad the term and wrap the description, indenting the following lines.\n *\n * So \"TTT\", 5, \"DDD DDDD DD DDD\" might be formatted for this.helpWidth=17 like so:\n * TTT DDD DDDD\n * DD DDD\n *\n * @param {string} term\n * @param {number} termWidth\n * @param {string} description\n * @param {Help} helper\n * @returns {string}\n */\n formatItem(term, termWidth, description, helper) {\n const itemIndent = 2;\n const itemIndentStr = ' '.repeat(itemIndent);\n if (!description) return itemIndentStr + term;\n\n // Pad the term out to a consistent width, so descriptions are aligned.\n const paddedTerm = term.padEnd(\n termWidth + term.length - helper.displayWidth(term),\n );\n\n // Format the description.\n const spacerWidth = 2; // between term and description\n const helpWidth = this.helpWidth ?? 80; // in case prepareContext() was not called\n const remainingWidth = helpWidth - termWidth - spacerWidth - itemIndent;\n let formattedDescription;\n if (\n remainingWidth < this.minWidthToWrap ||\n helper.preformatted(description)\n ) {\n formattedDescription = description;\n } else {\n const wrappedDescription = helper.boxWrap(description, remainingWidth);\n formattedDescription = wrappedDescription.replace(\n /\\n/g,\n '\\n' + ' '.repeat(termWidth + spacerWidth),\n );\n }\n\n // Construct and overall indent.\n return (\n itemIndentStr +\n paddedTerm +\n ' '.repeat(spacerWidth) +\n formattedDescription.replace(/\\n/g, `\\n${itemIndentStr}`)\n );\n }\n\n /**\n * Wrap a string at whitespace, preserving existing line breaks.\n * Wrapping is skipped if the width is less than `minWidthToWrap`.\n *\n * @param {string} str\n * @param {number} width\n * @returns {string}\n */\n boxWrap(str, width) {\n if (width < this.minWidthToWrap) return str;\n\n const rawLines = str.split(/\\r\\n|\\n/);\n // split up text by whitespace\n const chunkPattern = /[\\s]*[^\\s]+/g;\n const wrappedLines = [];\n rawLines.forEach((line) => {\n const chunks = line.match(chunkPattern);\n if (chunks === null) {\n wrappedLines.push('');\n return;\n }\n\n let sumChunks = [chunks.shift()];\n let sumWidth = this.displayWidth(sumChunks[0]);\n chunks.forEach((chunk) => {\n const visibleWidth = this.displayWidth(chunk);\n // Accumulate chunks while they fit into width.\n if (sumWidth + visibleWidth <= width) {\n sumChunks.push(chunk);\n sumWidth += visibleWidth;\n return;\n }\n wrappedLines.push(sumChunks.join(''));\n\n const nextChunk = chunk.trimStart(); // trim space at line break\n sumChunks = [nextChunk];\n sumWidth = this.displayWidth(nextChunk);\n });\n wrappedLines.push(sumChunks.join(''));\n });\n\n return wrappedLines.join('\\n');\n }\n}\n",
69
+ "import { InvalidArgumentError } from './error.js';\n\nexport class Option {\n /**\n * Initialize a new `Option` with the given `flags` and `description`.\n *\n * @param {string} flags\n * @param {string} [description]\n */\n\n constructor(flags, description) {\n this.flags = flags;\n this.description = description || '';\n\n this.required = flags.includes('<'); // A value must be supplied when the option is specified.\n this.optional = flags.includes('['); // A value is optional when the option is specified.\n // variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument\n this.variadic = /\\w\\.\\.\\.[>\\]]$/.test(flags); // The option can take multiple values.\n this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.\n const optionFlags = splitOptionFlags(flags);\n this.short = optionFlags.shortFlag; // May be a short flag, undefined, or even a long flag (if option has two long flags).\n this.long = optionFlags.longFlag;\n this.negate = false;\n if (this.long) {\n this.negate = this.long.startsWith('--no-');\n }\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.presetArg = undefined;\n this.envVar = undefined;\n this.parseArg = undefined;\n this.hidden = false;\n this.argChoices = undefined;\n this.conflictsWith = [];\n this.implied = undefined;\n this.helpGroupHeading = undefined; // soft initialised when option added to command\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Option}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Preset to use when option used without option-argument, especially optional but also boolean and negated.\n * The custom processing (parseArg) is called.\n *\n * @example\n * new Option('--color').default('GREYSCALE').preset('RGB');\n * new Option('--donate [amount]').preset('20').argParser(parseFloat);\n *\n * @param {*} arg\n * @return {Option}\n */\n\n preset(arg) {\n this.presetArg = arg;\n return this;\n }\n\n /**\n * Add option name(s) that conflict with this option.\n * An error will be displayed if conflicting options are found during parsing.\n *\n * @example\n * new Option('--rgb').conflicts('cmyk');\n * new Option('--js').conflicts(['ts', 'jsx']);\n *\n * @param {(string | string[])} names\n * @return {Option}\n */\n\n conflicts(names) {\n this.conflictsWith = this.conflictsWith.concat(names);\n return this;\n }\n\n /**\n * Specify implied option values for when this option is set and the implied options are not.\n *\n * The custom processing (parseArg) is not called on the implied values.\n *\n * @example\n * program\n * .addOption(new Option('--log', 'write logging information to file'))\n * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));\n *\n * @param {object} impliedOptionValues\n * @return {Option}\n */\n implies(impliedOptionValues) {\n let newImplied = impliedOptionValues;\n if (typeof impliedOptionValues === 'string') {\n // string is not documented, but easy mistake and we can do what user probably intended.\n newImplied = { [impliedOptionValues]: true };\n }\n this.implied = Object.assign(this.implied || {}, newImplied);\n return this;\n }\n\n /**\n * Set environment variable to check for option value.\n *\n * An environment variable is only used if when processed the current option value is\n * undefined, or the source of the current value is 'default' or 'config' or 'env'.\n *\n * @param {string} name\n * @return {Option}\n */\n\n env(name) {\n this.envVar = name;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI option arguments into option values.\n *\n * @param {Function} [fn]\n * @return {Option}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Whether the option is mandatory and must have a value after parsing.\n *\n * @param {boolean} [mandatory=true]\n * @return {Option}\n */\n\n makeOptionMandatory(mandatory = true) {\n this.mandatory = !!mandatory;\n return this;\n }\n\n /**\n * Hide option in help.\n *\n * @param {boolean} [hide=true]\n * @return {Option}\n */\n\n hideHelp(hide = true) {\n this.hidden = !!hide;\n return this;\n }\n\n /**\n * @package\n */\n\n _collectValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n previous.push(value);\n return previous;\n }\n\n /**\n * Only allow option value to be one of choices.\n *\n * @param {string[]} values\n * @return {Option}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(\n `Allowed choices are ${this.argChoices.join(', ')}.`,\n );\n }\n if (this.variadic) {\n return this._collectValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Return option name.\n *\n * @return {string}\n */\n\n name() {\n if (this.long) {\n return this.long.replace(/^--/, '');\n }\n return this.short.replace(/^-/, '');\n }\n\n /**\n * Return option name, in a camelcase format that can be used\n * as an object attribute key.\n *\n * @return {string}\n */\n\n attributeName() {\n if (this.negate) {\n return camelcase(this.name().replace(/^no-/, ''));\n }\n return camelcase(this.name());\n }\n\n /**\n * Set the help group heading.\n *\n * @param {string} heading\n * @return {Option}\n */\n helpGroup(heading) {\n this.helpGroupHeading = heading;\n return this;\n }\n\n /**\n * Check if `arg` matches the short or long flag.\n *\n * @param {string} arg\n * @return {boolean}\n * @package\n */\n\n is(arg) {\n return this.short === arg || this.long === arg;\n }\n\n /**\n * Return whether a boolean option.\n *\n * Options are one of boolean, negated, required argument, or optional argument.\n *\n * @return {boolean}\n * @package\n */\n\n isBoolean() {\n return !this.required && !this.optional && !this.negate;\n }\n}\n\n/**\n * This class is to make it easier to work with dual options, without changing the existing\n * implementation. We support separate dual options for separate positive and negative options,\n * like `--build` and `--no-build`, which share a single option value. This works nicely for some\n * use cases, but is tricky for others where we want separate behaviours despite\n * the single shared option value.\n */\nexport class DualOptions {\n /**\n * @param {Option[]} options\n */\n constructor(options) {\n this.positiveOptions = new Map();\n this.negativeOptions = new Map();\n this.dualOptions = new Set();\n options.forEach((option) => {\n if (option.negate) {\n this.negativeOptions.set(option.attributeName(), option);\n } else {\n this.positiveOptions.set(option.attributeName(), option);\n }\n });\n this.negativeOptions.forEach((value, key) => {\n if (this.positiveOptions.has(key)) {\n this.dualOptions.add(key);\n }\n });\n }\n\n /**\n * Did the value come from the option, and not from possible matching dual option?\n *\n * @param {*} value\n * @param {Option} option\n * @returns {boolean}\n */\n valueFromOption(value, option) {\n const optionKey = option.attributeName();\n if (!this.dualOptions.has(optionKey)) return true;\n\n // Use the value to deduce if (probably) came from the option.\n const preset = this.negativeOptions.get(optionKey).presetArg;\n const negativeValue = preset !== undefined ? preset : false;\n return option.negate === (negativeValue === value);\n }\n}\n\n/**\n * Convert string from kebab-case to camelCase.\n *\n * @param {string} str\n * @return {string}\n * @private\n */\n\nfunction camelcase(str) {\n return str.split('-').reduce((str, word) => {\n return str + word[0].toUpperCase() + word.slice(1);\n });\n}\n\n/**\n * Split the short and long flag out of something like '-m,--mixed <value>'\n *\n * @private\n */\n\nfunction splitOptionFlags(flags) {\n let shortFlag;\n let longFlag;\n // short flag, single dash and single character\n const shortFlagExp = /^-[^-]$/;\n // long flag, double dash and at least one character\n const longFlagExp = /^--[^-]/;\n\n const flagParts = flags.split(/[ |,]+/).concat('guard');\n // Normal is short and/or long.\n if (shortFlagExp.test(flagParts[0])) shortFlag = flagParts.shift();\n if (longFlagExp.test(flagParts[0])) longFlag = flagParts.shift();\n // Long then short. Rarely used but fine.\n if (!shortFlag && shortFlagExp.test(flagParts[0]))\n shortFlag = flagParts.shift();\n // Allow two long flags, like '--ws, --workspace'\n // This is the supported way to have a shortish option flag.\n if (!shortFlag && longFlagExp.test(flagParts[0])) {\n shortFlag = longFlag;\n longFlag = flagParts.shift();\n }\n\n // Check for unprocessed flag. Fail noisily rather than silently ignore.\n if (flagParts[0].startsWith('-')) {\n const unsupportedFlag = flagParts[0];\n const baseError = `option creation failed due to '${unsupportedFlag}' in option flags '${flags}'`;\n if (/^-[^-][^-]/.test(unsupportedFlag))\n throw new Error(\n `${baseError}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`,\n );\n if (shortFlagExp.test(unsupportedFlag))\n throw new Error(`${baseError}\n- too many short flags`);\n if (longFlagExp.test(unsupportedFlag))\n throw new Error(`${baseError}\n- too many long flags`);\n\n throw new Error(`${baseError}\n- unrecognised flag format`);\n }\n if (shortFlag === undefined && longFlag === undefined)\n throw new Error(\n `option creation failed due to no flags found in '${flags}'.`,\n );\n\n return { shortFlag, longFlag };\n}\n",
70
+ "const maxDistance = 3;\n\nfunction editDistance(a, b) {\n // https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance\n // Calculating optimal string alignment distance, no substring is edited more than once.\n // (Simple implementation.)\n\n // Quick early exit, return worst case.\n if (Math.abs(a.length - b.length) > maxDistance)\n return Math.max(a.length, b.length);\n\n // distance between prefix substrings of a and b\n const d = [];\n\n // pure deletions turn a into empty string\n for (let i = 0; i <= a.length; i++) {\n d[i] = [i];\n }\n // pure insertions turn empty string into b\n for (let j = 0; j <= b.length; j++) {\n d[0][j] = j;\n }\n\n // fill matrix\n for (let j = 1; j <= b.length; j++) {\n for (let i = 1; i <= a.length; i++) {\n let cost;\n if (a[i - 1] === b[j - 1]) {\n cost = 0;\n } else {\n cost = 1;\n }\n d[i][j] = Math.min(\n d[i - 1][j] + 1, // deletion\n d[i][j - 1] + 1, // insertion\n d[i - 1][j - 1] + cost, // substitution\n );\n // transposition\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);\n }\n }\n }\n\n return d[a.length][b.length];\n}\n\n/**\n * Find close matches, restricted to same number of edits.\n *\n * @param {string} word\n * @param {string[]} candidates\n * @returns {string}\n */\n\nexport function suggestSimilar(word, candidates) {\n if (!candidates || candidates.length === 0) return '';\n // remove possible duplicates\n candidates = Array.from(new Set(candidates));\n\n const searchingOptions = word.startsWith('--');\n if (searchingOptions) {\n word = word.slice(2);\n candidates = candidates.map((candidate) => candidate.slice(2));\n }\n\n let similar = [];\n let bestDistance = maxDistance;\n const minSimilarity = 0.4;\n candidates.forEach((candidate) => {\n if (candidate.length <= 1) return; // no one character guesses\n\n const distance = editDistance(word, candidate);\n const length = Math.max(word.length, candidate.length);\n const similarity = (length - distance) / length;\n if (similarity > minSimilarity) {\n if (distance < bestDistance) {\n // better edit distance, throw away previous worse matches\n bestDistance = distance;\n similar = [candidate];\n } else if (distance === bestDistance) {\n similar.push(candidate);\n }\n }\n });\n\n similar.sort((a, b) => a.localeCompare(b));\n if (searchingOptions) {\n similar = similar.map((candidate) => `--${candidate}`);\n }\n\n if (similar.length > 1) {\n return `\\n(Did you mean one of ${similar.join(', ')}?)`;\n }\n if (similar.length === 1) {\n return `\\n(Did you mean ${similar[0]}?)`;\n }\n return '';\n}\n",
71
+ "import { Argument } from './lib/argument.js';\nimport { Command } from './lib/command.js';\nimport { CommanderError, InvalidArgumentError } from './lib/error.js';\nimport { Help } from './lib/help.js';\nimport { Option } from './lib/option.js';\n\nexport const program = new Command();\n\nexport const createCommand = (name) => new Command(name);\nexport const createOption = (flags, description) =>\n new Option(flags, description);\nexport const createArgument = (name, description) =>\n new Argument(name, description);\n\n/**\n * Expose classes\n */\n\nexport { Command, Option, Argument, Help };\nexport { CommanderError, InvalidArgumentError };\nexport { InvalidArgumentError as InvalidOptionArgumentError }; // Deprecated\n",
72
+ "import { relative } from \"node:path\";\nimport pLimit from \"p-limit\";\nimport simpleGit from \"simple-git\";\nimport { findGitRepositoryPaths, type GitRepository } from \"@/git/discover\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { SwarmProgressBar } from \"@/utils/swarm-progress-bar\";\nimport { type RepoQuery, repoMatchesFilter } from \"./filter\";\n\ntype ForEachRepoOptions = {\n parallel: number;\n where: RepoQuery;\n progress: boolean;\n skipConfig?: boolean;\n};\n\nexport const forEachRepo = async <T>(\n root: string,\n visit: (repo: GitRepository, log: (message: string) => void) => Promise<T>,\n options: ForEachRepoOptions,\n): Promise<T[]> => {\n const limit = pLimit(options.parallel);\n\n const paths = await Array.fromAsync(\n findGitRepositoryPaths(root, {\n skipConfig: options.skipConfig ?? false,\n }),\n );\n\n const repos: GitRepository[] = await Promise.all(\n paths.map((path) =>\n limit(async () => {\n const repo: GitRepository = {\n path: {\n absolute: path,\n relative: relative(root, path) || \".\",\n },\n git: simpleGit(path, { baseDir: path }),\n };\n if (!(await repoMatchesFilter(repo, options.where))) {\n return null;\n }\n return repo;\n }),\n ),\n ).then(filterNotNull);\n\n const progress =\n options.progress && process.stdout.isTTY === true && repos.length > 0\n ? new SwarmProgressBar(repos)\n : null;\n progress?.start();\n try {\n const promises = repos.map((repo) =>\n limit(async () => {\n progress?.update(repo, \"started\");\n try {\n const result = await visit(\n repo,\n progress\n ? (message) => progress.log(message)\n : console.log,\n );\n progress?.update(repo, \"done\");\n return result;\n } catch (error) {\n progress?.update(repo, \"error\");\n throw error;\n }\n }),\n );\n return await Promise.all(promises);\n } finally {\n progress?.stop();\n }\n};\n",
73
+ "/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\n\t\t// Clean up tail reference when queue becomes empty\n\t\tif (!this.#head) {\n\t\t\tthis.#tail = undefined;\n\t\t}\n\n\t\treturn current.value;\n\t}\n\n\tpeek() {\n\t\tif (!this.#head) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#head.value;\n\n\t\t// TODO: Node.js 18.\n\t\t// return this.#head?.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n\n\t* drain() {\n\t\twhile (this.#head) {\n\t\t\tyield this.dequeue();\n\t\t}\n\t}\n}\n",
74
+ "import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tlet rejectOnClear = false;\n\n\tif (typeof concurrency === 'object') {\n\t\t({concurrency, rejectOnClear = false} = concurrency);\n\t}\n\n\tvalidateConcurrency(concurrency);\n\n\tif (typeof rejectOnClear !== 'boolean') {\n\t\tthrow new TypeError('Expected `rejectOnClear` to be a boolean');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst resumeNext = () => {\n\t\t// Process the next queued function if we're under the concurrency limit\n\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\tactiveCount++;\n\t\t\tqueue.dequeue().run();\n\t\t}\n\t};\n\n\tconst next = () => {\n\t\tactiveCount--;\n\t\tresumeNext();\n\t};\n\n\tconst run = async (function_, resolve, arguments_) => {\n\t\t// Execute the function and capture the result promise\n\t\tconst result = (async () => function_(...arguments_))();\n\n\t\t// Resolve immediately with the promise (don't wait for completion)\n\t\tresolve(result);\n\n\t\t// Wait for the function to complete (success or failure)\n\t\t// We catch errors here to prevent unhandled rejections,\n\t\t// but the original promise rejection is preserved for the caller\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\t// Decrement active count and process next queued function\n\t\tnext();\n\t};\n\n\tconst enqueue = (function_, resolve, reject, arguments_) => {\n\t\tconst queueItem = {reject};\n\n\t\t// Queue the internal resolve function instead of the run function\n\t\t// to preserve the asynchronous execution context.\n\t\tnew Promise(internalResolve => { // eslint-disable-line promise/param-names\n\t\t\tqueueItem.run = internalResolve;\n\t\t\tqueue.enqueue(queueItem);\n\t\t}).then(run.bind(undefined, function_, resolve, arguments_)); // eslint-disable-line promise/prefer-await-to-then\n\n\t\t// Start processing immediately if we haven't reached the concurrency limit\n\t\tif (activeCount < concurrency) {\n\t\t\tresumeNext();\n\t\t}\n\t};\n\n\tconst generator = (function_, ...arguments_) => new Promise((resolve, reject) => {\n\t\tenqueue(function_, resolve, reject, arguments_);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue() {\n\t\t\t\tif (!rejectOnClear) {\n\t\t\t\t\tqueue.clear();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst abortError = AbortSignal.abort().reason;\n\n\t\t\t\twhile (queue.size > 0) {\n\t\t\t\t\tqueue.dequeue().reject(abortError);\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tconcurrency: {\n\t\t\tget: () => concurrency,\n\n\t\t\tset(newConcurrency) {\n\t\t\t\tvalidateConcurrency(newConcurrency);\n\t\t\t\tconcurrency = newConcurrency;\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\t// eslint-disable-next-line no-unmodified-loop-condition\n\t\t\t\t\twhile (activeCount < concurrency && queue.size > 0) {\n\t\t\t\t\t\tresumeNext();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t},\n\t\tmap: {\n\t\t\tasync value(iterable, function_) {\n\t\t\t\tconst promises = Array.from(iterable, (value, index) => generator(function_, value, index));\n\t\t\t\treturn Promise.all(promises);\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n\nexport function limitFunction(function_, options) {\n\tconst limit = pLimit(options);\n\n\tconst limitedFunction = (...arguments_) => limit(() => function_(...arguments_));\n\tObject.defineProperty(limitedFunction, 'clearQueue', {\n\t\tvalue: limit.clearQueue,\n\t});\n\n\treturn limitedFunction;\n}\n\nfunction validateConcurrency(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n}\n",
75
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/lib/errors/git-error.ts\nvar GitError;\nvar init_git_error = __esm({\n \"src/lib/errors/git-error.ts\"() {\n \"use strict\";\n GitError = class extends Error {\n constructor(task, message) {\n super(message);\n this.task = task;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n };\n }\n});\n\n// src/lib/errors/git-response-error.ts\nvar GitResponseError;\nvar init_git_response_error = __esm({\n \"src/lib/errors/git-response-error.ts\"() {\n \"use strict\";\n init_git_error();\n GitResponseError = class extends GitError {\n constructor(git, message) {\n super(void 0, message || String(git));\n this.git = git;\n }\n };\n }\n});\n\n// src/lib/errors/task-configuration-error.ts\nvar TaskConfigurationError;\nvar init_task_configuration_error = __esm({\n \"src/lib/errors/task-configuration-error.ts\"() {\n \"use strict\";\n init_git_error();\n TaskConfigurationError = class extends GitError {\n constructor(message) {\n super(void 0, message);\n }\n };\n }\n});\n\n// src/lib/utils/util.ts\nimport { exists, FOLDER } from \"@kwsites/file-exists\";\nfunction asFunction(source) {\n if (typeof source !== \"function\") {\n return NOOP;\n }\n return source;\n}\nfunction isUserFunction(source) {\n return typeof source === \"function\" && source !== NOOP;\n}\nfunction splitOn(input, char) {\n const index = input.indexOf(char);\n if (index <= 0) {\n return [input, \"\"];\n }\n return [input.substr(0, index), input.substr(index + 1)];\n}\nfunction first(input, offset = 0) {\n return isArrayLike(input) && input.length > offset ? input[offset] : void 0;\n}\nfunction last(input, offset = 0) {\n if (isArrayLike(input) && input.length > offset) {\n return input[input.length - 1 - offset];\n }\n}\nfunction isArrayLike(input) {\n return filterHasLength(input);\n}\nfunction toLinesWithContent(input = \"\", trimmed2 = true, separator = \"\\n\") {\n return input.split(separator).reduce((output, line) => {\n const lineContent = trimmed2 ? line.trim() : line;\n if (lineContent) {\n output.push(lineContent);\n }\n return output;\n }, []);\n}\nfunction forEachLineWithContent(input, callback) {\n return toLinesWithContent(input, true).map((line) => callback(line));\n}\nfunction folderExists(path) {\n return exists(path, FOLDER);\n}\nfunction append(target, item) {\n if (Array.isArray(target)) {\n if (!target.includes(item)) {\n target.push(item);\n }\n } else {\n target.add(item);\n }\n return item;\n}\nfunction including(target, item) {\n if (Array.isArray(target) && !target.includes(item)) {\n target.push(item);\n }\n return target;\n}\nfunction remove(target, item) {\n if (Array.isArray(target)) {\n const index = target.indexOf(item);\n if (index >= 0) {\n target.splice(index, 1);\n }\n } else {\n target.delete(item);\n }\n return item;\n}\nfunction asArray(source) {\n return Array.isArray(source) ? source : [source];\n}\nfunction asCamelCase(str) {\n return str.replace(/[\\s-]+(.)/g, (_all, chr) => {\n return chr.toUpperCase();\n });\n}\nfunction asStringArray(source) {\n return asArray(source).map((item) => {\n return item instanceof String ? item : String(item);\n });\n}\nfunction asNumber(source, onNaN = 0) {\n if (source == null) {\n return onNaN;\n }\n const num = parseInt(source, 10);\n return Number.isNaN(num) ? onNaN : num;\n}\nfunction prefixedArray(input, prefix) {\n const output = [];\n for (let i = 0, max = input.length; i < max; i++) {\n output.push(prefix, input[i]);\n }\n return output;\n}\nfunction bufferToString(input) {\n return (Array.isArray(input) ? Buffer.concat(input) : input).toString(\"utf-8\");\n}\nfunction pick(source, properties) {\n const out = {};\n properties.forEach((key) => {\n if (source[key] !== void 0) {\n out[key] = source[key];\n }\n });\n return out;\n}\nfunction delay(duration = 0) {\n return new Promise((done) => setTimeout(done, duration));\n}\nfunction orVoid(input) {\n if (input === false) {\n return void 0;\n }\n return input;\n}\nvar NULL, NOOP, objectToString;\nvar init_util = __esm({\n \"src/lib/utils/util.ts\"() {\n \"use strict\";\n init_argument_filters();\n NULL = \"\\0\";\n NOOP = () => {\n };\n objectToString = Object.prototype.toString.call.bind(Object.prototype.toString);\n }\n});\n\n// src/lib/utils/argument-filters.ts\nimport { isPathSpec } from \"@simple-git/args-pathspec\";\nfunction filterType(input, filter, def) {\n if (filter(input)) {\n return input;\n }\n return arguments.length > 2 ? def : void 0;\n}\nfunction filterPrimitives(input, omit) {\n const type = isPathSpec(input) ? \"string\" : typeof input;\n return /number|string|boolean/.test(type) && (!omit || !omit.includes(type));\n}\nfunction filterPlainObject(input) {\n return !!input && objectToString(input) === \"[object Object]\";\n}\nfunction filterFunction(input) {\n return typeof input === \"function\";\n}\nvar filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength;\nvar init_argument_filters = __esm({\n \"src/lib/utils/argument-filters.ts\"() {\n \"use strict\";\n init_util();\n filterArray = (input) => {\n return Array.isArray(input);\n };\n filterNumber = (input) => {\n return typeof input === \"number\";\n };\n filterString = (input) => {\n return typeof input === \"string\" || isPathSpec(input);\n };\n filterStringOrStringArray = (input) => {\n return filterString(input) || Array.isArray(input) && input.every(filterString);\n };\n filterHasLength = (input) => {\n if (input == null || \"number|boolean|function\".includes(typeof input)) {\n return false;\n }\n return typeof input.length === \"number\";\n };\n }\n});\n\n// src/lib/utils/exit-codes.ts\nvar ExitCodes;\nvar init_exit_codes = __esm({\n \"src/lib/utils/exit-codes.ts\"() {\n \"use strict\";\n ExitCodes = /* @__PURE__ */ ((ExitCodes2) => {\n ExitCodes2[ExitCodes2[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExitCodes2[ExitCodes2[\"ERROR\"] = 1] = \"ERROR\";\n ExitCodes2[ExitCodes2[\"NOT_FOUND\"] = -2] = \"NOT_FOUND\";\n ExitCodes2[ExitCodes2[\"UNCLEAN\"] = 128] = \"UNCLEAN\";\n return ExitCodes2;\n })(ExitCodes || {});\n }\n});\n\n// src/lib/utils/git-output-streams.ts\nvar GitOutputStreams;\nvar init_git_output_streams = __esm({\n \"src/lib/utils/git-output-streams.ts\"() {\n \"use strict\";\n GitOutputStreams = class _GitOutputStreams {\n constructor(stdOut, stdErr) {\n this.stdOut = stdOut;\n this.stdErr = stdErr;\n }\n asStrings() {\n return new _GitOutputStreams(this.stdOut.toString(\"utf8\"), this.stdErr.toString(\"utf8\"));\n }\n };\n }\n});\n\n// src/lib/utils/line-parser.ts\nfunction useMatchesDefault() {\n throw new Error(`LineParser:useMatches not implemented`);\n}\nvar LineParser, RemoteLineParser;\nvar init_line_parser = __esm({\n \"src/lib/utils/line-parser.ts\"() {\n \"use strict\";\n LineParser = class {\n constructor(regExp, useMatches) {\n this.matches = [];\n this.useMatches = useMatchesDefault;\n this.parse = (line, target) => {\n this.resetMatches();\n if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) {\n return false;\n }\n return this.useMatches(target, this.prepareMatches()) !== false;\n };\n this._regExp = Array.isArray(regExp) ? regExp : [regExp];\n if (useMatches) {\n this.useMatches = useMatches;\n }\n }\n resetMatches() {\n this.matches.length = 0;\n }\n prepareMatches() {\n return this.matches;\n }\n addMatch(reg, index, line) {\n const matched = line && reg.exec(line);\n if (matched) {\n this.pushMatch(index, matched);\n }\n return !!matched;\n }\n pushMatch(_index, matched) {\n this.matches.push(...matched.slice(1));\n }\n };\n RemoteLineParser = class extends LineParser {\n addMatch(reg, index, line) {\n return /^remote:\\s/.test(String(line)) && super.addMatch(reg, index, line);\n }\n pushMatch(index, matched) {\n if (index > 0 || matched.length > 1) {\n super.pushMatch(index, matched);\n }\n }\n };\n }\n});\n\n// src/lib/utils/simple-git-options.ts\nfunction createInstanceConfig(...options) {\n const baseDir = process.cwd();\n const config = Object.assign(\n { baseDir, ...defaultOptions },\n ...options.filter((o) => typeof o === \"object\" && o)\n );\n config.baseDir = config.baseDir || baseDir;\n config.trimmed = config.trimmed === true;\n return config;\n}\nvar defaultOptions;\nvar init_simple_git_options = __esm({\n \"src/lib/utils/simple-git-options.ts\"() {\n \"use strict\";\n defaultOptions = {\n binary: \"git\",\n maxConcurrentProcesses: 5,\n config: [],\n trimmed: false\n };\n }\n});\n\n// src/lib/utils/task-options.ts\nimport { isPathSpec as isPathSpec2 } from \"@simple-git/args-pathspec\";\nfunction appendTaskOptions(options, commands = []) {\n if (!filterPlainObject(options)) {\n return commands;\n }\n return Object.keys(options).reduce((commands2, key) => {\n const value = options[key];\n if (isPathSpec2(value)) {\n commands2.push(value);\n } else if (filterPrimitives(value, [\"boolean\"])) {\n commands2.push(key + \"=\" + value);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n if (!filterPrimitives(v, [\"string\", \"number\"])) {\n commands2.push(key + \"=\" + v);\n }\n }\n } else {\n commands2.push(key);\n }\n return commands2;\n }, commands);\n}\nfunction getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) {\n const command = [];\n for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) {\n if (\"string|number\".includes(typeof args[i])) {\n command.push(String(args[i]));\n }\n }\n appendTaskOptions(trailingOptionsArgument(args), command);\n if (!objectOnly) {\n command.push(...trailingArrayArgument(args));\n }\n return command;\n}\nfunction trailingArrayArgument(args) {\n const hasTrailingCallback = typeof last(args) === \"function\";\n return asStringArray(filterType(last(args, hasTrailingCallback ? 1 : 0), filterArray, []));\n}\nfunction trailingOptionsArgument(args) {\n const hasTrailingCallback = filterFunction(last(args));\n return filterType(last(args, hasTrailingCallback ? 1 : 0), filterPlainObject);\n}\nfunction trailingFunctionArgument(args, includeNoop = true) {\n const callback = asFunction(last(args));\n return includeNoop || isUserFunction(callback) ? callback : void 0;\n}\nvar init_task_options = __esm({\n \"src/lib/utils/task-options.ts\"() {\n \"use strict\";\n init_argument_filters();\n init_util();\n }\n});\n\n// src/lib/utils/task-parser.ts\nfunction callTaskParser(parser4, streams) {\n return parser4(streams.stdOut, streams.stdErr);\n}\nfunction parseStringResponse(result, parsers12, texts, trim = true) {\n asArray(texts).forEach((text) => {\n for (let lines = toLinesWithContent(text, trim), i = 0, max = lines.length; i < max; i++) {\n const line = (offset = 0) => {\n if (i + offset >= max) {\n return;\n }\n return lines[i + offset];\n };\n parsers12.some(({ parse }) => parse(line, result));\n }\n });\n return result;\n}\nvar init_task_parser = __esm({\n \"src/lib/utils/task-parser.ts\"() {\n \"use strict\";\n init_util();\n }\n});\n\n// src/lib/utils/index.ts\nvar utils_exports = {};\n__export(utils_exports, {\n ExitCodes: () => ExitCodes,\n GitOutputStreams: () => GitOutputStreams,\n LineParser: () => LineParser,\n NOOP: () => NOOP,\n NULL: () => NULL,\n RemoteLineParser: () => RemoteLineParser,\n append: () => append,\n appendTaskOptions: () => appendTaskOptions,\n asArray: () => asArray,\n asCamelCase: () => asCamelCase,\n asFunction: () => asFunction,\n asNumber: () => asNumber,\n asStringArray: () => asStringArray,\n bufferToString: () => bufferToString,\n callTaskParser: () => callTaskParser,\n createInstanceConfig: () => createInstanceConfig,\n delay: () => delay,\n filterArray: () => filterArray,\n filterFunction: () => filterFunction,\n filterHasLength: () => filterHasLength,\n filterNumber: () => filterNumber,\n filterPlainObject: () => filterPlainObject,\n filterPrimitives: () => filterPrimitives,\n filterString: () => filterString,\n filterStringOrStringArray: () => filterStringOrStringArray,\n filterType: () => filterType,\n first: () => first,\n folderExists: () => folderExists,\n forEachLineWithContent: () => forEachLineWithContent,\n getTrailingOptions: () => getTrailingOptions,\n including: () => including,\n isUserFunction: () => isUserFunction,\n last: () => last,\n objectToString: () => objectToString,\n orVoid: () => orVoid,\n parseStringResponse: () => parseStringResponse,\n pick: () => pick,\n prefixedArray: () => prefixedArray,\n remove: () => remove,\n splitOn: () => splitOn,\n toLinesWithContent: () => toLinesWithContent,\n trailingFunctionArgument: () => trailingFunctionArgument,\n trailingOptionsArgument: () => trailingOptionsArgument\n});\nvar init_utils = __esm({\n \"src/lib/utils/index.ts\"() {\n \"use strict\";\n init_argument_filters();\n init_exit_codes();\n init_git_output_streams();\n init_line_parser();\n init_simple_git_options();\n init_task_options();\n init_task_parser();\n init_util();\n }\n});\n\n// src/lib/tasks/check-is-repo.ts\nvar check_is_repo_exports = {};\n__export(check_is_repo_exports, {\n CheckRepoActions: () => CheckRepoActions,\n checkIsBareRepoTask: () => checkIsBareRepoTask,\n checkIsRepoRootTask: () => checkIsRepoRootTask,\n checkIsRepoTask: () => checkIsRepoTask\n});\nfunction checkIsRepoTask(action) {\n switch (action) {\n case \"bare\" /* BARE */:\n return checkIsBareRepoTask();\n case \"root\" /* IS_REPO_ROOT */:\n return checkIsRepoRootTask();\n }\n const commands = [\"rev-parse\", \"--is-inside-work-tree\"];\n return {\n commands,\n format: \"utf-8\",\n onError,\n parser\n };\n}\nfunction checkIsRepoRootTask() {\n const commands = [\"rev-parse\", \"--git-dir\"];\n return {\n commands,\n format: \"utf-8\",\n onError,\n parser(path) {\n return /^\\.(git)?$/.test(path.trim());\n }\n };\n}\nfunction checkIsBareRepoTask() {\n const commands = [\"rev-parse\", \"--is-bare-repository\"];\n return {\n commands,\n format: \"utf-8\",\n onError,\n parser\n };\n}\nfunction isNotRepoMessage(error) {\n return /(Not a git repository|Kein Git-Repository)/i.test(String(error));\n}\nvar CheckRepoActions, onError, parser;\nvar init_check_is_repo = __esm({\n \"src/lib/tasks/check-is-repo.ts\"() {\n \"use strict\";\n init_utils();\n CheckRepoActions = /* @__PURE__ */ ((CheckRepoActions2) => {\n CheckRepoActions2[\"BARE\"] = \"bare\";\n CheckRepoActions2[\"IN_TREE\"] = \"tree\";\n CheckRepoActions2[\"IS_REPO_ROOT\"] = \"root\";\n return CheckRepoActions2;\n })(CheckRepoActions || {});\n onError = ({ exitCode }, error, done, fail) => {\n if (exitCode === 128 /* UNCLEAN */ && isNotRepoMessage(error)) {\n return done(Buffer.from(\"false\"));\n }\n fail(error);\n };\n parser = (text) => {\n return text.trim() === \"true\";\n };\n }\n});\n\n// src/lib/responses/CleanSummary.ts\nfunction cleanSummaryParser(dryRun, text) {\n const summary = new CleanResponse(dryRun);\n const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp;\n toLinesWithContent(text).forEach((line) => {\n const removed = line.replace(regexp, \"\");\n summary.paths.push(removed);\n (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed);\n });\n return summary;\n}\nvar CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp;\nvar init_CleanSummary = __esm({\n \"src/lib/responses/CleanSummary.ts\"() {\n \"use strict\";\n init_utils();\n CleanResponse = class {\n constructor(dryRun) {\n this.dryRun = dryRun;\n this.paths = [];\n this.files = [];\n this.folders = [];\n }\n };\n removalRegexp = /^[a-z]+\\s*/i;\n dryRunRemovalRegexp = /^[a-z]+\\s+[a-z]+\\s*/i;\n isFolderRegexp = /\\/$/;\n }\n});\n\n// src/lib/tasks/task.ts\nvar task_exports = {};\n__export(task_exports, {\n EMPTY_COMMANDS: () => EMPTY_COMMANDS,\n adhocExecTask: () => adhocExecTask,\n configurationErrorTask: () => configurationErrorTask,\n isBufferTask: () => isBufferTask,\n isEmptyTask: () => isEmptyTask,\n straightThroughBufferTask: () => straightThroughBufferTask,\n straightThroughStringTask: () => straightThroughStringTask\n});\nfunction adhocExecTask(parser4) {\n return {\n commands: EMPTY_COMMANDS,\n format: \"empty\",\n parser: parser4\n };\n}\nfunction configurationErrorTask(error) {\n return {\n commands: EMPTY_COMMANDS,\n format: \"empty\",\n parser() {\n throw typeof error === \"string\" ? new TaskConfigurationError(error) : error;\n }\n };\n}\nfunction straightThroughStringTask(commands, trimmed2 = false) {\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return trimmed2 ? String(text).trim() : text;\n }\n };\n}\nfunction straightThroughBufferTask(commands) {\n return {\n commands,\n format: \"buffer\",\n parser(buffer) {\n return buffer;\n }\n };\n}\nfunction isBufferTask(task) {\n return task.format === \"buffer\";\n}\nfunction isEmptyTask(task) {\n return task.format === \"empty\" || !task.commands.length;\n}\nvar EMPTY_COMMANDS;\nvar init_task = __esm({\n \"src/lib/tasks/task.ts\"() {\n \"use strict\";\n init_task_configuration_error();\n EMPTY_COMMANDS = [];\n }\n});\n\n// src/lib/tasks/clean.ts\nvar clean_exports = {};\n__export(clean_exports, {\n CONFIG_ERROR_INTERACTIVE_MODE: () => CONFIG_ERROR_INTERACTIVE_MODE,\n CONFIG_ERROR_MODE_REQUIRED: () => CONFIG_ERROR_MODE_REQUIRED,\n CONFIG_ERROR_UNKNOWN_OPTION: () => CONFIG_ERROR_UNKNOWN_OPTION,\n CleanOptions: () => CleanOptions,\n cleanTask: () => cleanTask,\n cleanWithOptionsTask: () => cleanWithOptionsTask,\n isCleanOptionsArray: () => isCleanOptionsArray\n});\nfunction cleanWithOptionsTask(mode, customArgs) {\n const { cleanMode, options, valid } = getCleanOptions(mode);\n if (!cleanMode) {\n return configurationErrorTask(CONFIG_ERROR_MODE_REQUIRED);\n }\n if (!valid.options) {\n return configurationErrorTask(CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode));\n }\n options.push(...customArgs);\n if (options.some(isInteractiveMode)) {\n return configurationErrorTask(CONFIG_ERROR_INTERACTIVE_MODE);\n }\n return cleanTask(cleanMode, options);\n}\nfunction cleanTask(mode, customArgs) {\n const commands = [\"clean\", `-${mode}`, ...customArgs];\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return cleanSummaryParser(mode === \"n\" /* DRY_RUN */, text);\n }\n };\n}\nfunction isCleanOptionsArray(input) {\n return Array.isArray(input) && input.every((test) => CleanOptionValues.has(test));\n}\nfunction getCleanOptions(input) {\n let cleanMode;\n let options = [];\n let valid = { cleanMode: false, options: true };\n input.replace(/[^a-z]i/g, \"\").split(\"\").forEach((char) => {\n if (isCleanMode(char)) {\n cleanMode = char;\n valid.cleanMode = true;\n } else {\n valid.options = valid.options && isKnownOption(options[options.length] = `-${char}`);\n }\n });\n return {\n cleanMode,\n options,\n valid\n };\n}\nfunction isCleanMode(cleanMode) {\n return cleanMode === \"f\" /* FORCE */ || cleanMode === \"n\" /* DRY_RUN */;\n}\nfunction isKnownOption(option) {\n return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1));\n}\nfunction isInteractiveMode(option) {\n if (/^-[^\\-]/.test(option)) {\n return option.indexOf(\"i\") > 0;\n }\n return option === \"--interactive\";\n}\nvar CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues;\nvar init_clean = __esm({\n \"src/lib/tasks/clean.ts\"() {\n \"use strict\";\n init_CleanSummary();\n init_utils();\n init_task();\n CONFIG_ERROR_INTERACTIVE_MODE = \"Git clean interactive mode is not supported\";\n CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter (\"n\" or \"f\") is required';\n CONFIG_ERROR_UNKNOWN_OPTION = \"Git clean unknown option found in: \";\n CleanOptions = /* @__PURE__ */ ((CleanOptions2) => {\n CleanOptions2[\"DRY_RUN\"] = \"n\";\n CleanOptions2[\"FORCE\"] = \"f\";\n CleanOptions2[\"IGNORED_INCLUDED\"] = \"x\";\n CleanOptions2[\"IGNORED_ONLY\"] = \"X\";\n CleanOptions2[\"EXCLUDING\"] = \"e\";\n CleanOptions2[\"QUIET\"] = \"q\";\n CleanOptions2[\"RECURSIVE\"] = \"d\";\n return CleanOptions2;\n })(CleanOptions || {});\n CleanOptionValues = /* @__PURE__ */ new Set([\n \"i\",\n ...asStringArray(Object.values(CleanOptions))\n ]);\n }\n});\n\n// src/lib/responses/ConfigList.ts\nfunction configListParser(text) {\n const config = new ConfigList();\n for (const item of configParser(text)) {\n config.addValue(item.file, String(item.key), item.value);\n }\n return config;\n}\nfunction configGetParser(text, key) {\n let value = null;\n const values = [];\n const scopes = /* @__PURE__ */ new Map();\n for (const item of configParser(text, key)) {\n if (item.key !== key) {\n continue;\n }\n values.push(value = item.value);\n if (!scopes.has(item.file)) {\n scopes.set(item.file, []);\n }\n scopes.get(item.file).push(value);\n }\n return {\n key,\n paths: Array.from(scopes.keys()),\n scopes,\n value,\n values\n };\n}\nfunction configFilePath(filePath) {\n return filePath.replace(/^(file):/, \"\");\n}\nfunction* configParser(text, requestedKey = null) {\n const lines = text.split(\"\\0\");\n for (let i = 0, max = lines.length - 1; i < max; ) {\n const file = configFilePath(lines[i++]);\n let value = lines[i++];\n let key = requestedKey;\n if (value.includes(\"\\n\")) {\n const line = splitOn(value, \"\\n\");\n key = line[0];\n value = line[1];\n }\n yield { file, key, value };\n }\n}\nvar ConfigList;\nvar init_ConfigList = __esm({\n \"src/lib/responses/ConfigList.ts\"() {\n \"use strict\";\n init_utils();\n ConfigList = class {\n constructor() {\n this.files = [];\n this.values = /* @__PURE__ */ Object.create(null);\n }\n get all() {\n if (!this._all) {\n this._all = this.files.reduce((all, file) => {\n return Object.assign(all, this.values[file]);\n }, {});\n }\n return this._all;\n }\n addFile(file) {\n if (!(file in this.values)) {\n const latest = last(this.files);\n this.values[file] = latest ? Object.create(this.values[latest]) : {};\n this.files.push(file);\n }\n return this.values[file];\n }\n addValue(file, key, value) {\n const values = this.addFile(file);\n if (!Object.hasOwn(values, key)) {\n values[key] = value;\n } else if (Array.isArray(values[key])) {\n values[key].push(value);\n } else {\n values[key] = [values[key], value];\n }\n this._all = void 0;\n }\n };\n }\n});\n\n// src/lib/tasks/config.ts\nfunction asConfigScope(scope, fallback) {\n if (typeof scope === \"string\" && Object.hasOwn(GitConfigScope, scope)) {\n return scope;\n }\n return fallback;\n}\nfunction addConfigTask(key, value, append2, scope) {\n const commands = [\"config\", `--${scope}`];\n if (append2) {\n commands.push(\"--add\");\n }\n commands.push(key, value);\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return text;\n }\n };\n}\nfunction getConfigTask(key, scope) {\n const commands = [\"config\", \"--null\", \"--show-origin\", \"--get-all\", key];\n if (scope) {\n commands.splice(1, 0, `--${scope}`);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return configGetParser(text, key);\n }\n };\n}\nfunction listConfigTask(scope) {\n const commands = [\"config\", \"--list\", \"--show-origin\", \"--null\"];\n if (scope) {\n commands.push(`--${scope}`);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return configListParser(text);\n }\n };\n}\nfunction config_default() {\n return {\n addConfig(key, value, ...rest) {\n return this._runTask(\n addConfigTask(\n key,\n value,\n rest[0] === true,\n asConfigScope(rest[1], \"local\" /* local */)\n ),\n trailingFunctionArgument(arguments)\n );\n },\n getConfig(key, scope) {\n return this._runTask(\n getConfigTask(key, asConfigScope(scope, void 0)),\n trailingFunctionArgument(arguments)\n );\n },\n listConfig(...rest) {\n return this._runTask(\n listConfigTask(asConfigScope(rest[0], void 0)),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar GitConfigScope;\nvar init_config = __esm({\n \"src/lib/tasks/config.ts\"() {\n \"use strict\";\n init_ConfigList();\n init_utils();\n GitConfigScope = /* @__PURE__ */ ((GitConfigScope2) => {\n GitConfigScope2[\"system\"] = \"system\";\n GitConfigScope2[\"global\"] = \"global\";\n GitConfigScope2[\"local\"] = \"local\";\n GitConfigScope2[\"worktree\"] = \"worktree\";\n return GitConfigScope2;\n })(GitConfigScope || {});\n }\n});\n\n// src/lib/tasks/diff-name-status.ts\nfunction isDiffNameStatus(input) {\n return diffNameStatus.has(input);\n}\nvar DiffNameStatus, diffNameStatus;\nvar init_diff_name_status = __esm({\n \"src/lib/tasks/diff-name-status.ts\"() {\n \"use strict\";\n DiffNameStatus = /* @__PURE__ */ ((DiffNameStatus2) => {\n DiffNameStatus2[\"ADDED\"] = \"A\";\n DiffNameStatus2[\"COPIED\"] = \"C\";\n DiffNameStatus2[\"DELETED\"] = \"D\";\n DiffNameStatus2[\"MODIFIED\"] = \"M\";\n DiffNameStatus2[\"RENAMED\"] = \"R\";\n DiffNameStatus2[\"CHANGED\"] = \"T\";\n DiffNameStatus2[\"UNMERGED\"] = \"U\";\n DiffNameStatus2[\"UNKNOWN\"] = \"X\";\n DiffNameStatus2[\"BROKEN\"] = \"B\";\n return DiffNameStatus2;\n })(DiffNameStatus || {});\n diffNameStatus = new Set(Object.values(DiffNameStatus));\n }\n});\n\n// src/lib/tasks/grep.ts\nfunction grepQueryBuilder(...params) {\n return new GrepQuery().param(...params);\n}\nfunction parseGrep(grep) {\n const paths = /* @__PURE__ */ new Set();\n const results = {};\n forEachLineWithContent(grep, (input) => {\n const [path, line, preview] = input.split(NULL);\n paths.add(path);\n (results[path] = results[path] || []).push({\n line: asNumber(line),\n path,\n preview\n });\n });\n return {\n paths,\n results\n };\n}\nfunction grep_default() {\n return {\n grep(searchTerm) {\n const then = trailingFunctionArgument(arguments);\n const options = getTrailingOptions(arguments);\n for (const option of disallowedOptions) {\n if (options.includes(option)) {\n return this._runTask(\n configurationErrorTask(`git.grep: use of \"${option}\" is not supported.`),\n then\n );\n }\n }\n if (typeof searchTerm === \"string\") {\n searchTerm = grepQueryBuilder().param(searchTerm);\n }\n const commands = [\"grep\", \"--null\", \"-n\", \"--full-name\", ...options, ...searchTerm];\n return this._runTask(\n {\n commands,\n format: \"utf-8\",\n parser(stdOut) {\n return parseGrep(stdOut);\n }\n },\n then\n );\n }\n };\n}\nvar disallowedOptions, Query, _a, GrepQuery;\nvar init_grep = __esm({\n \"src/lib/tasks/grep.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n disallowedOptions = [\"-h\"];\n Query = Symbol(\"grepQuery\");\n GrepQuery = class {\n constructor() {\n this[_a] = [];\n }\n *[(_a = Query, Symbol.iterator)]() {\n for (const query of this[Query]) {\n yield query;\n }\n }\n and(...and) {\n and.length && this[Query].push(\"--and\", \"(\", ...prefixedArray(and, \"-e\"), \")\");\n return this;\n }\n param(...param) {\n this[Query].push(...prefixedArray(param, \"-e\"));\n return this;\n }\n };\n }\n});\n\n// src/lib/tasks/reset.ts\nvar reset_exports = {};\n__export(reset_exports, {\n ResetMode: () => ResetMode,\n getResetMode: () => getResetMode,\n resetTask: () => resetTask\n});\nfunction resetTask(mode, customArgs) {\n const commands = [\"reset\"];\n if (isValidResetMode(mode)) {\n commands.push(`--${mode}`);\n }\n commands.push(...customArgs);\n return straightThroughStringTask(commands);\n}\nfunction getResetMode(mode) {\n if (isValidResetMode(mode)) {\n return mode;\n }\n switch (typeof mode) {\n case \"string\":\n case \"undefined\":\n return \"soft\" /* SOFT */;\n }\n return;\n}\nfunction isValidResetMode(mode) {\n return typeof mode === \"string\" && validResetModes.includes(mode);\n}\nvar ResetMode, validResetModes;\nvar init_reset = __esm({\n \"src/lib/tasks/reset.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n ResetMode = /* @__PURE__ */ ((ResetMode2) => {\n ResetMode2[\"MIXED\"] = \"mixed\";\n ResetMode2[\"SOFT\"] = \"soft\";\n ResetMode2[\"HARD\"] = \"hard\";\n ResetMode2[\"MERGE\"] = \"merge\";\n ResetMode2[\"KEEP\"] = \"keep\";\n return ResetMode2;\n })(ResetMode || {});\n validResetModes = asStringArray(Object.values(ResetMode));\n }\n});\n\n// src/lib/git-logger.ts\nimport debug from \"debug\";\nfunction createLog() {\n return debug(\"simple-git\");\n}\nfunction prefixedLogger(to, prefix, forward) {\n if (!prefix || !String(prefix).replace(/\\s*/, \"\")) {\n return !forward ? to : (message, ...args) => {\n to(message, ...args);\n forward(message, ...args);\n };\n }\n return (message, ...args) => {\n to(`%s ${message}`, prefix, ...args);\n if (forward) {\n forward(message, ...args);\n }\n };\n}\nfunction childLoggerName(name, childDebugger, { namespace: parentNamespace }) {\n if (typeof name === \"string\") {\n return name;\n }\n const childNamespace = childDebugger && childDebugger.namespace || \"\";\n if (childNamespace.startsWith(parentNamespace)) {\n return childNamespace.substr(parentNamespace.length + 1);\n }\n return childNamespace || parentNamespace;\n}\nfunction createLogger(label, verbose, initialStep, infoDebugger = createLog()) {\n const labelPrefix = label && `[${label}]` || \"\";\n const spawned = [];\n const debugDebugger = typeof verbose === \"string\" ? infoDebugger.extend(verbose) : verbose;\n const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger);\n return step(initialStep);\n function sibling(name, initial) {\n return append(\n spawned,\n createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger)\n );\n }\n function step(phase) {\n const stepPrefix = phase && `[${phase}]` || \"\";\n const debug2 = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || NOOP;\n const info = prefixedLogger(infoDebugger, `${labelPrefix} ${stepPrefix}`, debug2);\n return Object.assign(debugDebugger ? debug2 : info, {\n label,\n sibling,\n info,\n step\n });\n }\n}\nvar init_git_logger = __esm({\n \"src/lib/git-logger.ts\"() {\n \"use strict\";\n init_utils();\n debug.formatters.L = (value) => String(filterHasLength(value) ? value.length : \"-\");\n debug.formatters.B = (value) => {\n if (Buffer.isBuffer(value)) {\n return value.toString(\"utf8\");\n }\n return objectToString(value);\n };\n }\n});\n\n// src/lib/runners/tasks-pending-queue.ts\nvar TasksPendingQueue;\nvar init_tasks_pending_queue = __esm({\n \"src/lib/runners/tasks-pending-queue.ts\"() {\n \"use strict\";\n init_git_error();\n init_git_logger();\n TasksPendingQueue = class _TasksPendingQueue {\n constructor(logLabel = \"GitExecutor\") {\n this.logLabel = logLabel;\n this._queue = /* @__PURE__ */ new Map();\n }\n withProgress(task) {\n return this._queue.get(task);\n }\n createProgress(task) {\n const name = _TasksPendingQueue.getName(task.commands[0]);\n const logger = createLogger(this.logLabel, name);\n return {\n task,\n logger,\n name\n };\n }\n push(task) {\n const progress = this.createProgress(task);\n progress.logger(\"Adding task to the queue, commands = %o\", task.commands);\n this._queue.set(task, progress);\n return progress;\n }\n fatal(err) {\n for (const [task, { logger }] of Array.from(this._queue.entries())) {\n if (task === err.task) {\n logger.info(`Failed %o`, err);\n logger(\n `Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`\n );\n } else {\n logger.info(\n `A fatal exception occurred in a previous task, the queue has been purged: %o`,\n err.message\n );\n }\n this.complete(task);\n }\n if (this._queue.size !== 0) {\n throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`);\n }\n }\n complete(task) {\n const progress = this.withProgress(task);\n if (progress) {\n this._queue.delete(task);\n }\n }\n attempt(task) {\n const progress = this.withProgress(task);\n if (!progress) {\n throw new GitError(void 0, \"TasksPendingQueue: attempt called for an unknown task\");\n }\n progress.logger(\"Starting task\");\n return progress;\n }\n static getName(name = \"empty\") {\n return `task:${name}:${++_TasksPendingQueue.counter}`;\n }\n static {\n this.counter = 0;\n }\n };\n }\n});\n\n// src/lib/runners/git-executor-chain.ts\nimport { spawn } from \"child_process\";\nfunction pluginContext(task, commands) {\n return {\n method: first(task.commands) || \"\",\n commands\n };\n}\nfunction onErrorReceived(target, logger) {\n return (err) => {\n logger(`[ERROR] child process exception %o`, err);\n target.push(Buffer.from(String(err.stack), \"ascii\"));\n };\n}\nfunction onDataReceived(target, name, logger, output) {\n return (buffer) => {\n logger(`%s received %L bytes`, name, buffer);\n output(`%B`, buffer);\n target.push(buffer);\n };\n}\nvar GitExecutorChain;\nvar init_git_executor_chain = __esm({\n \"src/lib/runners/git-executor-chain.ts\"() {\n \"use strict\";\n init_git_error();\n init_task();\n init_utils();\n init_tasks_pending_queue();\n GitExecutorChain = class {\n constructor(_executor, _scheduler, _plugins) {\n this._executor = _executor;\n this._scheduler = _scheduler;\n this._plugins = _plugins;\n this._chain = Promise.resolve();\n this._queue = new TasksPendingQueue();\n }\n get cwd() {\n return this._cwd || this._executor.cwd;\n }\n set cwd(cwd) {\n this._cwd = cwd;\n }\n get env() {\n return this._executor.env;\n }\n get outputHandler() {\n return this._executor.outputHandler;\n }\n chain() {\n return this;\n }\n push(task) {\n this._queue.push(task);\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n async attemptTask(task) {\n const onScheduleComplete = await this._scheduler.next();\n const onQueueComplete = () => this._queue.complete(task);\n try {\n const { logger } = this._queue.attempt(task);\n return await (isEmptyTask(task) ? this.attemptEmptyTask(task, logger) : this.attemptRemoteTask(task, logger));\n } catch (e) {\n throw this.onFatalException(task, e);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n onFatalException(task, e) {\n const gitError = e instanceof GitError ? Object.assign(e, { task }) : new GitError(task, e && String(e));\n this._chain = Promise.resolve();\n this._queue.fatal(gitError);\n return gitError;\n }\n async attemptRemoteTask(task, logger) {\n const binary = this._plugins.exec(\"spawn.binary\", \"\", pluginContext(task, task.commands));\n const args = this._plugins.exec(\"spawn.args\", [...task.commands], {\n ...pluginContext(task, task.commands),\n env: { ...this.env }\n });\n const raw = await this.gitResponse(\n task,\n binary,\n args,\n this.outputHandler,\n logger.step(\"SPAWN\")\n );\n const outputStreams = await this.handleTaskData(task, args, raw, logger.step(\"HANDLE\"));\n logger(`passing response to task's parser as a %s`, task.format);\n if (isBufferTask(task)) {\n return callTaskParser(task.parser, outputStreams);\n }\n return callTaskParser(task.parser, outputStreams.asStrings());\n }\n async attemptEmptyTask(task, logger) {\n logger(`empty task bypassing child process to call to task's parser`);\n return task.parser(this);\n }\n handleTaskData(task, args, result, logger) {\n const { exitCode, rejection, stdOut, stdErr } = result;\n return new Promise((done, fail) => {\n logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode);\n const { error } = this._plugins.exec(\n \"task.error\",\n { error: rejection },\n {\n ...pluginContext(task, args),\n ...result\n }\n );\n if (error && task.onError) {\n logger.info(`exitCode=%s handling with custom error handler`);\n return task.onError(\n result,\n error,\n (newStdOut) => {\n logger.info(`custom error handler treated as success`);\n logger(`custom error returned a %s`, objectToString(newStdOut));\n done(\n new GitOutputStreams(\n Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut,\n Buffer.concat(stdErr)\n )\n );\n },\n fail\n );\n }\n if (error) {\n logger.info(\n `handling as error: exitCode=%s stdErr=%s rejection=%o`,\n exitCode,\n stdErr.length,\n rejection\n );\n return fail(error);\n }\n logger.info(`retrieving task output complete`);\n done(new GitOutputStreams(Buffer.concat(stdOut), Buffer.concat(stdErr)));\n });\n }\n async gitResponse(task, command, args, outputHandler, logger) {\n const outputLogger = logger.sibling(\"output\");\n const spawnOptions = this._plugins.exec(\n \"spawn.options\",\n {\n cwd: this.cwd,\n env: this.env,\n windowsHide: true\n },\n pluginContext(task, task.commands)\n );\n return new Promise((done) => {\n const stdOut = [];\n const stdErr = [];\n logger.info(`%s %o`, command, args);\n logger(\"%O\", spawnOptions);\n let rejection = this._beforeSpawn(task, args);\n if (rejection) {\n return done({\n stdOut,\n stdErr,\n exitCode: 9901,\n rejection\n });\n }\n this._plugins.exec(\"spawn.before\", void 0, {\n ...pluginContext(task, args),\n kill(reason) {\n rejection = reason || rejection;\n }\n });\n const spawned = spawn(command, args, spawnOptions);\n spawned.stdout.on(\n \"data\",\n onDataReceived(stdOut, \"stdOut\", logger, outputLogger.step(\"stdOut\"))\n );\n spawned.stderr.on(\n \"data\",\n onDataReceived(stdErr, \"stdErr\", logger, outputLogger.step(\"stdErr\"))\n );\n spawned.on(\"error\", onErrorReceived(stdErr, logger));\n if (outputHandler) {\n logger(`Passing child process stdOut/stdErr to custom outputHandler`);\n outputHandler(command, spawned.stdout, spawned.stderr, [...args]);\n }\n this._plugins.exec(\"spawn.after\", void 0, {\n ...pluginContext(task, args),\n spawned,\n close(exitCode, reason) {\n done({\n stdOut,\n stdErr,\n exitCode,\n rejection: rejection || reason\n });\n },\n kill(reason) {\n if (spawned.killed) {\n return;\n }\n rejection = reason;\n spawned.kill(\"SIGINT\");\n }\n });\n });\n }\n _beforeSpawn(task, args) {\n let rejection;\n this._plugins.exec(\"spawn.before\", void 0, {\n ...pluginContext(task, args),\n kill(reason) {\n rejection = reason || rejection;\n }\n });\n return rejection;\n }\n };\n }\n});\n\n// src/lib/runners/git-executor.ts\nvar git_executor_exports = {};\n__export(git_executor_exports, {\n GitExecutor: () => GitExecutor\n});\nvar GitExecutor;\nvar init_git_executor = __esm({\n \"src/lib/runners/git-executor.ts\"() {\n \"use strict\";\n init_git_executor_chain();\n GitExecutor = class {\n constructor(cwd, _scheduler, _plugins) {\n this.cwd = cwd;\n this._scheduler = _scheduler;\n this._plugins = _plugins;\n this._chain = new GitExecutorChain(this, this._scheduler, this._plugins);\n }\n chain() {\n return new GitExecutorChain(this, this._scheduler, this._plugins);\n }\n push(task) {\n return this._chain.push(task);\n }\n };\n }\n});\n\n// src/lib/task-callback.ts\nfunction taskCallback(task, response, callback = NOOP) {\n const onSuccess = (data) => {\n callback(null, data);\n };\n const onError2 = (err) => {\n if (err?.task === task) {\n callback(\n err instanceof GitResponseError ? addDeprecationNoticeToError(err) : err,\n void 0\n );\n }\n };\n response.then(onSuccess, onError2);\n}\nfunction addDeprecationNoticeToError(err) {\n let log = (name) => {\n console.warn(\n `simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`\n );\n log = NOOP;\n };\n return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {}));\n function descriptorReducer(all, name) {\n if (name in err) {\n return all;\n }\n all[name] = {\n enumerable: false,\n configurable: false,\n get() {\n log(name);\n return err.git[name];\n }\n };\n return all;\n }\n}\nvar init_task_callback = __esm({\n \"src/lib/task-callback.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_utils();\n }\n});\n\n// src/lib/tasks/change-working-directory.ts\nfunction changeWorkingDirectoryTask(directory, root) {\n return adhocExecTask((instance) => {\n if (!folderExists(directory)) {\n throw new Error(`Git.cwd: cannot change to non-directory \"${directory}\"`);\n }\n return (root || instance).cwd = directory;\n });\n}\nvar init_change_working_directory = __esm({\n \"src/lib/tasks/change-working-directory.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/checkout.ts\nfunction checkoutTask(args) {\n const commands = [\"checkout\", ...args];\n if (commands[1] === \"-b\" && commands.includes(\"-B\")) {\n commands[1] = remove(commands, \"-B\");\n }\n return straightThroughStringTask(commands);\n}\nfunction checkout_default() {\n return {\n checkout() {\n return this._runTask(\n checkoutTask(getTrailingOptions(arguments, 1)),\n trailingFunctionArgument(arguments)\n );\n },\n checkoutBranch(branchName, startPoint) {\n return this._runTask(\n checkoutTask([\"-b\", branchName, startPoint, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n },\n checkoutLocalBranch(branchName) {\n return this._runTask(\n checkoutTask([\"-b\", branchName, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar init_checkout = __esm({\n \"src/lib/tasks/checkout.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/count-objects.ts\nfunction countObjectsResponse() {\n return {\n count: 0,\n garbage: 0,\n inPack: 0,\n packs: 0,\n prunePackable: 0,\n size: 0,\n sizeGarbage: 0,\n sizePack: 0\n };\n}\nfunction count_objects_default() {\n return {\n countObjects() {\n return this._runTask({\n commands: [\"count-objects\", \"--verbose\"],\n format: \"utf-8\",\n parser(stdOut) {\n return parseStringResponse(countObjectsResponse(), [parser2], stdOut);\n }\n });\n }\n };\n}\nvar parser2;\nvar init_count_objects = __esm({\n \"src/lib/tasks/count-objects.ts\"() {\n \"use strict\";\n init_utils();\n parser2 = new LineParser(\n /([a-z-]+): (\\d+)$/,\n (result, [key, value]) => {\n const property = asCamelCase(key);\n if (Object.hasOwn(result, property)) {\n result[property] = asNumber(value);\n }\n }\n );\n }\n});\n\n// src/lib/parsers/parse-commit.ts\nfunction parseCommitResult(stdOut) {\n const result = {\n author: null,\n branch: \"\",\n commit: \"\",\n root: false,\n summary: {\n changes: 0,\n insertions: 0,\n deletions: 0\n }\n };\n return parseStringResponse(result, parsers, stdOut);\n}\nvar parsers;\nvar init_parse_commit = __esm({\n \"src/lib/parsers/parse-commit.ts\"() {\n \"use strict\";\n init_utils();\n parsers = [\n new LineParser(/^\\[([^\\s]+)( \\([^)]+\\))? ([^\\]]+)/, (result, [branch, root, commit]) => {\n result.branch = branch;\n result.commit = commit;\n result.root = !!root;\n }),\n new LineParser(/\\s*Author:\\s(.+)/i, (result, [author]) => {\n const parts = author.split(\"<\");\n const email = parts.pop();\n if (!email || !email.includes(\"@\")) {\n return;\n }\n result.author = {\n email: email.substr(0, email.length - 1),\n name: parts.join(\"<\").trim()\n };\n }),\n new LineParser(\n /(\\d+)[^,]*(?:,\\s*(\\d+)[^,]*)(?:,\\s*(\\d+))/g,\n (result, [changes, insertions, deletions]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n result.summary.insertions = parseInt(insertions, 10) || 0;\n result.summary.deletions = parseInt(deletions, 10) || 0;\n }\n ),\n new LineParser(\n /^(\\d+)[^,]*(?:,\\s*(\\d+)[^(]+\\(([+-]))?/,\n (result, [changes, lines, direction]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n const count = parseInt(lines, 10) || 0;\n if (direction === \"-\") {\n result.summary.deletions = count;\n } else if (direction === \"+\") {\n result.summary.insertions = count;\n }\n }\n )\n ];\n }\n});\n\n// src/lib/tasks/commit.ts\nfunction commitTask(message, files, customArgs) {\n const commands = [\n \"-c\",\n \"core.abbrev=40\",\n \"commit\",\n ...prefixedArray(message, \"-m\"),\n ...files,\n ...customArgs\n ];\n return {\n commands,\n format: \"utf-8\",\n parser: parseCommitResult\n };\n}\nfunction commit_default() {\n return {\n commit(message, ...rest) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) || commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [\n ...asStringArray(filterType(rest[1], filterArray, [])),\n ...getTrailingOptions(arguments, 0, true)\n ]\n );\n return this._runTask(task, next);\n }\n };\n function rejectDeprecatedSignatures(message) {\n return !filterStringOrStringArray(message) && configurationErrorTask(\n `git.commit: requires the commit message to be supplied as a string/string[]`\n );\n }\n}\nvar init_commit = __esm({\n \"src/lib/tasks/commit.ts\"() {\n \"use strict\";\n init_parse_commit();\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/first-commit.ts\nfunction first_commit_default() {\n return {\n firstCommit() {\n return this._runTask(\n straightThroughStringTask([\"rev-list\", \"--max-parents=0\", \"HEAD\"], true),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar init_first_commit = __esm({\n \"src/lib/tasks/first-commit.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/hash-object.ts\nfunction hashObjectTask(filePath, write) {\n const commands = [\"hash-object\", filePath];\n if (write) {\n commands.push(\"-w\");\n }\n return straightThroughStringTask(commands, true);\n}\nvar init_hash_object = __esm({\n \"src/lib/tasks/hash-object.ts\"() {\n \"use strict\";\n init_task();\n }\n});\n\n// src/lib/responses/InitSummary.ts\nfunction parseInit(bare, path, text) {\n const response = String(text).trim();\n let result;\n if (result = initResponseRegex.exec(response)) {\n return new InitSummary(bare, path, false, result[1]);\n }\n if (result = reInitResponseRegex.exec(response)) {\n return new InitSummary(bare, path, true, result[1]);\n }\n let gitDir = \"\";\n const tokens = response.split(\" \");\n while (tokens.length) {\n const token = tokens.shift();\n if (token === \"in\") {\n gitDir = tokens.join(\" \");\n break;\n }\n }\n return new InitSummary(bare, path, /^re/i.test(response), gitDir);\n}\nvar InitSummary, initResponseRegex, reInitResponseRegex;\nvar init_InitSummary = __esm({\n \"src/lib/responses/InitSummary.ts\"() {\n \"use strict\";\n InitSummary = class {\n constructor(bare, path, existing, gitDir) {\n this.bare = bare;\n this.path = path;\n this.existing = existing;\n this.gitDir = gitDir;\n }\n };\n initResponseRegex = /^Init.+ repository in (.+)$/;\n reInitResponseRegex = /^Rein.+ in (.+)$/;\n }\n});\n\n// src/lib/tasks/init.ts\nfunction hasBareCommand(command) {\n return command.includes(bareCommand);\n}\nfunction initTask(bare = false, path, customArgs) {\n const commands = [\"init\", ...customArgs];\n if (bare && !hasBareCommand(commands)) {\n commands.splice(1, 0, bareCommand);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return parseInit(commands.includes(\"--bare\"), path, text);\n }\n };\n}\nvar bareCommand;\nvar init_init = __esm({\n \"src/lib/tasks/init.ts\"() {\n \"use strict\";\n init_InitSummary();\n bareCommand = \"--bare\";\n }\n});\n\n// src/lib/args/log-format.ts\nfunction logFormatFromCommand(customArgs) {\n for (let i = 0; i < customArgs.length; i++) {\n const format = logFormatRegex.exec(customArgs[i]);\n if (format) {\n return `--${format[1]}`;\n }\n }\n return \"\" /* NONE */;\n}\nfunction isLogFormat(customArg) {\n return logFormatRegex.test(customArg);\n}\nvar logFormatRegex;\nvar init_log_format = __esm({\n \"src/lib/args/log-format.ts\"() {\n \"use strict\";\n logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/;\n }\n});\n\n// src/lib/responses/DiffSummary.ts\nvar DiffSummary;\nvar init_DiffSummary = __esm({\n \"src/lib/responses/DiffSummary.ts\"() {\n \"use strict\";\n DiffSummary = class {\n constructor() {\n this.changed = 0;\n this.deletions = 0;\n this.insertions = 0;\n this.files = [];\n }\n };\n }\n});\n\n// src/lib/parsers/parse-diff-summary.ts\nfunction getDiffParser(format = \"\" /* NONE */) {\n const parser4 = diffSummaryParsers[format];\n return (stdOut) => parseStringResponse(new DiffSummary(), parser4, stdOut, false);\n}\nvar statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers;\nvar init_parse_diff_summary = __esm({\n \"src/lib/parsers/parse-diff-summary.ts\"() {\n \"use strict\";\n init_log_format();\n init_DiffSummary();\n init_diff_name_status();\n init_utils();\n statParser = [\n new LineParser(\n /^(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/,\n (result, [file, changes, alterations = \"\"]) => {\n result.files.push({\n file: file.trim(),\n changes: asNumber(changes),\n insertions: alterations.replace(/[^+]/g, \"\").length,\n deletions: alterations.replace(/[^-]/g, \"\").length,\n binary: false\n });\n }\n ),\n new LineParser(\n /^(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,\n (result, [file, before, after]) => {\n result.files.push({\n file: file.trim(),\n before: asNumber(before),\n after: asNumber(after),\n binary: true\n });\n }\n ),\n new LineParser(\n /(\\d+) files? changed\\s*((?:, \\d+ [^,]+){0,2})/,\n (result, [changed, summary]) => {\n const inserted = /(\\d+) i/.exec(summary);\n const deleted = /(\\d+) d/.exec(summary);\n result.changed = asNumber(changed);\n result.insertions = asNumber(inserted?.[1]);\n result.deletions = asNumber(deleted?.[1]);\n }\n )\n ];\n numStatParser = [\n new LineParser(\n /(\\d+)\\t(\\d+)\\t(.+)$/,\n (result, [changesInsert, changesDelete, file]) => {\n const insertions = asNumber(changesInsert);\n const deletions = asNumber(changesDelete);\n result.changed++;\n result.insertions += insertions;\n result.deletions += deletions;\n result.files.push({\n file,\n changes: insertions + deletions,\n insertions,\n deletions,\n binary: false\n });\n }\n ),\n new LineParser(/-\\t-\\t(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n after: 0,\n before: 0,\n binary: true\n });\n })\n ];\n nameOnlyParser = [\n new LineParser(/(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false\n });\n })\n ];\n nameStatusParser = [\n new LineParser(\n /([ACDMRTUXB])([0-9]{0,3})\\t(.[^\\t]*)(\\t(.[^\\t]*))?$/,\n (result, [status, similarity, from, _to, to]) => {\n result.changed++;\n result.files.push({\n file: to ?? from,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n status: orVoid(isDiffNameStatus(status) && status),\n from: orVoid(!!to && from !== to && from),\n similarity: asNumber(similarity)\n });\n }\n )\n ];\n diffSummaryParsers = {\n [\"\" /* NONE */]: statParser,\n [\"--stat\" /* STAT */]: statParser,\n [\"--numstat\" /* NUM_STAT */]: numStatParser,\n [\"--name-status\" /* NAME_STATUS */]: nameStatusParser,\n [\"--name-only\" /* NAME_ONLY */]: nameOnlyParser\n };\n }\n});\n\n// src/lib/parsers/parse-list-log-summary.ts\nfunction lineBuilder(tokens, fields) {\n return fields.reduce(\n (line, field, index) => {\n line[field] = tokens[index] || \"\";\n return line;\n },\n /* @__PURE__ */ Object.create({ diff: null })\n );\n}\nfunction createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = \"\" /* NONE */) {\n const parseDiffResult = getDiffParser(logFormat);\n return function(stdOut) {\n const all = toLinesWithContent(\n stdOut.trim(),\n false,\n START_BOUNDARY\n ).map(function(item) {\n const lineDetail = item.split(COMMIT_BOUNDARY);\n const listLogLine = lineBuilder(lineDetail[0].split(splitter), fields);\n if (lineDetail.length > 1 && !!lineDetail[1].trim()) {\n listLogLine.diff = parseDiffResult(lineDetail[1]);\n }\n return listLogLine;\n });\n return {\n all,\n latest: all.length && all[0] || null,\n total: all.length\n };\n };\n}\nvar START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames;\nvar init_parse_list_log_summary = __esm({\n \"src/lib/parsers/parse-list-log-summary.ts\"() {\n \"use strict\";\n init_utils();\n init_parse_diff_summary();\n init_log_format();\n START_BOUNDARY = \"\\xF2\\xF2\\xF2\\xF2\\xF2\\xF2 \";\n COMMIT_BOUNDARY = \" \\xF2\\xF2\";\n SPLITTER = \" \\xF2 \";\n defaultFieldNames = [\"hash\", \"date\", \"message\", \"refs\", \"author_name\", \"author_email\"];\n }\n});\n\n// src/lib/tasks/diff.ts\nvar diff_exports = {};\n__export(diff_exports, {\n diffSummaryTask: () => diffSummaryTask,\n validateLogFormatConfig: () => validateLogFormatConfig\n});\nfunction diffSummaryTask(customArgs) {\n let logFormat = logFormatFromCommand(customArgs);\n const commands = [\"diff\"];\n if (logFormat === \"\" /* NONE */) {\n logFormat = \"--stat\" /* STAT */;\n commands.push(\"--stat=4096\");\n }\n commands.push(...customArgs);\n return validateLogFormatConfig(commands) || {\n commands,\n format: \"utf-8\",\n parser: getDiffParser(logFormat)\n };\n}\nfunction validateLogFormatConfig(customArgs) {\n const flags = customArgs.filter(isLogFormat);\n if (flags.length > 1) {\n return configurationErrorTask(\n `Summary flags are mutually exclusive - pick one of ${flags.join(\",\")}`\n );\n }\n if (flags.length && customArgs.includes(\"-z\")) {\n return configurationErrorTask(\n `Summary flag ${flags} parsing is not compatible with null termination option '-z'`\n );\n }\n}\nvar init_diff = __esm({\n \"src/lib/tasks/diff.ts\"() {\n \"use strict\";\n init_log_format();\n init_parse_diff_summary();\n init_task();\n }\n});\n\n// src/lib/tasks/log.ts\nimport { pathspec as pathspec2 } from \"@simple-git/args-pathspec\";\nfunction prettyFormat(format, splitter) {\n const fields = [];\n const formatStr = [];\n Object.keys(format).forEach((field) => {\n fields.push(field);\n formatStr.push(String(format[field]));\n });\n return [fields, formatStr.join(splitter)];\n}\nfunction userOptions(input) {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {});\n}\nfunction parseLogOptions(opt = {}, customArgs = []) {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = filterPlainObject(opt.format) ? opt.format : {\n hash: \"%H\",\n date: opt.strictDate === false ? \"%ai\" : \"%aI\",\n message: \"%s\",\n refs: \"%D\",\n body: opt.multiLine ? \"%B\" : \"%b\",\n author_name: opt.mailMap !== false ? \"%aN\" : \"%an\",\n author_email: opt.mailMap !== false ? \"%aE\" : \"%ae\"\n };\n const [fields, formatStr] = prettyFormat(format, splitter);\n const suffix = [];\n const command = [\n `--pretty=format:${START_BOUNDARY}${formatStr}${COMMIT_BOUNDARY}`,\n ...customArgs\n ];\n const maxCount = opt.n || opt[\"max-count\"] || opt.maxCount;\n if (maxCount) {\n command.push(`--max-count=${maxCount}`);\n }\n if (opt.from || opt.to) {\n const rangeOperator = opt.symmetric !== false ? \"...\" : \"..\";\n suffix.push(`${opt.from || \"\"}${rangeOperator}${opt.to || \"\"}`);\n }\n if (filterString(opt.file)) {\n command.push(\"--follow\", pathspec2(opt.file));\n }\n appendTaskOptions(userOptions(opt), command);\n return {\n fields,\n splitter,\n commands: [...command, ...suffix]\n };\n}\nfunction logTask(splitter, fields, customArgs) {\n const parser4 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));\n return {\n commands: [\"log\", ...customArgs],\n format: \"utf-8\",\n parser: parser4\n };\n}\nfunction log_default() {\n return {\n log(...rest) {\n const next = trailingFunctionArgument(arguments);\n const options = parseLogOptions(\n trailingOptionsArgument(arguments),\n asStringArray(filterType(arguments[0], filterArray, []))\n );\n const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options);\n return this._runTask(task, next);\n }\n };\n function createLogTask(options) {\n return logTask(options.splitter, options.fields, options.commands);\n }\n function rejectDeprecatedSignatures(from, to) {\n return filterString(from) && filterString(to) && configurationErrorTask(\n `git.log(string, string) should be replaced with git.log({ from: string, to: string })`\n );\n }\n}\nvar excludeOptions;\nvar init_log = __esm({\n \"src/lib/tasks/log.ts\"() {\n \"use strict\";\n init_log_format();\n init_parse_list_log_summary();\n init_utils();\n init_task();\n init_diff();\n excludeOptions = /* @__PURE__ */ ((excludeOptions2) => {\n excludeOptions2[excludeOptions2[\"--pretty\"] = 0] = \"--pretty\";\n excludeOptions2[excludeOptions2[\"max-count\"] = 1] = \"max-count\";\n excludeOptions2[excludeOptions2[\"maxCount\"] = 2] = \"maxCount\";\n excludeOptions2[excludeOptions2[\"n\"] = 3] = \"n\";\n excludeOptions2[excludeOptions2[\"file\"] = 4] = \"file\";\n excludeOptions2[excludeOptions2[\"format\"] = 5] = \"format\";\n excludeOptions2[excludeOptions2[\"from\"] = 6] = \"from\";\n excludeOptions2[excludeOptions2[\"to\"] = 7] = \"to\";\n excludeOptions2[excludeOptions2[\"splitter\"] = 8] = \"splitter\";\n excludeOptions2[excludeOptions2[\"symmetric\"] = 9] = \"symmetric\";\n excludeOptions2[excludeOptions2[\"mailMap\"] = 10] = \"mailMap\";\n excludeOptions2[excludeOptions2[\"multiLine\"] = 11] = \"multiLine\";\n excludeOptions2[excludeOptions2[\"strictDate\"] = 12] = \"strictDate\";\n return excludeOptions2;\n })(excludeOptions || {});\n }\n});\n\n// src/lib/responses/MergeSummary.ts\nvar MergeSummaryConflict, MergeSummaryDetail;\nvar init_MergeSummary = __esm({\n \"src/lib/responses/MergeSummary.ts\"() {\n \"use strict\";\n MergeSummaryConflict = class {\n constructor(reason, file = null, meta) {\n this.reason = reason;\n this.file = file;\n this.meta = meta;\n }\n toString() {\n return `${this.file}:${this.reason}`;\n }\n };\n MergeSummaryDetail = class {\n constructor() {\n this.conflicts = [];\n this.merges = [];\n this.result = \"success\";\n }\n get failed() {\n return this.conflicts.length > 0;\n }\n get reason() {\n return this.result;\n }\n toString() {\n if (this.conflicts.length) {\n return `CONFLICTS: ${this.conflicts.join(\", \")}`;\n }\n return \"OK\";\n }\n };\n }\n});\n\n// src/lib/responses/PullSummary.ts\nvar PullSummary, PullFailedSummary;\nvar init_PullSummary = __esm({\n \"src/lib/responses/PullSummary.ts\"() {\n \"use strict\";\n PullSummary = class {\n constructor() {\n this.remoteMessages = {\n all: []\n };\n this.created = [];\n this.deleted = [];\n this.files = [];\n this.deletions = {};\n this.insertions = {};\n this.summary = {\n changes: 0,\n deletions: 0,\n insertions: 0\n };\n }\n };\n PullFailedSummary = class {\n constructor() {\n this.remote = \"\";\n this.hash = {\n local: \"\",\n remote: \"\"\n };\n this.branch = {\n local: \"\",\n remote: \"\"\n };\n this.message = \"\";\n }\n toString() {\n return this.message;\n }\n };\n }\n});\n\n// src/lib/parsers/parse-remote-objects.ts\nfunction objectEnumerationResult(remoteMessages) {\n return remoteMessages.objects = remoteMessages.objects || {\n compressing: 0,\n counting: 0,\n enumerating: 0,\n packReused: 0,\n reused: { count: 0, delta: 0 },\n total: { count: 0, delta: 0 }\n };\n}\nfunction asObjectCount(source) {\n const count = /^\\s*(\\d+)/.exec(source);\n const delta = /delta (\\d+)/i.exec(source);\n return {\n count: asNumber(count && count[1] || \"0\"),\n delta: asNumber(delta && delta[1] || \"0\")\n };\n}\nvar remoteMessagesObjectParsers;\nvar init_parse_remote_objects = __esm({\n \"src/lib/parsers/parse-remote-objects.ts\"() {\n \"use strict\";\n init_utils();\n remoteMessagesObjectParsers = [\n new RemoteLineParser(\n /^remote:\\s*(enumerating|counting|compressing) objects: (\\d+),/i,\n (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n Object.assign(enumeration, { [key]: asNumber(count) });\n }\n ),\n new RemoteLineParser(\n /^remote:\\s*(enumerating|counting|compressing) objects: \\d+% \\(\\d+\\/(\\d+)\\),/i,\n (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n Object.assign(enumeration, { [key]: asNumber(count) });\n }\n ),\n new RemoteLineParser(\n /total ([^,]+), reused ([^,]+), pack-reused (\\d+)/i,\n (result, [total, reused, packReused]) => {\n const objects = objectEnumerationResult(result.remoteMessages);\n objects.total = asObjectCount(total);\n objects.reused = asObjectCount(reused);\n objects.packReused = asNumber(packReused);\n }\n )\n ];\n }\n});\n\n// src/lib/parsers/parse-remote-messages.ts\nfunction parseRemoteMessages(_stdOut, stdErr) {\n return parseStringResponse({ remoteMessages: new RemoteMessageSummary() }, parsers2, stdErr);\n}\nvar parsers2, RemoteMessageSummary;\nvar init_parse_remote_messages = __esm({\n \"src/lib/parsers/parse-remote-messages.ts\"() {\n \"use strict\";\n init_utils();\n init_parse_remote_objects();\n parsers2 = [\n new RemoteLineParser(/^remote:\\s*(.+)$/, (result, [text]) => {\n result.remoteMessages.all.push(text.trim());\n return false;\n }),\n ...remoteMessagesObjectParsers,\n new RemoteLineParser(\n [/create a (?:pull|merge) request/i, /\\s(https?:\\/\\/\\S+)$/],\n (result, [pullRequestUrl]) => {\n result.remoteMessages.pullRequestUrl = pullRequestUrl;\n }\n ),\n new RemoteLineParser(\n [/found (\\d+) vulnerabilities.+\\(([^)]+)\\)/i, /\\s(https?:\\/\\/\\S+)$/],\n (result, [count, summary, url]) => {\n result.remoteMessages.vulnerabilities = {\n count: asNumber(count),\n summary,\n url\n };\n }\n )\n ];\n RemoteMessageSummary = class {\n constructor() {\n this.all = [];\n }\n };\n }\n});\n\n// src/lib/parsers/parse-pull.ts\nfunction parsePullErrorResult(stdOut, stdErr) {\n const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, [stdOut, stdErr]);\n return pullError.message && pullError;\n}\nvar FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult;\nvar init_parse_pull = __esm({\n \"src/lib/parsers/parse-pull.ts\"() {\n \"use strict\";\n init_PullSummary();\n init_utils();\n init_parse_remote_messages();\n FILE_UPDATE_REGEX = /^\\s*(.+?)\\s+\\|\\s+\\d+\\s*(\\+*)(-*)/;\n SUMMARY_REGEX = /(\\d+)\\D+((\\d+)\\D+\\(\\+\\))?(\\D+(\\d+)\\D+\\(-\\))?/;\n ACTION_REGEX = /^(create|delete) mode \\d+ (.+)/;\n parsers3 = [\n new LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => {\n result.files.push(file);\n if (insertions) {\n result.insertions[file] = insertions.length;\n }\n if (deletions) {\n result.deletions[file] = deletions.length;\n }\n }),\n new LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => {\n if (insertions !== void 0 || deletions !== void 0) {\n result.summary.changes = +changes || 0;\n result.summary.insertions = +insertions || 0;\n result.summary.deletions = +deletions || 0;\n return true;\n }\n return false;\n }),\n new LineParser(ACTION_REGEX, (result, [action, file]) => {\n append(result.files, file);\n append(action === \"create\" ? result.created : result.deleted, file);\n })\n ];\n errorParsers = [\n new LineParser(/^from\\s(.+)$/i, (result, [remote]) => void (result.remote = remote)),\n new LineParser(/^fatal:\\s(.+)$/, (result, [message]) => void (result.message = message)),\n new LineParser(\n /([a-z0-9]+)\\.\\.([a-z0-9]+)\\s+(\\S+)\\s+->\\s+(\\S+)$/,\n (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => {\n result.branch.local = branchLocal;\n result.hash.local = hashLocal;\n result.branch.remote = branchRemote;\n result.hash.remote = hashRemote;\n }\n )\n ];\n parsePullDetail = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]);\n };\n parsePullResult = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(stdOut, stdErr)\n );\n };\n }\n});\n\n// src/lib/parsers/parse-merge.ts\nvar parsers4, parseMergeResult, parseMergeDetail;\nvar init_parse_merge = __esm({\n \"src/lib/parsers/parse-merge.ts\"() {\n \"use strict\";\n init_MergeSummary();\n init_utils();\n init_parse_pull();\n parsers4 = [\n new LineParser(/^Auto-merging\\s+(.+)$/, (summary, [autoMerge]) => {\n summary.merges.push(autoMerge);\n }),\n new LineParser(/^CONFLICT\\s+\\((.+)\\): Merge conflict in (.+)$/, (summary, [reason, file]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file));\n }),\n new LineParser(\n /^CONFLICT\\s+\\((.+\\/delete)\\): (.+) deleted in (.+) and/,\n (summary, [reason, file, deleteRef]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file, { deleteRef }));\n }\n ),\n new LineParser(/^CONFLICT\\s+\\((.+)\\):/, (summary, [reason]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, null));\n }),\n new LineParser(/^Automatic merge failed;\\s+(.+)$/, (summary, [result]) => {\n summary.result = result;\n })\n ];\n parseMergeResult = (stdOut, stdErr) => {\n return Object.assign(parseMergeDetail(stdOut, stdErr), parsePullResult(stdOut, stdErr));\n };\n parseMergeDetail = (stdOut) => {\n return parseStringResponse(new MergeSummaryDetail(), parsers4, stdOut);\n };\n }\n});\n\n// src/lib/tasks/merge.ts\nfunction mergeTask(customArgs) {\n if (!customArgs.length) {\n return configurationErrorTask(\"Git.merge requires at least one option\");\n }\n return {\n commands: [\"merge\", ...customArgs],\n format: \"utf-8\",\n parser(stdOut, stdErr) {\n const merge = parseMergeResult(stdOut, stdErr);\n if (merge.failed) {\n throw new GitResponseError(merge);\n }\n return merge;\n }\n };\n}\nvar init_merge = __esm({\n \"src/lib/tasks/merge.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_parse_merge();\n init_task();\n }\n});\n\n// src/lib/parsers/parse-push.ts\nfunction pushResultPushedItem(local, remote, status) {\n const deleted = status.includes(\"deleted\");\n const tag = status.includes(\"tag\") || /^refs\\/tags/.test(local);\n const alreadyUpdated = !status.includes(\"new\");\n return {\n deleted,\n tag,\n branch: !tag,\n new: !alreadyUpdated,\n alreadyUpdated,\n local,\n remote\n };\n}\nvar parsers5, parsePushResult, parsePushDetail;\nvar init_parse_push = __esm({\n \"src/lib/parsers/parse-push.ts\"() {\n \"use strict\";\n init_utils();\n init_parse_remote_messages();\n parsers5 = [\n new LineParser(/^Pushing to (.+)$/, (result, [repo]) => {\n result.repo = repo;\n }),\n new LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => {\n result.ref = {\n ...result.ref || {},\n local\n };\n }),\n new LineParser(/^[=*-]\\s+([^:]+):(\\S+)\\s+\\[(.+)]$/, (result, [local, remote, type]) => {\n result.pushed.push(pushResultPushedItem(local, remote, type));\n }),\n new LineParser(\n /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,\n (result, [local, remote, remoteName]) => {\n result.branch = {\n ...result.branch || {},\n local,\n remote,\n remoteName\n };\n }\n ),\n new LineParser(\n /^([^:]+):(\\S+)\\s+([a-z0-9]+)\\.\\.([a-z0-9]+)$/,\n (result, [local, remote, from, to]) => {\n result.update = {\n head: {\n local,\n remote\n },\n hash: {\n from,\n to\n }\n };\n }\n )\n ];\n parsePushResult = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n return {\n ...pushDetail,\n ...responseDetail\n };\n };\n parsePushDetail = (stdOut, stdErr) => {\n return parseStringResponse({ pushed: [] }, parsers5, [stdOut, stdErr]);\n };\n }\n});\n\n// src/lib/tasks/push.ts\nvar push_exports = {};\n__export(push_exports, {\n pushTagsTask: () => pushTagsTask,\n pushTask: () => pushTask\n});\nfunction pushTagsTask(ref = {}, customArgs) {\n append(customArgs, \"--tags\");\n return pushTask(ref, customArgs);\n}\nfunction pushTask(ref = {}, customArgs) {\n const commands = [\"push\", ...customArgs];\n if (ref.branch) {\n commands.splice(1, 0, ref.branch);\n }\n if (ref.remote) {\n commands.splice(1, 0, ref.remote);\n }\n remove(commands, \"-v\");\n append(commands, \"--verbose\");\n append(commands, \"--porcelain\");\n return {\n commands,\n format: \"utf-8\",\n parser: parsePushResult\n };\n}\nvar init_push = __esm({\n \"src/lib/tasks/push.ts\"() {\n \"use strict\";\n init_parse_push();\n init_utils();\n }\n});\n\n// src/lib/tasks/show.ts\nfunction show_default() {\n return {\n showBuffer() {\n const commands = [\"show\", ...getTrailingOptions(arguments, 1)];\n if (!commands.includes(\"--binary\")) {\n commands.splice(1, 0, \"--binary\");\n }\n return this._runTask(\n straightThroughBufferTask(commands),\n trailingFunctionArgument(arguments)\n );\n },\n show() {\n const commands = [\"show\", ...getTrailingOptions(arguments, 1)];\n return this._runTask(\n straightThroughStringTask(commands),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar init_show = __esm({\n \"src/lib/tasks/show.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/responses/FileStatusSummary.ts\nvar fromPathRegex, FileStatusSummary;\nvar init_FileStatusSummary = __esm({\n \"src/lib/responses/FileStatusSummary.ts\"() {\n \"use strict\";\n fromPathRegex = /^(.+)\\0(.+)$/;\n FileStatusSummary = class {\n constructor(path, index, working_dir) {\n this.path = path;\n this.index = index;\n this.working_dir = working_dir;\n if (index === \"R\" || working_dir === \"R\") {\n const detail = fromPathRegex.exec(path) || [null, path, path];\n this.from = detail[2] || \"\";\n this.path = detail[1] || \"\";\n }\n }\n };\n }\n});\n\n// src/lib/responses/StatusSummary.ts\nfunction renamedFile(line) {\n const [to, from] = line.split(NULL);\n return {\n from: from || to,\n to\n };\n}\nfunction parser3(indexX, indexY, handler) {\n return [`${indexX}${indexY}`, handler];\n}\nfunction conflicts(indexX, ...indexY) {\n return indexY.map((y) => parser3(indexX, y, (result, file) => result.conflicted.push(file)));\n}\nfunction splitLine(result, lineStr) {\n const trimmed2 = lineStr.trim();\n switch (\" \") {\n case trimmed2.charAt(2):\n return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.slice(3));\n case trimmed2.charAt(1):\n return data(\" \" /* NONE */, trimmed2.charAt(0), trimmed2.slice(2));\n default:\n return;\n }\n function data(index, workingDir, path) {\n const raw = `${index}${workingDir}`;\n const handler = parsers6.get(raw);\n if (handler) {\n handler(result, path);\n }\n if (raw !== \"##\" && raw !== \"!!\") {\n result.files.push(new FileStatusSummary(path, index, workingDir));\n }\n }\n}\nvar StatusSummary, parsers6, parseStatusSummary;\nvar init_StatusSummary = __esm({\n \"src/lib/responses/StatusSummary.ts\"() {\n \"use strict\";\n init_utils();\n init_FileStatusSummary();\n StatusSummary = class {\n constructor() {\n this.not_added = [];\n this.conflicted = [];\n this.created = [];\n this.deleted = [];\n this.ignored = void 0;\n this.modified = [];\n this.renamed = [];\n this.files = [];\n this.staged = [];\n this.ahead = 0;\n this.behind = 0;\n this.current = null;\n this.tracking = null;\n this.detached = false;\n this.isClean = () => {\n return !this.files.length;\n };\n }\n };\n parsers6 = new Map([\n parser3(\n \" \" /* NONE */,\n \"A\" /* ADDED */,\n (result, file) => result.created.push(file)\n ),\n parser3(\n \" \" /* NONE */,\n \"D\" /* DELETED */,\n (result, file) => result.deleted.push(file)\n ),\n parser3(\n \" \" /* NONE */,\n \"M\" /* MODIFIED */,\n (result, file) => result.modified.push(file)\n ),\n parser3(\"A\" /* ADDED */, \" \" /* NONE */, (result, file) => {\n result.created.push(file);\n result.staged.push(file);\n }),\n parser3(\"A\" /* ADDED */, \"M\" /* MODIFIED */, (result, file) => {\n result.created.push(file);\n result.staged.push(file);\n result.modified.push(file);\n }),\n parser3(\"D\" /* DELETED */, \" \" /* NONE */, (result, file) => {\n result.deleted.push(file);\n result.staged.push(file);\n }),\n parser3(\"M\" /* MODIFIED */, \" \" /* NONE */, (result, file) => {\n result.modified.push(file);\n result.staged.push(file);\n }),\n parser3(\"M\" /* MODIFIED */, \"M\" /* MODIFIED */, (result, file) => {\n result.modified.push(file);\n result.staged.push(file);\n }),\n parser3(\"R\" /* RENAMED */, \" \" /* NONE */, (result, file) => {\n result.renamed.push(renamedFile(file));\n }),\n parser3(\"R\" /* RENAMED */, \"M\" /* MODIFIED */, (result, file) => {\n const renamed = renamedFile(file);\n result.renamed.push(renamed);\n result.modified.push(renamed.to);\n }),\n parser3(\"!\" /* IGNORED */, \"!\" /* IGNORED */, (_result, _file) => {\n (_result.ignored = _result.ignored || []).push(_file);\n }),\n parser3(\n \"?\" /* UNTRACKED */,\n \"?\" /* UNTRACKED */,\n (result, file) => result.not_added.push(file)\n ),\n ...conflicts(\"A\" /* ADDED */, \"A\" /* ADDED */, \"U\" /* UNMERGED */),\n ...conflicts(\n \"D\" /* DELETED */,\n \"D\" /* DELETED */,\n \"U\" /* UNMERGED */\n ),\n ...conflicts(\n \"U\" /* UNMERGED */,\n \"A\" /* ADDED */,\n \"D\" /* DELETED */,\n \"U\" /* UNMERGED */\n ),\n [\n \"##\",\n (result, line) => {\n const aheadReg = /ahead (\\d+)/;\n const behindReg = /behind (\\d+)/;\n const currentReg = /^(.+?(?=(?:\\.{3}|\\s|$)))/;\n const trackingReg = /\\.{3}(\\S*)/;\n const onEmptyBranchReg = /\\son\\s(\\S+?)(?=\\.{3}|$)/;\n let regexResult = aheadReg.exec(line);\n result.ahead = regexResult && +regexResult[1] || 0;\n regexResult = behindReg.exec(line);\n result.behind = regexResult && +regexResult[1] || 0;\n regexResult = currentReg.exec(line);\n result.current = filterType(regexResult?.[1], filterString, null);\n regexResult = trackingReg.exec(line);\n result.tracking = filterType(regexResult?.[1], filterString, null);\n regexResult = onEmptyBranchReg.exec(line);\n if (regexResult) {\n result.current = filterType(regexResult?.[1], filterString, result.current);\n }\n result.detached = /\\(no branch\\)/.test(line);\n }\n ]\n ]);\n parseStatusSummary = function(text) {\n const lines = text.split(NULL);\n const status = new StatusSummary();\n for (let i = 0, l = lines.length; i < l; ) {\n let line = lines[i++].trim();\n if (!line) {\n continue;\n }\n if (line.charAt(0) === \"R\" /* RENAMED */) {\n line += NULL + (lines[i++] || \"\");\n }\n splitLine(status, line);\n }\n return status;\n };\n }\n});\n\n// src/lib/tasks/status.ts\nfunction statusTask(customArgs) {\n const commands = [\n \"status\",\n \"--porcelain\",\n \"-b\",\n \"-u\",\n \"--null\",\n ...customArgs.filter((arg) => !ignoredOptions.includes(arg))\n ];\n return {\n format: \"utf-8\",\n commands,\n parser(text) {\n return parseStatusSummary(text);\n }\n };\n}\nvar ignoredOptions;\nvar init_status = __esm({\n \"src/lib/tasks/status.ts\"() {\n \"use strict\";\n init_StatusSummary();\n ignoredOptions = [\"--null\", \"-z\"];\n }\n});\n\n// src/lib/tasks/version.ts\nfunction versionResponse(major = 0, minor = 0, patch = 0, agent = \"\", installed = true) {\n return Object.defineProperty(\n {\n major,\n minor,\n patch,\n agent,\n installed\n },\n \"toString\",\n {\n value() {\n return `${this.major}.${this.minor}.${this.patch}`;\n },\n configurable: false,\n enumerable: false\n }\n );\n}\nfunction notInstalledResponse() {\n return versionResponse(0, 0, 0, \"\", false);\n}\nfunction version_default() {\n return {\n version() {\n return this._runTask({\n commands: [\"--version\"],\n format: \"utf-8\",\n parser: versionParser,\n onError(result, error, done, fail) {\n if (result.exitCode === -2 /* NOT_FOUND */) {\n return done(Buffer.from(NOT_INSTALLED));\n }\n fail(error);\n }\n });\n }\n };\n}\nfunction versionParser(stdOut) {\n if (stdOut === NOT_INSTALLED) {\n return notInstalledResponse();\n }\n return parseStringResponse(versionResponse(0, 0, 0, stdOut), parsers7, stdOut);\n}\nvar NOT_INSTALLED, parsers7;\nvar init_version = __esm({\n \"src/lib/tasks/version.ts\"() {\n \"use strict\";\n init_utils();\n NOT_INSTALLED = \"installed=false\";\n parsers7 = [\n new LineParser(\n /version (\\d+)\\.(\\d+)\\.(\\d+)(?:\\s*\\((.+)\\))?/,\n (result, [major, minor, patch, agent = \"\"]) => {\n Object.assign(\n result,\n versionResponse(asNumber(major), asNumber(minor), asNumber(patch), agent)\n );\n }\n ),\n new LineParser(\n /version (\\d+)\\.(\\d+)\\.(\\D+)(.+)?$/,\n (result, [major, minor, patch, agent = \"\"]) => {\n Object.assign(result, versionResponse(asNumber(major), asNumber(minor), patch, agent));\n }\n )\n ];\n }\n});\n\n// src/lib/tasks/clone.ts\nimport { pathspec as pathspec3 } from \"@simple-git/args-pathspec\";\nfunction createCloneTask(api, task, repoPath, ...args) {\n if (!filterString(repoPath)) {\n return configurationErrorTask(`git.${api}() requires a string 'repoPath'`);\n }\n return task(repoPath, filterType(args[0], filterString), getTrailingOptions(arguments));\n}\nfunction clone_default() {\n return {\n clone(repo, ...rest) {\n return this._runTask(\n createCloneTask(\"clone\", cloneTask, filterType(repo, filterString), ...rest),\n trailingFunctionArgument(arguments)\n );\n },\n mirror(repo, ...rest) {\n return this._runTask(\n createCloneTask(\"mirror\", cloneMirrorTask, filterType(repo, filterString), ...rest),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar cloneTask, cloneMirrorTask;\nvar init_clone = __esm({\n \"src/lib/tasks/clone.ts\"() {\n \"use strict\";\n init_task();\n init_utils();\n cloneTask = (repo, directory, customArgs) => {\n const commands = [\"clone\", ...customArgs];\n filterString(repo) && commands.push(pathspec3(repo));\n filterString(directory) && commands.push(pathspec3(directory));\n return straightThroughStringTask(commands);\n };\n cloneMirrorTask = (repo, directory, customArgs) => {\n append(customArgs, \"--mirror\");\n return cloneTask(repo, directory, customArgs);\n };\n }\n});\n\n// src/lib/simple-git-api.ts\nvar simple_git_api_exports = {};\n__export(simple_git_api_exports, {\n SimpleGitApi: () => SimpleGitApi\n});\nvar SimpleGitApi;\nvar init_simple_git_api = __esm({\n \"src/lib/simple-git-api.ts\"() {\n \"use strict\";\n init_task_callback();\n init_change_working_directory();\n init_checkout();\n init_count_objects();\n init_commit();\n init_config();\n init_first_commit();\n init_grep();\n init_hash_object();\n init_init();\n init_log();\n init_merge();\n init_push();\n init_show();\n init_status();\n init_task();\n init_version();\n init_utils();\n init_clone();\n SimpleGitApi = class {\n constructor(_executor) {\n this._executor = _executor;\n }\n _runTask(task, then) {\n const chain = this._executor.chain();\n const promise = chain.push(task);\n if (then) {\n taskCallback(task, promise, then);\n }\n return Object.create(this, {\n then: { value: promise.then.bind(promise) },\n catch: { value: promise.catch.bind(promise) },\n _executor: { value: chain }\n });\n }\n add(files) {\n return this._runTask(\n straightThroughStringTask([\"add\", ...asArray(files)]),\n trailingFunctionArgument(arguments)\n );\n }\n cwd(directory) {\n const next = trailingFunctionArgument(arguments);\n if (typeof directory === \"string\") {\n return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);\n }\n if (typeof directory?.path === \"string\") {\n return this._runTask(\n changeWorkingDirectoryTask(\n directory.path,\n directory.root && this._executor || void 0\n ),\n next\n );\n }\n return this._runTask(\n configurationErrorTask(\"Git.cwd: workingDirectory must be supplied as a string\"),\n next\n );\n }\n hashObject(path, write) {\n return this._runTask(\n hashObjectTask(path, write === true),\n trailingFunctionArgument(arguments)\n );\n }\n init(bare) {\n return this._runTask(\n initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments)\n );\n }\n merge() {\n return this._runTask(\n mergeTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments)\n );\n }\n mergeFromTo(remote, branch) {\n if (!(filterString(remote) && filterString(branch))) {\n return this._runTask(\n configurationErrorTask(\n `Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`\n )\n );\n }\n return this._runTask(\n mergeTask([remote, branch, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments, false)\n );\n }\n outputHandler(handler) {\n this._executor.outputHandler = handler;\n return this;\n }\n push() {\n const task = pushTask(\n {\n remote: filterType(arguments[0], filterString),\n branch: filterType(arguments[1], filterString)\n },\n getTrailingOptions(arguments)\n );\n return this._runTask(task, trailingFunctionArgument(arguments));\n }\n stash() {\n return this._runTask(\n straightThroughStringTask([\"stash\", ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n }\n status() {\n return this._runTask(\n statusTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments)\n );\n }\n };\n Object.assign(\n SimpleGitApi.prototype,\n checkout_default(),\n clone_default(),\n commit_default(),\n config_default(),\n count_objects_default(),\n first_commit_default(),\n grep_default(),\n log_default(),\n show_default(),\n version_default()\n );\n }\n});\n\n// src/lib/runners/scheduler.ts\nvar scheduler_exports = {};\n__export(scheduler_exports, {\n Scheduler: () => Scheduler\n});\nimport { createDeferred } from \"@kwsites/promise-deferred\";\nvar createScheduledTask, Scheduler;\nvar init_scheduler = __esm({\n \"src/lib/runners/scheduler.ts\"() {\n \"use strict\";\n init_utils();\n init_git_logger();\n createScheduledTask = /* @__PURE__ */ (() => {\n let id = 0;\n return () => {\n id++;\n const { promise, done } = createDeferred();\n return {\n promise,\n done,\n id\n };\n };\n })();\n Scheduler = class {\n constructor(concurrency = 2) {\n this.concurrency = concurrency;\n this.logger = createLogger(\"\", \"scheduler\");\n this.pending = [];\n this.running = [];\n this.logger(`Constructed, concurrency=%s`, concurrency);\n }\n schedule() {\n if (!this.pending.length || this.running.length >= this.concurrency) {\n this.logger(\n `Schedule attempt ignored, pending=%s running=%s concurrency=%s`,\n this.pending.length,\n this.running.length,\n this.concurrency\n );\n return;\n }\n const task = append(this.running, this.pending.shift());\n this.logger(`Attempting id=%s`, task.id);\n task.done(() => {\n this.logger(`Completing id=`, task.id);\n remove(this.running, task);\n this.schedule();\n });\n }\n next() {\n const { promise, id } = append(this.pending, createScheduledTask());\n this.logger(`Scheduling id=%s`, id);\n this.schedule();\n return promise;\n }\n };\n }\n});\n\n// src/lib/tasks/apply-patch.ts\nvar apply_patch_exports = {};\n__export(apply_patch_exports, {\n applyPatchTask: () => applyPatchTask\n});\nfunction applyPatchTask(patches, customArgs) {\n return straightThroughStringTask([\"apply\", ...customArgs, ...patches]);\n}\nvar init_apply_patch = __esm({\n \"src/lib/tasks/apply-patch.ts\"() {\n \"use strict\";\n init_task();\n }\n});\n\n// src/lib/responses/BranchDeleteSummary.ts\nfunction branchDeletionSuccess(branch, hash) {\n return {\n branch,\n hash,\n success: true\n };\n}\nfunction branchDeletionFailure(branch) {\n return {\n branch,\n hash: null,\n success: false\n };\n}\nvar BranchDeletionBatch;\nvar init_BranchDeleteSummary = __esm({\n \"src/lib/responses/BranchDeleteSummary.ts\"() {\n \"use strict\";\n BranchDeletionBatch = class {\n constructor() {\n this.all = [];\n this.branches = {};\n this.errors = [];\n }\n get success() {\n return !this.errors.length;\n }\n };\n }\n});\n\n// src/lib/parsers/parse-branch-delete.ts\nfunction hasBranchDeletionError(data, processExitCode) {\n return processExitCode === 1 /* ERROR */ && deleteErrorRegex.test(data);\n}\nvar deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions;\nvar init_parse_branch_delete = __esm({\n \"src/lib/parsers/parse-branch-delete.ts\"() {\n \"use strict\";\n init_BranchDeleteSummary();\n init_utils();\n deleteSuccessRegex = /(\\S+)\\s+\\(\\S+\\s([^)]+)\\)/;\n deleteErrorRegex = /^error[^']+'([^']+)'/m;\n parsers8 = [\n new LineParser(deleteSuccessRegex, (result, [branch, hash]) => {\n const deletion = branchDeletionSuccess(branch, hash);\n result.all.push(deletion);\n result.branches[branch] = deletion;\n }),\n new LineParser(deleteErrorRegex, (result, [branch]) => {\n const deletion = branchDeletionFailure(branch);\n result.errors.push(deletion);\n result.all.push(deletion);\n result.branches[branch] = deletion;\n })\n ];\n parseBranchDeletions = (stdOut, stdErr) => {\n return parseStringResponse(new BranchDeletionBatch(), parsers8, [stdOut, stdErr]);\n };\n }\n});\n\n// src/lib/responses/BranchSummary.ts\nvar BranchSummaryResult;\nvar init_BranchSummary = __esm({\n \"src/lib/responses/BranchSummary.ts\"() {\n \"use strict\";\n BranchSummaryResult = class {\n constructor() {\n this.all = [];\n this.branches = {};\n this.current = \"\";\n this.detached = false;\n }\n push(status, detached, name, commit, label) {\n if (status === \"*\" /* CURRENT */) {\n this.detached = detached;\n this.current = name;\n }\n this.all.push(name);\n this.branches[name] = {\n current: status === \"*\" /* CURRENT */,\n linkedWorkTree: status === \"+\" /* LINKED */,\n name,\n commit,\n label\n };\n }\n };\n }\n});\n\n// src/lib/parsers/parse-branch.ts\nfunction branchStatus(input) {\n return input ? input.charAt(0) : \"\";\n}\nfunction parseBranchSummary(stdOut, currentOnly = false) {\n return parseStringResponse(\n new BranchSummaryResult(),\n currentOnly ? [currentBranchParser] : parsers9,\n stdOut\n );\n}\nvar parsers9, currentBranchParser;\nvar init_parse_branch = __esm({\n \"src/lib/parsers/parse-branch.ts\"() {\n \"use strict\";\n init_BranchSummary();\n init_utils();\n parsers9 = [\n new LineParser(\n /^([*+]\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/,\n (result, [current, name, commit, label]) => {\n result.push(branchStatus(current), true, name, commit, label);\n }\n ),\n new LineParser(\n /^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$/s,\n (result, [current, name, commit, label]) => {\n result.push(branchStatus(current), false, name, commit, label);\n }\n )\n ];\n currentBranchParser = new LineParser(/^(\\S+)$/s, (result, [name]) => {\n result.push(\"*\" /* CURRENT */, false, name, \"\", \"\");\n });\n }\n});\n\n// src/lib/tasks/branch.ts\nvar branch_exports = {};\n__export(branch_exports, {\n branchLocalTask: () => branchLocalTask,\n branchTask: () => branchTask,\n containsDeleteBranchCommand: () => containsDeleteBranchCommand,\n deleteBranchTask: () => deleteBranchTask,\n deleteBranchesTask: () => deleteBranchesTask\n});\nfunction containsDeleteBranchCommand(commands) {\n const deleteCommands = [\"-d\", \"-D\", \"--delete\"];\n return commands.some((command) => deleteCommands.includes(command));\n}\nfunction branchTask(customArgs) {\n const isDelete = containsDeleteBranchCommand(customArgs);\n const isCurrentOnly = customArgs.includes(\"--show-current\");\n const commands = [\"branch\", ...customArgs];\n if (commands.length === 1) {\n commands.push(\"-a\");\n }\n if (!commands.includes(\"-v\")) {\n commands.splice(1, 0, \"-v\");\n }\n return {\n format: \"utf-8\",\n commands,\n parser(stdOut, stdErr) {\n if (isDelete) {\n return parseBranchDeletions(stdOut, stdErr).all[0];\n }\n return parseBranchSummary(stdOut, isCurrentOnly);\n }\n };\n}\nfunction branchLocalTask() {\n return {\n format: \"utf-8\",\n commands: [\"branch\", \"-v\"],\n parser(stdOut) {\n return parseBranchSummary(stdOut);\n }\n };\n}\nfunction deleteBranchesTask(branches, forceDelete = false) {\n return {\n format: \"utf-8\",\n commands: [\"branch\", \"-v\", forceDelete ? \"-D\" : \"-d\", ...branches],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr);\n },\n onError({ exitCode, stdOut }, error, done, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n done(stdOut);\n }\n };\n}\nfunction deleteBranchTask(branch, forceDelete = false) {\n const task = {\n format: \"utf-8\",\n commands: [\"branch\", \"-v\", forceDelete ? \"-D\" : \"-d\", branch],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr).branches[branch];\n },\n onError({ exitCode, stdErr, stdOut }, error, _, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n throw new GitResponseError(\n task.parser(bufferToString(stdOut), bufferToString(stdErr)),\n String(error)\n );\n }\n };\n return task;\n}\nvar init_branch = __esm({\n \"src/lib/tasks/branch.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_parse_branch_delete();\n init_parse_branch();\n init_utils();\n }\n});\n\n// src/lib/responses/CheckIgnore.ts\nimport { normalize } from \"node:path\";\nfunction toPath(input) {\n const path = input.trim().replace(/^[\"']|[\"']$/g, \"\");\n return path && normalize(path);\n}\nvar parseCheckIgnore;\nvar init_CheckIgnore = __esm({\n \"src/lib/responses/CheckIgnore.ts\"() {\n \"use strict\";\n parseCheckIgnore = (text) => {\n return text.split(/\\n/g).map(toPath).filter(Boolean);\n };\n }\n});\n\n// src/lib/tasks/check-ignore.ts\nvar check_ignore_exports = {};\n__export(check_ignore_exports, {\n checkIgnoreTask: () => checkIgnoreTask\n});\nfunction checkIgnoreTask(paths) {\n return {\n commands: [\"check-ignore\", ...paths],\n format: \"utf-8\",\n parser: parseCheckIgnore\n };\n}\nvar init_check_ignore = __esm({\n \"src/lib/tasks/check-ignore.ts\"() {\n \"use strict\";\n init_CheckIgnore();\n }\n});\n\n// src/lib/parsers/parse-fetch.ts\nfunction parseFetchResult(stdOut, stdErr) {\n const result = {\n raw: stdOut,\n remote: null,\n branches: [],\n tags: [],\n updated: [],\n deleted: []\n };\n return parseStringResponse(result, parsers10, [stdOut, stdErr]);\n}\nvar parsers10;\nvar init_parse_fetch = __esm({\n \"src/lib/parsers/parse-fetch.ts\"() {\n \"use strict\";\n init_utils();\n parsers10 = [\n new LineParser(/From (.+)$/, (result, [remote]) => {\n result.remote = remote;\n }),\n new LineParser(/\\* \\[new branch]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) => {\n result.branches.push({\n name,\n tracking\n });\n }),\n new LineParser(/\\* \\[new tag]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) => {\n result.tags.push({\n name,\n tracking\n });\n }),\n new LineParser(/- \\[deleted]\\s+\\S+\\s*-> (.+)$/, (result, [tracking]) => {\n result.deleted.push({\n tracking\n });\n }),\n new LineParser(\n /\\s*([^.]+)\\.\\.(\\S+)\\s+(\\S+)\\s*-> (.+)$/,\n (result, [from, to, name, tracking]) => {\n result.updated.push({\n name,\n tracking,\n to,\n from\n });\n }\n )\n ];\n }\n});\n\n// src/lib/tasks/fetch.ts\nvar fetch_exports = {};\n__export(fetch_exports, {\n fetchTask: () => fetchTask\n});\nfunction disallowedCommand(command) {\n return /^--upload-pack(=|$)/.test(command);\n}\nfunction fetchTask(remote, branch, customArgs) {\n const commands = [\"fetch\", ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n return {\n commands,\n format: \"utf-8\",\n parser: parseFetchResult\n };\n}\nvar init_fetch = __esm({\n \"src/lib/tasks/fetch.ts\"() {\n \"use strict\";\n init_parse_fetch();\n init_task();\n }\n});\n\n// src/lib/parsers/parse-move.ts\nfunction parseMoveResult(stdOut) {\n return parseStringResponse({ moves: [] }, parsers11, stdOut);\n}\nvar parsers11;\nvar init_parse_move = __esm({\n \"src/lib/parsers/parse-move.ts\"() {\n \"use strict\";\n init_utils();\n parsers11 = [\n new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => {\n result.moves.push({ from, to });\n })\n ];\n }\n});\n\n// src/lib/tasks/move.ts\nvar move_exports = {};\n__export(move_exports, {\n moveTask: () => moveTask\n});\nfunction moveTask(from, to) {\n return {\n commands: [\"mv\", \"-v\", ...asArray(from), to],\n format: \"utf-8\",\n parser: parseMoveResult\n };\n}\nvar init_move = __esm({\n \"src/lib/tasks/move.ts\"() {\n \"use strict\";\n init_parse_move();\n init_utils();\n }\n});\n\n// src/lib/tasks/pull.ts\nvar pull_exports = {};\n__export(pull_exports, {\n pullTask: () => pullTask\n});\nfunction pullTask(remote, branch, customArgs) {\n const commands = [\"pull\", ...customArgs];\n if (remote && branch) {\n commands.splice(1, 0, remote, branch);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(stdOut, stdErr) {\n return parsePullResult(stdOut, stdErr);\n },\n onError(result, _error, _done, fail) {\n const pullError = parsePullErrorResult(\n bufferToString(result.stdOut),\n bufferToString(result.stdErr)\n );\n if (pullError) {\n return fail(new GitResponseError(pullError));\n }\n fail(_error);\n }\n };\n}\nvar init_pull = __esm({\n \"src/lib/tasks/pull.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_parse_pull();\n init_utils();\n }\n});\n\n// src/lib/responses/GetRemoteSummary.ts\nfunction parseGetRemotes(text) {\n const remotes = {};\n forEach(text, ([name]) => remotes[name] = { name });\n return Object.values(remotes);\n}\nfunction parseGetRemotesVerbose(text) {\n const remotes = {};\n forEach(text, ([name, url, purpose]) => {\n if (!Object.hasOwn(remotes, name)) {\n remotes[name] = {\n name,\n refs: { fetch: \"\", push: \"\" }\n };\n }\n if (purpose && url) {\n remotes[name].refs[purpose.replace(/[^a-z]/g, \"\")] = url;\n }\n });\n return Object.values(remotes);\n}\nfunction forEach(text, handler) {\n forEachLineWithContent(text, (line) => handler(line.split(/\\s+/)));\n}\nvar init_GetRemoteSummary = __esm({\n \"src/lib/responses/GetRemoteSummary.ts\"() {\n \"use strict\";\n init_utils();\n }\n});\n\n// src/lib/tasks/remote.ts\nvar remote_exports = {};\n__export(remote_exports, {\n addRemoteTask: () => addRemoteTask,\n getRemotesTask: () => getRemotesTask,\n listRemotesTask: () => listRemotesTask,\n remoteTask: () => remoteTask,\n removeRemoteTask: () => removeRemoteTask\n});\nfunction addRemoteTask(remoteName, remoteRepo, customArgs) {\n return straightThroughStringTask([\"remote\", \"add\", ...customArgs, remoteName, remoteRepo]);\n}\nfunction getRemotesTask(verbose) {\n const commands = [\"remote\"];\n if (verbose) {\n commands.push(\"-v\");\n }\n return {\n commands,\n format: \"utf-8\",\n parser: verbose ? parseGetRemotesVerbose : parseGetRemotes\n };\n}\nfunction listRemotesTask(customArgs) {\n const commands = [...customArgs];\n if (commands[0] !== \"ls-remote\") {\n commands.unshift(\"ls-remote\");\n }\n return straightThroughStringTask(commands);\n}\nfunction remoteTask(customArgs) {\n const commands = [...customArgs];\n if (commands[0] !== \"remote\") {\n commands.unshift(\"remote\");\n }\n return straightThroughStringTask(commands);\n}\nfunction removeRemoteTask(remoteName) {\n return straightThroughStringTask([\"remote\", \"remove\", remoteName]);\n}\nvar init_remote = __esm({\n \"src/lib/tasks/remote.ts\"() {\n \"use strict\";\n init_GetRemoteSummary();\n init_task();\n }\n});\n\n// src/lib/tasks/stash-list.ts\nvar stash_list_exports = {};\n__export(stash_list_exports, {\n stashListTask: () => stashListTask\n});\nfunction stashListTask(opt = {}, customArgs) {\n const options = parseLogOptions(opt);\n const commands = [\"stash\", \"list\", ...options.commands, ...customArgs];\n const parser4 = createListLogSummaryParser(\n options.splitter,\n options.fields,\n logFormatFromCommand(commands)\n );\n return validateLogFormatConfig(commands) || {\n commands,\n format: \"utf-8\",\n parser: parser4\n };\n}\nvar init_stash_list = __esm({\n \"src/lib/tasks/stash-list.ts\"() {\n \"use strict\";\n init_log_format();\n init_parse_list_log_summary();\n init_diff();\n init_log();\n }\n});\n\n// src/lib/tasks/sub-module.ts\nvar sub_module_exports = {};\n__export(sub_module_exports, {\n addSubModuleTask: () => addSubModuleTask,\n initSubModuleTask: () => initSubModuleTask,\n subModuleTask: () => subModuleTask,\n updateSubModuleTask: () => updateSubModuleTask\n});\nfunction addSubModuleTask(repo, path) {\n return subModuleTask([\"add\", repo, path]);\n}\nfunction initSubModuleTask(customArgs) {\n return subModuleTask([\"init\", ...customArgs]);\n}\nfunction subModuleTask(customArgs) {\n const commands = [...customArgs];\n if (commands[0] !== \"submodule\") {\n commands.unshift(\"submodule\");\n }\n return straightThroughStringTask(commands);\n}\nfunction updateSubModuleTask(customArgs) {\n return subModuleTask([\"update\", ...customArgs]);\n}\nvar init_sub_module = __esm({\n \"src/lib/tasks/sub-module.ts\"() {\n \"use strict\";\n init_task();\n }\n});\n\n// src/lib/responses/TagList.ts\nfunction singleSorted(a, b) {\n const aIsNum = Number.isNaN(a);\n const bIsNum = Number.isNaN(b);\n if (aIsNum !== bIsNum) {\n return aIsNum ? 1 : -1;\n }\n return aIsNum ? sorted(a, b) : 0;\n}\nfunction sorted(a, b) {\n return a === b ? 0 : a > b ? 1 : -1;\n}\nfunction trimmed(input) {\n return input.trim();\n}\nfunction toNumber(input) {\n if (typeof input === \"string\") {\n return parseInt(input.replace(/^\\D+/g, \"\"), 10) || 0;\n }\n return 0;\n}\nvar TagList, parseTagList;\nvar init_TagList = __esm({\n \"src/lib/responses/TagList.ts\"() {\n \"use strict\";\n TagList = class {\n constructor(all, latest) {\n this.all = all;\n this.latest = latest;\n }\n };\n parseTagList = function(data, customSort = false) {\n const tags = data.split(\"\\n\").map(trimmed).filter(Boolean);\n if (!customSort) {\n tags.sort(function(tagA, tagB) {\n const partsA = tagA.split(\".\");\n const partsB = tagB.split(\".\");\n if (partsA.length === 1 || partsB.length === 1) {\n return singleSorted(toNumber(partsA[0]), toNumber(partsB[0]));\n }\n for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) {\n const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i]));\n if (diff) {\n return diff;\n }\n }\n return 0;\n });\n }\n const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf(\".\") >= 0);\n return new TagList(tags, latest);\n };\n }\n});\n\n// src/lib/tasks/tag.ts\nvar tag_exports = {};\n__export(tag_exports, {\n addAnnotatedTagTask: () => addAnnotatedTagTask,\n addTagTask: () => addTagTask,\n tagListTask: () => tagListTask\n});\nfunction tagListTask(customArgs = []) {\n const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option));\n return {\n format: \"utf-8\",\n commands: [\"tag\", \"-l\", ...customArgs],\n parser(text) {\n return parseTagList(text, hasCustomSort);\n }\n };\n}\nfunction addTagTask(name) {\n return {\n format: \"utf-8\",\n commands: [\"tag\", name],\n parser() {\n return { name };\n }\n };\n}\nfunction addAnnotatedTagTask(name, tagMessage) {\n return {\n format: \"utf-8\",\n commands: [\"tag\", \"-a\", \"-m\", tagMessage, name],\n parser() {\n return { name };\n }\n };\n}\nvar init_tag = __esm({\n \"src/lib/tasks/tag.ts\"() {\n \"use strict\";\n init_TagList();\n }\n});\n\n// src/git.js\nvar require_git = __commonJS({\n \"src/git.js\"(exports, module) {\n \"use strict\";\n var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS(git_executor_exports));\n var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS(simple_git_api_exports));\n var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS(scheduler_exports));\n var { adhocExecTask: adhocExecTask2, configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS(task_exports));\n var {\n asArray: asArray2,\n filterArray: filterArray2,\n filterPrimitives: filterPrimitives2,\n filterString: filterString2,\n filterStringOrStringArray: filterStringOrStringArray2,\n filterType: filterType2,\n getTrailingOptions: getTrailingOptions2,\n trailingFunctionArgument: trailingFunctionArgument2,\n trailingOptionsArgument: trailingOptionsArgument2\n } = (init_utils(), __toCommonJS(utils_exports));\n var { applyPatchTask: applyPatchTask2 } = (init_apply_patch(), __toCommonJS(apply_patch_exports));\n var {\n branchTask: branchTask2,\n branchLocalTask: branchLocalTask2,\n deleteBranchesTask: deleteBranchesTask2,\n deleteBranchTask: deleteBranchTask2\n } = (init_branch(), __toCommonJS(branch_exports));\n var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS(check_ignore_exports));\n var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS(check_is_repo_exports));\n var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS(clean_exports));\n var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS(diff_exports));\n var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS(fetch_exports));\n var { moveTask: moveTask2 } = (init_move(), __toCommonJS(move_exports));\n var { pullTask: pullTask2 } = (init_pull(), __toCommonJS(pull_exports));\n var { pushTagsTask: pushTagsTask2 } = (init_push(), __toCommonJS(push_exports));\n var {\n addRemoteTask: addRemoteTask2,\n getRemotesTask: getRemotesTask2,\n listRemotesTask: listRemotesTask2,\n remoteTask: remoteTask2,\n removeRemoteTask: removeRemoteTask2\n } = (init_remote(), __toCommonJS(remote_exports));\n var { getResetMode: getResetMode2, resetTask: resetTask2 } = (init_reset(), __toCommonJS(reset_exports));\n var { stashListTask: stashListTask2 } = (init_stash_list(), __toCommonJS(stash_list_exports));\n var {\n addSubModuleTask: addSubModuleTask2,\n initSubModuleTask: initSubModuleTask2,\n subModuleTask: subModuleTask2,\n updateSubModuleTask: updateSubModuleTask2\n } = (init_sub_module(), __toCommonJS(sub_module_exports));\n var { addAnnotatedTagTask: addAnnotatedTagTask2, addTagTask: addTagTask2, tagListTask: tagListTask2 } = (init_tag(), __toCommonJS(tag_exports));\n var { straightThroughBufferTask: straightThroughBufferTask2, straightThroughStringTask: straightThroughStringTask2 } = (init_task(), __toCommonJS(task_exports));\n function Git2(options, plugins) {\n this._plugins = plugins;\n this._executor = new GitExecutor2(\n options.baseDir,\n new Scheduler2(options.maxConcurrentProcesses),\n plugins\n );\n this._trimmed = options.trimmed;\n }\n (Git2.prototype = Object.create(SimpleGitApi2.prototype)).constructor = Git2;\n Git2.prototype.customBinary = function(command) {\n this._plugins.reconfigure(\"binary\", command);\n return this;\n };\n Git2.prototype.env = function(name, value) {\n if (arguments.length === 1 && typeof name === \"object\") {\n this._executor.env = name;\n } else {\n (this._executor.env = this._executor.env || {})[name] = value;\n }\n return this;\n };\n Git2.prototype.stashList = function(options) {\n return this._runTask(\n stashListTask2(\n trailingOptionsArgument2(arguments) || {},\n filterArray2(options) && options || []\n ),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.mv = function(from, to) {\n return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.checkoutLatestTag = function(then) {\n var git = this;\n return this.pull(function() {\n git.tags(function(err, tags) {\n git.checkout(tags.latest, then);\n });\n });\n };\n Git2.prototype.pull = function(remote, branch, options, then) {\n return this._runTask(\n pullTask2(\n filterType2(remote, filterString2),\n filterType2(branch, filterString2),\n getTrailingOptions2(arguments)\n ),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.fetch = function(remote, branch) {\n return this._runTask(\n fetchTask2(\n filterType2(remote, filterString2),\n filterType2(branch, filterString2),\n getTrailingOptions2(arguments)\n ),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.silent = function(silence) {\n return this._runTask(\n adhocExecTask2(\n () => console.warn(\n \"simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.\"\n )\n )\n );\n };\n Git2.prototype.tags = function(options, then) {\n return this._runTask(\n tagListTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.rebase = function() {\n return this._runTask(\n straightThroughStringTask2([\"rebase\", ...getTrailingOptions2(arguments)]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.reset = function(mode) {\n return this._runTask(\n resetTask2(getResetMode2(mode), getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.revert = function(commit) {\n const next = trailingFunctionArgument2(arguments);\n if (typeof commit !== \"string\") {\n return this._runTask(configurationErrorTask2(\"Commit must be a string\"), next);\n }\n return this._runTask(\n straightThroughStringTask2([\"revert\", ...getTrailingOptions2(arguments, 0, true), commit]),\n next\n );\n };\n Git2.prototype.addTag = function(name) {\n const task = typeof name === \"string\" ? addTagTask2(name) : configurationErrorTask2(\"Git.addTag requires a tag name\");\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.addAnnotatedTag = function(tagName, tagMessage) {\n return this._runTask(\n addAnnotatedTagTask2(tagName, tagMessage),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.deleteLocalBranch = function(branchName, forceDelete, then) {\n return this._runTask(\n deleteBranchTask2(branchName, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.deleteLocalBranches = function(branchNames, forceDelete, then) {\n return this._runTask(\n deleteBranchesTask2(branchNames, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.branch = function(options, then) {\n return this._runTask(\n branchTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.branchLocal = function(then) {\n return this._runTask(branchLocalTask2(), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.raw = function(commands) {\n const createRestCommands = !Array.isArray(commands);\n const command = [].slice.call(createRestCommands ? arguments : commands, 0);\n for (let i = 0; i < command.length && createRestCommands; i++) {\n if (!filterPrimitives2(command[i])) {\n command.splice(i, command.length - i);\n break;\n }\n }\n command.push(...getTrailingOptions2(arguments, 0, true));\n var next = trailingFunctionArgument2(arguments);\n if (!command.length) {\n return this._runTask(\n configurationErrorTask2(\"Raw: must supply one or more command to execute\"),\n next\n );\n }\n return this._runTask(straightThroughStringTask2(command, this._trimmed), next);\n };\n Git2.prototype.submoduleAdd = function(repo, path, then) {\n return this._runTask(addSubModuleTask2(repo, path), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.submoduleUpdate = function(args, then) {\n return this._runTask(\n updateSubModuleTask2(getTrailingOptions2(arguments, true)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.submoduleInit = function(args, then) {\n return this._runTask(\n initSubModuleTask2(getTrailingOptions2(arguments, true)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.subModule = function(options, then) {\n return this._runTask(\n subModuleTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.listRemote = function() {\n return this._runTask(\n listRemotesTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.addRemote = function(remoteName, remoteRepo, then) {\n return this._runTask(\n addRemoteTask2(remoteName, remoteRepo, getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.removeRemote = function(remoteName, then) {\n return this._runTask(removeRemoteTask2(remoteName), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.getRemotes = function(verbose, then) {\n return this._runTask(getRemotesTask2(verbose === true), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.remote = function(options, then) {\n return this._runTask(\n remoteTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.tag = function(options, then) {\n const command = getTrailingOptions2(arguments);\n if (command[0] !== \"tag\") {\n command.unshift(\"tag\");\n }\n return this._runTask(straightThroughStringTask2(command), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.updateServerInfo = function(then) {\n return this._runTask(\n straightThroughStringTask2([\"update-server-info\"]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.pushTags = function(remote, then) {\n const task = pushTagsTask2(\n { remote: filterType2(remote, filterString2) },\n getTrailingOptions2(arguments)\n );\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.rm = function(files) {\n return this._runTask(\n straightThroughStringTask2([\"rm\", \"-f\", ...asArray2(files)]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.rmKeepLocal = function(files) {\n return this._runTask(\n straightThroughStringTask2([\"rm\", \"--cached\", ...asArray2(files)]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.catFile = function(options, then) {\n return this._catFile(\"utf-8\", arguments);\n };\n Git2.prototype.binaryCatFile = function() {\n return this._catFile(\"buffer\", arguments);\n };\n Git2.prototype._catFile = function(format, args) {\n var handler = trailingFunctionArgument2(args);\n var command = [\"cat-file\"];\n var options = args[0];\n if (typeof options === \"string\") {\n return this._runTask(\n configurationErrorTask2(\"Git.catFile: options must be supplied as an array of strings\"),\n handler\n );\n }\n if (Array.isArray(options)) {\n command.push.apply(command, options);\n }\n const task = format === \"buffer\" ? straightThroughBufferTask2(command) : straightThroughStringTask2(command);\n return this._runTask(task, handler);\n };\n Git2.prototype.diff = function(options, then) {\n const task = filterString2(options) ? configurationErrorTask2(\n \"git.diff: supplying options as a single string is no longer supported, switch to an array of strings\"\n ) : straightThroughStringTask2([\"diff\", ...getTrailingOptions2(arguments)]);\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.diffSummary = function() {\n return this._runTask(\n diffSummaryTask2(getTrailingOptions2(arguments, 1)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.applyPatch = function(patches) {\n const task = !filterStringOrStringArray2(patches) ? configurationErrorTask2(\n `git.applyPatch requires one or more string patches as the first argument`\n ) : applyPatchTask2(asArray2(patches), getTrailingOptions2([].slice.call(arguments, 1)));\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.revparse = function() {\n const commands = [\"rev-parse\", ...getTrailingOptions2(arguments, true)];\n return this._runTask(\n straightThroughStringTask2(commands, true),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.clean = function(mode, options, then) {\n const usingCleanOptionsArray = isCleanOptionsArray2(mode);\n const cleanMode = usingCleanOptionsArray && mode.join(\"\") || filterType2(mode, filterString2) || \"\";\n const customArgs = getTrailingOptions2([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0));\n return this._runTask(\n cleanWithOptionsTask2(cleanMode, customArgs),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.exec = function(then) {\n const task = {\n commands: [],\n format: \"utf-8\",\n parser() {\n if (typeof then === \"function\") {\n then();\n }\n }\n };\n return this._runTask(task);\n };\n Git2.prototype.clearQueue = function() {\n return this._runTask(\n adhocExecTask2(\n () => console.warn(\n \"simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.\"\n )\n )\n );\n };\n Git2.prototype.checkIgnore = function(pathnames, then) {\n return this._runTask(\n checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.checkIsRepo = function(checkType, then) {\n return this._runTask(\n checkIsRepoTask2(filterType2(checkType, filterString2)),\n trailingFunctionArgument2(arguments)\n );\n };\n module.exports = Git2;\n }\n});\n\n// src/lib/api.ts\nimport { pathspec } from \"@simple-git/args-pathspec\";\n\n// src/lib/errors/git-construct-error.ts\ninit_git_error();\nvar GitConstructError = class extends GitError {\n constructor(config, message) {\n super(void 0, message);\n this.config = config;\n }\n};\n\n// src/lib/api.ts\ninit_git_error();\n\n// src/lib/errors/git-plugin-error.ts\ninit_git_error();\nvar GitPluginError = class extends GitError {\n constructor(task, plugin, message) {\n super(task, message);\n this.task = task;\n this.plugin = plugin;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n};\n\n// src/lib/api.ts\ninit_git_response_error();\ninit_task_configuration_error();\ninit_check_is_repo();\ninit_clean();\ninit_config();\ninit_diff_name_status();\ninit_grep();\ninit_reset();\n\n// src/lib/plugins/abort-plugin.ts\nfunction abortPlugin(signal) {\n if (!signal) {\n return;\n }\n const onSpawnAfter = {\n type: \"spawn.after\",\n action(_data, context) {\n function kill() {\n context.kill(new GitPluginError(void 0, \"abort\", \"Abort signal received\"));\n }\n signal.addEventListener(\"abort\", kill);\n context.spawned.on(\"close\", () => signal.removeEventListener(\"abort\", kill));\n }\n };\n const onSpawnBefore = {\n type: \"spawn.before\",\n action(_data, context) {\n if (signal.aborted) {\n context.kill(new GitPluginError(void 0, \"abort\", \"Abort already signaled\"));\n }\n }\n };\n return [onSpawnBefore, onSpawnAfter];\n}\n\n// src/lib/plugins/block-unsafe-operations-plugin.ts\nimport { vulnerabilityCheck } from \"@simple-git/argv-parser\";\nfunction blockUnsafeOperationsPlugin(options = {}) {\n return {\n type: \"spawn.args\",\n action(args, { env }) {\n for (const vulnerability of vulnerabilityCheck(args, env)) {\n if (options[vulnerability.category] !== true) {\n throw new GitPluginError(void 0, \"unsafe\", vulnerability.message);\n }\n }\n return args;\n }\n };\n}\n\n// src/lib/plugins/command-config-prefixing-plugin.ts\ninit_utils();\nfunction commandConfigPrefixingPlugin(configuration) {\n const prefix = prefixedArray(configuration, \"-c\");\n return {\n type: \"spawn.args\",\n action(data) {\n return [...prefix, ...data];\n }\n };\n}\n\n// src/lib/plugins/completion-detection.plugin.ts\ninit_utils();\nimport { deferred } from \"@kwsites/promise-deferred\";\nvar never = deferred().promise;\nfunction completionDetectionPlugin({\n onClose = true,\n onExit = 50\n} = {}) {\n function createEvents() {\n let exitCode = -1;\n const events = {\n close: deferred(),\n closeTimeout: deferred(),\n exit: deferred(),\n exitTimeout: deferred()\n };\n const result = Promise.race([\n onClose === false ? never : events.closeTimeout.promise,\n onExit === false ? never : events.exitTimeout.promise\n ]);\n configureTimeout(onClose, events.close, events.closeTimeout);\n configureTimeout(onExit, events.exit, events.exitTimeout);\n return {\n close(code) {\n exitCode = code;\n events.close.done();\n },\n exit(code) {\n exitCode = code;\n events.exit.done();\n },\n get exitCode() {\n return exitCode;\n },\n result\n };\n }\n function configureTimeout(flag, event, timeout) {\n if (flag === false) {\n return;\n }\n (flag === true ? event.promise : event.promise.then(() => delay(flag))).then(timeout.done);\n }\n return {\n type: \"spawn.after\",\n async action(_data, { spawned, close }) {\n const events = createEvents();\n let deferClose = true;\n let quickClose = () => void (deferClose = false);\n spawned.stdout?.on(\"data\", quickClose);\n spawned.stderr?.on(\"data\", quickClose);\n spawned.on(\"error\", quickClose);\n spawned.on(\"close\", (code) => events.close(code));\n spawned.on(\"exit\", (code) => events.exit(code));\n try {\n await events.result;\n if (deferClose) {\n await delay(50);\n }\n close(events.exitCode);\n } catch (err) {\n close(events.exitCode, err);\n }\n }\n };\n}\n\n// src/lib/plugins/custom-binary.plugin.ts\ninit_utils();\nvar WRONG_NUMBER_ERR = `Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings`;\nvar WRONG_CHARS_ERR = `Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option`;\nfunction isBadArgument(arg) {\n return !arg || !/^([a-z]:)?([a-z0-9/.\\\\_~-]+)$/i.test(arg);\n}\nfunction toBinaryConfig(input, allowUnsafe) {\n if (input.length < 1 || input.length > 2) {\n throw new GitPluginError(void 0, \"binary\", WRONG_NUMBER_ERR);\n }\n const isBad = input.some(isBadArgument);\n if (isBad) {\n if (allowUnsafe) {\n console.warn(WRONG_CHARS_ERR);\n } else {\n throw new GitPluginError(void 0, \"binary\", WRONG_CHARS_ERR);\n }\n }\n const [binary, prefix] = input;\n return {\n binary,\n prefix\n };\n}\nfunction customBinaryPlugin(plugins, input = [\"git\"], allowUnsafe = false) {\n let config = toBinaryConfig(asArray(input), allowUnsafe);\n plugins.on(\"binary\", (input2) => {\n config = toBinaryConfig(asArray(input2), allowUnsafe);\n });\n plugins.append(\"spawn.binary\", () => {\n return config.binary;\n });\n plugins.append(\"spawn.args\", (data) => {\n return config.prefix ? [config.prefix, ...data] : data;\n });\n}\n\n// src/lib/plugins/error-detection.plugin.ts\ninit_git_error();\nfunction isTaskError(result) {\n return !!(result.exitCode && result.stdErr.length);\n}\nfunction getErrorMessage(result) {\n return Buffer.concat([...result.stdOut, ...result.stdErr]);\n}\nfunction errorDetectionHandler(overwrite = false, isError = isTaskError, errorMessage = getErrorMessage) {\n return (error, result) => {\n if (!overwrite && error || !isError(result)) {\n return error;\n }\n return errorMessage(result);\n };\n}\nfunction errorDetectionPlugin(config) {\n return {\n type: \"task.error\",\n action(data, context) {\n const error = config(data.error, {\n stdErr: context.stdErr,\n stdOut: context.stdOut,\n exitCode: context.exitCode\n });\n if (Buffer.isBuffer(error)) {\n return { error: new GitError(void 0, error.toString(\"utf-8\")) };\n }\n return {\n error\n };\n }\n };\n}\n\n// src/lib/plugins/plugin-store.ts\ninit_utils();\nimport { EventEmitter } from \"node:events\";\nvar PluginStore = class {\n constructor() {\n this.plugins = /* @__PURE__ */ new Set();\n this.events = new EventEmitter();\n }\n on(type, listener) {\n this.events.on(type, listener);\n }\n reconfigure(type, data) {\n this.events.emit(type, data);\n }\n append(type, action) {\n const plugin = append(this.plugins, { type, action });\n return () => this.plugins.delete(plugin);\n }\n add(plugin) {\n const plugins = [];\n asArray(plugin).forEach((plugin2) => plugin2 && this.plugins.add(append(plugins, plugin2)));\n return () => {\n plugins.forEach((plugin2) => this.plugins.delete(plugin2));\n };\n }\n exec(type, data, context) {\n let output = data;\n const contextual = Object.freeze(Object.create(context));\n for (const plugin of this.plugins) {\n if (plugin.type === type) {\n output = plugin.action(output, contextual);\n }\n }\n return output;\n }\n};\n\n// src/lib/plugins/progress-monitor-plugin.ts\ninit_utils();\nfunction progressMonitorPlugin(progress) {\n const progressCommand = \"--progress\";\n const progressMethods = [\"checkout\", \"clone\", \"fetch\", \"pull\", \"push\"];\n const onProgress = {\n type: \"spawn.after\",\n action(_data, context) {\n if (!context.commands.includes(progressCommand)) {\n return;\n }\n context.spawned.stderr?.on(\"data\", (chunk) => {\n const message = /^([\\s\\S]+?):\\s*(\\d+)% \\((\\d+)\\/(\\d+)\\)/.exec(chunk.toString(\"utf8\"));\n if (!message) {\n return;\n }\n progress({\n method: context.method,\n stage: progressEventStage(message[1]),\n progress: asNumber(message[2]),\n processed: asNumber(message[3]),\n total: asNumber(message[4])\n });\n });\n }\n };\n const onArgs = {\n type: \"spawn.args\",\n action(args, context) {\n if (!progressMethods.includes(context.method)) {\n return args;\n }\n return including(args, progressCommand);\n }\n };\n return [onArgs, onProgress];\n}\nfunction progressEventStage(input) {\n return String(input.toLowerCase().split(\" \", 1)) || \"unknown\";\n}\n\n// src/lib/plugins/spawn-options-plugin.ts\ninit_utils();\nfunction spawnOptionsPlugin(spawnOptions) {\n const options = pick(spawnOptions, [\"uid\", \"gid\"]);\n return {\n type: \"spawn.options\",\n action(data) {\n return { ...options, ...data };\n }\n };\n}\n\n// src/lib/plugins/timout-plugin.ts\nfunction timeoutPlugin({\n block,\n stdErr = true,\n stdOut = true\n}) {\n if (block > 0) {\n return {\n type: \"spawn.after\",\n action(_data, context) {\n let timeout;\n function wait() {\n timeout && clearTimeout(timeout);\n timeout = setTimeout(kill, block);\n }\n function stop() {\n context.spawned.stdout?.off(\"data\", wait);\n context.spawned.stderr?.off(\"data\", wait);\n context.spawned.off(\"exit\", stop);\n context.spawned.off(\"close\", stop);\n timeout && clearTimeout(timeout);\n }\n function kill() {\n stop();\n context.kill(new GitPluginError(void 0, \"timeout\", `block timeout reached`));\n }\n stdOut && context.spawned.stdout?.on(\"data\", wait);\n stdErr && context.spawned.stderr?.on(\"data\", wait);\n context.spawned.on(\"exit\", stop);\n context.spawned.on(\"close\", stop);\n wait();\n }\n };\n }\n}\n\n// src/lib/plugins/suffix-paths.plugin.ts\nimport { isPathSpec as isPathSpec3, toPaths } from \"@simple-git/args-pathspec\";\nfunction suffixPathsPlugin() {\n return {\n type: \"spawn.args\",\n action(data) {\n const prefix = [];\n let suffix;\n function append2(args) {\n (suffix = suffix || []).push(...args);\n }\n for (let i = 0; i < data.length; i++) {\n const param = data[i];\n if (isPathSpec3(param)) {\n append2(toPaths(param));\n continue;\n }\n if (param === \"--\") {\n append2(\n data.slice(i + 1).flatMap((item) => isPathSpec3(item) && toPaths(item) || item)\n );\n break;\n }\n prefix.push(param);\n }\n return !suffix ? prefix : [...prefix, \"--\", ...suffix.map(String)];\n }\n };\n}\n\n// src/lib/git-factory.ts\ninit_utils();\nvar Git = require_git();\nfunction gitInstanceFactory(baseDir, options) {\n const plugins = new PluginStore();\n const config = createInstanceConfig(\n baseDir && (typeof baseDir === \"string\" ? { baseDir } : baseDir) || {},\n options\n );\n if (!folderExists(config.baseDir)) {\n throw new GitConstructError(\n config,\n `Cannot use simple-git on a directory that does not exist`\n );\n }\n if (Array.isArray(config.config)) {\n plugins.add(commandConfigPrefixingPlugin(config.config));\n }\n plugins.add(blockUnsafeOperationsPlugin(config.unsafe));\n plugins.add(completionDetectionPlugin(config.completion));\n config.abort && plugins.add(abortPlugin(config.abort));\n config.progress && plugins.add(progressMonitorPlugin(config.progress));\n config.timeout && plugins.add(timeoutPlugin(config.timeout));\n config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));\n plugins.add(suffixPathsPlugin());\n plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));\n config.errors && plugins.add(errorDetectionPlugin(config.errors));\n customBinaryPlugin(plugins, config.binary, config.unsafe?.allowUnsafeCustomBinary);\n return new Git(config, plugins);\n}\n\n// src/lib/runners/promise-wrapped.ts\ninit_git_response_error();\nvar functionNamesBuilderApi = [\"customBinary\", \"env\", \"outputHandler\", \"silent\"];\nvar functionNamesPromiseApi = [\n \"add\",\n \"addAnnotatedTag\",\n \"addConfig\",\n \"addRemote\",\n \"addTag\",\n \"applyPatch\",\n \"binaryCatFile\",\n \"branch\",\n \"branchLocal\",\n \"catFile\",\n \"checkIgnore\",\n \"checkIsRepo\",\n \"checkout\",\n \"checkoutBranch\",\n \"checkoutLatestTag\",\n \"checkoutLocalBranch\",\n \"clean\",\n \"clone\",\n \"commit\",\n \"cwd\",\n \"deleteLocalBranch\",\n \"deleteLocalBranches\",\n \"diff\",\n \"diffSummary\",\n \"exec\",\n \"fetch\",\n \"getRemotes\",\n \"init\",\n \"listConfig\",\n \"listRemote\",\n \"log\",\n \"merge\",\n \"mergeFromTo\",\n \"mirror\",\n \"mv\",\n \"pull\",\n \"push\",\n \"pushTags\",\n \"raw\",\n \"rebase\",\n \"remote\",\n \"removeRemote\",\n \"reset\",\n \"revert\",\n \"revparse\",\n \"rm\",\n \"rmKeepLocal\",\n \"show\",\n \"stash\",\n \"stashList\",\n \"status\",\n \"subModule\",\n \"submoduleAdd\",\n \"submoduleInit\",\n \"submoduleUpdate\",\n \"tag\",\n \"tags\",\n \"updateServerInfo\"\n];\nfunction gitP(...args) {\n let git;\n let chain = Promise.resolve();\n try {\n git = gitInstanceFactory(...args);\n } catch (e) {\n chain = Promise.reject(e);\n }\n function builderReturn() {\n return promiseApi;\n }\n function chainReturn() {\n return chain;\n }\n const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce(\n (api, name) => {\n const isAsync = functionNamesPromiseApi.includes(name);\n const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api);\n const alternative = isAsync ? chainReturn : builderReturn;\n Object.defineProperty(api, name, {\n enumerable: false,\n configurable: false,\n value: git ? valid : alternative\n });\n return api;\n },\n {}\n );\n return promiseApi;\n function asyncWrapper(fn, git2) {\n return function(...args2) {\n if (typeof args2[args2.length] === \"function\") {\n throw new TypeError(\n \"Promise interface requires that handlers are not supplied inline, trailing function not allowed in call to \" + fn\n );\n }\n return chain.then(function() {\n return new Promise(function(resolve, reject) {\n const callback = (err, result) => {\n if (err) {\n return reject(toError(err));\n }\n resolve(result);\n };\n args2.push(callback);\n git2[fn].apply(git2, args2);\n });\n });\n };\n }\n function syncWrapper(fn, git2, api) {\n return (...args2) => {\n git2[fn](...args2);\n return api;\n };\n }\n}\nfunction toError(error) {\n if (error instanceof Error) {\n return error;\n }\n if (typeof error === \"string\") {\n return new Error(error);\n }\n return new GitResponseError(error);\n}\n\n// src/esm.mjs\nvar simpleGit = gitInstanceFactory;\nvar esm_default = gitInstanceFactory;\nexport {\n CheckRepoActions,\n CleanOptions,\n DiffNameStatus,\n GitConfigScope,\n GitConstructError,\n GitError,\n GitPluginError,\n GitResponseError,\n ResetMode,\n TaskConfigurationError,\n esm_default as default,\n gitP,\n grepQueryBuilder,\n pathspec,\n simpleGit\n};\n//# sourceMappingURL=index.js.map\n",
76
+ "const t = /* @__PURE__ */ new WeakMap();\nfunction c(...n) {\n const e = new String(n);\n return t.set(e, n), e;\n}\nfunction r(n) {\n return n instanceof String && t.has(n);\n}\nfunction o(n) {\n return t.get(n) ?? [];\n}\nexport {\n r as isPathSpec,\n c as pathspec,\n o as toPaths\n};\n//# sourceMappingURL=index.mjs.map\n",
77
+ "import { isPathSpec as m, toPaths as v } from \"@simple-git/args-pathspec\";\nfunction* U(e, t) {\n const n = t === \"global\";\n for (const o of e)\n o.isGlobal === n && (yield o);\n}\nconst k = /* @__PURE__ */ new Set([\n \"--add\",\n \"--edit\",\n \"--remove-section\",\n \"--rename-section\",\n \"--replace-all\",\n \"--unset\",\n \"--unset-all\",\n \"-e\"\n]), S = /* @__PURE__ */ new Set([\n \"--get\",\n \"--get-all\",\n \"--get-color\",\n \"--get-colorbool\",\n \"--get-regexp\",\n \"--get-urlmatch\",\n \"--list\",\n \"-l\"\n]), P = /* @__PURE__ */ new Set([\n \"edit\",\n \"remove-section\",\n \"rename-section\",\n \"set\",\n \"unset\"\n]), E = /* @__PURE__ */ new Set([\"get\", \"get-color\", \"get-colorbool\", \"list\"]);\nfunction F(e, t) {\n for (const { name: o } of U(e, \"task\")) {\n if (k.has(o))\n return p(!0, t);\n if (S.has(o))\n return p(!1, t);\n }\n const n = t.at(0)?.toLowerCase();\n return n === void 0 ? null : P.has(n) ? p(!0, t.slice(1)) : E.has(n) ? p(!1, t.slice(1)) : t.length === 1 ? p(!1, t) : p(!0, t);\n}\nfunction p(e = !1, t = []) {\n const n = t.at(0)?.toLowerCase();\n return n === void 0 ? null : {\n isWrite: e,\n isRead: !e,\n key: n,\n value: t.at(1)\n };\n}\nfunction A(e, t) {\n return t.isWrite && t.value !== void 0 ? { key: t.key, value: t.value, scope: e } : { key: t.key, scope: e };\n}\nfunction M(e) {\n const t = e?.indexOf(\"=\") || -1;\n return !e || t < 0 ? null : {\n key: e.slice(0, t).trim().toLowerCase(),\n value: e.slice(t + 1)\n };\n}\nfunction N(e) {\n for (const { name: t } of U(e, \"task\"))\n switch (t) {\n case \"--global\":\n return \"global\";\n case \"--system\":\n return \"system\";\n case \"--worktree\":\n return \"worktree\";\n case \"--local\":\n return \"local\";\n case \"--file\":\n case \"-f\":\n return \"file\";\n }\n return \"local\";\n}\nfunction G({ name: e }) {\n if (e === \"-c\" || e === \"--config\")\n return \"inline\";\n if (e === \"--config-env\")\n return \"env\";\n}\nfunction* O(e) {\n for (const t of e) {\n const n = G(t), o = n && M(t.value);\n o && (yield {\n ...o,\n scope: n\n });\n }\n}\nfunction L(e, t, n) {\n const o = {\n read: [],\n write: [...O(t)]\n };\n return e === \"config\" && $(\n o,\n N(t),\n F(t, n)\n ), o;\n}\nfunction $(e, t, n) {\n if (n === null)\n return;\n const o = A(t, n);\n n.isWrite ? e.write.push(o) : e.read.push(o);\n}\nconst x = {\n short: /* @__PURE__ */ new Map([\n [\"c\", !0]\n // -c <k=v> set config key for this invocation\n ])\n}, D = {\n short: new Map([\n [\"C\", !0],\n // -C <path> change working directory\n [\"P\", !1],\n // -P no pager (alias for --no-pager)\n [\"h\", !1],\n // -h help\n [\"p\", !1],\n // -p paginate\n [\"v\", !1],\n // -v version\n ...x.short.entries()\n ]),\n long: /* @__PURE__ */ new Set([\n \"attr-source\",\n \"config-env\",\n \"exec-path\",\n \"git-dir\",\n \"list-cmds\",\n \"namespace\",\n \"super-prefix\",\n \"work-tree\"\n ])\n}, R = {\n clone: {\n short: /* @__PURE__ */ new Map([\n [\"b\", !0],\n // -b <branch>\n [\"j\", !0],\n // -j <n> parallel jobs\n [\"l\", !1],\n // -l local\n [\"n\", !1],\n // -n no-checkout\n [\"o\", !0],\n // -o <name> remote name\n [\"q\", !1],\n // -q quiet\n [\"s\", !1],\n // -s shared\n [\"u\", !0]\n // -u <upload-pack>\n ]),\n long: /* @__PURE__ */ new Set([\"branch\", \"config\", \"jobs\", \"origin\", \"upload-pack\", \"u\", \"template\"])\n },\n commit: {\n short: /* @__PURE__ */ new Map([\n [\"C\", !0],\n // -C <commit> reuse message\n [\"F\", !0],\n // -F <file> read message from file\n [\"c\", !0],\n // -c <commit> reedit message\n [\"m\", !0],\n // -m <msg>\n [\"t\", !0]\n // -t <template>\n ]),\n long: /* @__PURE__ */ new Set([\"file\", \"message\", \"reedit-message\", \"reuse-message\", \"template\"])\n },\n config: {\n short: /* @__PURE__ */ new Map([\n [\"e\", !1],\n // -e open editor\n [\"f\", !0],\n // -f <file>\n [\"l\", !1]\n // -l list\n ]),\n long: /* @__PURE__ */ new Set([\"blob\", \"comment\", \"default\", \"file\", \"type\", \"value\"])\n },\n fetch: {\n short: /* @__PURE__ */ new Map(),\n long: /* @__PURE__ */ new Set([\"upload-pack\"])\n },\n init: {\n short: /* @__PURE__ */ new Map(),\n long: /* @__PURE__ */ new Set([\"template\"])\n },\n pull: {\n short: /* @__PURE__ */ new Map(),\n long: /* @__PURE__ */ new Set([\"upload-pack\"])\n },\n push: {\n short: /* @__PURE__ */ new Map(),\n long: /* @__PURE__ */ new Set([\"exec\", \"receive-pack\"])\n }\n}, T = { short: /* @__PURE__ */ new Map(), long: /* @__PURE__ */ new Set() };\nfunction I(e) {\n const t = R[e ?? \"\"] ?? T;\n return {\n short: new Map([...x.short.entries(), ...t.short.entries()]),\n long: t.long\n };\n}\nfunction b(e, t = D) {\n if (e.startsWith(\"--\")) {\n const n = e.indexOf(\"=\");\n if (n > 2)\n return [{ name: e.slice(0, n), value: e.slice(n + 1), needsNext: !1 }];\n const o = e.slice(2);\n return [{ name: e, needsNext: t.long.has(o) }];\n }\n if (e.length === 2) {\n const n = e.charAt(1), o = t.short.get(n);\n return [{ name: e, needsNext: o === !0 }];\n }\n return W(e, t.short);\n}\nfunction W(e, t) {\n const n = e.slice(1).split(\"\"), o = [];\n for (let s = 0; s < n.length; s++) {\n const r = n[s], l = t.get(r);\n if (l === void 0)\n return [{ name: e, needsNext: !1 }];\n if (l) {\n const a = n.slice(s + 1).join(\"\");\n if (a && ![...a].every((w) => t.has(w)))\n return o.push({ name: `-${r}`, value: a, needsNext: !1 }), o;\n }\n o.push({ name: `-${r}`, needsNext: l });\n }\n return o;\n}\nfunction j(e, t = []) {\n let n = 0;\n for (; n < e.length; ) {\n const o = String(e[n]);\n if (!o.startsWith(\"-\") || o.length < 2) break;\n const s = b(o);\n let r = n + 1;\n for (const l of s) {\n const a = {\n name: l.name,\n value: l.value,\n absorbedNext: !1,\n isGlobal: !0\n };\n l.needsNext && a.value === void 0 && r < e.length && (a.value = String(e[r]), a.absorbedNext = !0, r++), t.push(a);\n }\n n = r;\n }\n return { flags: t, taskIndex: n };\n}\nfunction B(e, t, n = []) {\n const o = I(t), s = [], r = [];\n let l = 0;\n for (; l < e.length; ) {\n const a = e[l];\n if (m(a)) {\n r.push(...v(a)), l++;\n continue;\n }\n const f = String(a);\n if (f === \"--\") {\n for (let g = l + 1; g < e.length; g++) {\n const u = e[g];\n m(u) ? r.push(...v(u)) : r.push(String(u));\n }\n break;\n }\n if (!f.startsWith(\"-\") || f.length < 2) {\n s.push(f), l++;\n continue;\n }\n const w = b(f, o);\n let d = l + 1;\n for (const g of w) {\n const u = {\n name: g.name,\n value: g.value,\n absorbedNext: !1,\n isGlobal: !1\n };\n g.needsNext && u.value === void 0 && d < e.length && !m(e[d]) && (u.value = String(e[d]), u.absorbedNext = !0, d++), n.push(u);\n }\n l = d;\n }\n return { flags: n, positionals: s, pathspecs: r };\n}\nfunction* V({\n write: e\n}) {\n for (const t of e)\n for (const n of q) {\n const o = n(t.key);\n o && (yield o);\n }\n}\nfunction c(e, t, n = String(e)) {\n const o = typeof e == \"string\" ? new RegExp(`\\\\s*${e.toLowerCase()}`) : e;\n return function(r) {\n if (o.test(r))\n return {\n category: t,\n message: `Configuring ${n} is not permitted without enabling ${t}`\n };\n };\n}\nfunction i(e, t) {\n const n = new RegExp(`\\\\s*${e.toLowerCase().replace(/\\./g, \"(..+)?.\")}`);\n return c(n, t, e);\n}\nconst q = [\n c(\"alias\", \"allowUnsafeAlias\"),\n c(\"core.askPass\", \"allowUnsafeAskPass\"),\n c(\"core.editor\", \"allowUnsafeEditor\"),\n c(\"core.fsmonitor\", \"allowUnsafeFsMonitor\"),\n c(\"core.gitProxy\", \"allowUnsafeGitProxy\"),\n c(\"core.hooksPath\", \"allowUnsafeHooksPath\"),\n c(\"core.pager\", \"allowUnsafePager\"),\n c(\"core.sshCommand\", \"allowUnsafeSshCommand\"),\n i(\"credential.helper\", \"allowUnsafeCredentialHelper\"),\n i(\"diff.command\", \"allowUnsafeDiffExternal\"),\n c(\"diff.external\", \"allowUnsafeDiffExternal\"),\n i(\"diff.textconv\", \"allowUnsafeDiffTextConv\"),\n i(\"filter.clean\", \"allowUnsafeFilter\"),\n i(\"filter.smudge\", \"allowUnsafeFilter\"),\n i(\"gpg.program\", \"allowUnsafeGpgProgram\"),\n c(\"init.templateDir\", \"allowUnsafeTemplateDir\"),\n i(\"merge.driver\", \"allowUnsafeMergeDriver\"),\n i(\"mergetool.path\", \"allowUnsafeMergeDriver\"),\n i(\"mergetool.cmd\", \"allowUnsafeMergeDriver\"),\n i(\"protocol.allow\", \"allowUnsafeProtocolOverride\"),\n i(\"remote.receivepack\", \"allowUnsafePack\"),\n i(\"remote.uploadpack\", \"allowUnsafePack\"),\n c(\"sequence.editor\", \"allowUnsafeEditor\")\n];\nfunction* K(e, t) {\n for (const n of t)\n for (const o of H) {\n const s = o(e, n.name);\n s && (yield s);\n }\n}\nfunction h(e, t, n, o = String(t)) {\n const s = typeof t == \"string\" ? new RegExp(`\\\\s*${t.toLowerCase()}`) : t, r = `Use of ${e ? `${e} with option ` : \"\"}${o} is not permitted without enabling ${n}`;\n return function(a, f) {\n if ((!e || a === e) && s.test(f))\n return {\n category: n,\n message: r\n };\n };\n}\nconst H = [\n h(\n null,\n /--(upload|receive)-pack/,\n \"allowUnsafePack\",\n \"--upload-pack or --receive-pack\"\n ),\n h(\"clone\", /^-\\w*u/, \"allowUnsafePack\"),\n h(\"clone\", \"--u\", \"allowUnsafePack\"),\n h(\"push\", \"--exec\", \"allowUnsafePack\"),\n h(null, \"--template\", \"allowUnsafeTemplateDir\")\n];\nfunction C(e, t, n) {\n return [...K(e, t), ...V(n)];\n}\nfunction Y(...e) {\n const { flags: t, taskIndex: n } = j(e), o = n < e.length ? String(e[n]).toLowerCase() : null, s = o !== null ? e.slice(n + 1) : [], { positionals: r, pathspecs: l } = B(s, o, t), a = L(o, t, r);\n return {\n task: o,\n flags: t.map(J),\n paths: l,\n config: a,\n vulnerabilities: z(C(o, t, a))\n };\n}\nfunction z(e) {\n return Object.defineProperty(e, \"vulnerabilities\", {\n value: e\n });\n}\nfunction J({ value: e, name: t }) {\n return e !== void 0 ? { name: t, value: e } : { name: t };\n}\nconst y = {\n editor: \"allowUnsafeEditor\",\n git_askpass: \"allowUnsafeAskPass\",\n git_config_global: \"allowUnsafeConfigPaths\",\n git_config_system: \"allowUnsafeConfigPaths\",\n git_config_count: \"allowUnsafeConfigEnvCount\",\n git_config: \"allowUnsafeConfigPaths\",\n git_editor: \"allowUnsafeEditor\",\n git_exec_path: \"allowUnsafeConfigPaths\",\n git_external_diff: \"allowUnsafeDiffExternal\",\n git_pager: \"allowUnsafePager\",\n git_proxy_command: \"allowUnsafeGitProxy\",\n git_template_dir: \"allowUnsafeTemplateDir\",\n git_sequence_editor: \"allowUnsafeEditor\",\n git_ssh: \"allowUnsafeSshCommand\",\n git_ssh_command: \"allowUnsafeSshCommand\",\n pager: \"allowUnsafePager\",\n prefix: \"allowUnsafeConfigPaths\",\n ssh_askpass: \"allowUnsafeAskPass\"\n};\nfunction* Q(e) {\n const t = parseInt(e.git_config_count ?? \"0\", 10);\n for (let n = 0; n < t; n++) {\n const o = e[`git_config_key_${n}`], s = e[`git_config_value_${n}`];\n o !== void 0 && (yield { key: o.toLowerCase().trim(), value: s, scope: \"env\" });\n }\n}\nfunction* X(e) {\n for (const t of Object.keys(e))\n if (_(t)) {\n const n = y[t];\n yield {\n category: n,\n message: `Use of \"${t.toUpperCase()}\" is not permitted without enabling ${n}`\n };\n }\n}\nfunction _(e) {\n return Object.hasOwn(y, e);\n}\nfunction Z(e) {\n const t = {};\n for (const [n, o] of Object.entries(e)) {\n const s = n.toLowerCase().trim();\n (_(s) || s.startsWith(\"git\")) && (t[s] = String(o));\n }\n return t;\n}\nfunction ee(e) {\n const t = Z(e), n = {\n read: [],\n write: [...Q(t)]\n }, o = [\n ...X(t),\n ...C(null, [], n)\n ];\n return {\n config: n,\n vulnerabilities: o\n };\n}\nfunction ne(e, t) {\n return [...Y(...e).vulnerabilities, ...ee(t).vulnerabilities];\n}\nexport {\n Y as parseArgv,\n ee as parseEnv,\n ne as vulnerabilityCheck\n};\n//# sourceMappingURL=index.mjs.map\n",
78
+ "import { stat } from \"node:fs/promises\";\nimport { dirname, join, resolve } from \"node:path\";\nimport type { SimpleGit } from \"simple-git\";\nimport { glob } from \"tinyglobby\";\nimport { config } from \"@/config\";\nimport { c } from \"@/utils/colour\";\n\nexport type GitRepository = {\n path: {\n absolute: string;\n relative: string;\n };\n git: SimpleGit;\n};\n\ntype Options = { skipConfig: boolean };\n\nconst failConfigRepoPath = (path: string, reason: string): never => {\n console.error(`${c.red(\"✗\")} Config repository path ${reason}: \"${path}\"`);\n console.error(\n `${c.gray(\"Hint:\")} Run ${c.bold(\"`git-swarm config refresh`\")} to refresh repository paths`,\n );\n process.exit(1);\n};\n\nconst assertConfigRepoPath = async (root: string, path: string) => {\n const absolute = resolve(root, path);\n\n const stats = await stat(absolute).catch(() => null);\n if (stats === null || !stats.isDirectory()) {\n failConfigRepoPath(\n path,\n stats === null ? \"not found\" : \"is not a directory\",\n );\n }\n\n try {\n await stat(join(absolute, \".git\"));\n } catch {\n failConfigRepoPath(path, \"is not a git repository\");\n }\n};\n\nexport async function* findGitRepositoryPaths(root: string, options: Options) {\n if (!options.skipConfig) {\n const repos = await config.get().then((c) => c.repositories);\n if (repos) {\n for (const repo of repos) {\n await assertConfigRepoPath(root, repo.path);\n yield repo.path;\n }\n return;\n }\n }\n\n const matches = await glob(\"**/.git\", {\n cwd: root,\n dot: true,\n onlyFiles: false,\n expandDirectories: false,\n absolute: true,\n });\n\n for (const path of matches) {\n yield dirname(path);\n }\n}\n",
79
+ "import { readdir, readdirSync, realpath, realpathSync, stat, statSync } from \"fs\";\nimport { isAbsolute, posix, resolve } from \"path\";\nimport { fileURLToPath } from \"url\";\nimport { fdir } from \"fdir\";\nimport picomatch from \"picomatch\";\n//#region src/utils.ts\nconst isReadonlyArray = Array.isArray;\nconst BACKSLASHES = /\\\\/g;\nconst DRIVE_RELATIVE_PATH = /^[A-Za-z]:$/;\nconst isWin = process.platform === \"win32\";\nconst ONLY_PARENT_DIRECTORIES = /^(\\/?\\.\\.)+$/;\nfunction getPartialMatcher(patterns, options = {}) {\n\tconst patternsCount = patterns.length;\n\tconst patternsParts = Array(patternsCount);\n\tconst matchers = Array(patternsCount);\n\tlet i, j;\n\tfor (i = 0; i < patternsCount; i++) {\n\t\tconst parts = splitPattern(patterns[i]);\n\t\tpatternsParts[i] = parts;\n\t\tconst partsCount = parts.length;\n\t\tconst partMatchers = Array(partsCount);\n\t\tfor (j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options);\n\t\tmatchers[i] = partMatchers;\n\t}\n\treturn (input) => {\n\t\tconst inputParts = input.split(\"/\");\n\t\tif (inputParts[0] === \"..\" && ONLY_PARENT_DIRECTORIES.test(input)) return true;\n\t\tfor (i = 0; i < patternsCount; i++) {\n\t\t\tconst patternParts = patternsParts[i];\n\t\t\tconst matcher = matchers[i];\n\t\t\tconst inputPatternCount = inputParts.length;\n\t\t\tconst minParts = Math.min(inputPatternCount, patternParts.length);\n\t\t\tj = 0;\n\t\t\twhile (j < minParts) {\n\t\t\t\tconst part = patternParts[j];\n\t\t\t\tif (part.includes(\"/\")) return true;\n\t\t\t\tif (!matcher[j](inputParts[j])) break;\n\t\t\t\tif (!options.noglobstar && part === \"**\") return true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tif (j === inputPatternCount) return true;\n\t\t}\n\t\treturn false;\n\t};\n}\n/* node:coverage ignore next 2 */\nconst WIN32_ROOT_DIR = /^[A-Z]:\\/$/i;\nconst isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === \"/\";\nfunction buildFormat(cwd, root, absolute) {\n\tif (cwd === root || root.startsWith(`${cwd}/`)) {\n\t\tif (absolute) {\n\t\t\tconst start = cwd.length + +!isRoot(cwd);\n\t\t\treturn (p, isDir) => p.slice(start, isDir ? -1 : void 0) || \".\";\n\t\t}\n\t\tconst prefix = root.slice(cwd.length + 1);\n\t\tif (prefix) return (p, isDir) => {\n\t\t\tif (p === \".\") return prefix;\n\t\t\tconst result = `${prefix}/${p}`;\n\t\t\treturn isDir ? result.slice(0, -1) : result;\n\t\t};\n\t\treturn (p, isDir) => isDir && p !== \".\" ? p.slice(0, -1) : p;\n\t}\n\tif (absolute) return (p) => posix.relative(cwd, p) || \".\";\n\treturn (p) => posix.relative(cwd, `${root}/${p}`) || \".\";\n}\nfunction buildRelative(cwd, root) {\n\tif (root.startsWith(`${cwd}/`)) {\n\t\tconst prefix = root.slice(cwd.length + 1);\n\t\treturn (p) => `${prefix}/${p}`;\n\t}\n\treturn (p) => {\n\t\tconst result = posix.relative(cwd, `${root}/${p}`);\n\t\treturn p[p.length - 1] === \"/\" && result !== \"\" ? `${result}/` : result || \".\";\n\t};\n}\nfunction ensureNonDriveRelativePath(path) {\n\treturn path.replace(DRIVE_RELATIVE_PATH, (match) => `${match}/`);\n}\nconst splitPatternOptions = { parts: true };\nfunction splitPattern(path) {\n\tvar _result$parts;\n\tconst result = picomatch.scan(path, splitPatternOptions);\n\treturn ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];\n}\nconst ESCAPED_WIN32_BACKSLASHES = /\\\\(?![()[\\]{}!+@])/g;\nfunction convertPosixPathToPattern(path) {\n\treturn escapePosixPath(path);\n}\nfunction convertWin32PathToPattern(path) {\n\treturn escapeWin32Path(path).replace(ESCAPED_WIN32_BACKSLASHES, \"/\");\n}\n/**\n* Converts a path to a pattern depending on the platform.\n* Identical to {@link escapePath} on POSIX systems.\n* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}\n*/\n/* node:coverage ignore next 3 */\nconst convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;\nconst POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\\\)([()[\\]{}*?|]|^!|[!+@](?=\\()|\\\\(?![()[\\]{}!*+?@|]))/g;\nconst WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\\\)([()[\\]{}]|^!|[!+@](?=\\())/g;\nconst escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, \"\\\\$&\");\nconst escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, \"\\\\$&\");\n/**\n* Escapes a path's special characters depending on the platform.\n* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}\n*/\n/* node:coverage ignore next */\nconst escapePath = isWin ? escapeWin32Path : escapePosixPath;\n/**\n* Checks if a pattern has dynamic parts.\n*\n* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:\n*\n* - Doesn't necessarily return `false` on patterns that include `\\`.\n* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.\n* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.\n* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.\n*\n* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}\n*/\nfunction isDynamicPattern(pattern, options) {\n\tif ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;\n\tconst scan = picomatch.scan(pattern);\n\treturn scan.isGlob || scan.negated;\n}\nfunction log(...tasks) {\n\tconsole.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString(\"es\")}]`, ...tasks);\n}\nfunction ensureStringArray(value) {\n\treturn typeof value === \"string\" ? [value] : value !== null && value !== void 0 ? value : [];\n}\n//#endregion\n//#region src/patterns.ts\nconst PARENT_DIRECTORY = /^(\\/?\\.\\.)+/;\nconst ESCAPING_BACKSLASHES = /\\\\(?=[()[\\]{}!*+?@|])/g;\nfunction normalizePattern(pattern, opts, props, isIgnore) {\n\tvar _PARENT_DIRECTORY$exe;\n\tconst cwd = opts.cwd;\n\tlet result = pattern;\n\tif (pattern[pattern.length - 1] === \"/\") result = pattern.slice(0, -1);\n\tif (result[result.length - 1] !== \"*\" && opts.expandDirectories) result += \"/**\";\n\tconst escapedCwd = escapePath(cwd);\n\tresult = isAbsolute(result.replace(ESCAPING_BACKSLASHES, \"\")) ? posix.relative(escapedCwd, result) : posix.normalize(result);\n\tconst parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];\n\tconst parts = splitPattern(result);\n\tif (parentDir) {\n\t\tconst n = (parentDir.length + 1) / 3;\n\t\tlet i = 0;\n\t\tconst cwdParts = escapedCwd.split(\"/\");\n\t\twhile (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {\n\t\t\tresult = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || \".\";\n\t\t\ti++;\n\t\t}\n\t\tconst potentialRoot = posix.join(cwd, parentDir.slice(i * 3));\n\t\tif (potentialRoot[0] !== \".\" && props.root.length > potentialRoot.length) {\n\t\t\tprops.root = ensureNonDriveRelativePath(potentialRoot);\n\t\t\tprops.depthOffset = -n + i;\n\t\t}\n\t}\n\tif (!isIgnore && props.depthOffset >= 0) {\n\t\tvar _props$commonPath;\n\t\t(_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);\n\t\tconst newCommonPath = [];\n\t\tconst length = Math.min(props.commonPath.length, parts.length);\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tconst part = parts[i];\n\t\t\tif (part === \"**\" && !parts[i + 1]) {\n\t\t\t\tnewCommonPath.pop();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;\n\t\t\tnewCommonPath.push(part);\n\t\t}\n\t\tprops.depthOffset = newCommonPath.length;\n\t\tprops.commonPath = newCommonPath;\n\t\tprops.root = ensureNonDriveRelativePath(newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd);\n\t}\n\treturn result;\n}\nfunction processPatterns(options, patterns, props) {\n\tconst matchPatterns = [];\n\tconst ignorePatterns = [];\n\tfor (const pattern of options.ignore) {\n\t\tif (!pattern) continue;\n\t\tif (pattern[0] !== \"!\" || pattern[1] === \"(\") ignorePatterns.push(normalizePattern(pattern, options, props, true));\n\t}\n\tfor (const pattern of patterns) {\n\t\tif (!pattern) continue;\n\t\tif (pattern[0] !== \"!\" || pattern[1] === \"(\") matchPatterns.push(normalizePattern(pattern, options, props, false));\n\t\telse if (pattern[1] !== \"!\" || pattern[2] === \"(\") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));\n\t}\n\treturn {\n\t\tmatch: matchPatterns,\n\t\tignore: ignorePatterns\n\t};\n}\n//#endregion\n//#region src/crawler.ts\nfunction buildCrawler(options, patterns) {\n\tconst cwd = options.cwd;\n\tconst props = {\n\t\troot: cwd,\n\t\tdepthOffset: 0\n\t};\n\tconst processed = processPatterns(options, patterns, props);\n\tif (options.debug) log(\"internal processing patterns:\", processed);\n\tconst { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;\n\tconst root = props.root.replace(BACKSLASHES, \"\");\n\tconst matchOptions = {\n\t\tdot,\n\t\tnobrace: options.braceExpansion === false,\n\t\tnocase: !caseSensitiveMatch,\n\t\tnoextglob: options.extglob === false,\n\t\tnoglobstar: options.globstar === false,\n\t\tposix: true\n\t};\n\tconst matcher = picomatch(processed.match, matchOptions);\n\tconst ignore = picomatch(processed.ignore, matchOptions);\n\tconst partialMatcher = getPartialMatcher(processed.match, matchOptions);\n\tconst format = buildFormat(cwd, root, absolute);\n\tconst excludeFormatter = absolute ? format : buildFormat(cwd, root, true);\n\tconst excludePredicate = (_, p) => {\n\t\tconst relativePath = excludeFormatter(p, true);\n\t\treturn relativePath !== \".\" && !partialMatcher(relativePath) || ignore(relativePath);\n\t};\n\tlet maxDepth;\n\tif (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);\n\tconst crawler = new fdir({\n\t\tfilters: [debug ? (p, isDirectory) => {\n\t\t\tconst path = format(p, isDirectory);\n\t\t\tconst matches = matcher(path) && !ignore(path);\n\t\t\tif (matches) log(`matched ${path}`);\n\t\t\treturn matches;\n\t\t} : (p, isDirectory) => {\n\t\t\tconst path = format(p, isDirectory);\n\t\t\treturn matcher(path) && !ignore(path);\n\t\t}],\n\t\texclude: debug ? (_, p) => {\n\t\t\tconst skipped = excludePredicate(_, p);\n\t\t\tlog(`${skipped ? \"skipped\" : \"crawling\"} ${p}`);\n\t\t\treturn skipped;\n\t\t} : excludePredicate,\n\t\tfs: options.fs,\n\t\tpathSeparator: \"/\",\n\t\trelativePaths: !absolute,\n\t\tresolvePaths: absolute,\n\t\tincludeBasePath: absolute,\n\t\tresolveSymlinks: followSymbolicLinks,\n\t\texcludeSymlinks: !followSymbolicLinks,\n\t\texcludeFiles: onlyDirectories,\n\t\tincludeDirs: onlyDirectories || !options.onlyFiles,\n\t\tmaxDepth,\n\t\tsignal: options.signal\n\t}).crawl(root);\n\tif (options.debug) log(\"internal properties:\", {\n\t\t...props,\n\t\troot\n\t});\n\treturn [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];\n}\n//#endregion\n//#region src/index.ts\nfunction formatPaths(paths, mapper) {\n\tif (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);\n\treturn paths;\n}\nconst defaultOptions = {\n\tcaseSensitiveMatch: true,\n\tdebug: !!process.env.TINYGLOBBY_DEBUG,\n\texpandDirectories: true,\n\tfollowSymbolicLinks: true,\n\tonlyFiles: true\n};\nfunction getOptions(options) {\n\tconst opts = Object.assign({}, options);\n\tfor (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });\n\topts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd || process.cwd())).replace(BACKSLASHES, \"/\");\n\topts.ignore = ensureStringArray(opts.ignore);\n\topts.fs && (opts.fs = {\n\t\treaddir: opts.fs.readdir || readdir,\n\t\treaddirSync: opts.fs.readdirSync || readdirSync,\n\t\trealpath: opts.fs.realpath || realpath,\n\t\trealpathSync: opts.fs.realpathSync || realpathSync,\n\t\tstat: opts.fs.stat || stat,\n\t\tstatSync: opts.fs.statSync || statSync\n\t});\n\tif (opts.debug) log(\"globbing with options:\", opts);\n\treturn opts;\n}\nfunction getCrawler(globInput, inputOptions = {}) {\n\tvar _ref;\n\tif (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error(\"Cannot pass patterns as both an argument and an option\");\n\tconst isModern = isReadonlyArray(globInput) || typeof globInput === \"string\";\n\tconst patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : \"**/*\");\n\tconst options = getOptions(isModern ? inputOptions : globInput);\n\treturn patterns.length > 0 ? buildCrawler(options, patterns) : [];\n}\nasync function glob(globInput, options) {\n\tconst [crawler, relative] = getCrawler(globInput, options);\n\treturn crawler ? formatPaths(await crawler.withPromise(), relative) : [];\n}\nfunction globSync(globInput, options) {\n\tconst [crawler, relative] = getCrawler(globInput, options);\n\treturn crawler ? formatPaths(crawler.sync(), relative) : [];\n}\n//#endregion\nexport { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };\n",
80
+ "import { createRequire } from \"module\";\nimport { basename, dirname, normalize, relative, resolve, sep } from \"path\";\nimport * as nativeFs from \"fs\";\n\n//#region rolldown:runtime\nvar __require = /* @__PURE__ */ createRequire(import.meta.url);\n\n//#endregion\n//#region src/utils.ts\nfunction cleanPath(path) {\n\tlet normalized = normalize(path);\n\tif (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);\n\treturn normalized;\n}\nconst SLASHES_REGEX = /[\\\\/]/g;\nfunction convertSlashes(path, separator) {\n\treturn path.replace(SLASHES_REGEX, separator);\n}\nconst WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\\\/]$/i;\nfunction isRootDirectory(path) {\n\treturn path === \"/\" || WINDOWS_ROOT_DIR_REGEX.test(path);\n}\nfunction normalizePath(path, options) {\n\tconst { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;\n\tconst pathNeedsCleaning = process.platform === \"win32\" && path.includes(\"/\") || path.startsWith(\".\");\n\tif (resolvePaths) path = resolve(path);\n\tif (normalizePath$1 || pathNeedsCleaning) path = cleanPath(path);\n\tif (path === \".\") return \"\";\n\tconst needsSeperator = path[path.length - 1] !== pathSeparator;\n\treturn convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);\n}\n\n//#endregion\n//#region src/api/functions/join-path.ts\nfunction joinPathWithBasePath(filename, directoryPath) {\n\treturn directoryPath + filename;\n}\nfunction joinPathWithRelativePath(root, options) {\n\treturn function(filename, directoryPath) {\n\t\tconst sameRoot = directoryPath.startsWith(root);\n\t\tif (sameRoot) return directoryPath.slice(root.length) + filename;\n\t\telse return convertSlashes(relative(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;\n\t};\n}\nfunction joinPath(filename) {\n\treturn filename;\n}\nfunction joinDirectoryPath(filename, directoryPath, separator) {\n\treturn directoryPath + filename + separator;\n}\nfunction build$7(root, options) {\n\tconst { relativePaths, includeBasePath } = options;\n\treturn relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;\n}\n\n//#endregion\n//#region src/api/functions/push-directory.ts\nfunction pushDirectoryWithRelativePath(root) {\n\treturn function(directoryPath, paths) {\n\t\tpaths.push(directoryPath.substring(root.length) || \".\");\n\t};\n}\nfunction pushDirectoryFilterWithRelativePath(root) {\n\treturn function(directoryPath, paths, filters) {\n\t\tconst relativePath = directoryPath.substring(root.length) || \".\";\n\t\tif (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);\n\t};\n}\nconst pushDirectory = (directoryPath, paths) => {\n\tpaths.push(directoryPath || \".\");\n};\nconst pushDirectoryFilter = (directoryPath, paths, filters) => {\n\tconst path = directoryPath || \".\";\n\tif (filters.every((filter) => filter(path, true))) paths.push(path);\n};\nconst empty$2 = () => {};\nfunction build$6(root, options) {\n\tconst { includeDirs, filters, relativePaths } = options;\n\tif (!includeDirs) return empty$2;\n\tif (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);\n\treturn filters && filters.length ? pushDirectoryFilter : pushDirectory;\n}\n\n//#endregion\n//#region src/api/functions/push-file.ts\nconst pushFileFilterAndCount = (filename, _paths, counts, filters) => {\n\tif (filters.every((filter) => filter(filename, false))) counts.files++;\n};\nconst pushFileFilter = (filename, paths, _counts, filters) => {\n\tif (filters.every((filter) => filter(filename, false))) paths.push(filename);\n};\nconst pushFileCount = (_filename, _paths, counts, _filters) => {\n\tcounts.files++;\n};\nconst pushFile = (filename, paths) => {\n\tpaths.push(filename);\n};\nconst empty$1 = () => {};\nfunction build$5(options) {\n\tconst { excludeFiles, filters, onlyCounts } = options;\n\tif (excludeFiles) return empty$1;\n\tif (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;\n\telse if (onlyCounts) return pushFileCount;\n\telse return pushFile;\n}\n\n//#endregion\n//#region src/api/functions/get-array.ts\nconst getArray = (paths) => {\n\treturn paths;\n};\nconst getArrayGroup = () => {\n\treturn [\"\"].slice(0, 0);\n};\nfunction build$4(options) {\n\treturn options.group ? getArrayGroup : getArray;\n}\n\n//#endregion\n//#region src/api/functions/group-files.ts\nconst groupFiles = (groups, directory, files) => {\n\tgroups.push({\n\t\tdirectory,\n\t\tfiles,\n\t\tdir: directory\n\t});\n};\nconst empty = () => {};\nfunction build$3(options) {\n\treturn options.group ? groupFiles : empty;\n}\n\n//#endregion\n//#region src/api/functions/resolve-symlink.ts\nconst resolveSymlinksAsync = function(path, state, callback$1) {\n\tconst { queue, fs, options: { suppressErrors } } = state;\n\tqueue.enqueue();\n\tfs.realpath(path, (error, resolvedPath) => {\n\t\tif (error) return queue.dequeue(suppressErrors ? null : error, state);\n\t\tfs.stat(resolvedPath, (error$1, stat) => {\n\t\t\tif (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);\n\t\t\tif (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);\n\t\t\tcallback$1(stat, resolvedPath);\n\t\t\tqueue.dequeue(null, state);\n\t\t});\n\t});\n};\nconst resolveSymlinks = function(path, state, callback$1) {\n\tconst { queue, fs, options: { suppressErrors } } = state;\n\tqueue.enqueue();\n\ttry {\n\t\tconst resolvedPath = fs.realpathSync(path);\n\t\tconst stat = fs.statSync(resolvedPath);\n\t\tif (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;\n\t\tcallback$1(stat, resolvedPath);\n\t} catch (e) {\n\t\tif (!suppressErrors) throw e;\n\t}\n};\nfunction build$2(options, isSynchronous) {\n\tif (!options.resolveSymlinks || options.excludeSymlinks) return null;\n\treturn isSynchronous ? resolveSymlinks : resolveSymlinksAsync;\n}\nfunction isRecursive(path, resolved, state) {\n\tif (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);\n\tlet parent = dirname(path);\n\tlet depth = 1;\n\twhile (parent !== state.root && depth < 2) {\n\t\tconst resolvedPath = state.symlinks.get(parent);\n\t\tconst isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));\n\t\tif (isSameRoot) depth++;\n\t\telse parent = dirname(parent);\n\t}\n\tstate.symlinks.set(path, resolved);\n\treturn depth > 1;\n}\nfunction isRecursiveUsingRealPaths(resolved, state) {\n\treturn state.visited.includes(resolved + state.options.pathSeparator);\n}\n\n//#endregion\n//#region src/api/functions/invoke-callback.ts\nconst onlyCountsSync = (state) => {\n\treturn state.counts;\n};\nconst groupsSync = (state) => {\n\treturn state.groups;\n};\nconst defaultSync = (state) => {\n\treturn state.paths;\n};\nconst limitFilesSync = (state) => {\n\treturn state.paths.slice(0, state.options.maxFiles);\n};\nconst onlyCountsAsync = (state, error, callback$1) => {\n\treport(error, callback$1, state.counts, state.options.suppressErrors);\n\treturn null;\n};\nconst defaultAsync = (state, error, callback$1) => {\n\treport(error, callback$1, state.paths, state.options.suppressErrors);\n\treturn null;\n};\nconst limitFilesAsync = (state, error, callback$1) => {\n\treport(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);\n\treturn null;\n};\nconst groupsAsync = (state, error, callback$1) => {\n\treport(error, callback$1, state.groups, state.options.suppressErrors);\n\treturn null;\n};\nfunction report(error, callback$1, output, suppressErrors) {\n\tif (error && !suppressErrors) callback$1(error, output);\n\telse callback$1(null, output);\n}\nfunction build$1(options, isSynchronous) {\n\tconst { onlyCounts, group, maxFiles } = options;\n\tif (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;\n\telse if (group) return isSynchronous ? groupsSync : groupsAsync;\n\telse if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;\n\telse return isSynchronous ? defaultSync : defaultAsync;\n}\n\n//#endregion\n//#region src/api/functions/walk-directory.ts\nconst readdirOpts = { withFileTypes: true };\nconst walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {\n\tstate.queue.enqueue();\n\tif (currentDepth < 0) return state.queue.dequeue(null, state);\n\tconst { fs } = state;\n\tstate.visited.push(crawlPath);\n\tstate.counts.directories++;\n\tfs.readdir(crawlPath || \".\", readdirOpts, (error, entries = []) => {\n\t\tcallback$1(entries, directoryPath, currentDepth);\n\t\tstate.queue.dequeue(state.options.suppressErrors ? null : error, state);\n\t});\n};\nconst walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {\n\tconst { fs } = state;\n\tif (currentDepth < 0) return;\n\tstate.visited.push(crawlPath);\n\tstate.counts.directories++;\n\tlet entries = [];\n\ttry {\n\t\tentries = fs.readdirSync(crawlPath || \".\", readdirOpts);\n\t} catch (e) {\n\t\tif (!state.options.suppressErrors) throw e;\n\t}\n\tcallback$1(entries, directoryPath, currentDepth);\n};\nfunction build(isSynchronous) {\n\treturn isSynchronous ? walkSync : walkAsync;\n}\n\n//#endregion\n//#region src/api/queue.ts\n/**\n* This is a custom stateless queue to track concurrent async fs calls.\n* It increments a counter whenever a call is queued and decrements it\n* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.\n*/\nvar Queue = class {\n\tcount = 0;\n\tconstructor(onQueueEmpty) {\n\t\tthis.onQueueEmpty = onQueueEmpty;\n\t}\n\tenqueue() {\n\t\tthis.count++;\n\t\treturn this.count;\n\t}\n\tdequeue(error, output) {\n\t\tif (this.onQueueEmpty && (--this.count <= 0 || error)) {\n\t\t\tthis.onQueueEmpty(error, output);\n\t\t\tif (error) {\n\t\t\t\toutput.controller.abort();\n\t\t\t\tthis.onQueueEmpty = void 0;\n\t\t\t}\n\t\t}\n\t}\n};\n\n//#endregion\n//#region src/api/counter.ts\nvar Counter = class {\n\t_files = 0;\n\t_directories = 0;\n\tset files(num) {\n\t\tthis._files = num;\n\t}\n\tget files() {\n\t\treturn this._files;\n\t}\n\tset directories(num) {\n\t\tthis._directories = num;\n\t}\n\tget directories() {\n\t\treturn this._directories;\n\t}\n\t/**\n\t* @deprecated use `directories` instead\n\t*/\n\t/* c8 ignore next 3 */\n\tget dirs() {\n\t\treturn this._directories;\n\t}\n};\n\n//#endregion\n//#region src/api/aborter.ts\n/**\n* AbortController is not supported on Node 14 so we use this until we can drop\n* support for Node 14.\n*/\nvar Aborter = class {\n\taborted = false;\n\tabort() {\n\t\tthis.aborted = true;\n\t}\n};\n\n//#endregion\n//#region src/api/walker.ts\nvar Walker = class {\n\troot;\n\tisSynchronous;\n\tstate;\n\tjoinPath;\n\tpushDirectory;\n\tpushFile;\n\tgetArray;\n\tgroupFiles;\n\tresolveSymlink;\n\twalkDirectory;\n\tcallbackInvoker;\n\tconstructor(root, options, callback$1) {\n\t\tthis.isSynchronous = !callback$1;\n\t\tthis.callbackInvoker = build$1(options, this.isSynchronous);\n\t\tthis.root = normalizePath(root, options);\n\t\tthis.state = {\n\t\t\troot: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),\n\t\t\tpaths: [\"\"].slice(0, 0),\n\t\t\tgroups: [],\n\t\t\tcounts: new Counter(),\n\t\t\toptions,\n\t\t\tqueue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),\n\t\t\tsymlinks: /* @__PURE__ */ new Map(),\n\t\t\tvisited: [\"\"].slice(0, 0),\n\t\t\tcontroller: new Aborter(),\n\t\t\tfs: options.fs || nativeFs\n\t\t};\n\t\tthis.joinPath = build$7(this.root, options);\n\t\tthis.pushDirectory = build$6(this.root, options);\n\t\tthis.pushFile = build$5(options);\n\t\tthis.getArray = build$4(options);\n\t\tthis.groupFiles = build$3(options);\n\t\tthis.resolveSymlink = build$2(options, this.isSynchronous);\n\t\tthis.walkDirectory = build(this.isSynchronous);\n\t}\n\tstart() {\n\t\tthis.pushDirectory(this.root, this.state.paths, this.state.options.filters);\n\t\tthis.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);\n\t\treturn this.isSynchronous ? this.callbackInvoker(this.state, null) : null;\n\t}\n\twalk = (entries, directoryPath, depth) => {\n\t\tconst { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;\n\t\tif (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;\n\t\tconst files = this.getArray(this.state.paths);\n\t\tfor (let i = 0; i < entries.length; ++i) {\n\t\t\tconst entry = entries[i];\n\t\t\tif (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {\n\t\t\t\tconst filename = this.joinPath(entry.name, directoryPath);\n\t\t\t\tthis.pushFile(filename, files, this.state.counts, filters);\n\t\t\t} else if (entry.isDirectory()) {\n\t\t\t\tlet path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);\n\t\t\t\tif (exclude && exclude(entry.name, path)) continue;\n\t\t\t\tthis.pushDirectory(path, paths, filters);\n\t\t\t\tthis.walkDirectory(this.state, path, path, depth - 1, this.walk);\n\t\t\t} else if (this.resolveSymlink && entry.isSymbolicLink()) {\n\t\t\t\tlet path = joinPathWithBasePath(entry.name, directoryPath);\n\t\t\t\tthis.resolveSymlink(path, this.state, (stat, resolvedPath) => {\n\t\t\t\t\tif (stat.isDirectory()) {\n\t\t\t\t\t\tresolvedPath = normalizePath(resolvedPath, this.state.options);\n\t\t\t\t\t\tif (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;\n\t\t\t\t\t\tthis.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolvedPath = useRealPaths ? resolvedPath : path;\n\t\t\t\t\t\tconst filename = basename(resolvedPath);\n\t\t\t\t\t\tconst directoryPath$1 = normalizePath(dirname(resolvedPath), this.state.options);\n\t\t\t\t\t\tresolvedPath = this.joinPath(filename, directoryPath$1);\n\t\t\t\t\t\tthis.pushFile(resolvedPath, files, this.state.counts, filters);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tthis.groupFiles(this.state.groups, directoryPath, files);\n\t};\n};\n\n//#endregion\n//#region src/api/async.ts\nfunction promise(root, options) {\n\treturn new Promise((resolve$1, reject) => {\n\t\tcallback(root, options, (err, output) => {\n\t\t\tif (err) return reject(err);\n\t\t\tresolve$1(output);\n\t\t});\n\t});\n}\nfunction callback(root, options, callback$1) {\n\tlet walker = new Walker(root, options, callback$1);\n\twalker.start();\n}\n\n//#endregion\n//#region src/api/sync.ts\nfunction sync(root, options) {\n\tconst walker = new Walker(root, options);\n\treturn walker.start();\n}\n\n//#endregion\n//#region src/builder/api-builder.ts\nvar APIBuilder = class {\n\tconstructor(root, options) {\n\t\tthis.root = root;\n\t\tthis.options = options;\n\t}\n\twithPromise() {\n\t\treturn promise(this.root, this.options);\n\t}\n\twithCallback(cb) {\n\t\tcallback(this.root, this.options, cb);\n\t}\n\tsync() {\n\t\treturn sync(this.root, this.options);\n\t}\n};\n\n//#endregion\n//#region src/builder/index.ts\nlet pm = null;\n/* c8 ignore next 6 */\ntry {\n\t__require.resolve(\"picomatch\");\n\tpm = __require(\"picomatch\");\n} catch {}\nvar Builder = class {\n\tglobCache = {};\n\toptions = {\n\t\tmaxDepth: Infinity,\n\t\tsuppressErrors: true,\n\t\tpathSeparator: sep,\n\t\tfilters: []\n\t};\n\tglobFunction;\n\tconstructor(options) {\n\t\tthis.options = {\n\t\t\t...this.options,\n\t\t\t...options\n\t\t};\n\t\tthis.globFunction = this.options.globFunction;\n\t}\n\tgroup() {\n\t\tthis.options.group = true;\n\t\treturn this;\n\t}\n\twithPathSeparator(separator) {\n\t\tthis.options.pathSeparator = separator;\n\t\treturn this;\n\t}\n\twithBasePath() {\n\t\tthis.options.includeBasePath = true;\n\t\treturn this;\n\t}\n\twithRelativePaths() {\n\t\tthis.options.relativePaths = true;\n\t\treturn this;\n\t}\n\twithDirs() {\n\t\tthis.options.includeDirs = true;\n\t\treturn this;\n\t}\n\twithMaxDepth(depth) {\n\t\tthis.options.maxDepth = depth;\n\t\treturn this;\n\t}\n\twithMaxFiles(limit) {\n\t\tthis.options.maxFiles = limit;\n\t\treturn this;\n\t}\n\twithFullPaths() {\n\t\tthis.options.resolvePaths = true;\n\t\tthis.options.includeBasePath = true;\n\t\treturn this;\n\t}\n\twithErrors() {\n\t\tthis.options.suppressErrors = false;\n\t\treturn this;\n\t}\n\twithSymlinks({ resolvePaths = true } = {}) {\n\t\tthis.options.resolveSymlinks = true;\n\t\tthis.options.useRealPaths = resolvePaths;\n\t\treturn this.withFullPaths();\n\t}\n\twithAbortSignal(signal) {\n\t\tthis.options.signal = signal;\n\t\treturn this;\n\t}\n\tnormalize() {\n\t\tthis.options.normalizePath = true;\n\t\treturn this;\n\t}\n\tfilter(predicate) {\n\t\tthis.options.filters.push(predicate);\n\t\treturn this;\n\t}\n\tonlyDirs() {\n\t\tthis.options.excludeFiles = true;\n\t\tthis.options.includeDirs = true;\n\t\treturn this;\n\t}\n\texclude(predicate) {\n\t\tthis.options.exclude = predicate;\n\t\treturn this;\n\t}\n\tonlyCounts() {\n\t\tthis.options.onlyCounts = true;\n\t\treturn this;\n\t}\n\tcrawl(root) {\n\t\treturn new APIBuilder(root || \".\", this.options);\n\t}\n\twithGlobFunction(fn) {\n\t\tthis.globFunction = fn;\n\t\treturn this;\n\t}\n\t/**\n\t* @deprecated Pass options using the constructor instead:\n\t* ```ts\n\t* new fdir(options).crawl(\"/path/to/root\");\n\t* ```\n\t* This method will be removed in v7.0\n\t*/\n\t/* c8 ignore next 4 */\n\tcrawlWithOptions(root, options) {\n\t\tthis.options = {\n\t\t\t...this.options,\n\t\t\t...options\n\t\t};\n\t\treturn new APIBuilder(root || \".\", this.options);\n\t}\n\tglob(...patterns) {\n\t\tif (this.globFunction) return this.globWithOptions(patterns);\n\t\treturn this.globWithOptions(patterns, ...[{ dot: true }]);\n\t}\n\tglobWithOptions(patterns, ...options) {\n\t\tconst globFn = this.globFunction || pm;\n\t\t/* c8 ignore next 5 */\n\t\tif (!globFn) throw new Error(\"Please specify a glob function to use glob matching.\");\n\t\tvar isMatch = this.globCache[patterns.join(\"\\0\")];\n\t\tif (!isMatch) {\n\t\t\tisMatch = globFn(patterns, ...options);\n\t\t\tthis.globCache[patterns.join(\"\\0\")] = isMatch;\n\t\t}\n\t\tthis.options.filters.push((path) => isMatch(path));\n\t\treturn this;\n\t}\n};\n\n//#endregion\nexport { Builder as fdir };",
81
+ "import { YAML } from \"bun\";\nimport { z } from \"zod\";\nimport packageJson from \"@/package.json\";\n\nexport const CONFIG_FILE_NAME = \"git-swarm.config.yaml\";\n\nconst defaults = {\n $schema: `https://raw.githubusercontent.com/imfelixyeung/git-swarm/v${packageJson.version}/src/config/schema.json`,\n options: {\n parallel: 1,\n where: \"\",\n },\n};\n\nexport const configSchema = z.object({\n $schema: z.string().nullish(),\n repositories: z\n .array(\n z.object({\n path: z.string(),\n }),\n )\n .nullish(),\n options: z\n .object({\n parallel: z\n .number()\n .gte(0)\n .nullish()\n .default(defaults.options.parallel),\n where: z.string().nullish().default(defaults.options.where),\n })\n .nullish(),\n});\n\nexport type GitSwarmConfig = z.infer<typeof configSchema>;\ndefaults satisfies GitSwarmConfig;\n\nexport const defaultConfig = {\n $schema: defaults.$schema,\n options: {\n parallel: defaults.options.parallel,\n where: defaults.options.where,\n },\n} as const satisfies GitSwarmConfig;\n\nconst file = () => Bun.file(CONFIG_FILE_NAME);\n\nconst exists = async () => file().exists();\n\nconst write = async (config: GitSwarmConfig) => {\n await file().write(YAML.stringify(config, null, 4));\n};\n\nlet cache: GitSwarmConfig | null = null;\n\nconst get = async (): Promise<GitSwarmConfig> => {\n if (cache !== null) {\n return cache;\n }\n\n if (!(await file().exists())) {\n cache = defaultConfig;\n return cache;\n }\n\n const contents = await file().text();\n const config = YAML.parse(contents);\n const result = await configSchema.parseAsync(config);\n cache = result;\n return result;\n};\n\nconst getOption = async <\n T extends keyof NonNullable<GitSwarmConfig[\"options\"]>,\n>(\n key: T,\n) => {\n const config = await get();\n return config.options?.[key] ?? defaultConfig.options[key];\n};\n\nexport const config = {\n file,\n exists,\n write,\n get,\n getOption,\n};\n",
82
+ "import { globalConfig } from \"./core.js\";\n// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function toZod() {\n return (schema) => schema;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const ratio = val / step;\n const roundedRatio = Math.round(ratio);\n // `val` and `step` each round to a double before the division rounds again, so a true decimal multiple's quotient can sit up to 1.5 of these scaled epsilons from the integer. A 1x tolerance therefore rejected 2.03 as a multiple of 0.07; 4x covers the worst case with margin.\n const tolerance = 4 * Number.EPSILON * Math.max(Math.abs(ratio), 1);\n if (Math.abs(ratio - roundedRatio) < tolerance)\n return 0;\n return ratio - roundedRatio;\n}\nconst EVALUATING = /* @__PURE__*/ Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = /* @__PURE__*/ cached(() => {\n // Skip the probe under `jitless`: strict CSPs report the caught `new Function` as a `securitypolicyviolation` even though the throw is swallowed.\n if (globalConfig.jitless) {\n return false;\n }\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n if (o instanceof Map)\n return new Map(o);\n if (o instanceof Set)\n return new Set(o);\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = /* @__PURE__*/ new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = /* @__PURE__*/ new Set([\n \"string\",\n \"number\",\n \"bigint\",\n \"boolean\",\n \"symbol\",\n \"undefined\",\n]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin !== undefined && shape[k]._zod.optout === \"optional\";\n });\n}\n// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle.\nexport const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n}))();\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n // `for...in` skips symbols, so a symbol in the mask would select nothing\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n assignProp(newShape, key, currDef.shape[key]);\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape. Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key of Reflect.ownKeys(shape)) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n if (!b?._zod?.def) {\n throw new Error(\"Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.\");\n }\n if (a._zod.def.checks?.length) {\n throw new Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");\n }\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: b._zod.def.checks ?? [],\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask, name = \"partial\") {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(`.${name}() cannot be used on object schemas containing refinements`);\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(oldShape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n // the spread copies symbol keys; `for...in` would not reach them\n for (const key of Reflect.ownKeys(oldShape)) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(shape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key of Reflect.ownKeys(oldShape)) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\n// Checks for explicit abort (continue === false), as opposed to implicit abort (continue === undefined). Used to respect `abort: true` in .refine() even for checks that have a `when` function.\nexport function explicitlyAborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue === false) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\n/* A check holds no link back to the schema it is attached to — the same check instance is shared by every clone of that schema — so the owner is stamped onto the issues a check just raised, at the only point where both are in scope. Runs on the failure path only; `start` is the issue count from before the check ran. */\nexport function attachSchema(issues, start, inst) {\n var _a;\n for (let i = start; i < issues.length; i++) {\n (_a = issues[i]).schema ?? (_a.schema = inst);\n }\n}\nexport function finalizeIssue(iss, ctx, config) {\n var _a;\n // A schema that raised an issue itself owns it outright, and outranks any stamp an enclosing check left in `attachSchema`. String formats and z.custom() are schema and check at once, so when they act as a check they defer to that stamp instead.\n const traits = iss.inst?._zod?.traits;\n if (traits?.has(\"$ZodType\")) {\n if (traits.has(\"$ZodCheck\"))\n (_a = iss).schema ?? (_a.schema = iss.inst);\n else\n iss.schema = iss.inst;\n }\n // Decreasing specificity, first map to return a message wins. `inst` is whatever raised the issue, so a check's own map outranks the owning schema's.\n const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : undefined;\n const message = iss.message\n ? iss.message\n : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(schemaError?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\");\n const { inst: _inst, schema: _schema, continue: _continue, input: _input, ...rest } = iss;\n rest.path ?? (rest.path = []);\n rest.message = message;\n if (ctx?.reportInput) {\n rest.input = _input;\n }\n return rest;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nconst highSurrogate = /[\\uD800-\\uDBFF]/;\n// Code points in `str`: a surrogate pair counts once, a lone surrogate as itself. Hand-rolled because the string iterator allocates and runs ~250x slower on this path; the regex probe exits ~50x quicker for a string with no astral characters.\nexport function codePointLength(str) {\n const units = str.length;\n if (!highSurrogate.test(str))\n return units;\n let count = units;\n for (let i = 0; i < units - 1; i++) {\n if ((str.charCodeAt(i) & 0xfc00) === 0xd800 && (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n count--;\n i++;\n }\n }\n return count;\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n////////// PROTOTYPE INSTALLERS //////////\n//\n// Members live on the prototype and materialize per instance on first read, which keeps own-property count under the step where V8 stops using inline slots. Changing anything here means re-measuring runtime, memory and bundle size together — see \"The three axes\" in AGENTS.md.\n/**\n * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working.\n *\n * Call this from a `proto` initializer, which runs once per prototype — never per instance.\n */\nexport function members(proto, table) {\n for (const key in table) {\n const desc = Object.getOwnPropertyDescriptor(table, key);\n // a getter installs as written, so it stays live: `description` reads through to the registry on every access. not enumerable: an object literal's is, and a prototype member never was\n if (desc.get)\n Object.defineProperty(proto, key, { ...desc, enumerable: false });\n // a method materializes bound on first read, which is what keeps a detached member working: `const opt = schema.optional; opt()`\n else\n defineBound(proto, key, desc.value);\n }\n}\n/** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */\nexport function own(inst, key, value, enumerable = true) {\n Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });\n return value;\n}\n/** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */\nexport function hide(inst, key, value) {\n return own(inst, key, value, false);\n}\nfunction defineBound(proto, key, fn) {\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // vitest's spyOn calls a prototype getter bare to find the function it wraps, so a nullish receiver answers the raw method\n return this == null ? fn : own(this, key, fn.bind(this));\n },\n set(value) {\n own(this, key, value);\n },\n });\n}\n/** Returns the prototype to install on, or `undefined` if this group is already installed on it. */\nfunction claim(inst, sentinel) {\n const proto = Object.getPrototypeOf(inst);\n // Runs on every construction, so `in` rather than the costlier `hasOwnProperty.call`. Sentinels are keys the group itself defines.\n return sentinel in proto ? undefined : proto;\n}\n// The internals whose init chain is installing. A second call for the same one is a derived constructor overriding its base, so it must not construct another schema in between or the override is dropped.\nlet installing;\n// Set while a getter is running, so a value that resolved through a recursion break is not memoized. One shared descriptor shadows the key for the duration, which costs no per-key allocation.\nlet broke = false;\nconst breaker = {\n configurable: true,\n get() {\n broke = true;\n return undefined;\n },\n};\n/**\n * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s\n * constructor, computed from the internals object itself and cached there on\n * first read. One accessor per constructor rather than one per instance.\n */\nexport function defineLazyInternal(inst, key, compute) {\n const proto = Object.getPrototypeOf(inst._zod);\n if (key in proto && installing !== inst._zod) {\n // A repeat construction: everything is installed already. Cleared here so the reference is not held past the first construction of every type.\n installing = undefined;\n return;\n }\n installing = inst._zod;\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // Shadowed before computing so a re-entrant read from a recursive schema resolves to undefined instead of running the getter again.\n Object.defineProperty(this, key, breaker);\n const outer = broke;\n broke = false;\n try {\n const value = compute(this);\n // A result that resolved through a recursion break is recomputed once the graph is complete; everything else memoizes, undefined included.\n if (broke)\n delete this[key];\n else\n Object.defineProperty(this, key, { configurable: true, writable: true, value });\n broke = broke || outer;\n return value;\n }\n catch (err) {\n // A compute that threw memoizes nothing, so a later read runs it again and fails the same way. The shadow goes with it, since leaving it installed would answer undefined for every later read.\n delete this[key];\n broke = broke || outer;\n throw err;\n }\n },\n set(value) {\n Object.defineProperty(this, key, { configurable: true, writable: true, value });\n },\n });\n}\n/**\n * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own\n * data property. One accessor per constructor rather than one per instance, because an own accessor\n * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel.\n */\nexport function installLazyProp(inst, key, make, enumerable) {\n const proto = claim(inst, key);\n if (!proto)\n return;\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // Shadowed before computing, so a re-entrant read from a self-referential shape resolves to undefined instead of running the getter again. A data property rather than an accessor: an own accessor is the dictionary-mode transition this exists to avoid.\n const desc = { configurable: true, writable: true, enumerable, value: undefined };\n Object.defineProperty(this, key, desc);\n // a compute that throws leaves the shadow behind, so later reads answer undefined instead of re-throwing; `defineLazy` did the same, and `defineLazyInternal`'s delete-on-catch would cost bytes in every bundle for a case only a throwing user getter reaches\n desc.value = make(this);\n Object.defineProperty(this, key, desc);\n return desc.value;\n },\n set(value) {\n Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value });\n },\n });\n}\n/** Marks the thunk `_catch` synthesises for a constant catch value. `Function.length` cannot tell that thunk from a user callback — rest and defaulted parameters both report arity 0 — and a user callback reads `ctx.error`, whose issues only finalize correctly against the caller's per-parse error map. Provenance can say what arity cannot. A plain string key rather than `Symbol.for`, whose call at module scope no bundler can prove pure — the same shape that anchored `urlCanParse` into every build. */\nexport const CONSTANT_CATCH = \"~constantCatch\";\n/** Wraps a constant catch value in a thunk tagged with {@link CONSTANT_CATCH}. */\nexport function constantCatch(value) {\n const fn = () => value;\n fn[CONSTANT_CATCH] = true;\n return fn;\n}\n",
83
+ "var _a;\nimport { members as installMembers } from \"./util.js\";\n/** A special constant with type `never` */\nexport const NEVER = /*@__PURE__*/ Object.freeze({\n status: \"aborted\",\n});\n/* Shared descriptor for installing `_zod`; defineProperty reads it\n * synchronously, so reusing one object avoids a per-instance allocation. */\nconst _zodDesc = { value: undefined, enumerable: false };\n// null where suppressing the capture would be unrecoverable: `parse()` puts the frames back with `captureStackTrace`, so without it the throw would lose its stack. also latched to null once `stackTraceLimit` proves unassignable, which a realm can do at any point by hardening Error\nlet _E = \"captureStackTrace\" in Error ? Error : null;\n// v8 captures a stack trace inside the Error constructor, which dominates a failed parse; costs only the frames, and parse() restores those. the constructor must RUN: Object.create is cheaper and passes instanceof, but Error.isError and util.types.isNativeError check an internal slot\nfunction newError(Definition) {\n const E = _E;\n if (E) {\n const saved = E.stackTraceLimit;\n if (typeof saved === \"number\") {\n try {\n E.stackTraceLimit = 0;\n }\n catch {\n _E = null;\n return new Definition();\n }\n try {\n return new Definition();\n }\n finally {\n E.stackTraceLimit = saved;\n }\n }\n }\n return new Definition();\n}\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, \n/** This trait's members, installed once on every prototype that composes it. They cannot be declared in the initializer above: that runs per instance, and the prototype is shared. */\nproto, params) {\n // Prototype for this constructor's `_zod` internals. Lazily-derived fields (`values`, `pattern`, `optin`, …) install here once rather than as an accessor on every instance.\n const zodProto = {};\n // Assigning the fields in the constructor body is what gives instances in-object slots; building the object literally and reparenting it costs a second allocation and a generic property copy.\n function Internals(def) {\n this.def = def;\n this.constr = _;\n this.traits = new Set();\n }\n Internals.prototype = zodProto;\n const protoMembers = proto;\n // One trait's members land on every prototype whose chain composes it, so the answer is per prototype rather than per trait.\n const initialized = protoMembers && new WeakSet();\n function init(inst, def) {\n if (!inst._zod) {\n _zodDesc.value = new Internals(def);\n try {\n Object.defineProperty(inst, \"_zod\", _zodDesc);\n }\n finally {\n // Cleared even on throw, so the shared descriptor never leaks one instance's internals into the next.\n _zodDesc.value = undefined;\n }\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n if (initialized) {\n // `super(def)` from a user subclass gives `this` a prototype the subclass owns, and installing there would overwrite whatever the subclass declared. `constr` built the instance, so its prototype is the one below the subclass's that should carry the members. A receiver whose chain never reaches that prototype installs on its own, which for a plain object handed straight to `init` means `Object.prototype` — unchanged from before.\n const own = Object.getPrototypeOf(inst);\n const ctorProto = inst._zod.constr.prototype;\n let up = own;\n while (up && up !== ctorProto)\n up = Object.getPrototypeOf(up);\n const target = up ?? own;\n if (!initialized.has(target)) {\n initialized.add(target);\n installMembers(target, protoMembers);\n }\n }\n // support prototype modifications; for-in avoids the array allocation of Object.keys on the (usually empty) prototype\n const proto = _.prototype;\n for (const k in proto) {\n if (!Object.prototype.hasOwnProperty.call(proto, k))\n continue;\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n const inst = params?.Parent ? newError(Definition) : this;\n init(inst, def);\n const deferred = inst._zod.deferred;\n if (deferred) {\n for (const fn of deferred) {\n fn();\n }\n // Released: initializers run once, and the list would otherwise be retained for the schema's lifetime.\n inst._zod.deferred = undefined;\n }\n // Global post-processor hook. Internal: installed by `import \"zod/compile\"` to enable AOT compilation for every constructed schema. Runs last, once the instance is fully built, because it hands the instance to compile(). The post-processor is expected to be reentrancy-guarded by its own implementation.\n const pp = globalThis.__zod_globalConfig?.postProcessor;\n if (pp)\n pp(inst);\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = /*@__PURE__*/ Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\n(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});\nexport const globalConfig = globalThis.__zod_globalConfig;\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n",
84
+ "import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\n/* Computing the message eagerly is expensive (pretty-printed JSON of all\n * issues), so defer it until first read. The accessor functions and\n * descriptors are shared across instances to keep error construction\n * cheap; the computed message is cached on the internals object. The\n * setter preserves plain assignment semantics for consumers that\n * overwrite `message`. */\nfunction _getMessage() {\n const internals = this._zod;\n internals.message ?? (internals.message = JSON.stringify(internals.def, util.jsonStringifyReplacer, 2));\n return internals.message;\n}\nfunction _setMessage(value) {\n this._zod.message = value;\n}\nconst _messageDesc = {\n get: _getMessage,\n set: _setMessage,\n enumerable: true,\n configurable: true,\n};\nconst _zodDesc = { value: undefined, enumerable: false };\nconst _issuesDesc = { value: undefined, enumerable: false };\n/* Prototypes that already carry the lazy `toString`. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n _zodDesc.value = inst._zod;\n Object.defineProperty(inst, \"_zod\", _zodDesc);\n _issuesDesc.value = def;\n Object.defineProperty(inst, \"issues\", _issuesDesc);\n // Clear the shared slots; a retained `value` pins the last error's issues.\n _zodDesc.value = undefined;\n _issuesDesc.value = undefined;\n Object.defineProperty(inst, \"message\", _messageDesc);\n /* `toString` lives as a non-enumerable lazy getter on the shared\n * prototype; on first access it caches a per-instance closure so\n * detached usage still works. */\n const proto = Object.getPrototypeOf(inst);\n if (!_installedToString.has(proto)) {\n _installedToString.add(proto);\n Object.defineProperty(proto, \"toString\", {\n configurable: true,\n enumerable: false,\n get() {\n const value = () => this.message;\n Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n return value;\n },\n set(value) {\n Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n },\n });\n }\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, undefined, {\n Parent: Error,\n});\n/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member\n * (\"toString\", \"constructor\") would otherwise read through to the prototype, and assigning\n * \"__proto__\" would hit the setter instead of creating a key. */\nfunction node(obj, key, make) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n if (key === \"__proto__\") {\n Object.defineProperty(obj, key, { value: make(), writable: true, enumerable: true, configurable: true });\n }\n else {\n obj[key] = make();\n }\n }\n return obj[key];\n}\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n node(fieldErrors, sub.path[0], () => []).push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error, path = []) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n // `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.\n if (el === \"_errors\") {\n if (terminal)\n curr._errors.push(mapper(issue));\n i++;\n continue;\n }\n // A path element may collide with an inherited property name such as\n // \"__proto__\" or \"constructor\". Truthiness checks read the prototype\n // (so no node is created, then ._errors.push throws), and bracket\n // assignment of \"__proto__\" hits the setter instead of creating an\n // own key. Guard the read with hasOwnProperty and create the node\n // with defineProperty so any path element becomes a real own key.\n if (!Object.prototype.hasOwnProperty.call(curr, el)) {\n Object.defineProperty(curr, el, {\n value: { _errors: [] },\n enumerable: true,\n writable: true,\n configurable: true,\n });\n }\n const node = curr[el];\n if (terminal) {\n node._errors.push(mapper(issue));\n }\n curr = node;\n i++;\n }\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n // el may collide with an inherited property name (\"__proto__\",\n // \"constructor\", ...); ??= reads the prototype so the node is never\n // created and curr.errors.push throws. Guard with hasOwnProperty and\n // create the node with defineProperty so \"__proto__\" becomes a real\n // own key rather than invoking the prototype setter.\n if (!Object.prototype.hasOwnProperty.call(curr.properties, el)) {\n Object.defineProperty(curr.properties, el, {\n value: { errors: [] },\n enumerable: true,\n writable: true,\n configurable: true,\n });\n }\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_a = curr.items)[el] ?? (_a[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n",
85
+ "import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\n// Always both keys, so the `_params` read site in `_parse` sees one object shape rather than two.\nfunction finalizeParams(callee, params) {\n return { callee: params?.callee ?? callee, Err: params?.Err };\n}\nexport const _parse = (_Err) => {\n const fn = (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee ?? fn);\n throw e;\n }\n return result.value;\n };\n return fn;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => {\n const fn = async (schema, value, _ctx, params) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee ?? fn);\n throw e;\n }\n return result.value;\n };\n return fn;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\n// registry mirrors of the compiler's sentinels, so this module never imports the compiler\nconst COMPILE_INVALID = /* @__PURE__ */ Symbol.for(\"zod.compile.invalid\");\nconst COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for(\"zod.compile.fallback\");\n// Deliberately tiny, because v8 will not inline a body carrying the fallback's object literals and throw. Everything that is not the compiled happy path lives in validateFallback, and that split is worth ~35% on a compiled schema.\nexport const validate = ((schema, value, _ctx) => {\n const validator = schema._zod.bag.validator;\n if (validator !== undefined && validator(value) !== COMPILE_INVALID)\n return true;\n return validateFallback(schema, value, _ctx);\n});\nfunction validateFallback(schema, value, _ctx) {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const fallbackRun = schema._zod.bag.fallbackRun;\n let result;\n if (fallbackRun) {\n // skip nested fast paths on the fallback, so user callbacks keep the at-most-twice bound\n ctx[COMPILE_FALLBACK] = true;\n result = fallbackRun({ value, issues: [] }, ctx);\n }\n else {\n result = schema._zod.run({ value, issues: [] }, ctx);\n }\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length === 0;\n}\n// no fast path: the compiler keeps async parses on the runtime, because a promise-returning callback that is not declared async compiles to a throw\nexport const validateAsync = async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length === 0;\n};\nexport const _encode = (_Err) => {\n const parse = _parse(_Err);\n const fn = (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return parse(schema, value, ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => {\n const parse = _parse(_Err);\n const fn = (schema, value, _ctx, _params) => {\n return parse(schema, value, _ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => {\n const parseAsync = _parseAsync(_Err);\n const fn = async (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return (await parseAsync(schema, value, ctx, finalizeParams(fn, _params)));\n };\n return fn;\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => {\n const parseAsync = _parseAsync(_Err);\n const fn = async (schema, value, _ctx, _params) => {\n return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n",
86
+ "import * as util from \"./util.js\";\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const cuid = /^[cC][0-9a-z]{6,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\nexport function nanoidOfLength(length) {\n return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);\n}\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?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)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([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})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([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)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[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])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[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])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\n// Single character class, not an alternation: the two properties overlap (U+1F9B0-U+1F9B3), so `(A|B)+` backtracks exponentially on a failed match.\nconst _emoji = `^[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?: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])$/;\nexport const ipv6 = /^(([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}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((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])$/;\nexport const cidrv6 = /^(([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}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{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])?)*\\.?$/;\nexport const domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$/;\nexport const httpProtocol = /^https?$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces) E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// Credit card shape: 12–19 digits, optionally separated by single spaces or single hyphens. ISO/IEC 7812 caps the PAN at 19 digits; 12 is the shortest issued length (Maestro).\nexport const creditCard = /^\\d(?:[ -]?\\d){11,18}$/;\nconst dateSource = `(?:(?:\\\\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])))`;\n/** Anchors a pattern source. The interpolation lives here rather than at the call site because\n * esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it\n * will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */\nfunction anchor(source) {\n return new RegExp(`^${source}$`);\n}\nexport const date = /*@__PURE__*/ anchor(dateSource);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : args.seconds\n ? `${hhmm}:[0-5]\\\\d(?:\\\\.\\\\d+)?`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const opts = [\"Z\"];\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n // RFC 3339 mandates seconds wherever the time carries a `Z` or an offset, so only the unqualified form `local` adds may omit them\n const qualified = `${timeSource({ precision: args.precision, seconds: true })}(?:${opts.join(\"|\")})`;\n const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n",
87
+ "// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\n/** Default `when` for size-based checks: run only on non-nullish values with a `size`. */\nconst _whenHasSize = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n};\n/** Default `when` for length-based checks: run only on non-nullish values with a `length`. */\nconst _whenHasLength = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n};\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin: numericOriginMap[typeof payload.value] ?? origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin: numericOriginMap[typeof payload.value] ?? origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? // `value % 0n` throws, and nothing is a multiple of zero — the number branch already fails this way via NaN\n def.value !== BigInt(0) && payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // Strings are measured in Unicode code points, not UTF-16 units. A code point is at most two units, so a string that already fits in units fits in code points; only an overflow has to be counted.\n const length = typeof input === \"string\" && units > def.maximum ? util.codePointLength(input) : units;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // A code point is one or two UTF-16 units, so fewer units than the floor can never reach it and twice the floor always clears it. Only in between is the exact count in doubt.\n const length = typeof input === \"string\" && units >= def.minimum && units < def.minimum * 2\n ? util.codePointLength(input)\n : units;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // A code point is one or two UTF-16 units, so outside `[length, length * 2]` units the target is missed either way — and missed in the same direction in both measures.\n const length = typeof input === \"string\" && units >= def.length && units <= def.length * 2\n ? util.codePointLength(input)\n : units;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n // `String.prototype.includes(sub, position)` matches `sub` at `position`\n // OR LATER, so the pattern must allow at least `position` leading chars\n // (`{N,}`), not exactly `position` chars (`{N}`).\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n",
88
+ "export class Doc {\n constructor(args = [], closed = {}) {\n this.content = [];\n this.indent = 0;\n this.args = args;\n this.closed = closed;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const content = this?.content ?? [``];\n const factory = new F(...Object.keys(this.closed), `return function (${this.args.join(\", \")}) {\\n${content.join(\"\\n\")}\\n};`);\n return factory(...Object.values(this.closed));\n }\n}\n",
89
+ "export const version = {\n major: 4,\n minor: 5,\n patch: 4,\n};\n",
90
+ "import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const defChecks = inst._zod.def.checks;\n // if inst is itself a checks.$ZodCheck, run it as a check\n const checks = inst._zod.traits.has(\"$ZodCheck\")\n ? [inst, ...(defChecks ?? [])]\n : defChecks?.length\n ? [...defChecks]\n : [];\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n if (payload.memo)\n return payload;\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n if (util.explicitlyAborted(payload))\n continue;\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n util.attachSchema(payload.issues, currLen, inst);\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n util.attachSchema(payload.issues, currLen, inst);\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n}, {\n // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.\n get \"~standard\"() {\n return util.hide(this, \"~standard\", standardProps(this));\n },\n set \"~standard\"(value) {\n util.own(this, \"~standard\", value);\n },\n});\n/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */\nconst toStandardResult = (r) => r.success ? { value: r.data } : { issues: r.error?.issues };\nexport function standardProps(inst) {\n return {\n validate: (value) => {\n try {\n return toStandardResult(safeParse(inst, value));\n }\n catch (_) {\n return safeParseAsync(inst, value).then(toStandardResult);\n }\n },\n vendor: \"zod\",\n version: 1,\n };\n}\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\n/** The `://` guard rejected the input before the URL constructor saw it. */\nexport const URL_BAD_FORMAT = 1;\n/** The URL constructor rejected the input. */\nexport const URL_UNPARSEABLE = 2;\n/** Parses a URL for `$ZodURL`, applying the one guard the URL constructor cannot express. Returns the parsed URL, or a code naming the stage that rejected it — the runtime needs that distinction to pick an issue note, and compiled code only needs to know it is not a URL. */\nexport function parseURLObject(trimmed, def) {\n // When normalize is off, require :// for http/https URLs. This prevents strings like \"http:example.com\" or \"https:/path\" from being silently accepted\n if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\\/\\//i.test(trimmed)) {\n return URL_BAD_FORMAT;\n }\n try {\n // @ts-ignore\n return new URL(trimmed);\n }\n catch {\n return URL_UNPARSEABLE;\n }\n}\nconst asciiTabOrNewline = /[\\t\\n\\r]/g;\n/** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL(\"https://exa\\nmple.com\")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */\nexport function stripTabAndNewline(value) {\n return value.replace(asciiTabOrNewline, \"\");\n}\nexport function urlHostnameOk(url, hostname) {\n hostname.lastIndex = 0;\n return hostname.test(url.hostname);\n}\nexport function urlProtocolOk(url, protocol) {\n protocol.lastIndex = 0;\n return protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol);\n}\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n const url = parseURLObject(trimmed, def);\n if (url === URL_BAD_FORMAT) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid URL format\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n return;\n }\n if (url === URL_UNPARSEABLE) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n return;\n }\n if (def.hostname && !urlHostnameOk(url, def.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n if (def.protocol && !urlProtocolOk(url, def.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n // Set the output value based on normalize flag\n payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n if (def.length !== undefined && (!Number.isInteger(def.length) || def.length < 1))\n throw new Error(`Invalid nanoid length: ${def.length}`);\n def.pattern ?? (def.pattern = def.length === undefined ? regexes.nanoid : regexes.nanoidOfLength(def.length));\n $ZodStringFormat.init(inst, def);\n});\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n // these two drop the offset or seconds `date-time` requires — on the bag not the def, since `z.string().check(...)` lands the format on a different schema\n if (def.local || def.precision === -1) {\n inst._zod.bag.laxFormat = true;\n inst._zod.onattach.push((s) => {\n s._zod.bag.laxFormat = true;\n });\n }\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\n/** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL(\"http://[...]\")` parses an authority, not an address, so `@` and `\\` re-delimit it and `\"::@1\\\\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `\"::1\\n\"` validated as `::1`. */\nconst ipv6Alphabet = /^[0-9a-fA-F:.]+$/;\nexport function isValidIPv6(value) {\n if (!ipv6Alphabet.test(value))\n return false;\n try {\n // @ts-ignore\n new URL(`http://[${value}]`);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n if (!isValidIPv6(payload.value)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport function isValidCIDRv6(value) {\n const parts = value.split(\"/\");\n if (parts.length !== 2)\n return false;\n const [address, prefix] = parts;\n if (!prefix)\n return false;\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n return false;\n if (prefixNum < 0 || prefixNum > 128)\n return false;\n return isValidIPv6(address);\n}\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (!isValidCIDRv6(payload.value)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n // atob ignores whitespace, so reject it up front.\n if (/\\s/.test(data))\n return false;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodCreditCard //////////////////////////////\nconst CC_SANITIZE = /[- ]/g;\n/** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */\nfunction isLuhnAlgo(digits) {\n let length = digits.length;\n let bit = 1;\n let sum = 0;\n while (length) {\n const value = +digits[--length];\n bit ^= 1;\n sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;\n }\n return sum % 10 === 0;\n}\nexport function isValidCreditCard(input) {\n if (!regexes.creditCard.test(input))\n return false;\n return isLuhnAlgo(input.replace(CC_SANITIZE, \"\"));\n}\nexport const $ZodCreditCard = /*@__PURE__*/ core.$constructor(\"$ZodCreditCard\", (inst, def) => {\n // Shape only — the Luhn check below is not expressible as a pattern, so consumers of `pattern` (JSON Schema, template literals) get the length and separator rules alone.\n def.pattern ?? (def.pattern = regexes.creditCard);\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidCreditCard(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"credit_card\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? String(input)\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, optin, optout) {\n const isPresent = key in input;\n const isOptionalOut = optout === \"optional\";\n // The middle rung means \"absence permitted, nothing supplied in its place\", so an absent key contributes nothing — whatever the schema made of `undefined` is invented, not substituted. Only `optional` reaches this with a value: `defaulted` substitutes, and a schema that isn't optional-out has to keep the key.\n if (!isPresent && isOptionalOut && optin === \"optional\") {\n return;\n }\n if (result.issues.length) {\n // For optional-in/out schemas, ignore errors on absent keys.\n if (optin !== undefined && isOptionalOut && !isPresent) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (!isPresent && optin === undefined) {\n if (!result.issues.length) {\n final.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [key],\n });\n }\n return;\n }\n if (result.value === undefined) {\n if (isPresent) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\n// one shared instance; a fresh [] per schema cost 56 bytes retained\nconst NO_SYMBOL_KEYS = [];\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n const ownSymbols = Object.getOwnPropertySymbols(def.shape);\n const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS;\n // aliases `keys` when there are no symbols, so a string-only shape keeps one array\n const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;\n for (const k of allKeys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${String(k)}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n allKeys,\n symbolKeys,\n // string-only: handleCatchall matches it against `for...in`, which never yields a symbol\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const optin = _catchall.optin;\n const optout = _catchall.optout;\n for (const key in input) {\n // Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.\n if (keySet.has(key))\n continue;\n // Don't copy an undeclared __proto__ into the result; assignment to a plain {} would replace the result prototype. But in strict mode it is still an unknown key, so report it before skipping.\n if (key === \"__proto__\") {\n if (t === \"never\")\n unrecognized.push(key);\n continue;\n }\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n }\n else {\n handlePropertyResult(r, payload, key, input, optin, optout);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.\n continue: true,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\n// Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it. Keyed by def, so a def rebuilt by a builder is simply absent rather than inheriting the source's. Read its keys with `Object.keys`, which does not invoke them — that is what lets a discriminated union check its discriminator without resolving an option whose getters reference the union being constructed.\nconst propShapes = new WeakMap();\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n propShapes.set(def, sh);\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n propShapes.set(def, newSh);\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazyInternal(inst, \"propValues\", (zod) => {\n const shape = zod.def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n if (!Object.prototype.hasOwnProperty.call(propValues, key)) {\n util.assignProp(propValues, key, new Set());\n }\n for (const v of field.values)\n propValues[key].add(v);\n // An omittable slot reads back as undefined at a discriminator lookup, so it has to claim undefined: two options that can both omit the key are not discriminable on it.\n if (field.optin !== undefined)\n propValues[key].add(undefined);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.allKeys) {\n if (key === \"__proto__\")\n continue;\n const el = shape[key];\n const optin = el._zod.optin;\n const optout = el._zod.optout;\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n }\n else {\n handlePropertyResult(r, payload, key, input, optin, optout);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const memo = core.globalConfig.memoizer;\n const generateFastpass = (shape) => {\n const normalized = _normalized.value;\n const syms = normalized.symbolKeys;\n // a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope\n const doc = new Doc([\"payload\", \"ctx\"], { shape, inst, memo, syms });\n const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n // Prefixes in place, like util.prefixIssues does for every interpreted path.\n const prefixStr = (id, k) => `\n for (let i = 0; i < ${id}.issues.length; i++) {\n const iss = ${id}.issues[i];\n iss.path = iss.path ? [${k}, ...iss.path] : [${k}];\n payload.issues.push(iss);\n }`;\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.allKeys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);\n for (const key of normalized.allKeys) {\n if (key === \"__proto__\")\n continue;\n const id = ids[key];\n const k = typeof key === \"symbol\" ? `syms[${syms.indexOf(key)}]` : util.esc(key);\n const isPresent = `${k} in input`;\n const schema = shape[key];\n const optin = schema?._zod?.optin;\n const isOptionalIn = optin !== undefined;\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(k)};`);\n if (isOptionalIn && isOptionalOut) {\n // For optional-in/out schemas, ignore errors on absent keys — and, like the interpreted path, drop the value produced alongside them. The middle rung goes further: it permits absence without supplying anything in its place, so an absent key contributes nothing at all.\n const assign = optin === \"optional\" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;\n doc.write(`\n const ${id}_present = ${isPresent};\n if (!${id}.issues.length || ${id}_present) {\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n\n if (${assign}) {\n newResult[${k}] = ${id}.value;\n }\n }\n\n `);\n }\n else if (!isOptionalIn) {\n doc.write(`\n const ${id}_present = ${isPresent};\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n if (!${id}_present && !${id}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${k}]\n });\n }\n\n if (${id}_present) {\n newResult[${k}] = ${id}.value;\n }\n\n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n \n if (${id}.value === undefined) {\n if (${isPresent}) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n\n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n // closing `shape` in is what pays: turbofan specializes the parser against that one shape object, so every `shape[k]._zod.run` folds to a known callee. as a parameter it stays a generic load and measures 13% slower even with the forwarding frame gone\n return doc.compile();\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.options.some((o) => o._zod.optin === \"defaulted\")\n ? \"defaulted\"\n : zod.def.options.some((o) => o._zod.optin !== undefined)\n ? \"optional\"\n : undefined);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazyInternal(inst, \"values\", (zod) => {\n if (zod.def.options.every((o) => o._zod.values)) {\n return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n if (zod.def.options.every((o) => o._zod.pattern)) {\n const patterns = zod.def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const matches = [];\n for (let i = 0; i < results.length; i++) {\n if (results[i].issues.length === 0)\n matches.push(i);\n }\n if (matches.length === 1) {\n final.value = results[matches[0]].value;\n return final;\n }\n if (matches.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n matches,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\n/** Returns the option of `union` whose discriminator claims `value`. */\nexport function getDiscriminatedOption(union, value) {\n const internals = union._zod;\n let map = internals.bag.optionsMap;\n if (!map) {\n map = new Map();\n const { options, discriminator } = internals.def;\n for (const option of options) {\n // First declaration wins, matching the order the parse path resolves a duplicate in.\n for (const v of option._zod.propValues?.[discriminator] ?? [])\n if (!map.has(v))\n map.set(v, option);\n }\n internals.bag.optionsMap = map;\n }\n return map.get(value);\n}\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazyInternal(inst, \"propValues\", (zod) => {\n const propValues = {};\n for (const option of zod.def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${zod.def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!Object.prototype.hasOwnProperty.call(propValues, k)) {\n util.assignProp(propValues, k, new Set());\n }\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n // Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes, lazies, and objects rebuilt by a builder such as `.extend()` — are left to the map.\n def.options.forEach((option, i) => {\n const propShape = propShapes.get(option._zod.def);\n if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {\n throw new Error(`Invalid discriminated union option at index \"${i}\"`);\n }\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n // Fall back to union matching when the fast discriminator path fails:\n // - explicitly enabled via unionFallback, or\n // - during backward direction (encode), since codec-based discriminators have different values in forward vs backward directions\n if (def.unionFallback || ctx.direction === \"backward\") {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n options: Array.from(disc.value.keys()),\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nexport function mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n if (Object.prototype.hasOwnProperty.call(newObj, \"__proto__\"))\n delete newObj.__proto__;\n for (const key of sharedKeys) {\n if (key === \"__proto__\")\n continue;\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key per key.\n const unrecKeys = new Map();\n let unrecIssue;\n const keyIssues = new Map();\n const collect = (iss, side) => {\n let keys;\n if (iss.code === \"unrecognized_keys\" && !iss.path?.length) {\n unrecIssue ?? (unrecIssue = iss);\n keys = iss.keys;\n }\n else if (iss.code === \"invalid_key\" && iss.origin === \"record\" && iss.path?.length === 1) {\n const k = String(iss.path[0]);\n if (!keyIssues.has(k))\n keyIssues.set(k, iss);\n keys = [k];\n }\n else {\n return false;\n }\n for (const k of keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k)[side] = true;\n }\n return true;\n };\n for (const iss of left.issues) {\n if (!collect(iss, \"l\"))\n result.issues.push(iss);\n }\n for (const iss of right.issues) {\n if (!collect(iss, \"r\"))\n result.issues.push(iss);\n }\n // Report only keys rejected by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length) {\n const aggregated = unrecIssue ? bothKeys.filter((k) => unrecIssue.keys.includes(k)) : [];\n if (aggregated.length)\n result.issues.push({ ...unrecIssue, keys: aggregated });\n for (const k of bothKeys) {\n if (!aggregated.includes(k) && keyIssues.has(k))\n result.issues.push(keyIssues.get(k));\n }\n }\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n if (util.aborted(result))\n return result;\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];\n const proms = [];\n const optinStart = getTupleOptStart(items, \"optin\");\n const optoutStart = getTupleOptStart(items, \"optout\");\n if (!def.rest) {\n if (input.length < optinStart) {\n payload.issues.push({\n code: \"too_small\",\n minimum: optinStart,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n if (input.length > items.length) {\n payload.issues.push({\n code: \"too_big\",\n maximum: items.length,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n }\n }\n // Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.\n const itemResults = new Array(items.length);\n for (let i = 0; i < items.length; i++) {\n const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((rr) => {\n itemResults[i] = rr;\n }));\n }\n else {\n itemResults[i] = r;\n }\n }\n if (def.rest) {\n let i = items.length - 1;\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({ value: el, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((r) => handleTupleResult(r, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));\n }\n return handleTupleResults(itemResults, payload, items, input, optoutStart);\n };\n});\nfunction getTupleOptStart(items, key) {\n for (let i = items.length - 1; i >= 0; i--) {\n // optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.\n const omittable = key === \"optin\" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === \"optional\";\n if (!omittable)\n return i + 1;\n }\n return 0;\n}\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nfunction handleTupleResults(itemResults, final, items, input, optoutStart) {\n // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.\n for (let i = 0; i < items.length; i++) {\n const r = itemResults[i];\n const isPresent = i < input.length;\n // The array analog of `handlePropertyResult`'s absent-key early return: the middle rung permits absence without supplying anything in its place, so the tail truncates here instead of materializing whatever the item made of `undefined`.\n if (!isPresent && i >= optoutStart && items[i]._zod.optin === \"optional\") {\n final.value.length = i;\n break;\n }\n if (r.issues.length) {\n if (!isPresent && i >= optoutStart) {\n final.value.length = i;\n break;\n }\n final.issues.push(...util.prefixIssues(i, r.issues));\n }\n final.value[i] = r.value;\n }\n // Drop trailing slots that produced `undefined` for absent input\n // (the array analog of an absent optional key on an object). The\n // `i >= input.length` floor is critical: an explicit `undefined`\n // *inside* the input must be preserved even when the schema is\n // optional-out (e.g. `z.string().or(z.undefined())` accepting an\n // explicit undefined value).\n for (let i = final.value.length - 1; i >= input.length; i--) {\n if (items[i]._zod.optout === \"optional\" && final.value[i] === undefined) {\n final.value.length = i;\n }\n else {\n break;\n }\n }\n return final;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values && !def.partial) {\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n // A declared __proto__ is stripped but is not an unrecognized key.\n if (key === \"__proto__\")\n continue;\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (keyResult.issues.length) {\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n continue;\n }\n const outKey = keyResult.value;\n if (outKey === \"__proto__\")\n continue;\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n if (def.mode === \"loose\") {\n // skip __proto__ so it can't replace the result prototype via the assignment setter on the plain {} we build into\n if (key === \"__proto__\")\n continue;\n payload.value[key] = input[key];\n }\n else {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n continue: true,\n });\n }\n }\n else {\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n // An enumerable key schema declares which keys the record owns, so a key outside the set is unrecognized. A non-enumerable one (regex, refine) is a constraint every key must satisfy, so a failing key is invalid. Only the former is reconcilable against the other side of an intersection.\n let unrecognized;\n // Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n if (!Object.prototype.propertyIsEnumerable.call(input, key))\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key). This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else if (values) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n // the guard above tests the raw input key, but the key schema can normalize an ordinary key into __proto__; re-check the key we actually write under\n const outKey = keyResult.value;\n if (outKey === \"__proto__\")\n continue;\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n continue: true,\n });\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n const patternValues = values.filter((k) => util.propertyKeyTypes.has(typeof k));\n // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n inst._zod.pattern = new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join(\"|\")})$` : \"^[^\\\\s\\\\S]$\");\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = new Set(def.values);\n inst._zod.values = values;\n // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n inst._zod.pattern = new RegExp(def.values.length\n ? `^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`\n : \"^[^\\\\s\\\\S]$\");\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n core.globalConfig.memoizer?.guard(inst);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(payload, result) {\n // A substituting schema that still failed has no usable answer; yield undefined. Its issues are simply dropped: it ran on a payload of its own, so there is no shared array to truncate and nothing of the caller's to lose with it.\n payload.value = result.issues.length ? undefined : result.value;\n return payload;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n // .optional() propagates absence rather than substituting for it, so a defaulted inner keeps its rung.\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n inst._zod.optout = \"optional\";\n util.defineLazyInternal(inst, \"values\", (zod) => {\n const values = zod.def.innerType._zod.values;\n return values ? new Set([...values, undefined]) : undefined;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const pattern = zod.def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (payload.value === undefined) {\n // Only the top rung substitutes a value for absence; everything else leaves it intact, which is what .optional() means.\n if (def.innerType._zod.optin !== \"defaulted\")\n return payload;\n // Its own payload, for the same reason $ZodCatch gets one: a pipe forwards an unrecognized key through the caller's issues array, and this must not read that as the substituting schema failing and drop it.\n const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n if (result instanceof Promise)\n return result.then((result) => handleOptionalResult(payload, result));\n return handleOptionalResult(payload, result);\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n util.defineLazyInternal(inst, \"pattern\", (zod) => zod.def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const pattern = zod.def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazyInternal(inst, \"values\", (zod) => {\n return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"defaulted\";\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"defaulted\";\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => {\n const v = zod.def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nfunction handleCatchResult(payload, result, def, ctx) {\n if (!result.issues.length) {\n payload.value = result.value;\n // The value carries up, so the flag describing it has to carry with it: a back-edge into a node still being parsed must not be frozen by an enclosing readonly, and its checks belong to the node itself. Guarded so the ordinary case adds no own property.\n if (result.memo)\n payload.memo = true;\n return payload;\n }\n // Spread the inner's own payload, not ours: `value` has to stay the input the catch was handed, and the inner ran on a payload of its own so its issues are already private to this call.\n payload.value = def.catchValue({\n ...result,\n value: payload.value,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n return payload;\n}\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleCatchResult(payload, result, def, ctx));\n }\n return handleCatchResult(payload, result, def, ctx);\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n // Any issue stops the pipe, so a failing refinement never feeds its transform. An unrecognized key is the exception: it describes the input's extra properties, not the value being piped, and an enclosing intersection may yet reconcile it.\n if (left.issues.some((iss) => iss.code !== \"unrecognized_keys\")) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodPreprocess = /*@__PURE__*/ core.$constructor(\"$ZodPreprocess\", (inst, def) => {\n $ZodPipe.init(inst, def);\n});\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.innerType._zod.propValues);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType?._zod?.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n // A repeat visit hands back a node that is still being built; freezing it here would make the rest of its keys fail to assign.\n if (!payload.memo)\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n // Defined, not assigned: the classic prototype exposes `_def` as a getter with no setter.\n Object.defineProperty(inst, \"_def\", { value: def });\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n // Defined inline so the closure stays anonymous: binding it to a `const` first names it, which costs 256 bytes per implemented function.\n return Object.defineProperty(function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n }, \"_zod\", { value: inst._zod, enumerable: false });\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return Object.defineProperty(async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n }, \"_zod\", { value: inst._zod, enumerable: false });\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // Cache the resolved inner type on the shared `def` so all clones of this lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance, preserving identity for cycle detection on recursive schemas.\n util.defineLazy(inst._zod, \"innerType\", () => {\n const d = def;\n if (!d._cachedInner)\n d._cachedInner = def.getter();\n return d._cachedInner;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => zod.innerType?._zod?.pattern);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.innerType?._zod?.propValues);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.innerType?._zod?.optin ?? undefined);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n",
91
+ "export class $ZodCyclicError extends Error {\n constructor() {\n super(`Cannot parse a reference cycle that closes through a transform`);\n this.name = \"ZodCyclicError\";\n }\n}\n/** Keyed off the context object every schema in one parse call already shares. */\nconst STATE = \"~memo\";\nconst NO_ISSUES = [];\n// Receivers prefix paths in place, so the cache and every hand-out need their own copies.\nfunction cloneIssues(issues) {\n return issues.map((iss) => (iss.path ? { ...iss, path: iss.path.slice() } : { ...iss }));\n}\nconst recursive = /*@__PURE__*/ new WeakMap();\n/** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */\nfunction isRecursive(inst, stack) {\n const cached = recursive.get(inst);\n if (cached !== undefined)\n return cached;\n // Relative to the walk in progress, so not cached.\n if (stack.has(inst))\n return true;\n stack.add(inst);\n let result = false;\n const check = (child) => {\n if (!result && child?._zod && isRecursive(child, stack))\n result = true;\n };\n const def = inst._zod.def;\n const kind = def.type;\n switch (kind) {\n case \"object\": {\n // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen\n for (const key of Reflect.ownKeys(def.shape))\n check(def.shape[key]);\n check(def.catchall);\n break;\n }\n case \"array\":\n check(def.element);\n break;\n case \"tuple\":\n for (const el of def.items)\n check(el);\n check(def.rest);\n break;\n case \"record\":\n case \"map\":\n check(def.keyType);\n check(def.valueType);\n break;\n case \"set\":\n check(def.valueType);\n break;\n case \"union\":\n for (const el of def.options)\n check(el);\n break;\n case \"intersection\":\n check(def.left);\n check(def.right);\n break;\n case \"optional\":\n case \"nullable\":\n case \"default\":\n case \"prefault\":\n case \"catch\":\n case \"readonly\":\n case \"nonoptional\":\n case \"promise\":\n case \"success\":\n check(def.innerType);\n break;\n case \"pipe\":\n check(def.in);\n check(def.out);\n break;\n case \"function\":\n check(def.input);\n check(def.output);\n break;\n // reading `_zod.innerType` resolves the getter once and caches it\n case \"lazy\":\n check(inst._zod.innerType);\n break;\n // a leaf by choice: `parts` are regex fragments, not data positions\n case \"template_literal\":\n // leaves\n case \"string\":\n case \"number\":\n case \"int\":\n case \"boolean\":\n case \"bigint\":\n case \"symbol\":\n case \"undefined\":\n case \"null\":\n case \"void\":\n case \"never\":\n case \"any\":\n case \"unknown\":\n case \"date\":\n case \"nan\":\n case \"enum\":\n case \"literal\":\n case \"file\":\n case \"transform\":\n case \"custom\":\n break;\n default: {\n // a new built-in kind becomes a compile error here\n kind;\n // a user-defined kind can still hold children, and only its author knows where, so fall back to scanning the def — skipping accessors, since reading one can run user code\n for (const key in def) {\n const desc = Object.getOwnPropertyDescriptor(def, key);\n if (!desc || desc.get)\n continue;\n const value = desc.value;\n if (!value || typeof value !== \"object\")\n continue;\n if (value._zod)\n check(value);\n else if (Array.isArray(value))\n for (const el of value)\n check(el);\n }\n }\n }\n stack.delete(inst);\n recursive.set(inst, result);\n return result;\n}\n/**\n * Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.\n * Exported for `z.compile`, which refuses to compile such a schema: cycle\n * breaking is driven from here off state keyed on the parse context, and a\n * generated fast path has no context to key on.\n */\nexport function isRecursiveSchema(inst) {\n return isRecursive(inst, new Set());\n}\nfunction bucketFor(state, inst) {\n let bucket = state.buckets.get(inst);\n if (!bucket) {\n bucket = new Map();\n state.buckets.set(inst, bucket);\n }\n return bucket;\n}\n// Set immediately before delegating to core and cleared immediately after, so `alloc` registers only for a visit this module is driving.\nlet handoff;\n// Allocated but unfinished entries. `alloc` and the matching pop both happen in the synchronous part of a parse, so they nest even when children are async, and one stack serves every schema.\nconst open = [];\nconst memo = {\n alloc(_inst, payload, empty) {\n const bucket = handoff;\n if (!bucket)\n return empty;\n handoff = undefined;\n const entry = { value: empty, issues: null };\n bucket.set(payload.value, entry);\n open.push(entry);\n return empty;\n },\n guard(inst) {\n var _a;\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred.push(() => {\n const base = inst._zod.parse;\n const wrapped = (payload, ctx) => {\n // The value is a placeholder a back-edge is still waiting on, so the cycle closes through this transform. Its output can't exist in time to bind.\n if (ctx.direction !== \"backward\" && isBackEdge(ctx, payload.value))\n throw new $ZodCyclicError();\n return base(payload, ctx);\n };\n inst._zod.parse = wrapped;\n if (inst._zod.run === base)\n inst._zod.run = wrapped;\n });\n },\n attach(inst) {\n var _a;\n let isRecursiveInst;\n // `bucket` memoized for one parse; a recursive schema is re-entered many times and its bucket never changes\n let lastCtx;\n let lastBucket;\n // Wraps `parse` in a deferred so it sees the container's final parse. Core's own deferred copies `parse` into `run` when there are no checks, and it ran first, so `run` is patched to match; with checks, `run` reads `parse` dynamically.\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred.push(() => {\n const base = inst._zod.parse;\n const wrapped = (payload, ctx) => {\n if (isRecursiveInst === undefined) {\n isRecursiveInst = isRecursive(inst, new Set());\n if (!isRecursiveInst) {\n // Nothing here can ever fire, so take it back out.\n inst._zod.parse = base;\n if (inst._zod.run === wrapped)\n inst._zod.run = base;\n return base(payload, ctx);\n }\n }\n const input = payload.value;\n if (input === null || typeof input !== \"object\")\n return base(payload, ctx);\n let state = ctx[STATE];\n if (!state) {\n state = { buckets: new Map(), backEdges: undefined };\n ctx[STATE] = state;\n }\n let bucket;\n if (lastCtx === ctx) {\n bucket = lastBucket;\n }\n else {\n bucket = bucketFor(state, inst);\n lastCtx = ctx;\n lastBucket = bucket;\n }\n const hit = bucket.get(input);\n if (hit) {\n payload.value = hit.value;\n if (hit.issues) {\n if (hit.issues.length)\n payload.issues.push(...cloneIssues(hit.issues));\n }\n else {\n // Still being parsed: its own checks cover it, so skip them here.\n payload.memo = true;\n state.backEdges ?? (state.backEdges = new Set());\n state.backEdges.add(hit.value);\n }\n return payload;\n }\n handoff = bucket;\n const depth = open.length;\n const result = base(payload, ctx);\n handoff = undefined;\n // A container that rejected its input outright allocated nothing.\n const entry = open.length > depth ? open.pop() : undefined;\n // Both paths written out so the sync one allocates no closure. It runs once per node, and capturing here cost more than everything else combined.\n if (result instanceof Promise) {\n return result.then((r) => {\n if (entry)\n entry.issues = r.issues.length ? cloneIssues(r.issues) : NO_ISSUES;\n return r;\n });\n }\n if (entry)\n entry.issues = result.issues.length ? cloneIssues(result.issues) : NO_ISSUES;\n return result;\n };\n inst._zod.parse = wrapped;\n if (inst._zod.run === base)\n inst._zod.run = wrapped;\n });\n },\n};\n/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */\nexport function memoizer() {\n return memo;\n}\n/** Whether this value is a node a back-edge resolved to before it finished. */\nexport function isBackEdge(ctx, value) {\n const backEdges = ctx[STATE]?.backEdges;\n return backEdges !== undefined && value !== null && typeof value === \"object\" && backEdges.has(value);\n}\n",
92
+ "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n credit_card: \"credit card number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n function getTypeName(type, input) {\n if (type === \"number\" && typeof input === \"number\" && !Number.isFinite(input)) {\n return String(input);\n }\n return TypeDictionary[type] ?? type;\n }\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = getTypeName(issue.expected);\n const receivedType = util.parsedType(issue.input);\n const received = getTypeName(receivedType, issue.input);\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {\n const opts = issue.options.map((o) => `'${o}'`).join(\" | \");\n return `Invalid discriminator value. Expected ${opts}`;\n }\n if (issue.inclusive === false) {\n return \"Invalid input: more than one option matched\";\n }\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n",
93
+ "var _a;\nexport const $output = /*@__PURE__*/ Symbol(\"ZodOutput\");\nexport const $input = /*@__PURE__*/ Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n",
94
+ "import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link _cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _creditCard(Class, params) {\n return new Class({\n type: \"string\",\n format: \"credit_card\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _properties(shape) {\n return Object.entries(shape).map(([property, schema]) => new checks.$ZodCheckProperty({ check: \"property\", property, schema }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options: options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : util.constantCatch(catchValue)),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn, params) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n if (!(\"input\" in _issue))\n _issue.input = payload.value;\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n }, params);\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n codec._zod.bag.truthy = truthyArray;\n codec._zod.bag.falsy = falsyArray;\n codec._zod.bag.case = params.case ?? \"insensitive\";\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n",
95
+ "import { globalRegistry } from \"./registries.js\";\nimport { assignProp } from \"./util.js\";\nfunction assignProps(target, ...sources) {\n for (const source of sources) {\n for (const key of Reflect.ownKeys(source)) {\n if (Object.prototype.propertyIsEnumerable.call(source, key)) {\n assignProp(target, key, source[key]);\n }\n }\n }\n return target;\n}\n// function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n sharedDefsExtractedFor: undefined,\n sharedEmitDoneFor: undefined,\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n intersections: [],\n deferred: [],\n external: params?.external ?? undefined,\n };\n}\n/**\n * Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws\n * `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a\n * custom JSON Schema was written into `json`, in which case the caller must not write its own.\n */\nexport function handleUnrepresentable(schema, ctx, json, params, message) {\n const result = typeof ctx.unrepresentable === \"function\"\n ? ctx.unrepresentable({ zodSchema: schema, path: params.path, message })\n : ctx.unrepresentable;\n if (result === \"any\")\n return false;\n if (result === undefined || result === \"throw\")\n throw new Error(message);\n Object.assign(json, result);\n return true;\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n ctx.sharedDefsExtractedFor = undefined;\n ctx.sharedEmitDoneFor = undefined;\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n assignProps(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && \"_prefault\" in result.schema)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\n// Escape a reference token for use in a JSON Pointer fragment (RFC 6901): `~` becomes `~0` and `/` becomes `~1`. The `~` replacement must run first.\nfunction encodeJSONPointerSegment(segment) {\n return segment.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // With `external` set, every registered schema resolves through the external branch of `makeURI`, so the root branch below produces the same ref the external branch would — this pass is identical whichever schema it is called with, and only needs to run once.\n if (ctx.external && ctx.sharedDefsExtractedFor === ctx.external)\n return;\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes multiple schemas map to the same seen object. e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${encodeJSONPointerSegment(id)}` };\n }\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n // an id-less root has nowhere to be extracted to, so it stays inline and self-references as `#`\n if (entry[1] === root && !entry[1].schema.id) {\n return { ref: uriPrefix };\n }\n // self-contained schema\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + encodeJSONPointerSegment(defId) };\n };\n // stored cached version in `def` property remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/<root>` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n if (ctx.external)\n ctx.sharedDefsExtractedFor = ctx.external;\n}\n/** Rewrites `anyOf: [{type: \"a\"}, {type: \"b\"}]` to `type: [\"a\", \"b\"]`, which every JSON Schema draft treats as equivalent and most consumers render far better for the nullable case. Only branches that are a bare type assertion qualify — anything carrying a constraint, `$ref`, `const` or metadata is left alone. Runs after `flattenRef`, so a branch an override decorated or `$defs` extraction turned into a `$ref` is no longer bare and correctly stays in `anyOf`. `oneOf` is excluded: `integer` and `number` overlap, so \"exactly one\" and \"at least one\" are not the same there. OpenAPI 3.0 is excluded: its `type` must be a single string. */\nfunction compactTypeUnion(schema) {\n const options = schema.anyOf;\n if (!Array.isArray(options) || options.length === 0 || schema.type !== undefined)\n return;\n const types = [];\n for (const option of options) {\n if (!option || typeof option !== \"object\")\n return;\n // A branch that is itself a compactible union folds into this one — nested `anyOf` and a flat `type` array say the same thing. Compacting it first also makes the result independent of the order this pass walks the seen map in.\n compactTypeUnion(option);\n const keys = Object.keys(option);\n if (keys.length !== 1 || keys[0] !== \"type\")\n return;\n const type = option.type;\n for (const member of Array.isArray(type) ? type : [type]) {\n if (typeof member !== \"string\")\n return;\n if (!types.includes(member))\n types.push(member);\n }\n }\n delete schema.anyOf;\n // A `type` array must be non-empty and unique (metaschema); a single member is spelled as a bare string.\n schema.type = types.length === 1 ? types[0] : types;\n}\n/** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,\n * an annotation like `description` — makes a member unfoldable, so a constraint this does not\n * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */\nconst FOLDABLE_KEYS = new Set([\"type\", \"properties\", \"required\", \"additionalProperties\"]);\nconst UNION_KEYS = [\"oneOf\", \"anyOf\"];\n/** A member's constraint on a key it does not declare itself. A `catchall` states one; `false`, an absent `additionalProperties`, and the empty schema a loose object emits state nothing. */\nfunction undeclaredConstraint(member) {\n const extra = member.additionalProperties;\n if (extra === undefined || extra === false || typeof extra !== \"object\" || extra === null)\n return null;\n return Object.keys(extra).length ? extra : null;\n}\n/** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */\nfunction foldObjects(members) {\n const objects = [];\n for (const member of members) {\n // A boolean subschema is legal JSON Schema and carries no keywords to fold.\n if (typeof member !== \"object\" || member.type !== \"object\")\n return null;\n for (const key in member) {\n if (!FOLDABLE_KEYS.has(key))\n return null;\n }\n objects.push(member);\n }\n const properties = {};\n const required = new Set();\n for (const object of objects) {\n for (const key in object.properties) {\n // `in` would report a `__proto__` key as already present via the prototype chain and skip it.\n if (Object.prototype.hasOwnProperty.call(properties, key))\n continue;\n // Every member constrains this key: the ones that declare it say how, and a `catchall` member constrains it too even though it does not name it. The key has to satisfy all of them, which is the same intersection one level down.\n const parts = [];\n for (const other of objects) {\n const part = other.properties?.[key] ?? undeclaredConstraint(other);\n if (part === null || part === undefined)\n continue;\n if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part)))\n parts.push(part);\n }\n const merged = parts.length === 1\n ? parts[0]\n : (foldObjects(parts) ?? { allOf: parts });\n assignProp(properties, key, merged);\n }\n for (const key of object.required ?? [])\n required.add(key);\n }\n const folded = { type: \"object\", properties };\n if (required.size)\n folded.required = [...required];\n // A key no member declares is rejected only when every member rejects it, so the fold is closed only when every member is. Otherwise it carries whatever the `catchall` members demand of such a key.\n if (objects.every((object) => object.additionalProperties === false)) {\n folded.additionalProperties = false;\n }\n else {\n const constraints = [];\n for (const object of objects) {\n const constraint = undeclaredConstraint(object);\n if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint)))\n constraints.push(constraint);\n }\n if (constraints.length === 1)\n folded.additionalProperties = constraints[0];\n else if (constraints.length > 1)\n folded.additionalProperties = { allOf: constraints };\n }\n return folded;\n}\n/** `additionalProperties` in an `allOf` member sees only that member's own `properties`, so two\n * closed object members reject each other's keys and the schema validates nothing. Zod's parser\n * pools the key sets instead — `handleIntersectionResults` reports a key as unrecognized only when\n * *every* side rejects it — so the emitted schema has to pool them too, and folding the members\n * into one object is the encoding that says so on every target.\n *\n * This runs from `finalize`, after `extractDefs`, which is what keeps it clear of the `$ref`\n * machinery: a member extracted into `$defs` is already a `$ref` by now and declines to fold, so it\n * keeps its reference and its own closedness rather than being inlined as a stale copy. */\nfunction foldIntersection(json) {\n const allOf = json.allOf;\n if (!Array.isArray(allOf) || allOf.length < 2)\n return;\n // An `override` runs before this pass and may have written object keywords onto the intersection itself. Those are deliberate, so decline rather than overwrite them.\n for (const key of FOLDABLE_KEYS)\n if (key in json)\n return;\n // An intersection distributes over a union: `A & (X | Y)` is `(A & X) | (A & Y)`. Only the first union is distributed over; a second one stays among the members every branch folds against, where it fails the object check and declines the whole intersection rather than multiplying out.\n const unions = allOf.filter((m) => UNION_KEYS.some((k) => Array.isArray(m[k])));\n let folded = null;\n if (!unions.length) {\n folded = foldObjects(allOf);\n }\n else {\n const union = unions[0];\n const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));\n if (Object.keys(union).length !== 1)\n return;\n const rest = allOf.filter((m) => m !== union);\n const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));\n if (branches.some((b) => !b))\n return;\n folded = { [keyword]: branches };\n }\n if (!folded)\n return;\n delete json.allOf;\n assignProps(json, folded);\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n assignProps(schema, refSchema);\n }\n // restore child's own properties (child wins)\n assignProps(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema. This handles cases like: readonly().meta({id}).describe() where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n // Flattening walks the whole map and clears each `ref` as it goes, so a second call over the same map is a no-op scan. Skip it outright once it has run for a registry conversion.\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n if (ctx.target !== \"openapi-3.0\") {\n for (const entry of ctx.seen.entries()) {\n compactTypeUnion(entry[1].def ?? entry[1].schema);\n }\n }\n for (const rewrite of ctx.deferred)\n rewrite();\n // After flattening, every member that was extracted is a `$ref`, so the fold sees the final shape. A schema that inherits an intersection — through `z.lazy`, or any `ref` chain — holds the same `allOf` array, so fold by array identity to catch every copy.\n if (ctx.intersections.length) {\n const carriers = new Map();\n for (const seen of ctx.seen.values()) {\n for (const json of [seen.schema, seen.def]) {\n const allOf = json?.allOf;\n if (!Array.isArray(allOf))\n continue;\n const existing = carriers.get(allOf);\n if (existing)\n existing.push(json);\n else\n carriers.set(allOf, [json]);\n }\n }\n for (const allOf of ctx.intersections) {\n for (const json of carriers.get(allOf) ?? [])\n foldIntersection(json);\n }\n }\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n // when the root was extracted into $defs, `root.schema` is the `$ref` wrapper and `root.def` is the body that now lives under $defs\n assignProps(result, root.defId ? root.schema : (root.def ?? root.schema));\n // The `id` in `.meta()` is a Zod-specific registration tag used to extract schemas into $defs — it is not user-facing JSON Schema metadata. Strip it from the output body where it would otherwise leak. The id is preserved implicitly via the $defs key (and via $ref paths).\n const rootMetaId = ctx.metadataRegistry.get(schema)?.id;\n if (rootMetaId !== undefined && result.id === rootMetaId)\n delete result.id;\n // build defs object. With `external`, `defs` is the shared object every schema writes into, so the same entries are reassigned on every call. Without it, `defs` is fresh per call and must be rebuilt.\n const defs = ctx.external?.defs ?? {};\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n if (seen.def.id === seen.defId)\n delete seen.def.id;\n assignProp(defs, seen.defId, seen.def);\n }\n }\n }\n if (ctx.external)\n ctx.sharedEmitDoneFor = ctx.external;\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed each call to finalize() is functionally independent though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\" ||\n def.type === \"catch\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n if (_schema._zod.traits.has(\"$ZodCodec\"))\n return true;\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n",
96
+ "import * as regexes from \"./regexes.js\";\nimport { extractDefs, finalize, handleUnrepresentable, initializeContext, process, } from \"./to-json-schema.js\";\nimport { assignProp, getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // `z.iso.time()` is never full-time, and `laxFormat` carries the datetime shapes that also accept what their keyword forbids\n if (format === \"time\" || laxFormat) {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const patternList = [...patterns];\n if (patternList.length === 1)\n json.pattern = patternList[0].source;\n else if (patternList.length > 1) {\n json.allOf = [\n ...patternList.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n // when both minimum and exclusiveMinimum exist, pick the more restrictive one\n const exMin = typeof exclusiveMinimum === \"number\" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);\n const exMax = typeof exclusiveMaximum === \"number\" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);\n const legacy = ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\";\n if (exMin) {\n if (legacy) {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n else if (typeof minimum === \"number\") {\n json.minimum = minimum;\n }\n if (exMax) {\n if (legacy) {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n else if (typeof maximum === \"number\") {\n json.maximum = maximum;\n }\n if (typeof multipleOf === \"number\") {\n // JSON Schema requires a divisor strictly greater than zero, and a non-finite one does not survive JSON at all. A negative divisor accepts exactly what its absolute value accepts, so it still maps; zero, NaN and Infinity have no keyword form.\n if (Number.isFinite(multipleOf) && multipleOf !== 0)\n json.multipleOf = Math.abs(multipleOf);\n else\n handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${multipleOf} cannot be represented in JSON Schema`);\n }\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"BigInt cannot be represented in JSON Schema\");\n};\nexport const symbolProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Symbols cannot be represented in JSON Schema\");\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Undefined cannot be represented in JSON Schema\");\n};\nexport const voidProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Void cannot be represented in JSON Schema\");\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Date cannot be represented in JSON Schema\");\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // an empty enum accepts nothing, same as z.never()\n if (values.length === 0) {\n json.not = {};\n return;\n }\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // a literal with no values accepts nothing, same as z.never()\n if (def.values.length === 0) {\n json.not = {};\n return;\n }\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n // a custom schema replaces the whole literal, so there is nothing left to accumulate\n if (handleUnrepresentable(schema, ctx, json, params, \"Literal `undefined` cannot be represented in JSON Schema\"))\n return;\n // otherwise do not add to vals\n }\n else if (typeof val === \"bigint\") {\n if (handleUnrepresentable(schema, ctx, json, params, \"BigInt literals cannot be represented in JSON Schema\"))\n return;\n vals.push(Number(val));\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"NaN cannot be represented in JSON Schema\");\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Custom types cannot be represented in JSON Schema\");\n};\nexport const functionProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Function types cannot be represented in JSON Schema\");\n};\nexport const transformProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Transforms cannot be represented in JSON Schema\");\n};\nexport const mapProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Map cannot be represented in JSON Schema\");\n};\nexport const setProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Set cannot be represented in JSON Schema\");\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, {\n ...params,\n path: [...params.path, \"items\"],\n });\n};\n// Transform and catch set `optin = \"optional\"` at runtime so the parser lets them observe an\n// absent key, but their declared input type stays required. An input JSON Schema describes the\n// declared type, so resolve past them to the schema that actually carries the optionality.\n// Used by both `objectProcessor` (for `required`) and `tupleProcessor` (for `minItems`); see\n// wiki/optionality.md, \"The JSON Schema emitter reads the *static* value\".\nfunction inputOptin(schema) {\n const def = schema._zod.def;\n if (def.type === \"pipe\" && def.in._zod.traits.has(\"$ZodTransform\")) {\n return inputOptin(def.out);\n }\n if (def.type === \"catch\") {\n return inputOptin(def.innerType);\n }\n return schema._zod.optin;\n}\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const shape = def.shape;\n // dropping it while still emitting `additionalProperties: false` would emit a schema that rejects data this one requires\n const symbolKeys = Object.getOwnPropertySymbols(shape);\n if (symbolKeys.length &&\n handleUnrepresentable(schema, ctx, json, params, \"Symbol keys cannot be represented in JSON Schema\")) {\n return;\n }\n json.type = \"object\";\n json.properties = {};\n for (const key in shape) {\n // assignProp so a __proto__ key becomes an own property instead of hitting the inherited setter on the plain {} we build into\n assignProp(json.properties, key, process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n }));\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const field = def.shape[key];\n if (ctx.io === \"input\") {\n return inputOptin(field) === undefined;\n }\n else {\n return field._zod.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches). This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n // Recorded innermost first, so a nested intersection has already folded by the time this one is considered. The array is the handle rather than the schema, because a wrapper that inherits this schema shares the same array; `finalize` folds every object holding it. See `foldIntersection`.\n ctx.intersections.push(allOf);\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n let minItems = def.items.length;\n while (minItems > 0) {\n const item = def.items[minItems - 1];\n const optional = ctx.io === \"input\" ? inputOptin(item) !== undefined : item._zod.optout === \"optional\";\n if (!optional)\n break;\n minItems--;\n }\n const maxItems = def.items.length;\n const isClosed = !def.rest;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (isClosed) {\n json.items = false;\n }\n else if (rest) {\n json.items = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else {\n json.items = prefixItems;\n if (isClosed) {\n json.additionalItems = false;\n }\n else if (rest) {\n json.additionalItems = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n // explicit user-defined length checks take precedence\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\n/** JSON object keys are always strings, so a numeric record key schema is re-expressed over the\n * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key\n * behind a wrapper only carries its own `type` before then, and a union key only has its branches.\n *\n * A numeric bound cannot apply to a property name, so `minimum` and its siblings are dropped rather\n * than carried over: keeping them beside `type: \"string\"` reproduces the match-nothing schema this\n * exists to fix. A key that carries one therefore emits wider than the record parses — `z.record(z.number().min(5), V)`\n * accepts `\"3\"` — which is the deliberate trade, since throwing on it would reject an ordinary schema\n * outright. */\nfunction stringifyKeyNames(bySchema, json, visited) {\n // an extracted key that rewrites cannot go on sharing its definition — the string form a key position needs is not the number form every other reference wants — so it inlines. One that does not rewrite keeps the `$ref`.\n if (json.$ref) {\n // a recursive key holds its own reference inside its definition, so a node already on the path is left alone rather than resolved again\n if (visited.has(json))\n return json;\n visited.add(json);\n const def = bySchema.get(json)?.def;\n if (!def)\n return json;\n const inlined = stringifyKeyNames(bySchema, def, visited);\n return inlined === def ? json : inlined;\n }\n for (const keyword of [\"anyOf\", \"oneOf\"]) {\n const branches = json[keyword];\n if (!Array.isArray(branches))\n continue;\n const mapped = branches.map((branch) => stringifyKeyNames(bySchema, branch, visited));\n // rebuilding regardless would detach a key that had nothing to re-express, dropping its `$ref` and leaking the internal `id`\n if (mapped.some((branch, i) => branch !== branches[i]))\n json = { ...json, [keyword]: mapped };\n }\n // a member that already admits a string leaves the key unconstrained, so the node's own type re-expresses only when every member is numeric\n const types = Array.isArray(json.type) ? json.type : [json.type];\n const numericType = !types.includes(\"string\") && types.some((t) => t === \"number\" || t === \"integer\");\n // a heterogeneous key carries no type at all, so its numeric members are caught here instead\n const values = json.enum ?? (json.const !== undefined ? [json.const] : undefined);\n if (!numericType && !values?.some((v) => typeof v === \"number\"))\n return json;\n const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;\n if (rest.enum)\n rest.enum = rest.enum.map((v) => (typeof v === \"number\" ? String(v) : v));\n else if (typeof rest.const === \"number\")\n rest.const = String(rest.const);\n // a heterogeneous key keeps its absent type: the stringified members already say what a key may be\n if (!numericType)\n return rest;\n rest.type = \"string\";\n if (!values)\n rest.pattern = (types.includes(\"number\") ? regexes.number : regexes.integer).source;\n return rest;\n}\n/** Every record of one conversion, so the carriers are found in a single pass rather than once per record. */\nconst pendingRecords = new WeakMap();\nfunction rewriteKeyNames(ctx) {\n // an extracted key is resolved by the object `extractToDef` left in its place, so the map is built once rather than searched per reference. `_zod.toJSONSchema` can hand the same object to two schemas, so the first entry carrying a body wins, as a search would have found it.\n const bySchema = new Map();\n for (const entry of ctx.seen.values()) {\n if (entry.def && !bySchema.has(entry.schema))\n bySchema.set(entry.schema, entry);\n }\n const rewrites = new Map();\n for (const record of pendingRecords.get(ctx) ?? []) {\n const seen = ctx.seen.get(record);\n const names = (seen?.def ?? seen?.schema)?.propertyNames;\n if (!names || names === true || rewrites.has(names))\n continue;\n const rewritten = stringifyKeyNames(bySchema, names, new Set());\n if (rewritten !== names)\n rewrites.set(names, rewritten);\n }\n if (!rewrites.size)\n return;\n // the flatten has already copied each record's own properties onto every wrapper by reference, and an extracted body is another such copy, so every carrier holding a rewritten key is updated together\n for (const entry of ctx.seen.values()) {\n for (const carrier of [entry.schema, entry.def]) {\n const rewritten = carrier && rewrites.get(carrier.propertyNames);\n if (rewritten)\n carrier.propertyNames = rewritten;\n }\n }\n}\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties. This correctly represents \"only validate keys matching the pattern\" semantics and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n assignProp(json.patternProperties, pattern.source, valueSchema);\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n let pending = pendingRecords.get(ctx);\n if (!pending) {\n pending = [];\n pendingRecords.set(ctx, pending);\n ctx.deferred.push(() => rewriteKeyNames(ctx));\n }\n pending.push(schema);\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n // Every key shares one value schema, so an optional-in value makes the whole key set omittable on input. Output keeps them: the exhaustive branch assigns every key, even one whose value came back undefined.\n const omittableOnInput = ctx.io === \"input\" && inputOptin(def.valueType) !== undefined;\n if (keyValues && !def.partial && !omittableOnInput) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues.map(String);\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\n/** Round-trips a default value through JSON so the emitted schema is guaranteed to be valid JSON.\n * A BigInt has no reliable encoding, so it goes through `unrepresentable` like any other\n * unrepresentable value. Returns a sentinel when the caller must not write a default of its own. */\nconst UNREPRESENTABLE_DEFAULT = Symbol();\nfunction serializeDefaultValue(value, schema, ctx, json, params) {\n let unrepresentable = false;\n const serialized = JSON.stringify(value, (_, val) => {\n if (typeof val !== \"bigint\")\n return val;\n unrepresentable = true;\n return null;\n });\n if (!unrepresentable)\n return JSON.parse(serialized);\n handleUnrepresentable(schema, ctx, json, params, \"BigInt defaults cannot be represented in JSON Schema\");\n return UNREPRESENTABLE_DEFAULT;\n}\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json.default = value;\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io !== \"input\")\n return;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json._prefault = value;\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n handleUnrepresentable(schema, ctx, json, params, \"Dynamic catch values are not supported in JSON Schema\");\n return;\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const inIsTransform = def.in._zod.traits.has(\"$ZodTransform\");\n const innerType = ctx.io === \"input\" ? (inIsTransform ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n assignProp(schemas, key, finalize(ctx, schema));\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n",
97
+ "import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\n/* Prototypes that already carry the lazy helper methods. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\n/* Helper methods live as non-enumerable lazy getters on the shared\n * prototype instead of own properties on every instance. On first\n * access the getter allocates the per-instance closure and caches it\n * as a non-enumerable own property, so detached usage still works and\n * the allocation only happens for methods actually touched. */\nfunction _lazyMethod(proto, key, make) {\n Object.defineProperty(proto, key, {\n configurable: true,\n enumerable: false,\n get() {\n const value = make(this);\n Object.defineProperty(this, key, { value, configurable: true, writable: true });\n return value;\n },\n set(value) {\n Object.defineProperty(this, key, { value, configurable: true, writable: true });\n },\n });\n}\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n const proto = Object.getPrototypeOf(inst);\n if (_installedErrorProtos.has(proto))\n return;\n _installedErrorProtos.add(proto);\n _lazyMethod(proto, \"format\", (self) => (mapper) => core.formatError(self, mapper));\n _lazyMethod(proto, \"flatten\", (self) => (mapper) => core.flattenError(self, mapper));\n _lazyMethod(proto, \"addIssue\", (self) => (issue) => {\n self.issues.push(issue);\n self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n });\n _lazyMethod(proto, \"addIssues\", (self) => (issues) => {\n self.issues.push(...issues);\n self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n });\n Object.defineProperty(proto, \"isEmpty\", {\n configurable: true,\n enumerable: false,\n get() {\n return this.issues.length === 0;\n },\n });\n};\nexport const ZodError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer, undefined, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n",
98
+ "import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\nexport { validate, validateAsync } from \"../core/index.js\";\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n",
99
+ "import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport en from \"../locales/en.js\";\nimport * as checks from \"./checks.js\";\nimport * as parse from \"./parse.js\";\n// Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.\nfunction _ensureDefaultLocale() {\n if (!core.globalConfig.localeError)\n core.config(en());\n}\n// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first\nfunction _ensureDefaultMemoizer() {\n if (!core.globalConfig.memoizer)\n core.config({ memoizer: core.memoizer() });\n}\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n _ensureDefaultLocale();\n core.$ZodType.init(inst, def);\n inst.def = def;\n inst.type = def.type;\n return inst;\n}, {\n check(...chks) {\n const def = this.def;\n return this.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...chks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), { parent: true });\n },\n with(...chks) {\n return this.check(...chks);\n },\n clone(def, params) {\n return core.clone(this, def, params);\n },\n brand() {\n return this;\n },\n register(reg, meta) {\n reg.add(this, meta);\n return this;\n },\n refine(check, params) {\n return this.check(refine(check, params));\n },\n superRefine(refinement, params) {\n return this.check(superRefine(refinement, params));\n },\n overwrite(fn) {\n return this.check(checks.overwrite(fn));\n },\n optional() {\n return optional(this);\n },\n exactOptional() {\n return exactOptional(this);\n },\n nullable() {\n return nullable(this);\n },\n nullish() {\n return optional(nullable(this));\n },\n nonoptional(params) {\n return nonoptional(this, params);\n },\n array() {\n return array(this);\n },\n or(arg) {\n return union([this, arg]);\n },\n and(arg) {\n return intersection(this, arg);\n },\n transform(tx) {\n return pipe(this, transform(tx));\n },\n default(d) {\n return _default(this, d);\n },\n prefault(d) {\n return prefault(this, d);\n },\n catch(params) {\n return _catch(this, params);\n },\n pipe(target) {\n return pipe(this, target);\n },\n readonly() {\n return readonly(this);\n },\n describe(description) {\n const cl = this.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n },\n meta(...args) {\n // overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.\n if (args.length === 0)\n return core.globalRegistry.get(this);\n const cl = this.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n },\n isOptional() {\n return this.safeParse(undefined).success;\n },\n isNullable() {\n return this.safeParse(null).success;\n },\n apply(fn, ...args) {\n return args.length === 0 ? fn(this) : fn(this, ...args);\n },\n // Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.\n get \"~standard\"() {\n return util.hide(this, \"~standard\", {\n ...core.standardProps(this),\n jsonSchema: {\n input: createStandardJSONSchemaMethod(this, \"input\"),\n output: createStandardJSONSchemaMethod(this, \"output\"),\n },\n });\n },\n set \"~standard\"(value) {\n util.own(this, \"~standard\", value);\n },\n parse: function _parse(data, params) {\n return parse.parse(this, data, params, { callee: _parse });\n },\n parseAsync: async function _parseAsync(data, params) {\n return await parse.parseAsync(this, data, params, { callee: _parseAsync });\n },\n safeParse(data, params) {\n return parse.safeParse(this, data, params);\n },\n async safeParseAsync(data, params) {\n return parse.safeParseAsync(this, data, params);\n },\n // `spa` is an alias: same function object as `safeParseAsync`, as before.\n get spa() {\n return this?.safeParseAsync;\n },\n set spa(value) {\n util.own(this, \"spa\", value);\n },\n encode: function _encode(data, params) {\n return parse.encode(this, data, params, { callee: _encode });\n },\n decode: function _decode(data, params) {\n return parse.decode(this, data, params, { callee: _decode });\n },\n encodeAsync: async function _encodeAsync(data, params) {\n return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });\n },\n decodeAsync: async function _decodeAsync(data, params) {\n return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });\n },\n safeEncode(data, params) {\n return parse.safeEncode(this, data, params);\n },\n safeDecode(data, params) {\n return parse.safeDecode(this, data, params);\n },\n async safeEncodeAsync(data, params) {\n return parse.safeEncodeAsync(this, data, params);\n },\n async safeDecodeAsync(data, params) {\n return parse.safeDecodeAsync(this, data, params);\n },\n toJSONSchema(params) {\n return createToJSONSchemaMethod(this, {})(params);\n },\n // Reads through to the registry on every access, so it must not cache.\n get description() {\n return core.globalRegistry.get(this)?.description;\n },\n // No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.\n get _def() {\n return this._zod.def;\n },\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n}, {\n regex(...args) {\n return this.check(checks.regex(...args));\n },\n includes(...args) {\n return this.check(checks.includes(...args));\n },\n startsWith(...args) {\n return this.check(checks.startsWith(...args));\n },\n endsWith(...args) {\n return this.check(checks.endsWith(...args));\n },\n min(...args) {\n return this.check(checks.minLength(...args));\n },\n max(...args) {\n return this.check(checks.maxLength(...args));\n },\n length(...args) {\n return this.check(checks.length(...args));\n },\n nonempty(...args) {\n return this.check(checks.minLength(1, ...args));\n },\n lowercase(params) {\n return this.check(checks.lowercase(params));\n },\n uppercase(params) {\n return this.check(checks.uppercase(params));\n },\n trim() {\n return this.check(checks.trim());\n },\n normalize(...args) {\n return this.check(checks.normalize(...args));\n },\n toLowerCase() {\n return this.check(checks.toLowerCase());\n },\n toUpperCase() {\n return this.check(checks.toUpperCase());\n },\n slugify() {\n return this.check(checks.slugify());\n },\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n}, {\n email(params) {\n return this.check(core._email(ZodEmail, params));\n },\n url(params) {\n return this.check(core._url(ZodURL, params));\n },\n jwt(params) {\n return this.check(core._jwt(ZodJWT, params));\n },\n emoji(params) {\n return this.check(core._emoji(ZodEmoji, params));\n },\n guid(params) {\n return this.check(core._guid(ZodGUID, params));\n },\n uuid(params) {\n return this.check(core._uuid(ZodUUID, params));\n },\n uuidv4(params) {\n return this.check(core._uuidv4(ZodUUID, params));\n },\n uuidv6(params) {\n return this.check(core._uuidv6(ZodUUID, params));\n },\n uuidv7(params) {\n return this.check(core._uuidv7(ZodUUID, params));\n },\n nanoid(params) {\n return this.check(core._nanoid(ZodNanoID, params));\n },\n cuid(params) {\n return this.check(core._cuid(ZodCUID, params));\n },\n cuid2(params) {\n return this.check(core._cuid2(ZodCUID2, params));\n },\n ulid(params) {\n return this.check(core._ulid(ZodULID, params));\n },\n base64(params) {\n return this.check(core._base64(ZodBase64, params));\n },\n base64url(params) {\n return this.check(core._base64url(ZodBase64URL, params));\n },\n xid(params) {\n return this.check(core._xid(ZodXID, params));\n },\n ksuid(params) {\n return this.check(core._ksuid(ZodKSUID, params));\n },\n ipv4(params) {\n return this.check(core._ipv4(ZodIPv4, params));\n },\n ipv6(params) {\n return this.check(core._ipv6(ZodIPv6, params));\n },\n cidrv4(params) {\n return this.check(core._cidrv4(ZodCIDRv4, params));\n },\n cidrv6(params) {\n return this.check(core._cidrv6(ZodCIDRv6, params));\n },\n e164(params) {\n return this.check(core._e164(ZodE164, params));\n },\n datetime(params) {\n return this.check(core._isoDateTime(ZodISODateTime, params));\n },\n date(params) {\n return this.check(core._isoDate(ZodISODate, params));\n },\n time(params) {\n return this.check(core._isoTime(ZodISOTime, params));\n },\n duration(params) {\n return this.check(core._isoDuration(ZodISODuration, params));\n },\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: core.regexes.httpProtocol,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\n/**\n * Validates a CUID v1 string.\n *\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodCreditCard = /*@__PURE__*/ core.$constructor(\"ZodCreditCard\", (inst, def) => {\n core.$ZodCreditCard.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function creditCard(params) {\n return core._creditCard(ZodCreditCard, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n}, {\n gt(value, params) {\n return this.check(checks.gt(value, params));\n },\n gte(value, params) {\n return this.check(checks.gte(value, params));\n },\n min(value, params) {\n return this.check(checks.gte(value, params));\n },\n lt(value, params) {\n return this.check(checks.lt(value, params));\n },\n lte(value, params) {\n return this.check(checks.lte(value, params));\n },\n max(value, params) {\n return this.check(checks.lte(value, params));\n },\n int(params) {\n return this.check(int(params));\n },\n safe(params) {\n return this.check(int(params));\n },\n positive(params) {\n return this.check(checks.gt(0, params));\n },\n nonnegative(params) {\n return this.check(checks.gte(0, params));\n },\n negative(params) {\n return this.check(checks.lt(0, params));\n },\n nonpositive(params) {\n return this.check(checks.lte(0, params));\n },\n multipleOf(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n step(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n finite() {\n return this;\n },\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n}, {\n gte(value, params) {\n return this.check(checks.gte(value, params));\n },\n min(value, params) {\n return this.check(checks.gte(value, params));\n },\n gt(value, params) {\n return this.check(checks.gt(value, params));\n },\n lt(value, params) {\n return this.check(checks.lt(value, params));\n },\n lte(value, params) {\n return this.check(checks.lte(value, params));\n },\n max(value, params) {\n return this.check(checks.lte(value, params));\n },\n positive(params) {\n return this.check(checks.gt(BigInt(0), params));\n },\n negative(params) {\n return this.check(checks.lt(BigInt(0), params));\n },\n nonpositive(params) {\n return this.check(checks.lte(BigInt(0), params));\n },\n nonnegative(params) {\n return this.check(checks.gte(BigInt(0), params));\n },\n multipleOf(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n}, {\n min(n, params) {\n return this.check(checks.minLength(n, params));\n },\n nonempty(params) {\n return this.check(checks.minLength(1, params));\n },\n max(n, params) {\n return this.check(checks.maxLength(n, params));\n },\n length(n, params) {\n return this.check(checks.length(n, params));\n },\n unwrap() {\n return this.element;\n },\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.installLazyProp(inst, \"shape\", (self) => self._zod.def.shape, false);\n}, {\n keyof() {\n return _enum(Object.keys(this._zod.def.shape));\n },\n catchall(catchall) {\n return this.clone({ ...this._zod.def, catchall: catchall });\n },\n passthrough() {\n return this.clone({ ...this._zod.def, catchall: unknown() });\n },\n loose() {\n return this.clone({ ...this._zod.def, catchall: unknown() });\n },\n strict() {\n return this.clone({ ...this._zod.def, catchall: never() });\n },\n strip() {\n return this.clone({ ...this._zod.def, catchall: undefined });\n },\n extend(incoming) {\n return util.extend(this, incoming);\n },\n safeExtend(incoming) {\n return util.safeExtend(this, incoming);\n },\n merge(other) {\n return util.merge(this, other);\n },\n pick(mask) {\n return util.pick(this, mask);\n },\n omit(mask) {\n return util.omit(this, mask);\n },\n partial(...args) {\n return util.partial(ZodOptional, this, args[0]);\n },\n exactPartial(...args) {\n return util.partial(ZodExactOptional, this, args[0], \"exactPartial\");\n },\n required(...args) {\n return util.required(ZodNonOptional, this, args[0]);\n },\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options: options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n}, {\n rest(rest) {\n return this.clone({\n ...this._zod.def,\n rest: rest,\n });\n },\n partial() {\n const def = this._zod.def;\n // a refinement was authored against the full arity; partialing would run it on a shorter array\n if (def.checks?.length)\n throw new Error(\".partial() cannot be used on tuple schemas containing refinements\");\n return this.clone({\n ...def,\n items: def.items.map((item) => new ZodOptional({ type: \"optional\", innerType: item })),\n });\n },\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()\n if (!valueType || !valueType._zod) {\n return new ZodRecord({\n type: \"record\",\n keyType: string(),\n valueType: keyType,\n ...util.normalizeParams(valueType),\n });\n }\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output<core.$ZodRecordKey>;\nexport function partialRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n partial: true,\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n if (!(\"input\" in _issue))\n _issue.input = payload.value;\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : core.util.constantCatch(catchValue)),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport function invertCodec(codec) {\n const def = codec._zod.def;\n return new ZodCodec({\n type: \"pipe\",\n in: def.out,\n out: def.in,\n transform: def.reverseTransform,\n reverseTransform: def.transform,\n });\n}\nexport const ZodPreprocess = /*@__PURE__*/ core.$constructor(\"ZodPreprocess\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodPreprocess.init(inst, def);\n});\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn, params) {\n return core._superRefine(fn, params);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\nexport function preprocess(fn, schema) {\n return new ZodPreprocess({\n type: \"pipe\",\n in: transform(fn),\n out: schema,\n });\n}\n",
100
+ "import picocolors from \"picocolors\";\n\nexport const c = picocolors;\n",
101
+ "export const filterNotNull = <T>(array: (T | null)[]): T[] =>\n array.filter((t) => t !== null);\n",
102
+ "import chunk from \"lodash.chunk\";\nimport type { GitRepository } from \"@/git/discover\";\nimport { ansi } from \"./ansi\";\nimport { c } from \"./colour\";\n\nconst countNewlines = (str: string): number => {\n return (str.match(/\\n/g) || []).length;\n};\n\nexport type RepoStatus = \"pending\" | \"started\" | \"done\" | \"error\";\nconst repoStatusLabels: Record<RepoStatus, string> = {\n pending: \" \",\n started: \".\",\n done: c.green(\"✓\"),\n error: c.red(\"⚠\"),\n};\n\nexport class SwarmProgressBar {\n private width: number;\n private repos: GitRepository[];\n private repoStatus: Map<GitRepository, RepoStatus>;\n private isFirstRender = true;\n\n constructor(repos: GitRepository[]) {\n this.repos = repos;\n this.width = Math.max(\n 1,\n (process.stdout.columns || 80) -\n 2 -\n this.maxBuildSummaryStringLength(),\n );\n this.repoStatus = new Map();\n repos.forEach((r) => {\n this.repoStatus.set(r, \"pending\");\n });\n }\n\n start(): void {\n ansi.hideCursor();\n this.render();\n }\n\n update(repo: GitRepository, status: RepoStatus): void {\n this.repoStatus.set(repo, status);\n this.render();\n }\n\n private buildRepoStatusString(repo: GitRepository): string {\n return repoStatusLabels[this.repoStatus.get(repo) ?? \"pending\"];\n }\n\n private buildSummaryStringFromValues(curr: number, total: number): string {\n return ` ${curr}/${total}`;\n }\n\n private buildSummaryString(): string {\n const done = [...this.repoStatus.values().filter((s) => s === \"done\")]\n .length;\n return this.buildSummaryStringFromValues(done, this.repos.length);\n }\n\n private maxBuildSummaryStringLength(): number {\n return this.buildSummaryStringFromValues(\n this.repos.length,\n this.repos.length,\n ).length;\n }\n\n private buildProgress(): string {\n const chunks = chunk(this.repos, this.width);\n const lines = chunks.map((repos) => {\n return repos.map((r) => this.buildRepoStatusString(r)).join(\"\");\n });\n\n return `${lines.map((l) => `[${l}]`).join(\"\\n\")}${this.buildSummaryString()}\\n`;\n }\n\n private render(): void {\n const progress = this.buildProgress();\n if (!this.isFirstRender) {\n ansi.moveUp(countNewlines(progress));\n ansi.carriageReturn();\n } else {\n this.isFirstRender = false;\n }\n process.stdout.write(progress);\n }\n\n stop(): void {\n const progress = this.buildProgress();\n ansi.moveUp(countNewlines(progress));\n ansi.carriageReturn();\n ansi.clearBelow();\n ansi.showCursor();\n this.isFirstRender = true;\n }\n\n log(message: string): void {\n this.stop();\n console.log(message);\n this.start();\n }\n}\n",
103
+ "const write = (string: string) => {\n process.stdout.write(string);\n};\n\nexport const ansi = {\n carriageReturn: () => write(\"\\r\"),\n hideCursor: () => write(\"\\x1B[?25l\"),\n showCursor: () => write(\"\\x1B[?25h\"),\n moveUp: (lines = 1) => {\n if (lines <= 0) {\n return;\n }\n write(`\\x1B[${lines}A`);\n },\n\n clearLine: () => write(\"\\x1B[2K\"),\n clearBelow: () => write(\"\\x1B[J\"),\n};\n",
104
+ "import { basename } from \"node:path\";\nimport jexl from \"jexl\";\nimport type { RemoteWithRefs } from \"simple-git\";\nimport type { GitRepository } from \"./discover\";\nimport { type GitProvider, parseGitRemoteRefs } from \"./remote\";\n\nexport interface RepoQueryContext {\n name: string;\n path: string;\n\n branch: string | null;\n branches: string[];\n localBranches: string[];\n detached: boolean;\n\n clean: boolean;\n stagedFiles: number;\n modifiedFiles: number;\n untrackedFiles: number;\n\n ahead: number;\n behind: number;\n hasUpstream: boolean;\n\n remote: {\n provider: \"github\" | \"gitlab\" | \"bitbucket\" | \"other\" | null;\n host: string | null;\n owner: string | null;\n repo: string | null;\n };\n}\n\nexport type RepoQueryExpression = ReturnType<typeof jexl.createExpression>;\n\nexport interface RepoQuery {\n expression: RepoQueryExpression | null;\n}\n\ntype StatusFields = Partial<RepoQueryContext> &\n Pick<\n RepoQueryContext,\n | \"branch\"\n | \"detached\"\n | \"clean\"\n | \"stagedFiles\"\n | \"modifiedFiles\"\n | \"untrackedFiles\"\n | \"ahead\"\n | \"behind\"\n | \"hasUpstream\"\n >;\n\ntype RemoteFields = RepoQueryContext[\"remote\"];\n\nconst statusFieldKeys = new Set<keyof StatusFields>([\n \"branch\",\n \"detached\",\n \"clean\",\n \"stagedFiles\",\n \"modifiedFiles\",\n \"untrackedFiles\",\n \"ahead\",\n \"behind\",\n \"hasUpstream\",\n]);\n\nconst toStatusFields = (\n status: Awaited<ReturnType<GitRepository[\"git\"][\"status\"]>>,\n): StatusFields => ({\n branch: status.current || null,\n detached: status.detached,\n clean: status.isClean(),\n stagedFiles: status.staged.length,\n modifiedFiles: status.modified.length,\n untrackedFiles: status.not_added.length,\n ahead: status.ahead,\n behind: status.behind,\n hasUpstream: Boolean(status.tracking),\n});\n\nconst toRemoteFields = (remotes: RemoteWithRefs[]): RemoteFields => {\n const parsed = parseGitRemoteRefs(remotes);\n const primary =\n parsed.find((remote) => remote.ref === \"origin\") ?? parsed[0];\n if (primary === undefined) {\n return { provider: null, host: null, owner: null, repo: null };\n }\n return {\n provider: mapProvider(primary.provider),\n host: primary.host || null,\n owner: primary.owner || null,\n repo: primary.name || null,\n };\n};\n\nconst mapProvider = (provider: GitProvider): RemoteFields[\"provider\"] =>\n provider === \"unknown\" ? \"other\" : provider;\n\nexport const compileQuery = (expression: string): RepoQuery => {\n const trimmed = expression.trim();\n if (trimmed.length === 0) {\n return { expression: null };\n }\n const compiled = jexl.createExpression(trimmed);\n compiled.compile();\n return { expression: compiled };\n};\n\nconst createRepoQueryContext = (repo: GitRepository): RepoQueryContext => {\n let statusPromise: Promise<StatusFields> | null = null;\n let allBranchesPromise: Promise<string[]> | null = null;\n let localBranchesPromise: Promise<string[]> | null = null;\n let remotePromise: Promise<RemoteFields> | null = null;\n\n const status = () =>\n (statusPromise ??= repo.git.status().then(toStatusFields));\n\n const allBranches = () =>\n (allBranchesPromise ??= repo.git\n .branch([\"-a\"])\n .then((summary) => summary.all));\n\n const localBranches = () =>\n (localBranchesPromise ??= repo.git\n .branchLocal()\n .then((summary) => summary.all));\n\n const remotes = () =>\n (remotePromise ??= repo.git.getRemotes(true).then(toRemoteFields));\n\n return new Proxy({} as RepoQueryContext, {\n get(_target, property) {\n if (property === \"name\") {\n return basename(repo.path.absolute);\n }\n if (property === \"path\") {\n return repo.path.relative;\n }\n if (property === \"branches\") {\n return allBranches();\n }\n if (property === \"localBranches\") {\n return localBranches();\n }\n if (property === \"remote\") {\n return remotes();\n }\n if (\n typeof property === \"string\" &&\n statusFieldKeys.has(property as keyof StatusFields)\n ) {\n return status().then(\n (fields) => fields[property as keyof StatusFields],\n );\n }\n return undefined;\n },\n });\n};\n\nexport const repoMatchesFilter = async (\n repo: GitRepository,\n query: RepoQuery,\n): Promise<boolean> => {\n if (query.expression === null) {\n return true;\n }\n try {\n return Boolean(\n await query.expression.eval(createRepoQueryContext(repo)),\n );\n } catch {\n return false;\n }\n};\n",
105
+ "import type { RemoteWithRefs } from \"simple-git\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\n\nexport type GitProvider = \"github\" | \"gitlab\" | \"bitbucket\" | \"unknown\";\nexport type GitProtocol = \"https\" | \"http\" | \"ssh\" | \"file\";\n\nexport interface ParsedGitUrl {\n ref: string;\n direction: string;\n provider: GitProvider;\n protocol: GitProtocol;\n host: string;\n owner: string;\n name: string;\n fullName: string;\n href: string;\n}\n\nconst KNOWN_PROVIDERS: Record<string, GitProvider> = {\n \"github.com\": \"github\",\n \"gitlab.com\": \"gitlab\",\n \"bitbucket.org\": \"bitbucket\",\n};\n\nexport function parseGitUrl(\n ref: string,\n direction: string,\n rawUrl: string,\n): ParsedGitUrl | null {\n if (!rawUrl || typeof rawUrl !== \"string\") return null;\n\n // Clean trailing spaces and trailing whitespace/newlines from git remote -v\n const cleaned = rawUrl.trim();\n\n let protocol: GitProtocol = \"https\";\n let host = \"\";\n let path = \"\";\n\n // 1. Match SCP-like SSH syntax: git@github.com:owner/repo.git\n const scpMatch = cleaned.match(/^(?:([^@]+)@)?([^:]+):(.+)$/);\n\n if (scpMatch && !cleaned.includes(\"://\")) {\n protocol = \"ssh\";\n // biome-ignore lint/style/noNonNullAssertion: regex must match\n host = scpMatch[2]!;\n // biome-ignore lint/style/noNonNullAssertion: regex must match\n path = scpMatch[3]!;\n } else {\n // 2. Standard URI syntax: https://, ssh://, git://\n try {\n // Strip authentication details if present for cleaner parsing\n const urlObj = new URL(cleaned);\n\n protocol =\n (urlObj.protocol.replace(\":\", \"\") as GitProtocol) || \"https\";\n host = urlObj.hostname;\n path = urlObj.pathname.replace(/^\\//, \"\"); // Strip leading slash\n } catch {\n return null; // Invalid URL structure\n }\n }\n\n // remote trailing .git\n path = path.replace(/\\.git$/, \"\").replace(/\\/$/, \"\");\n\n const segments = path.split(\"/\").filter(Boolean);\n if (segments.length < 2) return null;\n\n // biome-ignore lint/style/noNonNullAssertion: must exist from assertion above\n const name = segments.pop()!;\n\n // biome-ignore lint/style/noNonNullAssertion: must exist from assertion above\n const owner = segments[0]!;\n const fullName = [...segments, name].join(\"/\");\n const provider = KNOWN_PROVIDERS[host.toLowerCase()] || \"unknown\";\n\n return {\n ref,\n direction,\n provider,\n protocol,\n host,\n owner,\n name,\n fullName,\n href: `https://${host}/${fullName}`,\n };\n}\n\nexport const parseGitRemoteRefs = (refs: RemoteWithRefs[]): ParsedGitUrl[] => {\n return filterNotNull(\n refs.flatMap((ref) =>\n Object.entries(ref.refs).map(([direction, url]) =>\n parseGitUrl(ref.name, direction, url),\n ),\n ),\n );\n};\n",
106
+ "import { c } from \"@/utils/colour\";\n\nexport const catchError = (error: unknown) =>\n error instanceof Error ? error : new Error(`${error}`, { cause: error });\n\nexport const reportRepoError = (path: string, error: unknown): null => {\n const message = (\n error instanceof Error ? error.message : `${error}`\n ).trim();\n console.error(`${c.red(\"✗\")} ${path}: ${message}`);\n return null;\n};\n",
107
+ "import CliTable3, { type TableConstructorOptions } from \"cli-table3\";\n\nexport class CliTable extends CliTable3 {\n constructor(options: Omit<TableConstructorOptions, \"chars\" | \"style\">) {\n super({\n ...options,\n style: {\n head: [\"bold\", \"underline\", \"gray\"],\n \"padding-left\": 0,\n \"padding-right\": 0,\n },\n chars: {\n top: \"\",\n \"top-mid\": \"\",\n \"top-left\": \"\",\n \"top-right\": \"\",\n bottom: \"\",\n \"bottom-mid\": \"\",\n \"bottom-left\": \"\",\n \"bottom-right\": \"\",\n left: \"\",\n \"left-mid\": \"\",\n mid: \"\",\n \"mid-mid\": \"\",\n right: \"\",\n \"right-mid\": \"\",\n middle: \" \",\n },\n });\n }\n}\n",
108
+ "import { Command } from \"commander\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\nexport const checkoutCommand = new Command(\"checkout\")\n .description(\"Switch branches\")\n .argument(\"<branch>\", \"the branch to checkout\")\n .action(async (branch: string) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const table = new CliTable({ head: [\"path\", \"result\"] });\n let failed = false;\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const result = await git.checkout(branch).catch(catchError);\n if (result instanceof Error) {\n failed = true;\n return reportRepoError(path.relative, result);\n }\n\n return [path.relative, c.green(branch)];\n },\n programOptions,\n );\n if (failed) {\n process.exitCode = 1;\n }\n table.push(...filterNotNull(results));\n console.log(table.toString());\n });\n",
109
+ "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nconst dedent = createDedent({});\nexport default dedent;\nfunction createDedent(options) {\n dedent.withOptions = newOptions => createDedent(_objectSpread(_objectSpread({}, options), newOptions));\n return dedent;\n function dedent(strings, ...values) {\n const raw = typeof strings === \"string\" ? [strings] : strings.raw;\n const {\n alignValues = false,\n escapeSpecialCharacters = Array.isArray(strings),\n trimWhitespace = true\n } = options;\n\n // first, perform interpolation\n let result = \"\";\n for (let i = 0; i < raw.length; i++) {\n let next = raw[i];\n if (escapeSpecialCharacters) {\n // handle escaped newlines, backticks, and interpolation characters\n next = next.replace(/\\\\\\n[ \\t]*/g, \"\").replace(/\\\\`/g, \"`\").replace(/\\\\\\$/g, \"$\").replace(/\\\\\\{/g, \"{\");\n }\n result += next;\n if (i < values.length) {\n const value = alignValues ? alignValue(values[i], result) : values[i];\n\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n result += value;\n }\n }\n\n // now strip indentation\n const lines = result.split(\"\\n\");\n let mindent = null;\n for (const l of lines) {\n const m = l.match(/^(\\s+)\\S+/);\n if (m) {\n const indent = m[1].length;\n if (!mindent) {\n // this is the first indented line\n mindent = indent;\n } else {\n mindent = Math.min(mindent, indent);\n }\n }\n }\n if (mindent !== null) {\n const m = mindent; // appease TypeScript\n result = lines\n // https://github.com/typescript-eslint/typescript-eslint/issues/7140\n // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with\n .map(l => l[0] === \" \" || l[0] === \"\\t\" ? l.slice(m) : l).join(\"\\n\");\n }\n\n // dedent eats leading and trailing whitespace too\n if (trimWhitespace) {\n result = result.trim();\n }\n\n // Unescape escapes after trimming so sequences like `\\n`, `\\t`,\n // `\\xHH` and `\\u{...}` are preserved (fixes #24)\n if (escapeSpecialCharacters) {\n result = result.replace(/\\\\n/g, \"\\n\").replace(/\\\\t/g, \"\\t\").replace(/\\\\r/g, \"\\r\").replace(/\\\\v/g, \"\\v\").replace(/\\\\b/g, \"\\b\").replace(/\\\\f/g, \"\\f\").replace(/\\\\0/g, \"\\0\").replace(/\\\\x([\\da-fA-F]{2})/g, (_, h) => String.fromCharCode(parseInt(h, 16))).replace(/\\\\u\\{([\\da-fA-F]{1,6})\\}/g, (_, h) => String.fromCodePoint(parseInt(h, 16))).replace(/\\\\u([\\da-fA-F]{4})/g, (_, h) => String.fromCharCode(parseInt(h, 16)));\n }\n\n // Workaround for Bun issue with Unicode characters\n // https://github.com/oven-sh/bun/issues/8745\n if (typeof Bun !== \"undefined\") {\n result = result.replace(\n // Matches e.g. \\\\u{1f60a} or \\\\u5F1F\n /\\\\u(?:\\{([\\da-fA-F]{1,6})\\}|([\\da-fA-F]{4}))/g, (_, braced, unbraced) => {\n var _ref;\n const hex = (_ref = braced !== null && braced !== void 0 ? braced : unbraced) !== null && _ref !== void 0 ? _ref : \"\";\n return String.fromCodePoint(parseInt(hex, 16));\n });\n }\n return result;\n }\n}\n\n/**\n * Adjusts the indentation of a multi-line interpolated value to match the current line.\n */\nfunction alignValue(value, precedingText) {\n if (typeof value !== \"string\" || !value.includes(\"\\n\")) {\n return value;\n }\n const currentLine = precedingText.slice(precedingText.lastIndexOf(\"\\n\") + 1);\n const indentMatch = currentLine.match(/^(\\s+)/);\n if (indentMatch) {\n const indent = indentMatch[1];\n return value.replace(/\\n/g, `\\n${indent}`);\n }\n return value;\n}\n",
110
+ "import { Command } from \"commander\";\nimport dedent from \"dedent\";\nimport {\n CONFIG_FILE_NAME,\n config,\n defaultConfig,\n type GitSwarmConfig,\n} from \"@/config\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\n\ntype Options = {\n force?: boolean;\n};\n\nexport const initCommand = new Command(\"init\")\n .description(\n dedent`\n Initialises a git swarm config.\n Creates a ${CONFIG_FILE_NAME} if they don't exist.\n This does not run 'git init'\n `,\n )\n .option(\n \"--force\",\n \"Force creation of a fresh config file even if one already exists\",\n )\n .passThroughOptions()\n .action(async (options: Options) => {\n if (!options.force && (await config.exists())) {\n console.log(c.red(`${CONFIG_FILE_NAME} already exists.`));\n process.exit();\n }\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const repos = await forEachRepo(root, async (repo) => repo, {\n ...programOptions,\n skipConfig: true,\n });\n\n repos.sort((a, b) => a.path.relative.localeCompare(b.path.relative));\n\n const configData: GitSwarmConfig = {\n ...defaultConfig,\n repositories: repos.map((repo) => ({ path: repo.path.relative })),\n };\n\n await config.write(configData);\n console.log(\n c.green(\n `${CONFIG_FILE_NAME} created successfully, with ${repos.length} repositores.`,\n ),\n );\n });\n",
111
+ "import { Command } from \"commander\";\nimport dedent from \"dedent\";\nimport { CONFIG_FILE_NAME, config, type GitSwarmConfig } from \"@/config\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\n\nexport const refreshCommand = new Command(\"refresh\")\n .description(\n dedent`\n Refreshes the git swarm config with new repositores.\n Other options are kept as is.'\n `,\n )\n .option(\n \"--force\",\n \"Force creation of a fresh config file even if one already exists\",\n )\n .passThroughOptions()\n .action(async () => {\n if (!(await config.exists())) {\n console.log(\n c.red(\n `${CONFIG_FILE_NAME} missing. Run ${c.bold(\"`git swarm init`\")} first`,\n ),\n );\n process.exit();\n }\n const oldConfig = await config.get();\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const repos = await forEachRepo(root, async (repo) => repo, {\n ...programOptions,\n skipConfig: true,\n });\n\n repos.sort((a, b) => a.path.relative.localeCompare(b.path.relative));\n\n const configData: GitSwarmConfig = {\n ...oldConfig,\n repositories: repos.map((repo) => ({ path: repo.path.relative })),\n };\n\n await config.write(configData);\n console.log(\n c.green(\n `${CONFIG_FILE_NAME} refreshed successfully, with ${repos.length} repositores.`,\n ),\n );\n });\n",
112
+ "import { Command } from \"commander\";\nimport { initCommand } from \"./init/command\";\nimport { refreshCommand } from \"./refresh/command\";\n\nexport const configCommand = new Command(\"config\")\n .description(\"Commands related to git swarm configuration\")\n .enablePositionalOptions()\n .addCommand(initCommand)\n .addCommand(refreshCommand);\n",
113
+ "import { Command } from \"commander\";\nimport type { DiffResult } from \"simple-git\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\ntype DiffOptions = {\n stat: boolean;\n cached: boolean;\n};\n\ntype DiffFile = DiffResult[\"files\"][number];\n\nconst getFileRow = (path: string, file: DiffFile) => {\n if (file.binary) {\n return [path, c.gray(file.file), c.gray(\"binary\"), \"\", \"\"];\n }\n\n return [\n path,\n file.file,\n String(file.changes),\n c.green(`+${file.insertions}`),\n c.red(`-${file.deletions}`),\n ];\n};\n\nconst getStatRow = (path: string, summary: DiffResult) => [\n path,\n String(summary.changed),\n c.green(`+${summary.insertions}`),\n c.red(`-${summary.deletions}`),\n];\n\nexport const diffCommand = new Command(\"diff\")\n .description(\"Show changes across all repositories\")\n .argument(\"[rev]\")\n .option(\"--cached\", \"show changes staged in the index\")\n .option(\"--stat\", \"show the diff summary for each repository\")\n .action(async (rev: string | null, options: DiffOptions) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const diffArgs = options.cached ? [\"--cached\"] : [];\n let failed = false;\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const summary = await git\n .diffSummary(rev ? [rev, ...diffArgs] : diffArgs)\n .catch(catchError);\n if (summary instanceof Error) {\n failed = true;\n return reportRepoError(path.relative, summary);\n }\n\n if (summary.changed === 0) {\n return null;\n }\n\n return { path: path.relative, summary };\n },\n programOptions,\n );\n\n const diffs = filterNotNull(results);\n\n if (diffs.length === 0) {\n process.exitCode = failed ? 1 : 0;\n return;\n }\n\n const head = options.stat\n ? [\"path\", \"files\", \"insertions\", \"deletions\"]\n : [\"path\", \"file\", \"changes\", \"insertions\", \"deletions\"];\n const table = new CliTable({ head });\n\n for (const { path, summary } of diffs) {\n if (options.stat) {\n table.push(getStatRow(path, summary));\n } else {\n table.push(\n ...summary.files.map((file) => getFileRow(path, file)),\n );\n }\n }\n\n console.log(table.toString());\n\n const repos = diffs.length;\n const files = diffs.reduce((sum, d) => sum + d.summary.changed, 0);\n const insertions = diffs.reduce(\n (sum, d) => sum + d.summary.insertions,\n 0,\n );\n const deletions = diffs.reduce(\n (sum, d) => sum + d.summary.deletions,\n 0,\n );\n\n console.log(\n [\n c.bold(`${repos} repos`),\n c.gray(\"·\"),\n c.bold(`${files} files`),\n c.gray(\"·\"),\n c.green(`+${insertions}`),\n c.red(`-${deletions}`),\n ].join(\" \"),\n );\n\n process.exitCode = 1;\n });\n",
114
+ "const pluralRules = [];\nconst singularRules = [];\nconst uncountables = /* @__PURE__ */new Set();\nconst irregularPlurals = /* @__PURE__ */new Map();\nconst irregularSingles = /* @__PURE__ */new Map();\nconst sanitizeRule = rule => typeof rule === \"string\" ? new RegExp(\"^\".concat(rule, \"$\"), \"i\") : rule;\nconst restoreCase = (word, token) => {\n if (typeof token !== \"string\") return word;\n if (word === token) return token;\n if (word === word.toLowerCase()) return token.toLowerCase();\n if (word === word.toUpperCase()) return token.toUpperCase();\n if (word[0] === word[0].toUpperCase()) {\n return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();\n }\n return token.toLowerCase();\n};\nconst sanitizeWord = (token, word, rules) => {\n if (!token.length || uncountables.has(token)) {\n return word;\n }\n let {\n length: len\n } = rules;\n while (len--) {\n const rule = rules[len];\n if (rule[0].test(word)) {\n return word.replace(rule[0], function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const [match, index] = args;\n const result = rule[1].replace(/\\$(\\d{1,2})/g, (_, index2) => args[index2] || \"\");\n if (match === \"\") {\n return restoreCase(word[index - 1], result);\n }\n return restoreCase(match, result);\n });\n }\n }\n return word;\n};\nconst compute = (word, replaceMap, keepMap, rules) => {\n const token = word.toLowerCase();\n if (keepMap.has(token)) {\n return restoreCase(word, token);\n }\n if (replaceMap.has(token)) {\n return restoreCase(word, replaceMap.get(token));\n }\n return sanitizeWord(token, word, rules);\n};\nconst mapHas = (word, replaceMap, keepMap, rules) => {\n const token = word.toLowerCase();\n if (keepMap.has(token)) return true;\n if (replaceMap.has(token)) return false;\n return sanitizeWord(token, token, rules) === token;\n};\nconst pluralize = (word, count, inclusive) => {\n const pluralized = count === 1 ? pluralize.singular(word) : pluralize.plural(word);\n if (inclusive) return \"\".concat(count, \" \").concat(pluralized);\n return pluralized;\n};\npluralize.plural = word => compute(word, irregularSingles, irregularPlurals, pluralRules);\npluralize.singular = word => compute(word, irregularPlurals, irregularSingles, singularRules);\npluralize.addPluralRule = (rule, replacement) => {\n pluralRules.push([sanitizeRule(rule), replacement]);\n};\npluralize.addSingularRule = (rule, replacement) => {\n singularRules.push([sanitizeRule(rule), replacement]);\n};\npluralize.addIrregularRule = (single, plural) => {\n const _plural = plural.toLowerCase();\n const _single = single.toLowerCase();\n irregularSingles.set(_single, _plural);\n irregularPlurals.set(_plural, _single);\n};\npluralize.addUncountableRule = rule => {\n if (typeof rule === \"string\") {\n uncountables.add(rule.toLowerCase());\n return;\n }\n pluralize.addPluralRule(rule, \"$0\");\n pluralize.addSingularRule(rule, \"$0\");\n};\npluralize.isPlural = word => mapHas(word, irregularSingles, irregularPlurals, pluralRules);\npluralize.isSingular = word => mapHas(word, irregularPlurals, irregularSingles, singularRules);\nconst defaultIrregulars = [\n// Pronouns.\n[\"I\", \"we\"], [\"me\", \"us\"], [\"he\", \"they\"], [\"she\", \"they\"], [\"them\", \"them\"], [\"myself\", \"ourselves\"], [\"yourself\", \"yourselves\"], [\"itself\", \"themselves\"], [\"herself\", \"themselves\"], [\"himself\", \"themselves\"], [\"themself\", \"themselves\"], [\"is\", \"are\"], [\"was\", \"were\"], [\"has\", \"have\"], [\"this\", \"these\"], [\"that\", \"those\"], [\"my\", \"our\"], [\"its\", \"their\"], [\"his\", \"their\"], [\"her\", \"their\"],\n// Words ending in with a consonant and `o`.\n[\"echo\", \"echoes\"], [\"dingo\", \"dingoes\"], [\"volcano\", \"volcanoes\"], [\"tornado\", \"tornadoes\"], [\"torpedo\", \"torpedoes\"],\n// Ends with `us`.\n[\"genus\", \"genera\"], [\"viscus\", \"viscera\"],\n// Ends with `ma`.\n[\"stigma\", \"stigmata\"], [\"stoma\", \"stomata\"], [\"dogma\", \"dogmata\"], [\"lemma\", \"lemmata\"], [\"schema\", \"schemata\"], [\"anathema\", \"anathemata\"],\n// Other irregular rules.\n[\"ox\", \"oxen\"], [\"axe\", \"axes\"], [\"die\", \"dice\"], [\"yes\", \"yeses\"], [\"foot\", \"feet\"], [\"eave\", \"eaves\"], [\"goose\", \"geese\"], [\"tooth\", \"teeth\"], [\"quiz\", \"quizzes\"], [\"human\", \"humans\"], [\"proof\", \"proofs\"], [\"carve\", \"carves\"], [\"valve\", \"valves\"], [\"looey\", \"looies\"], [\"thief\", \"thieves\"], [\"groove\", \"grooves\"], [\"pickaxe\", \"pickaxes\"], [\"passerby\", \"passersby\"], [\"canvas\", \"canvases\"]];\nconst defaultPlurals = [[/s?$/i, \"s\"], [/[^\\u0000-\\u007F]$/i, \"$0\"], [/([^aeiou]ese)$/i, \"$1\"], [/(ax|test)is$/i, \"$1es\"], [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, \"$1es\"], [/(e[mn]u)s?$/i, \"$1s\"], [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, \"$1\"], [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, \"$1i\"], [/(alumn|alg|vertebr)(?:a|ae)$/i, \"$1ae\"], [/(seraph|cherub)(?:im)?$/i, \"$1im\"], [/(her|at|gr)o$/i, \"$1oes\"], [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, \"$1a\"], [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, \"$1a\"], [/sis$/i, \"ses\"], [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, \"$1$2ves\"], [/([^aeiouy]|qu)y$/i, \"$1ies\"], [/([^ch][ieo][ln])ey$/i, \"$1ies\"], [/(x|ch|ss|sh|zz)$/i, \"$1es\"], [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, \"$1ices\"], [/\\b((?:tit)?m|l)(?:ice|ouse)$/i, \"$1ice\"], [/(pe)(?:rson|ople)$/i, \"$1ople\"], [/(child)(?:ren)?$/i, \"$1ren\"], [/eaux$/i, \"$0\"], [/m[ae]n$/i, \"men\"], [\"thou\", \"you\"]];\nconst defaultSingles = [[/s$/i, \"\"], [/(ss)$/i, \"$1\"], [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\\w]|^)li)ves$/i, \"$1fe\"], [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, \"$1f\"], [/ies$/i, \"y\"], [/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i, \"$1ie\"], [/\\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i, \"$1ie\"], [/\\b(mon|smil)ies$/i, \"$1ey\"], [/\\b((?:tit)?m|l)ice$/i, \"$1ouse\"], [/(seraph|cherub)im$/i, \"$1\"], [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, \"$1\"], [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, \"$1sis\"], [/(movie|twelve|abuse|e[mn]u)s$/i, \"$1\"], [/(test)(?:is|es)$/i, \"$1is\"], [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, \"$1us\"], [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, \"$1um\"], [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, \"$1on\"], [/(alumn|alg|vertebr)ae$/i, \"$1a\"], [/(cod|mur|sil|vert|ind)ices$/i, \"$1ex\"], [/(matr|append)ices$/i, \"$1ix\"], [/(pe)(rson|ople)$/i, \"$1rson\"], [/(child)ren$/i, \"$1\"], [/(eau)x?$/i, \"$1\"], [/men$/i, \"man\"]];\nconst defaultUncountables = [\n// Singular words with no plurals.\n\"adulthood\", \"advice\", \"agenda\", \"aid\", \"aircraft\", \"alcohol\", \"ammo\", \"analytics\", \"anime\", \"athletics\", \"audio\", \"bison\", \"blood\", \"bream\", \"buffalo\", \"butter\", \"carp\", \"cash\", \"chassis\", \"chess\", \"clothing\", \"cod\", \"commerce\", \"cooperation\", \"corps\", \"debris\", \"diabetes\", \"digestion\", \"elk\", \"energy\", \"equipment\", \"excretion\", \"expertise\", \"firmware\", \"flounder\", \"fun\", \"gallows\", \"garbage\", \"graffiti\", \"hardware\", \"headquarters\", \"health\", \"herpes\", \"highjinks\", \"homework\", \"housework\", \"information\", \"jeans\", \"justice\", \"kudos\", \"labour\", \"literature\", \"machinery\", \"mackerel\", \"mail\", \"media\", \"mews\", \"moose\", \"music\", \"mud\", \"manga\", \"news\", \"only\", \"personnel\", \"pike\", \"plankton\", \"pliers\", \"police\", \"pollution\", \"premises\", \"rain\", \"research\", \"rice\", \"salmon\", \"scissors\", \"series\", \"sewage\", \"shambles\", \"shrimp\", \"software\", \"staff\", \"swine\", \"tennis\", \"traffic\", \"transportation\", \"trout\", \"tuna\", \"wealth\", \"welfare\", \"whiting\", \"wildebeest\", \"wildlife\", \"you\", /pok[eé]mon$/i,\n// Regexes.\n/[^aeiou]ese$/i,\n// \"chinese\", \"japanese\"\n/deer$/i,\n// \"deer\", \"reindeer\"\n/fish$/i,\n// \"fish\", \"blowfish\", \"angelfish\"\n/measles$/i, /o[iu]s$/i,\n// \"carnivorous\"\n/pox$/i,\n// \"chickpox\", \"smallpox\"\n/sheep$/i];\nfor (const [single, plural] of defaultIrregulars) {\n pluralize.addIrregularRule(single, plural);\n}\nfor (const [search, replacement] of defaultPlurals) {\n pluralize.addPluralRule(search, replacement);\n}\nfor (const [search, replacement] of defaultSingles) {\n pluralize.addSingularRule(search, replacement);\n}\nfor (const search of defaultUncountables) {\n pluralize.addUncountableRule(search);\n}\nexport { pluralize as default };\n//# sourceMappingURL=index.js.map\n",
115
+ "import { Command } from \"commander\";\nimport dedent from \"dedent\";\nimport pluralize from \"pluralize-esm\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError } from \"@/utils/error\";\n\ntype DoctorIssue = {\n mode: \"warn\" | \"error\";\n detail: string;\n};\n\nconst reportIssue = (path: string, issue: DoctorIssue) => {\n const symbol = issue.mode === \"error\" ? \"✗\" : \"⚠\";\n const colour = issue.mode === \"error\" ? c.red : c.yellow;\n return console.warn(\n colour(\n dedent`\n ${symbol} ${path}\n ${issue.detail}\n `,\n ),\n );\n};\n\nconst reportHealthy = (path: string) => {\n console.info(c.green(`✓ ${path}`));\n};\n\nexport const doctorCommand = new Command(\"doctor\")\n .description(\"Run diagnostics\")\n .action(async () => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const issues: DoctorIssue[] = [];\n const relative = path.relative;\n\n const status = await git.status().catch(catchError);\n if (status instanceof Error) {\n issues.push({\n mode: \"error\",\n detail: `git status failed: ${status.message}`,\n });\n return { path: relative, issues };\n }\n\n if (status.detached) {\n issues.push({\n mode: \"warn\",\n detail: \"HEAD is detached\",\n });\n }\n\n const remotes = await git.getRemotes().catch(catchError);\n const hasRemotes =\n !(remotes instanceof Error) && remotes.length > 0;\n if (!hasRemotes) {\n issues.push({\n mode: \"warn\",\n detail: \"No remotes configured\",\n });\n }\n\n if (status.current && !status.tracking) {\n issues.push({\n mode: \"warn\",\n detail: `Branch '${status.current}' has no upstream`,\n });\n }\n\n if (status.behind && status.ahead) {\n const summary = ([\"ahead\", \"behind\"] as const)\n .map(\n (v) =>\n `${pluralize(\"commit\", status[v], true)} ${v}`,\n )\n .join(\" \");\n\n issues.push({\n mode: \"warn\",\n detail: `'${status.current}' has diverged from ${status.tracking}. ${summary}`,\n });\n } else {\n for (const v of [\"ahead\", \"behind\"] as const) {\n if (status[v]) {\n issues.push({\n mode: \"warn\",\n detail: `'${status.current}' is ${pluralize(\"commit\", status[v], true)} ${v} ${status.tracking}`,\n });\n }\n }\n }\n\n return { path: relative, issues };\n },\n programOptions,\n );\n\n for (const result of results) {\n if (result.issues.length === 0) {\n reportHealthy(result.path);\n continue;\n }\n for (const issue of result.issues) {\n reportIssue(result.path, issue);\n if (issue.mode === \"error\") {\n process.exitCode = 1;\n }\n }\n }\n\n console.log(\n c.gray(\n \"Run `git-swarm config refresh` if repositories have changed.\",\n ),\n );\n });\n",
116
+ "import { Command } from \"commander\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\n\ntype ExecOptions = {\n verbose: boolean;\n};\n\ntype ExecResult = {\n path: string;\n lines: string[];\n success: boolean;\n};\n\nconst runCommand = async (\n name: string,\n cwd: string,\n command: string[],\n): Promise<ExecResult> => {\n const subprocess = Bun.spawn({\n cmd: command,\n cwd,\n stdout: \"pipe\",\n stderr: \"pipe\",\n });\n\n const [stdout, stderr] = await Promise.all([\n new Response(subprocess.stdout).text(),\n new Response(subprocess.stderr).text(),\n ]);\n\n const exitCode = await subprocess.exited.catch(\n () => subprocess.exitCode ?? 1,\n );\n const success = exitCode === 0;\n const lines = `${stdout}\\n${stderr}`\n .split(\"\\n\")\n .map((line) => line.trimEnd())\n .filter((line) => line.trim());\n\n return { lines, path: name, success };\n};\n\nconst getBadge = (success: boolean) => (success ? c.green(\"✓\") : c.red(\"✗\"));\n\nconst printLines = (prefix: string, lines: string[]) => {\n for (const line of lines) {\n console.log(`${prefix}${line}`);\n }\n};\n\nexport const execCommand = new Command(\"exec\")\n .description(\"Run a command in every repository\")\n .option(\"-v, --verbose\", \"use compact output format\")\n .passThroughOptions()\n .argument(\"<command...>\", \"the command and arguments to run\")\n .action(async (command: string[], options: ExecOptions) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const results = await forEachRepo(\n root,\n async ({ path }) =>\n runCommand(path.relative, path.absolute, command),\n programOptions,\n );\n\n if (options.verbose) {\n const maxWidth = Math.max(\n ...results.map((result) => `[${result.path}]`.length),\n );\n for (const result of results) {\n const label = `${getBadge(result.success)} ${`[${result.path}]`.padEnd(maxWidth)}`;\n if (result.lines.length) {\n printLines(`${label} `, result.lines);\n } else {\n console.log(label.trimEnd());\n }\n }\n return;\n }\n\n console.log();\n for (const result of results) {\n console.log(`${getBadge(result.success)} ${result.path}`);\n printLines(\" \", result.lines);\n console.log();\n }\n });\n",
117
+ "import { Command } from \"commander\";\nimport pluralize from \"pluralize-esm\";\nimport type { FetchResult } from \"simple-git\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\nconst getFetchSummary = (result: FetchResult) => {\n const chunks = [\n result.branches.length\n ? c.green(pluralize(\"new branch\", result.branches.length, true))\n : null,\n result.tags.length\n ? c.green(pluralize(\"new tag\", result.tags.length, true))\n : null,\n result.updated.length\n ? `${pluralize(\"branch\", result.updated.length, true)} updated`\n : null,\n result.deleted.length\n ? c.red(\n `${pluralize(\"branch\", result.deleted.length, true)} deleted`,\n )\n : null,\n ].filter(Boolean);\n\n return chunks.join(\", \") || c.gray(\"already up-to-date\");\n};\n\nexport type Options = { prune: boolean };\n\nexport const fetchCommand = new Command(\"fetch\")\n .description(\"Download objects and refs from another repository\")\n .option(\n \"-p, --prune\",\n \"prune remote-tracking branches no longer on the remote\",\n )\n .action(async (options: Options) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const table = new CliTable({ head: [\"path\", \"result\"] });\n let failed = false;\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const result = await git\n .fetch(options?.prune ? [\"--prune\"] : [])\n .catch(catchError);\n if (result instanceof Error) {\n failed = true;\n return reportRepoError(path.relative, result);\n }\n\n return [path.relative, getFetchSummary(result)];\n },\n programOptions,\n );\n if (failed) {\n process.exitCode = 1;\n }\n table.push(...filterNotNull(results));\n console.log(table.toString());\n });\n",
118
+ "import { Command } from \"commander\";\nimport pluralize from \"pluralize-esm\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\nconst getBranchSummary = (branch: string, branches: string[]) => {\n if (branches.includes(branch)) {\n return c.green(branch);\n }\n\n const matches = branches.filter((b) => b.includes(branch));\n if (matches.length) {\n return `${matches.map(c.yellow).join(\"\\n\")}\\n${c.gray(\"(fuzzy match)\")}`;\n }\n\n return null;\n};\n\nexport const findBranchCommand = new Command(\"find-branch\")\n .description(\"Search repositories for a branch by name\")\n .argument(\"<branch>\", \"the branch name to search for\")\n .action(async (branch: string) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const table = new CliTable({\n head: [\"path\", \"result\"],\n });\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const result = await git.branch().catch(catchError);\n if (result instanceof Error) {\n return reportRepoError(path.relative, result);\n }\n\n const found = getBranchSummary(branch, result.all);\n if (found) {\n return [path.relative, found];\n }\n\n return null;\n },\n programOptions,\n );\n const matches = filterNotNull(results);\n console.log(\n `${c.gray(\"branch\")} ${c.bold(branch)} ${c.gray(`found in ${pluralize(\"repo\", matches.length, true)}:`)}`,\n );\n if (matches.length === 0) {\n return;\n }\n table.push(...matches);\n console.log(table.toString());\n });\n",
119
+ "import { Command } from \"commander\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\n\ntype RepoGrepResult = {\n repo: string;\n lines: Array<{ file: string; line: number; preview: string }>;\n};\n\nexport const grepCommand = new Command(\"grep\")\n .description(\"Search for a pattern across all repositories\")\n .passThroughOptions()\n .argument(\"<pattern>\", \"the search pattern\")\n .argument(\"[options...]\", \"git-grep search options\", [])\n .action(async (pattern: string, grepOptions) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const result = await git\n .grep(pattern, grepOptions)\n .catch(catchError);\n if (result instanceof Error) {\n return reportRepoError(path.relative, result);\n }\n\n const lines: RepoGrepResult[\"lines\"] = [];\n for (const [file, matches] of Object.entries(result.results)) {\n for (const match of matches) {\n lines.push({\n file,\n line: match.line,\n preview: match.preview,\n });\n }\n }\n\n if (lines.length === 0) {\n return null;\n }\n\n lines.sort(\n (a, b) => a.file.localeCompare(b.file) || a.line - b.line,\n );\n return { repo: path.relative, lines };\n },\n programOptions,\n );\n\n const repos = results.filter((r): r is RepoGrepResult => r !== null);\n const totalMatches = repos.reduce((sum, r) => sum + r.lines.length, 0);\n\n if (repos.length === 0) {\n return;\n }\n\n for (const repo of repos) {\n console.log(c.bold(repo.repo));\n for (const { file, line, preview } of repo.lines) {\n console.log(` ${c.gray(`${file}:${line}`)}:${preview}`);\n }\n console.log();\n }\n\n console.log(\n `${c.bold(`${repos.length} repos`)} ${c.gray(\"·\")} ${c.bold(`${totalMatches} matches`)}`,\n );\n });\n",
120
+ "import { Command } from \"commander\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { CliTable } from \"@/utils/table\";\n\nexport const listCommand = new Command(\"list\")\n .description(\"List repositories discovered below the current directory\")\n .action(async () => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const table = new CliTable({\n head: [\"path\"],\n });\n const repos = await forEachRepo(\n root,\n async ({ path }) => path.relative,\n programOptions,\n );\n for (const relative of repos) {\n table.push([relative]);\n }\n console.log(table.toString());\n });\n",
121
+ "/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n",
122
+ "import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n",
123
+ "import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n",
124
+ "let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n",
125
+ "import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n",
126
+ "import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n",
127
+ "import { toDate } from \"./toDate.js\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const diff = +toDate(dateLeft) - +toDate(dateRight);\n\n if (diff < 0) return -1;\n else if (diff > 0) return 1;\n\n // Return 0 if diff is 0; return NaN if diff is NaN\n return diff;\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n",
128
+ "import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name constructNow\n * @category Generic Helpers\n * @summary Constructs a new current date using the passed value constructor.\n * @pure false\n *\n * @description\n * The function constructs a new current date using the constructor from\n * the reference date. It helps to build generic functions that accept date\n * extensions and use the current date.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @param date - The reference date to take constructor from\n *\n * @returns Current date initialized using the given date constructor\n *\n * @example\n * import { constructNow, isSameDay } from 'date-fns'\n *\n * function isToday<DateType extends Date>(\n * date: DateArg<DateType>,\n * ): boolean {\n * // If we were to use `new Date()` directly, the function would behave\n * // differently in different timezones and return false for the same date.\n * return isSameDay(date, constructNow(date));\n * }\n */\nexport function constructNow(date) {\n return constructFrom(date, Date.now());\n}\n\n// Fallback for modularized imports:\nexport default constructNow;\n",
129
+ "import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n",
130
+ "export function getRoundingMethod(method) {\n return (number) => {\n const round = method ? Math[method] : Math.trunc;\n const result = round(number);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n };\n}\n",
131
+ "import { toDate } from \"./toDate.js\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(laterDate, earlierDate) {\n return +toDate(laterDate) - +toDate(earlierDate);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n",
132
+ "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfDay} function options.\n */\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n",
133
+ "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n",
134
+ "import { endOfDay } from \"./endOfDay.js\";\nimport { endOfMonth } from \"./endOfMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param date - The date to check\n * @param options - An object with options\n *\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n return +endOfDay(_date, options) === +endOfMonth(_date, options);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n",
135
+ "import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.js\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.js\";\n\n/**\n * The {@link differenceInMonths} function options.\n */\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(laterDate, earlierDate, options) {\n const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n laterDate,\n earlierDate,\n );\n\n const sign = compareAsc(workingLaterDate, earlierDate_);\n const difference = Math.abs(\n differenceInCalendarMonths(workingLaterDate, earlierDate_),\n );\n\n if (difference < 1) return 0;\n\n if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)\n workingLaterDate.setDate(30);\n\n workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);\n\n let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;\n\n if (\n isLastDayOfMonth(laterDate_) &&\n difference === 1 &&\n compareAsc(laterDate_, earlierDate_) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n const result = sign * (difference - +isLastMonthNotFull);\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n",
136
+ "import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(laterDate, earlierDate, options) {\n const diff = differenceInMilliseconds(laterDate, earlierDate) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n",
137
+ "const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n",
138
+ "export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n",
139
+ "import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n",
140
+ "const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n",
141
+ "/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n",
142
+ "import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n",
143
+ "export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n",
144
+ "export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n",
145
+ "import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n",
146
+ "import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n",
147
+ "import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { minutesInDay, minutesInMonth } from \"./constants.js\";\nimport { differenceInMonths } from \"./differenceInMonths.js\";\nimport { differenceInSeconds } from \"./differenceInSeconds.js\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param laterDate - The date\n * @param earlierDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistance(laterDate, earlierDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(laterDate, earlierDate);\n\n if (isNaN(comparison)) throw new RangeError(\"Invalid time value\");\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n ...(comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]),\n );\n\n const seconds = differenceInSeconds(earlierDate_, laterDate_);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(earlierDate_) -\n getTimezoneOffsetInMilliseconds(laterDate_)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(earlierDate_, laterDate_);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n",
148
+ "import { constructNow } from \"./constructNow.js\";\n\nimport { formatDistance } from \"./formatDistance.js\";\n\n/**\n * The {@link formatDistanceToNow} function options.\n */\n\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param date - The given date\n * @param options - The object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistanceToNow(date, options) {\n return formatDistance(date, constructNow(date), options);\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceToNow;\n",
149
+ "import { Command } from \"commander\";\nimport { formatDistanceToNow } from \"date-fns\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\ntype LogOptions = {\n all: boolean;\n after: string | null;\n before: string | null;\n exactDate: boolean;\n author: boolean;\n};\n\ntype LogRow = {\n path: string;\n hash: string;\n message: string;\n date: string;\n time: number;\n author: string;\n files: number;\n insertions: number;\n deletions: number;\n};\n\nexport const logCommand = new Command(\"log\")\n .description(\"Show commit logs across all repositories\")\n .argument(\"[rev]\", \"the revision or revision range to log\")\n .option(\"--all\", \"show commits on all branches\")\n .option(\"--after <date>\", \"show commits more recent than a specific date\")\n .option(\"--before <date>\", \"show commits older than a specific date\")\n .option(\n \"--exact-date\",\n \"show the exact commit date instead of a relative time\",\n )\n .option(\"--author\", \"show the author of each commit\")\n .action(async (rev: string | null, options: LogOptions) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const logArgs = [\n ...(options.all ? [\"--all\"] : []),\n ...(rev ? [rev] : []),\n ...(options.after ? [`--after=${options.after}`] : []),\n ...(options.before ? [`--before=${options.before}`] : []),\n ];\n const log = await forEachRepo(\n root,\n async ({ path, git }) => {\n const result = await git\n .log([\"--stat=4096\", ...logArgs])\n .catch(catchError);\n if (result instanceof Error) {\n return reportRepoError(path.relative, result);\n }\n if (result.all.length === 0) {\n return null;\n }\n return { path: path.relative, log: result };\n },\n programOptions,\n );\n const logs = filterNotNull(log);\n if (logs.length === 0) {\n return;\n }\n\n const rows: LogRow[] = [];\n for (const { path, log } of logs) {\n for (const entry of log.all) {\n rows.push({\n path,\n hash: entry.hash.slice(0, 7),\n message: entry.message,\n date: options.exactDate\n ? entry.date\n : formatDistanceToNow(new Date(entry.date), {\n addSuffix: true,\n }),\n time: new Date(entry.date).getTime(),\n author: entry.author_name,\n files: entry.diff?.changed ?? 0,\n insertions: entry.diff?.insertions ?? 0,\n deletions: entry.diff?.deletions ?? 0,\n });\n }\n }\n\n rows.sort((a, b) => b.time - a.time);\n\n const head = [\n \"path\",\n \"hash\",\n \"date\",\n ...(options.author ? [\"author\"] : []),\n \"message\",\n \"files\",\n \"insertions\",\n \"deletions\",\n ];\n const table = new CliTable({\n head,\n });\n for (const row of rows) {\n table.push([\n row.path,\n c.gray(row.hash),\n c.gray(row.date),\n ...(options.author ? [row.author] : []),\n row.message,\n String(row.files),\n c.green(`+${row.insertions}`),\n c.red(`-${row.deletions}`),\n ]);\n }\n console.log(table.toString());\n });\n",
150
+ "import { Command } from \"commander\";\nimport pluralize from \"pluralize-esm\";\nimport type { PullResult } from \"simple-git\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\nconst getPullSummary = (result: PullResult) => {\n if (!result.files.length) {\n return c.gray(\"already up-to-date\");\n }\n\n const { insertions, deletions } = result.summary;\n const chunks = [\n `${pluralize(\"file\", result.files.length, true)} changed`,\n insertions ? c.green(`+${insertions}`) : null,\n deletions ? c.red(`-${deletions}`) : null,\n ];\n\n return chunks.filter(Boolean).join(\" \");\n};\n\nexport const pullCommand = new Command(\"pull\")\n .description(\"Fetch from and integrate with another repository\")\n .argument(\"[remote]\", \"the remote to pull from\")\n .argument(\"[branch]\", \"the branch to pull\")\n .action(async (remote: string | null, branch: string | null) => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const table = new CliTable({ head: [\"path\", \"result\"] });\n let failed = false;\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const result = await git\n .pull(remote ?? undefined, branch ?? undefined)\n .catch(catchError);\n if (result instanceof Error) {\n failed = true;\n return reportRepoError(path.relative, result);\n }\n\n return [path.relative, getPullSummary(result)];\n },\n programOptions,\n );\n if (failed) {\n process.exitCode = 1;\n }\n table.push(...filterNotNull(results));\n console.log(table.toString());\n });\n",
151
+ "import { Command } from \"commander\";\nimport type { ParsedGitUrl } from \"@/git/remote\";\nimport { parseGitRemoteRefs } from \"@/git/remote\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\nconst toRows = (path: string, remotes: ParsedGitUrl[]): string[][] => {\n const byRef = new Map<string, ParsedGitUrl[]>();\n for (const entry of remotes) {\n byRef.set(entry.ref, [...(byRef.get(entry.ref) ?? []), entry]);\n }\n\n const rows: string[][] = [];\n for (const [ref, entries] of byRef) {\n const fetch = entries.find((e) => e.direction === \"fetch\");\n const push = entries.find((e) => e.direction === \"push\");\n\n if (\n fetch &&\n push &&\n fetch.protocol === push.protocol &&\n fetch.href === push.href\n ) {\n const e = fetch;\n rows.push([\n path,\n ref,\n \"push, fetch\",\n e.href,\n e.provider,\n e.owner,\n e.name,\n ]);\n continue;\n }\n\n for (const entry of entries) {\n rows.push([\n path,\n ref,\n entry.direction,\n entry.href,\n entry.provider,\n entry.owner,\n entry.name,\n ]);\n }\n }\n return rows;\n};\n\nexport const remoteCommand = new Command(\"remote\")\n .description(\"List remotes for each repository\")\n .action(async () => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const table = new CliTable({\n head: [\n \"path\",\n \"remote\",\n \"direction\",\n \"url\",\n \"provider\",\n \"owner\",\n \"name\",\n ],\n });\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const remotes = await git.getRemotes(true).catch(catchError);\n if (remotes instanceof Error) {\n return reportRepoError(path.relative, remotes);\n }\n const parsed = parseGitRemoteRefs(remotes);\n if (parsed.length === 0) {\n return null;\n }\n return toRows(path.relative, parsed);\n },\n programOptions,\n );\n const rows = filterNotNull(results).flat();\n table.push(...rows);\n console.log(table.toString());\n });\n",
152
+ "import { Command } from \"commander\";\nimport pluralize from \"pluralize-esm\";\nimport type { StatusResult } from \"simple-git\";\nimport { forEachRepo } from \"@/git/worker\";\nimport { getProgramOptions } from \"@/program\";\nimport { c } from \"@/utils/colour\";\nimport { catchError, reportRepoError } from \"@/utils/error\";\nimport { filterNotNull } from \"@/utils/filter-not-null\";\nimport { CliTable } from \"@/utils/table\";\n\nconst getStatusSummary = (status: StatusResult) => {\n if (status.modified.length) {\n return c.red(\"modified\");\n }\n\n if (status.ahead || status.behind) {\n return c.yellow(`↑ ${status.ahead} ↓ ${status.behind}`);\n }\n\n if (status.detached) {\n return c.red(\"detached\");\n }\n\n if (status.isClean()) {\n return c.green(\"clean\");\n }\n\n if (status.not_added.length) {\n return c.red(\n pluralize(\"untracked item\", status.not_added.length, true),\n );\n }\n\n return c.gray(\"unknown\");\n};\n\nexport const statusCommand = new Command(\"status\")\n .description(\"Show the working tree status\")\n .action(async () => {\n const programOptions = getProgramOptions();\n const root = process.cwd();\n const table = new CliTable({\n head: [\"path\", \"branch\", \"tracking\", \"status\"],\n });\n const results = await forEachRepo(\n root,\n async ({ path, git }) => {\n const status = await git.status().catch(catchError);\n if (status instanceof Error) {\n return reportRepoError(path.relative, status);\n }\n return [\n path.relative,\n status.current,\n status.tracking,\n getStatusSummary(status),\n ];\n },\n programOptions,\n );\n table.push(...filterNotNull(results));\n console.log(table.toString());\n });\n",
153
+ "import { InvalidArgumentError, Option } from \"commander\";\nimport { config } from \"@/config\";\n\nexport const toParallel = (value: string | number): number => {\n const parallel = Number(value);\n if (!Number.isInteger(parallel) || parallel < 0) {\n throw new InvalidArgumentError(\n \"expected a non-negative integer (0 = unlimited, 1 = sequential)\",\n );\n }\n if (parallel === 0) {\n return Infinity;\n }\n return parallel;\n};\n\nexport const valueDescription = (value: number): string => {\n switch (true) {\n case value === 0:\n return \"unlimited\";\n case value === 1:\n return \"sequential\";\n default:\n return value.toLocaleString();\n }\n};\n\nexport type ParallelOption = {\n parallel: number;\n};\n\nconst defaultValue = toParallel(await config.getOption(\"parallel\"));\n\nexport const parallelOption = new Option(\n \"--parallel <count>\",\n \"run git in parallel, 0 = unlimited\",\n)\n .default(defaultValue, valueDescription(defaultValue))\n .argParser(toParallel);\n",
154
+ "import { Option } from \"commander\";\n\nexport type ProgressOption = {\n progress: boolean;\n};\n\nexport const progressOption = new Option(\n \"--no-progress\",\n \"disable the progress bar (defaults to enabled only when stdout is a TTY)\",\n).default(true, \"auto\");\n",
155
+ "import { InvalidArgumentError, Option } from \"commander\";\nimport { config } from \"@/config\";\nimport { compileQuery, type RepoQuery } from \"@/git/filter\";\n\nexport type WhereOption = {\n where: RepoQuery;\n};\n\nconst defaultWhere = await config.getOption(\"where\");\n\nexport const whereOption = new Option(\n \"--where <expression>\",\n \"filter repos by a JEXL expression\",\n)\n .default(compileQuery(defaultWhere), defaultWhere.trim() || \"all repos\")\n .argParser((value) => {\n try {\n return compileQuery(value);\n } catch (error) {\n if (error instanceof Error) {\n throw new InvalidArgumentError(error.message);\n }\n throw error;\n }\n });\n",
156
+ "#!/usr/bin/env bun\nimport { Command } from \"commander\";\nimport packageJson from \"@/package.json\";\nimport { checkoutCommand } from \"./commands/checkout/command\";\nimport { configCommand } from \"./commands/config/command\";\nimport { diffCommand } from \"./commands/diff/command\";\nimport { doctorCommand } from \"./commands/doctor/command\";\nimport { execCommand } from \"./commands/exec/command\";\nimport { fetchCommand } from \"./commands/fetch/command\";\nimport { findBranchCommand } from \"./commands/find-branch/command\";\nimport { grepCommand } from \"./commands/grep/command\";\nimport { listCommand } from \"./commands/list/command\";\nimport { logCommand } from \"./commands/log/command\";\nimport { pullCommand } from \"./commands/pull/command\";\nimport { remoteCommand } from \"./commands/remote/command\";\nimport { statusCommand } from \"./commands/status/command\";\nimport { type ParallelOption, parallelOption } from \"./options/parallel\";\nimport { type ProgressOption, progressOption } from \"./options/progress\";\nimport { type WhereOption, whereOption } from \"./options/where\";\n\nexport const program = new Command();\n\nexport type ProgramOptions = ParallelOption & ProgressOption & WhereOption;\nexport const getProgramOptions = () => program.opts<ProgramOptions>();\n\nprogram\n .name(\"git-swarm\")\n .description(packageJson.description)\n .version(packageJson.version)\n .enablePositionalOptions()\n .addOption(parallelOption)\n .addOption(progressOption)\n .addOption(whereOption)\n .addCommand(checkoutCommand)\n .addCommand(configCommand)\n .addCommand(diffCommand)\n .addCommand(doctorCommand)\n .addCommand(execCommand)\n .addCommand(fetchCommand)\n .addCommand(findBranchCommand)\n .addCommand(grepCommand)\n .addCommand(listCommand)\n .addCommand(logCommand)\n .addCommand(pullCommand)\n .addCommand(remoteCommand)\n .addCommand(statusCommand);\n",
157
+ "#!/usr/bin/env bun\n\nimport { program } from \"./program\";\n\nprogram.parse();\n"
158
+ ],
159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,CAAC,GASK,WAAU,QAAS,CAAC,EAAO,CACjC,KAAK,eAAe,CAClB,KAAM,kBACN,SAAU,EAAM,KAClB,CAAC,2BCnPH,IAAI,QAmCI,UAAS,CACf,cAAe,CACb,WAAY,CACV,QAAS,CACP,QAAS,aACX,EACA,WAAY,CACV,QAAS,YACX,EACA,QAAS,CAAC,EACV,UAAW,CACT,QAAS,eACX,EACA,SAAU,CACR,QAAS,eACT,QAAS,GAAE,QACb,EACA,IAAK,CACH,QAAS,UACX,EACA,YAAa,CACX,QAAS,WACT,QAAS,GAAE,UACb,CACF,CACF,EACA,YAAa,CACX,WAAY,CACV,SAAU,CACR,QAAS,eACX,EACA,KAAM,CACJ,QAAS,iBACX,EACA,IAAK,CACH,QAAS,UACX,EACA,SAAU,CACR,QAAS,aACT,QAAS,GAAE,YACb,CACF,EACA,YAAa,EACf,EACA,gBAAiB,CACf,WAAY,CACV,WAAY,CACV,QAAS,gBACT,QAAS,GAAE,SACb,CACF,CACF,EACA,aAAc,CACZ,WAAY,CACV,WAAY,CACV,QAAS,kBACT,QAAS,GAAE,MACb,EACA,UAAW,CACT,QAAS,aACX,CACF,CACF,EACA,gBAAiB,CACf,WAAY,CACV,MAAO,CACL,QAAS,QACX,CACF,CACF,EACA,cAAe,CACb,WAAY,CACV,UAAW,CACT,QAAS,QACX,EACA,SAAU,CACR,QAAS,eACX,EACA,IAAK,CACH,QAAS,UACX,EACA,YAAa,CACX,QAAS,QACX,EACA,KAAM,CACJ,QAAS,iBACX,CACF,EACA,YAAa,EACf,EACA,SAAU,CACR,WAAY,CACV,SAAU,CACR,QAAS,eACX,EACA,IAAK,CACH,QAAS,UACX,EACA,YAAa,CACX,QAAS,QACX,EACA,KAAM,CACJ,QAAS,iBACX,CACF,EACA,YAAa,EACf,EACA,WAAY,CACV,WAAY,CACV,SAAU,CACR,QAAS,eACX,EACA,IAAK,CACH,QAAS,UACX,EACA,YAAa,CACX,QAAS,QACX,EACA,UAAW,CACT,QAAS,SACT,QAA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