@stryke/capnp 0.12.43 → 0.12.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/capnpc.mjs.map +1 -1
- package/dist/helpers-BoKbpcuO.mjs.map +1 -1
- package/dist/{rpc.d.cts → rpc-helpers.d.cts} +2 -2
- package/dist/rpc-helpers.d.cts.map +1 -0
- package/dist/{rpc.d.mts → rpc-helpers.d.mts} +2 -2
- package/dist/rpc-helpers.d.mts.map +1 -0
- package/dist/{rpc.mjs → rpc-helpers.mjs} +1 -1
- package/dist/rpc-helpers.mjs.map +1 -0
- package/package.json +28 -39
- package/dist/rpc.d.cts.map +0 -1
- package/dist/rpc.d.mts.map +0 -1
- package/dist/rpc.mjs.map +0 -1
- /package/dist/{rpc.cjs → rpc-helpers.cjs} +0 -0
package/bin/capnpc.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capnpc.mjs","names":["convert","conversions","models","path","styles","stringReplaceAll","stringEncaseCRLFWithFirstIndex","styles","chalk","chalk","chalk","MAX_DEPTH","depth","path","CommanderError","InvalidArgumentError","Argument","InvalidArgumentError","humanReadableArgName","Help","cmd","humanReadableArgName","stripColor","Option","InvalidArgumentError","DualOptions","str","suggestSimilar","process","Command","Help","Argument","CommanderError","Option","option","path","Command","Option","Argument","Help","CommanderError","InvalidArgumentError","commander","dump","#proxyHandler","depth","ts","padToWord","ts","add","adopt","disown","program","resolvedTsconfig!: ParsedCommandLine","existsSync","dataBuf: Buffer","Buffer","tty","chunks: Buffer[]","opts: string[]","existsSync","existsSync","program"],"sources":["../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-LA3S35UI.js","../../../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js","../../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js","../../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js","../../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js","../../../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js","../../../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js","../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js","../../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js","../../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js","../../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-LM2UMGYA.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-UU2P3WKA.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-VOC4Q4SE.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-6JBGUE4A.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-V3GMJ4TX.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.59/node_modules/@storm-software/config-tools/dist/chunk-4A2P7H63.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/error.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/argument.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/help.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/option.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/suggestSimilar.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/command.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/index.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/esm.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.0-_cOx6D.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.BvfUH5E6.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/capnp/schema.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.GpvEvMIK.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.CbTQkT9D.mjs","../../../convert/src/to-array.ts","../../src/helpers.ts","../../src/compile.ts","../../bin/capnpc.ts"],"sourcesContent":["// src/utilities/colors.ts\nvar DEFAULT_COLOR_CONFIG = {\n light: {\n background: \"#fafafa\",\n foreground: \"#1d1e22\",\n brand: \"#1fb2a6\",\n alternate: \"#db2777\",\n help: \"#5C4EE5\",\n success: \"#087f5b\",\n info: \"#0550ae\",\n warning: \"#e3b341\",\n danger: \"#D8314A\",\n fatal: \"#51070f\",\n link: \"#3fa6ff\",\n positive: \"#22c55e\",\n negative: \"#dc2626\",\n gradient: [\"#1fb2a6\", \"#db2777\", \"#5C4EE5\"]\n },\n dark: {\n background: \"#1d1e22\",\n foreground: \"#cbd5e1\",\n brand: \"#2dd4bf\",\n alternate: \"#db2777\",\n help: \"#818cf8\",\n success: \"#10b981\",\n info: \"#58a6ff\",\n warning: \"#f3d371\",\n danger: \"#D8314A\",\n fatal: \"#a40e26\",\n link: \"#3fa6ff\",\n positive: \"#22c55e\",\n negative: \"#dc2626\",\n gradient: [\"#1fb2a6\", \"#db2777\", \"#818cf8\"]\n }\n};\nfunction getColors(config) {\n if (!config?.colors || typeof config.colors !== \"object\" || !config.colors[\"dark\"] && (!config.colors[\"base\"] || typeof config.colors !== \"object\" || !config.colors[\"base\"]?.[\"dark\"])) {\n return DEFAULT_COLOR_CONFIG;\n }\n if (config.colors[\"base\"]) {\n if (typeof config.colors[\"base\"][\"dark\"] === \"object\") {\n return config.colors[\"base\"][\"dark\"];\n } else if (config.colors[\"base\"][\"dark\"] === \"string\") {\n return config.colors[\"base\"];\n }\n }\n if (typeof config.colors[\"dark\"] === \"object\") {\n return config.colors[\"dark\"];\n }\n return config.colors ?? DEFAULT_COLOR_CONFIG;\n}\nfunction getColor(key, config) {\n const colors = getColors(config);\n const result = (typeof colors[\"dark\"] === \"object\" ? colors[\"dark\"][key] : colors[key]) || DEFAULT_COLOR_CONFIG[\"dark\"][key] || DEFAULT_COLOR_CONFIG[key];\n if (result) {\n return result;\n }\n if (key === \"link\") {\n return getColor(\"info\", config);\n } else if (key === \"fatal\") {\n return getColor(\"danger\", config);\n }\n return getColor(\"brand\", config);\n}\nfunction getGradient(config) {\n const colors = getColors(config);\n const result = (typeof colors[\"dark\"] === \"object\" ? colors[\"dark\"].gradient : colors.gradient) || DEFAULT_COLOR_CONFIG[\"dark\"].gradient;\n if (result && Array.isArray(result) && result.length > 0) {\n return result;\n }\n return void 0;\n}\n\nexport {\n DEFAULT_COLOR_CONFIG,\n getColors,\n getColor,\n getGradient\n};\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","'use strict';\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n","'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n","'use strict';\nconst ansiStyles = require('ansi-styles');\nconst {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = require('./util');\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = require('./templates');\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n","// src/logger/chalk.ts\nimport chalk from \"chalk\";\nvar chalkDefault = {\n hex: (_) => (message) => message,\n bgHex: (_) => ({\n whiteBright: (message) => message,\n white: (message) => message\n }),\n white: (message) => message,\n whiteBright: (message) => message,\n gray: (message) => message,\n bold: {\n hex: (_) => (message) => message,\n bgHex: (_) => ({\n whiteBright: (message) => message,\n white: (message) => message\n }),\n whiteBright: (message) => message,\n white: (message) => message\n },\n dim: {\n hex: (_) => (message) => message,\n gray: (message) => message\n }\n};\nvar getChalk = () => {\n let _chalk = chalk;\n if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {\n _chalk = chalkDefault;\n }\n return _chalk;\n};\n\nexport {\n getChalk\n};\n","// src/logger/is-unicode-supported.ts\nfunction isUnicodeSupported() {\n if (process.platform !== \"win32\") {\n return process.env.TERM !== \"linux\";\n }\n return Boolean(process.env.WT_SESSION) || // Windows Terminal\n Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)\n process.env.ConEmuTask === \"{cmd::Cmder}\" || // ConEmu and cmder\n process.env.TERM_PROGRAM === \"Terminus-Sublime\" || process.env.TERM_PROGRAM === \"vscode\" || process.env.TERM === \"xterm-256color\" || process.env.TERM === \"alacritty\" || process.env.TERM === \"rxvt-unicode\" || process.env.TERM === \"rxvt-unicode-256color\" || process.env.TERMINAL_EMULATOR === \"JetBrains-JediTerm\";\n}\n\nexport {\n isUnicodeSupported\n};\n","// src/types.ts\nvar LogLevel = {\n SILENT: 0,\n FATAL: 10,\n ERROR: 20,\n WARN: 30,\n SUCCESS: 35,\n INFO: 40,\n DEBUG: 60,\n TRACE: 70,\n ALL: 100\n};\nvar LogLevelLabel = {\n SILENT: \"silent\",\n FATAL: \"fatal\",\n ERROR: \"error\",\n WARN: \"warn\",\n SUCCESS: \"success\",\n INFO: \"info\",\n DEBUG: \"debug\",\n TRACE: \"trace\",\n ALL: \"all\"\n};\n\nexport {\n LogLevel,\n LogLevelLabel\n};\n","import {\n isUnicodeSupported\n} from \"./chunk-G2MK47WL.js\";\nimport {\n LogLevelLabel\n} from \"./chunk-POXTJ6GF.js\";\n\n// src/logger/console-icons.ts\nvar useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;\nvar CONSOLE_ICONS = {\n [LogLevelLabel.ERROR]: useIcon(\"\\u2718\", \"\\xD7\"),\n [LogLevelLabel.FATAL]: useIcon(\"\\u{1F480}\", \"\\xD7\"),\n [LogLevelLabel.WARN]: useIcon(\"\\u26A0\", \"\\u203C\"),\n [LogLevelLabel.INFO]: useIcon(\"\\u2139\", \"i\"),\n [LogLevelLabel.SUCCESS]: useIcon(\"\\u2714\", \"\\u221A\"),\n [LogLevelLabel.DEBUG]: useIcon(\"\\u{1F6E0}\", \"D\"),\n [LogLevelLabel.TRACE]: useIcon(\"\\u{1F6E0}\", \"T\"),\n [LogLevelLabel.ALL]: useIcon(\"\\u2709\", \"\\u2192\")\n};\n\nexport {\n CONSOLE_ICONS\n};\n","// src/logger/format-timestamp.ts\nvar formatTimestamp = (date = /* @__PURE__ */ new Date()) => {\n return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;\n};\n\nexport {\n formatTimestamp\n};\n","import {\n LogLevel,\n LogLevelLabel\n} from \"./chunk-POXTJ6GF.js\";\n\n// src/logger/get-log-level.ts\nvar getLogLevel = (label) => {\n switch (label) {\n case \"all\":\n return LogLevel.ALL;\n case \"trace\":\n return LogLevel.TRACE;\n case \"debug\":\n return LogLevel.DEBUG;\n case \"info\":\n return LogLevel.INFO;\n case \"warn\":\n return LogLevel.WARN;\n case \"error\":\n return LogLevel.ERROR;\n case \"fatal\":\n return LogLevel.FATAL;\n case \"silent\":\n return LogLevel.SILENT;\n default:\n return LogLevel.INFO;\n }\n};\nvar getLogLevelLabel = (logLevel = LogLevel.INFO) => {\n if (logLevel >= LogLevel.ALL) {\n return LogLevelLabel.ALL;\n }\n if (logLevel >= LogLevel.TRACE) {\n return LogLevelLabel.TRACE;\n }\n if (logLevel >= LogLevel.DEBUG) {\n return LogLevelLabel.DEBUG;\n }\n if (logLevel >= LogLevel.INFO) {\n return LogLevelLabel.INFO;\n }\n if (logLevel >= LogLevel.WARN) {\n return LogLevelLabel.WARN;\n }\n if (logLevel >= LogLevel.ERROR) {\n return LogLevelLabel.ERROR;\n }\n if (logLevel >= LogLevel.FATAL) {\n return LogLevelLabel.FATAL;\n }\n if (logLevel <= LogLevel.SILENT) {\n return LogLevelLabel.SILENT;\n }\n return LogLevelLabel.INFO;\n};\nvar isVerbose = (label = LogLevelLabel.SILENT) => {\n const logLevel = typeof label === \"string\" ? getLogLevel(label) : label;\n return logLevel >= LogLevel.DEBUG;\n};\n\nexport {\n getLogLevel,\n getLogLevelLabel,\n isVerbose\n};\n","import {\n DEFAULT_COLOR_CONFIG\n} from \"./chunk-LA3S35UI.js\";\nimport {\n getChalk\n} from \"./chunk-HVVJHTFS.js\";\nimport {\n CONSOLE_ICONS\n} from \"./chunk-LM2UMGYA.js\";\nimport {\n formatTimestamp\n} from \"./chunk-CZ4IE2QN.js\";\nimport {\n getLogLevel\n} from \"./chunk-K4CDYUQR.js\";\nimport {\n LogLevel,\n LogLevelLabel\n} from \"./chunk-POXTJ6GF.js\";\n\n// src/logger/console.ts\nimport { formatDistanceToNow } from \"date-fns/formatDistanceToNow\";\nvar getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {\n const colors = !config.colors?.dark && !config.colors?.[\"base\"] && !config.colors?.[\"base\"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === \"string\" ? config.colors : config.colors?.[\"base\"]?.dark && typeof config.colors[\"base\"].dark === \"string\" ? config.colors[\"base\"].dark : config.colors?.[\"base\"] ? config.colors?.[\"base\"] : DEFAULT_COLOR_CONFIG;\n const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;\n if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {\n return (_) => {\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.FATAL >= logLevel) {\n return (message) => {\n console.error(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.ERROR >= logLevel) {\n return (message) => {\n console.error(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.WARN >= logLevel) {\n return (message) => {\n console.warn(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.SUCCESS >= logLevel) {\n return (message) => {\n console.info(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.INFO >= logLevel) {\n return (message) => {\n console.info(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.DEBUG >= logLevel) {\n return (message) => {\n console.debug(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.TRACE >= logLevel) {\n return (message) => {\n console.debug(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n return (message) => {\n console.log(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n};\nvar writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);\nvar writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);\nvar writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);\nvar writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);\nvar writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);\nvar writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);\nvar writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);\nvar writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);\nvar getStopwatch = (name) => {\n const start = /* @__PURE__ */ new Date();\n return () => {\n console.info(\n `\n> \\u23F1\\uFE0F The${name ? ` ${name}` : \"\"} process took ${formatDistanceToNow(start, {\n includeSeconds: true\n })} to complete\n`\n );\n };\n};\nvar MAX_DEPTH = 4;\nvar formatLogMessage = (message, options = {}, depth = 0) => {\n if (depth > MAX_DEPTH) {\n return \"<max depth>\";\n }\n const prefix = options.prefix ?? \"-\";\n const skip = options.skip ?? [];\n return typeof message === \"undefined\" || message === null || !message && typeof message !== \"boolean\" ? \"<none>\" : typeof message === \"string\" ? message : Array.isArray(message) ? `\n${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth + 1)}`).join(\"\\n\")}` : typeof message === \"object\" ? `\n${Object.keys(message).filter((key) => !skip.includes(key)).map(\n (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? \"<function>\" : typeof message[key] === \"object\" ? formatLogMessage(\n message[key],\n { prefix: `${prefix}-`, skip },\n depth + 1\n ) : message[key]}`\n ).join(\"\\n\")}` : message;\n};\nvar _isFunction = (value) => {\n try {\n return value instanceof Function || typeof value === \"function\" || !!(value?.constructor && value?.call && value?.apply);\n } catch {\n return false;\n }\n};\n\nexport {\n getLogFn,\n writeFatal,\n writeError,\n writeWarning,\n writeInfo,\n writeSuccess,\n writeDebug,\n writeTrace,\n writeSystem,\n getStopwatch,\n formatLogMessage\n};\n","import {\n writeError,\n writeFatal,\n writeSuccess,\n writeTrace\n} from \"./chunk-UU2P3WKA.js\";\n\n// src/utilities/process-handler.ts\nvar exitWithError = (config) => {\n writeFatal(\"Exiting script with an error status...\", config);\n process.exit(1);\n};\nvar exitWithSuccess = (config) => {\n writeSuccess(\"Script completed successfully. Exiting...\", config);\n process.exit(0);\n};\nvar handleProcess = (config) => {\n writeTrace(\n `Using the following arguments to process the script: ${process.argv.join(\", \")}`,\n config\n );\n process.on(\"unhandledRejection\", (error) => {\n writeError(\n `An Unhandled Rejection occurred while running the program: ${error}`,\n config\n );\n exitWithError(config);\n });\n process.on(\"uncaughtException\", (error) => {\n writeError(\n `An Uncaught Exception occurred while running the program: ${error.message} \nStacktrace: ${error.stack}`,\n config\n );\n exitWithError(config);\n });\n process.on(\"SIGTERM\", (signal) => {\n writeError(`The program terminated with signal code: ${signal}`, config);\n exitWithError(config);\n });\n process.on(\"SIGINT\", (signal) => {\n writeError(`The program terminated with signal code: ${signal}`, config);\n exitWithError(config);\n });\n process.on(\"SIGHUP\", (signal) => {\n writeError(`The program terminated with signal code: ${signal}`, config);\n exitWithError(config);\n });\n};\n\nexport {\n exitWithError,\n exitWithSuccess,\n handleProcess\n};\n","// src/utilities/find-up.ts\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nvar MAX_PATH_SEARCH_DEPTH = 30;\nvar depth = 0;\nfunction findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {\n const _startPath = startPath ?? process.cwd();\n if (endDirectoryNames.some(\n (endDirName) => existsSync(join(_startPath, endDirName))\n )) {\n return _startPath;\n }\n if (endFileNames.some(\n (endFileName) => existsSync(join(_startPath, endFileName))\n )) {\n return _startPath;\n }\n if (_startPath !== \"/\" && depth++ < MAX_PATH_SEARCH_DEPTH) {\n const parent = join(_startPath, \"..\");\n return findFolderUp(parent, endFileNames, endDirectoryNames);\n }\n return void 0;\n}\n\nexport {\n findFolderUp\n};\n","// src/utilities/correct-paths.ts\nvar _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\nvar _UNC_REGEX = /^[/\\\\]{2}/;\nvar _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nvar _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nvar _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nvar _EXTNAME_RE = /.(\\.[^./]+|\\.)$/;\nvar _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nvar sep = \"/\";\nvar correctPaths = function(path) {\n if (!path || path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path?.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nvar joinPaths = function(...segments) {\n let path = \"\";\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n return correctPaths(path);\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nvar resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) {\n } else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nvar isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nvar toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nvar extname = function(p) {\n if (p === \"..\") return \"\";\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nvar relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nvar dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nvar format = function(p) {\n const ext = p.ext ? p.ext.startsWith(\".\") ? p.ext : `.${p.ext}` : \"\";\n const segments = [p.root, p.dir, p.base ?? (p.name ?? \"\") + ext].filter(\n Boolean\n );\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nvar basename = function(p, extension) {\n const segments = normalizeWindowsPath(p).split(\"/\");\n let lastSegment = \"\";\n for (let i = segments.length - 1; i >= 0; i--) {\n const val = segments[i];\n if (val) {\n lastSegment = val;\n break;\n }\n }\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nvar parse = function(p) {\n const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\n\nexport {\n normalizeWindowsPath,\n sep,\n correctPaths,\n joinPaths,\n resolve,\n normalizeString,\n isAbsolute,\n toNamespacedPath,\n extname,\n relative,\n dirname,\n format,\n basename,\n parse\n};\n","import {\n findFolderUp\n} from \"./chunk-6JBGUE4A.js\";\nimport {\n correctPaths\n} from \"./chunk-V3GMJ4TX.js\";\n\n// src/utilities/find-workspace-root.ts\nvar rootFiles = [\n \"storm-workspace.json\",\n \"storm-workspace.yaml\",\n \"storm-workspace.yml\",\n \"storm-workspace.js\",\n \"storm-workspace.ts\",\n \".storm-workspace.json\",\n \".storm-workspace.yaml\",\n \".storm-workspace.yml\",\n \".storm-workspace.js\",\n \".storm-workspace.ts\",\n \"lerna.json\",\n \"nx.json\",\n \"turbo.json\",\n \"npm-workspace.json\",\n \"yarn-workspace.json\",\n \"pnpm-workspace.json\",\n \"npm-workspace.yaml\",\n \"yarn-workspace.yaml\",\n \"pnpm-workspace.yaml\",\n \"npm-workspace.yml\",\n \"yarn-workspace.yml\",\n \"pnpm-workspace.yml\",\n \"npm-lock.json\",\n \"yarn-lock.json\",\n \"pnpm-lock.json\",\n \"npm-lock.yaml\",\n \"yarn-lock.yaml\",\n \"pnpm-lock.yaml\",\n \"npm-lock.yml\",\n \"yarn-lock.yml\",\n \"pnpm-lock.yml\",\n \"bun.lockb\"\n];\nvar rootDirectories = [\n \".storm-workspace\",\n \".nx\",\n \".git\",\n \".github\",\n \".vscode\",\n \".verdaccio\"\n];\nfunction findWorkspaceRootSafe(pathInsideMonorepo) {\n if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {\n return correctPaths(\n process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH\n );\n }\n return correctPaths(\n findFolderUp(\n pathInsideMonorepo ?? process.cwd(),\n rootFiles,\n rootDirectories\n )\n );\n}\nfunction findWorkspaceRoot(pathInsideMonorepo) {\n const result = findWorkspaceRootSafe(pathInsideMonorepo);\n if (!result) {\n throw new Error(\n `Cannot find workspace root upwards from known path. Files search list includes: \n${rootFiles.join(\n \"\\n\"\n )}\nPath: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`\n );\n }\n return result;\n}\n\nexport {\n findWorkspaceRootSafe,\n findWorkspaceRoot\n};\n","/**\n * CommanderError class\n */\nclass 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 */\nclass 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\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass 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\nfunction humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';\n}\n\nexports.Argument = Argument;\nexports.humanReadableArgName = humanReadableArgName;\n","const { humanReadableArgName } = require('./argument.js');\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.\nclass 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 stripColor(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\n/**\n * Strip style ANSI escape sequences from the string. In particular, SGR (Select Graphic Rendition) codes.\n *\n * @param {string} str\n * @returns {string}\n * @package\n */\n\nfunction stripColor(str) {\n // eslint-disable-next-line no-control-regex\n const sgrPattern = /\\x1b\\[\\d*(;\\d*)*m/g;\n return str.replace(sgrPattern, '');\n}\n\nexports.Help = Help;\nexports.stripColor = stripColor;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass 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 */\nclass 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\nexports.Option = Option;\nexports.DualOptions = DualOptions;\n","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 = 1;\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\nfunction 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\nexports.suggestSimilar = suggestSimilar;\n","const EventEmitter = require('node:events').EventEmitter;\nconst childProcess = require('node:child_process');\nconst path = require('node:path');\nconst fs = require('node:fs');\nconst process = require('node:process');\n\nconst { Argument, humanReadableArgName } = require('./argument.js');\nconst { CommanderError } = require('./error.js');\nconst { Help, stripColor } = require('./help.js');\nconst { Option, DualOptions } = require('./option.js');\nconst { suggestSimilar } = require('./suggestSimilar');\n\nclass 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) => stripColor(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.negate) {\n // --no-foo is special and defaults foo to true, unless a --foo option is already defined\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(\n name,\n option.defaultValue === undefined ? true : option.defaultValue,\n 'default',\n );\n }\n } else 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 if (this._savedState === null) {\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 let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\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 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 forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\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 require.main.filename, or __filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(require.main.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(__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 * @returns {boolean | undefined}\n * @package\n */\nfunction 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\nexports.Command = Command;\nexports.useColor = useColor; // exporting for tests\n","const { Argument } = require('./lib/argument.js');\nconst { Command } = require('./lib/command.js');\nconst { CommanderError, InvalidArgumentError } = require('./lib/error.js');\nconst { Help } = require('./lib/help.js');\nconst { Option } = require('./lib/option.js');\n\nexports.program = new Command();\n\nexports.createCommand = (name) => new Command(name);\nexports.createOption = (flags, description) => new Option(flags, description);\nexports.createArgument = (name, description) => new Argument(name, description);\n\n/**\n * Expose classes\n */\n\nexports.Command = Command;\nexports.Option = Option;\nexports.Argument = Argument;\nexports.Help = Help;\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\nexports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated\n","import commander from './index.js';\n\n// wrapper to provide named exports for ESM.\nexport const {\n program,\n createCommand,\n createArgument,\n createOption,\n CommanderError,\n InvalidArgumentError,\n InvalidOptionArgumentError, // deprecated old name\n Command,\n Argument,\n Option,\n Help,\n} = commander;\n","var ListElementSize = /* @__PURE__ */ ((ListElementSize2) => {\n ListElementSize2[ListElementSize2[\"VOID\"] = 0] = \"VOID\";\n ListElementSize2[ListElementSize2[\"BIT\"] = 1] = \"BIT\";\n ListElementSize2[ListElementSize2[\"BYTE\"] = 2] = \"BYTE\";\n ListElementSize2[ListElementSize2[\"BYTE_2\"] = 3] = \"BYTE_2\";\n ListElementSize2[ListElementSize2[\"BYTE_4\"] = 4] = \"BYTE_4\";\n ListElementSize2[ListElementSize2[\"BYTE_8\"] = 5] = \"BYTE_8\";\n ListElementSize2[ListElementSize2[\"POINTER\"] = 6] = \"POINTER\";\n ListElementSize2[ListElementSize2[\"COMPOSITE\"] = 7] = \"COMPOSITE\";\n return ListElementSize2;\n})(ListElementSize || {});\n\nconst tmpWord = new DataView(new ArrayBuffer(8));\nnew Uint16Array(tmpWord.buffer)[0] = 258;\nconst DEFAULT_BUFFER_SIZE = 4096;\nconst DEFAULT_TRAVERSE_LIMIT = 64 << 20;\nconst LIST_SIZE_MASK = 7;\nconst MAX_BUFFER_DUMP_BYTES = 8192;\nconst MAX_INT32 = 2147483647;\nconst MAX_UINT32 = 4294967295;\nconst MIN_SINGLE_SEGMENT_GROWTH = 4096;\nconst NATIVE_LITTLE_ENDIAN = tmpWord.getUint8(0) === 2;\nconst PACK_SPAN_THRESHOLD = 2;\nconst POINTER_DOUBLE_FAR_MASK = 4;\nconst POINTER_TYPE_MASK = 3;\nconst MAX_DEPTH = MAX_INT32;\nconst MAX_SEGMENT_LENGTH = MAX_UINT32;\n\nconst INVARIANT_UNREACHABLE_CODE = \"CAPNP-TS000 Unreachable code detected.\";\nfunction assertNever(n) {\n throw new Error(INVARIANT_UNREACHABLE_CODE + ` (never block hit with: ${n})`);\n}\nconst MSG_INVALID_FRAME_HEADER = \"CAPNP-TS001 Attempted to parse an invalid message frame header; are you sure this is a Cap'n Proto message?\";\nconst MSG_PACK_NOT_WORD_ALIGNED = \"CAPNP-TS003 Attempted to pack a message that was not word-aligned.\";\nconst MSG_SEGMENT_OUT_OF_BOUNDS = \"CAPNP-TS004 Segment ID %X is out of bounds for message %s.\";\nconst MSG_SEGMENT_TOO_SMALL = \"CAPNP-TS005 First segment must have at least enough room to hold the root pointer (8 bytes).\";\nconst NOT_IMPLEMENTED = \"CAPNP-TS006 %s is not implemented.\";\nconst PTR_ADOPT_WRONG_MESSAGE = \"CAPNP-TS008 Attempted to adopt %s into a pointer in a different message %s.\";\nconst PTR_ALREADY_ADOPTED = \"CAPNP-TS009 Attempted to adopt %s more than once.\";\nconst PTR_COMPOSITE_SIZE_UNDEFINED = \"CAPNP-TS010 Attempted to set a composite list without providing a composite element size.\";\nconst PTR_DEPTH_LIMIT_EXCEEDED = \"CAPNP-TS011 Nesting depth limit exceeded for %s.\";\nconst PTR_INIT_COMPOSITE_STRUCT = \"CAPNP-TS013 Attempted to initialize a struct member from a composite list (%s).\";\nconst PTR_INVALID_FAR_TARGET = \"CAPNP-TS015 Target of a far pointer (%s) is another far pointer.\";\nconst PTR_INVALID_LIST_SIZE = \"CAPNP-TS016 Invalid list element size: %x.\";\nconst PTR_INVALID_POINTER_TYPE = \"CAPNP-TS017 Invalid pointer type: %x.\";\nconst PTR_INVALID_UNION_ACCESS = \"CAPNP-TS018 Attempted to access getter on %s for union field %s that is not currently set (wanted: %d, found: %d).\";\nconst PTR_OFFSET_OUT_OF_BOUNDS = \"CAPNP-TS019 Pointer offset %a is out of bounds for underlying buffer.\";\nconst PTR_STRUCT_DATA_OUT_OF_BOUNDS = \"CAPNP-TS020 Attempted to access out-of-bounds struct data (struct: %s, %d bytes at %a, data words: %d).\";\nconst PTR_STRUCT_POINTER_OUT_OF_BOUNDS = \"CAPNP-TS021 Attempted to access out-of-bounds struct pointer (%s, index: %d, length: %d).\";\nconst PTR_TRAVERSAL_LIMIT_EXCEEDED = \"CAPNP-TS022 Traversal limit exceeded! Slow down! %s\";\nconst PTR_WRONG_LIST_TYPE = \"CAPNP-TS023 Cannot convert %s to a %s list.\";\nconst PTR_WRONG_POINTER_TYPE = \"CAPNP-TS024 Attempted to convert pointer %s to a %s type.\";\nconst SEG_GET_NON_ZERO_SINGLE = \"CAPNP-TS035 Attempted to get a segment other than 0 (%d) from a single segment arena.\";\nconst SEG_ID_OUT_OF_BOUNDS = \"CAPNP-TS036 Attempted to get an out-of-bounds segment (%d).\";\nconst SEG_NOT_WORD_ALIGNED = \"CAPNP-TS037 Segment buffer length %d is not a multiple of 8.\";\nconst SEG_REPLACEMENT_BUFFER_TOO_SMALL = \"CAPNP-TS038 Attempted to replace a segment buffer with one that is smaller than the allocated space.\";\nconst SEG_SIZE_OVERFLOW = `CAPNP-TS039 Requested size %x exceeds maximum value (${MAX_SEGMENT_LENGTH}).`;\nconst TYPE_COMPOSITE_SIZE_UNDEFINED = \"CAPNP-TS040 Must provide a composite element size for composite list pointers.\";\nconst LIST_NO_MUTABLE = \"CAPNP-TS045: Cannot call mutative methods on an immutable list.\";\nconst LIST_NO_SEARCH = \"CAPNP-TS046: Search is not supported for list.\";\nconst RPC_NULL_CLIENT = \"CAPNP-TS100 Call on null client.\";\nconst RPC_CALL_QUEUE_FULL = \"CAPNP-TS101 Promised answer call queue full.\";\nconst RPC_QUEUE_CALL_CANCEL = \"CAPNP-TS102 Queue call canceled.\";\nconst RPC_ZERO_REF = \"CAPNP-TS105 Ref() called on zeroed refcount.\";\nconst RPC_IMPORT_CLOSED = \"CAPNP-TS106 Call on closed import.\";\nconst RPC_METHOD_NOT_IMPLEMENTED = \"CAPNP-TS107 Method not implemented.\";\nconst RPC_BAD_TARGET = \"CAPNP-TS109 Target not found.\";\nconst RPC_RETURN_FOR_UNKNOWN_QUESTION = \"CAPNP-TS111 Received return for unknown question (id=%s).\";\nconst RPC_QUESTION_ID_REUSED = \"CAPNP-TS112 Attempted to re-use question id (%s).\";\nconst RPC_UNKNOWN_EXPORT_ID = \"CAPNP-TS113 Capability table references unknown export ID (%s).\";\nconst RPC_UNKNOWN_ANSWER_ID = \"CAPNP-TS114 Capability table references unknown answer ID (%s).\";\nconst RPC_UNKNOWN_CAP_DESCRIPTOR = \"CAPNP-TS115 Unknown cap descriptor type (which: %s).\";\nconst RPC_METHOD_ERROR = \"CAPNP-TS116 RPC method failed at %s.%s(): %s\";\nconst RPC_ERROR = \"CAPNP-TS117 RPC call failed, reason: %s\";\nconst RPC_NO_MAIN_INTERFACE = \"CAPNP-TS118 Received bootstrap message without main interface set.\";\nconst RPC_FINISH_UNKNOWN_ANSWER = \"CAPNP-TS119 Received finish message for unknown answer ID (%s).\";\nconst RPC_FULFILL_ALREADY_CALLED = \"CAPNP-TS120 Fulfill called more than once for question (%s).\";\n\nfunction bufferToHex(buffer) {\n const a = new Uint8Array(buffer);\n const h = [];\n for (let i = 0; i < a.byteLength; i++) {\n h.push(pad(a[i].toString(16), 2));\n }\n return `[${h.join(\" \")}]`;\n}\nfunction dumpBuffer(buffer) {\n const b = buffer instanceof ArrayBuffer ? new Uint8Array(buffer) : new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n const byteLength = Math.min(b.byteLength, MAX_BUFFER_DUMP_BYTES);\n let r = format(\"\\n=== buffer[%d] ===\", byteLength);\n for (let j = 0; j < byteLength; j += 16) {\n r += `\n${pad(j.toString(16), 8)}: `;\n let s = \"\";\n let k;\n for (k = 0; k < 16 && j + k < b.byteLength; k++) {\n const v = b[j + k];\n r += `${pad(v.toString(16), 2)} `;\n s += v > 31 && v < 255 ? String.fromCharCode(v) : \"\\xB7\";\n if (k === 7) {\n r += \" \";\n }\n }\n r += `${\" \".repeat((17 - k) * 3)}${s}`;\n }\n r += \"\\n\";\n if (byteLength !== b.byteLength) {\n r += format(\"=== (truncated %d bytes) ===\\n\", b.byteLength - byteLength);\n }\n return r;\n}\nfunction format(s, ...args) {\n const n = s.length;\n let arg;\n let argIndex = 0;\n let c;\n let escaped = false;\n let i = 0;\n let leadingZero = false;\n let precision;\n let result = \"\";\n function nextArg() {\n return args[argIndex++];\n }\n function slurpNumber() {\n let digits = \"\";\n while (/\\d/.test(s[i])) {\n digits += s[i++];\n c = s[i];\n }\n return digits.length > 0 ? Number.parseInt(digits, 10) : null;\n }\n for (; i < n; ++i) {\n c = s[i];\n if (escaped) {\n escaped = false;\n if (c === \".\") {\n leadingZero = false;\n c = s[++i];\n } else if (c === \"0\" && s[i + 1] === \".\") {\n leadingZero = true;\n i += 2;\n c = s[i];\n } else {\n leadingZero = true;\n }\n precision = slurpNumber();\n switch (c) {\n case \"a\": {\n result += \"0x\" + pad(Number.parseInt(String(nextArg()), 10).toString(16), 8);\n break;\n }\n case \"b\": {\n result += Number.parseInt(String(nextArg()), 10).toString(2);\n break;\n }\n case \"c\": {\n arg = nextArg();\n result += typeof arg === \"string\" || arg instanceof String ? arg : String.fromCharCode(Number.parseInt(String(arg), 10));\n break;\n }\n case \"d\": {\n result += Number.parseInt(String(nextArg()), 10);\n break;\n }\n case \"f\": {\n const tmp = Number.parseFloat(String(nextArg())).toFixed(\n precision || 6\n );\n result += leadingZero ? tmp : tmp.replace(/^0/, \"\");\n break;\n }\n case \"j\": {\n result += JSON.stringify(nextArg());\n break;\n }\n case \"o\": {\n result += \"0\" + Number.parseInt(String(nextArg()), 10).toString(8);\n break;\n }\n case \"s\": {\n result += nextArg();\n break;\n }\n case \"x\": {\n result += \"0x\" + Number.parseInt(String(nextArg()), 10).toString(16);\n break;\n }\n case \"X\": {\n result += \"0x\" + Number.parseInt(String(nextArg()), 10).toString(16).toUpperCase();\n break;\n }\n default: {\n result += c;\n break;\n }\n }\n } else if (c === \"%\") {\n escaped = true;\n } else {\n result += c;\n }\n }\n return result;\n}\nfunction pad(v, width, pad2 = \"0\") {\n return v.length >= width ? v : Array.from({ length: width - v.length + 1 }).join(pad2) + v;\n}\nfunction padToWord$1(size) {\n return size + 7 & -8;\n}\n\nclass ObjectSize {\n /**\n * Creates a new ObjectSize instance.\n *\n * @param dataByteLength - The number of bytes in the data section of the struct\n * @param pointerLength - The number of pointers in the pointer section of the struct\n */\n constructor(dataByteLength, pointerLength) {\n this.dataByteLength = dataByteLength;\n this.pointerLength = pointerLength;\n }\n toString() {\n return format(\n \"ObjectSize_dw:%d,pc:%d\",\n getDataWordLength(this),\n this.pointerLength\n );\n }\n}\nfunction getByteLength(o) {\n return o.dataByteLength + o.pointerLength * 8;\n}\nfunction getDataWordLength(o) {\n return o.dataByteLength / 8;\n}\nfunction getWordLength(o) {\n return o.dataByteLength / 8 + o.pointerLength;\n}\nfunction padToWord(o) {\n return new ObjectSize(padToWord$1(o.dataByteLength), o.pointerLength);\n}\n\nclass Orphan {\n /** If this member is not present then the orphan has already been adopted, or something went very wrong. */\n _capnp;\n byteOffset;\n segment;\n constructor(src) {\n const c = getContent(src);\n this.segment = c.segment;\n this.byteOffset = c.byteOffset;\n this._capnp = {};\n this._capnp.type = getTargetPointerType(src);\n switch (this._capnp.type) {\n case PointerType.STRUCT: {\n this._capnp.size = getTargetStructSize(src);\n break;\n }\n case PointerType.LIST: {\n this._capnp.length = getTargetListLength(src);\n this._capnp.elementSize = getTargetListElementSize(src);\n if (this._capnp.elementSize === ListElementSize.COMPOSITE) {\n this._capnp.size = getTargetCompositeListSize(src);\n }\n break;\n }\n case PointerType.OTHER: {\n this._capnp.capId = getCapabilityId(src);\n break;\n }\n default: {\n throw new Error(PTR_INVALID_POINTER_TYPE);\n }\n }\n erasePointer(src);\n }\n /**\n * Adopt (move) this orphan into the target pointer location. This will allocate far pointers in `dst` as needed.\n *\n * @param dst The destination pointer.\n */\n _moveTo(dst) {\n if (this._capnp === undefined) {\n throw new Error(format(PTR_ALREADY_ADOPTED, this));\n }\n if (this.segment.message !== dst.segment.message) {\n throw new Error(format(PTR_ADOPT_WRONG_MESSAGE, this, dst));\n }\n erase(dst);\n const res = initPointer(this.segment, this.byteOffset, dst);\n switch (this._capnp.type) {\n case PointerType.STRUCT: {\n setStructPointer(res.offsetWords, this._capnp.size, res.pointer);\n break;\n }\n case PointerType.LIST: {\n let { offsetWords } = res;\n if (this._capnp.elementSize === ListElementSize.COMPOSITE) {\n offsetWords--;\n }\n setListPointer(\n offsetWords,\n this._capnp.elementSize,\n this._capnp.length,\n res.pointer,\n this._capnp.size\n );\n break;\n }\n case PointerType.OTHER: {\n setInterfacePointer(this._capnp.capId, res.pointer);\n break;\n }\n /* istanbul ignore next */\n default: {\n throw new Error(PTR_INVALID_POINTER_TYPE);\n }\n }\n this._capnp = undefined;\n }\n dispose() {\n if (this._capnp === undefined) {\n return;\n }\n switch (this._capnp.type) {\n case PointerType.STRUCT: {\n this.segment.fillZeroWords(\n this.byteOffset,\n getWordLength(this._capnp.size)\n );\n break;\n }\n case PointerType.LIST: {\n const byteLength = getListByteLength(\n this._capnp.elementSize,\n this._capnp.length,\n this._capnp.size\n );\n this.segment.fillZeroWords(this.byteOffset, byteLength);\n break;\n }\n }\n this._capnp = undefined;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n return format(\n \"Orphan_%d@%a,type:%s\",\n this.segment.id,\n this.byteOffset,\n this._capnp && this._capnp.type\n );\n }\n}\n\nfunction adopt(src, p) {\n src._moveTo(p);\n}\nfunction disown(p) {\n return new Orphan(p);\n}\nfunction dump(p) {\n return bufferToHex(p.segment.buffer.slice(p.byteOffset, p.byteOffset + 8));\n}\nfunction getListByteLength(elementSize, length, compositeSize) {\n switch (elementSize) {\n case ListElementSize.BIT: {\n return padToWord$1(length + 7 >>> 3);\n }\n case ListElementSize.BYTE:\n case ListElementSize.BYTE_2:\n case ListElementSize.BYTE_4:\n case ListElementSize.BYTE_8:\n case ListElementSize.POINTER:\n case ListElementSize.VOID: {\n return padToWord$1(getListElementByteLength(elementSize) * length);\n }\n /* istanbul ignore next */\n case ListElementSize.COMPOSITE: {\n if (compositeSize === undefined) {\n throw new Error(format(PTR_INVALID_LIST_SIZE, Number.NaN));\n }\n return length * padToWord$1(getByteLength(compositeSize));\n }\n /* istanbul ignore next */\n default: {\n throw new Error(PTR_INVALID_LIST_SIZE);\n }\n }\n}\nfunction getListElementByteLength(elementSize) {\n switch (elementSize) {\n /* istanbul ignore next */\n case ListElementSize.BIT: {\n return Number.NaN;\n }\n case ListElementSize.BYTE: {\n return 1;\n }\n case ListElementSize.BYTE_2: {\n return 2;\n }\n case ListElementSize.BYTE_4: {\n return 4;\n }\n case ListElementSize.BYTE_8:\n case ListElementSize.POINTER: {\n return 8;\n }\n /* istanbul ignore next */\n case ListElementSize.COMPOSITE: {\n return Number.NaN;\n }\n /* istanbul ignore next */\n case ListElementSize.VOID: {\n return 0;\n }\n /* istanbul ignore next */\n default: {\n throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize));\n }\n }\n}\nfunction add(offset, p) {\n return new Pointer(p.segment, p.byteOffset + offset, p._capnp.depthLimit);\n}\nfunction copyFrom(src, p) {\n if (p.segment === src.segment && p.byteOffset === src.byteOffset) {\n return;\n }\n erase(p);\n if (isNull(src)) return;\n switch (getTargetPointerType(src)) {\n case PointerType.STRUCT: {\n copyFromStruct(src, p);\n break;\n }\n case PointerType.LIST: {\n copyFromList(src, p);\n break;\n }\n case PointerType.OTHER: {\n copyFromInterface(src, p);\n break;\n }\n /* istanbul ignore next */\n default: {\n throw new Error(\n format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p))\n );\n }\n }\n}\nfunction erase(p) {\n if (isNull(p)) return;\n let c;\n switch (getTargetPointerType(p)) {\n case PointerType.STRUCT: {\n const size = getTargetStructSize(p);\n c = getContent(p);\n c.segment.fillZeroWords(c.byteOffset, size.dataByteLength / 8);\n for (let i = 0; i < size.pointerLength; i++) {\n erase(add(i * 8, c));\n }\n break;\n }\n case PointerType.LIST: {\n const elementSize = getTargetListElementSize(p);\n const length = getTargetListLength(p);\n let contentWords = padToWord$1(\n length * getListElementByteLength(elementSize)\n );\n c = getContent(p);\n if (elementSize === ListElementSize.POINTER) {\n for (let i = 0; i < length; i++) {\n erase(\n new Pointer(\n c.segment,\n c.byteOffset + i * 8,\n p._capnp.depthLimit - 1\n )\n );\n }\n break;\n } else if (elementSize === ListElementSize.COMPOSITE) {\n const tag = add(-8, c);\n const compositeSize = getStructSize(tag);\n const compositeByteLength = getByteLength(compositeSize);\n contentWords = getOffsetWords(tag);\n c.segment.setWordZero(c.byteOffset - 8);\n for (let i = 0; i < length; i++) {\n for (let j = 0; j < compositeSize.pointerLength; j++) {\n erase(\n new Pointer(\n c.segment,\n c.byteOffset + i * compositeByteLength + j * 8,\n p._capnp.depthLimit - 1\n )\n );\n }\n }\n }\n c.segment.fillZeroWords(c.byteOffset, contentWords);\n break;\n }\n case PointerType.OTHER: {\n break;\n }\n default: {\n throw new Error(\n format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p))\n );\n }\n }\n erasePointer(p);\n}\nfunction erasePointer(p) {\n if (getPointerType(p) === PointerType.FAR) {\n const landingPad = followFar(p);\n if (isDoubleFar(p)) {\n landingPad.segment.setWordZero(landingPad.byteOffset + 8);\n }\n landingPad.segment.setWordZero(landingPad.byteOffset);\n }\n p.segment.setWordZero(p.byteOffset);\n}\nfunction followFar(p) {\n const targetSegment = p.segment.message.getSegment(\n p.segment.getUint32(p.byteOffset + 4)\n );\n const targetWordOffset = p.segment.getUint32(p.byteOffset) >>> 3;\n return new Pointer(\n targetSegment,\n targetWordOffset * 8,\n p._capnp.depthLimit - 1\n );\n}\nfunction followFars(p) {\n if (getPointerType(p) === PointerType.FAR) {\n const landingPad = followFar(p);\n if (isDoubleFar(p)) {\n landingPad.byteOffset += 8;\n }\n return landingPad;\n }\n return p;\n}\nfunction getCapabilityId(p) {\n return p.segment.getUint32(p.byteOffset + 4);\n}\nfunction isCompositeList(p) {\n return getTargetPointerType(p) === PointerType.LIST && getTargetListElementSize(p) === ListElementSize.COMPOSITE;\n}\nfunction getContent(p, ignoreCompositeIndex) {\n let c;\n if (isDoubleFar(p)) {\n const landingPad = followFar(p);\n c = new Pointer(\n p.segment.message.getSegment(getFarSegmentId(landingPad)),\n getOffsetWords(landingPad) * 8\n );\n } else {\n const target = followFars(p);\n c = new Pointer(\n target.segment,\n target.byteOffset + 8 + getOffsetWords(target) * 8\n );\n }\n if (isCompositeList(p)) {\n c.byteOffset += 8;\n }\n if (!ignoreCompositeIndex && p._capnp.compositeIndex !== undefined) {\n c.byteOffset -= 8;\n c.byteOffset += 8 + p._capnp.compositeIndex * getByteLength(padToWord(getStructSize(c)));\n }\n return c;\n}\nfunction getFarSegmentId(p) {\n return p.segment.getUint32(p.byteOffset + 4);\n}\nfunction getListElementSize(p) {\n return p.segment.getUint32(p.byteOffset + 4) & LIST_SIZE_MASK;\n}\nfunction getListLength(p) {\n return p.segment.getUint32(p.byteOffset + 4) >>> 3;\n}\nfunction getOffsetWords(p) {\n const o = p.segment.getInt32(p.byteOffset);\n return o & 2 ? o >> 3 : o >> 2;\n}\nfunction getPointerType(p) {\n return p.segment.getUint32(p.byteOffset) & POINTER_TYPE_MASK;\n}\nfunction getStructDataWords(p) {\n return p.segment.getUint16(p.byteOffset + 4);\n}\nfunction getStructPointerLength(p) {\n return p.segment.getUint16(p.byteOffset + 6);\n}\nfunction getStructSize(p) {\n return new ObjectSize(getStructDataWords(p) * 8, getStructPointerLength(p));\n}\nfunction getTargetCompositeListTag(p) {\n const c = getContent(p);\n c.byteOffset -= 8;\n return c;\n}\nfunction getTargetCompositeListSize(p) {\n return getStructSize(getTargetCompositeListTag(p));\n}\nfunction getTargetListElementSize(p) {\n return getListElementSize(followFars(p));\n}\nfunction getTargetListLength(p) {\n const t = followFars(p);\n if (getListElementSize(t) === ListElementSize.COMPOSITE) {\n return getOffsetWords(getTargetCompositeListTag(p));\n }\n return getListLength(t);\n}\nfunction getTargetPointerType(p) {\n const t = getPointerType(followFars(p));\n if (t === PointerType.FAR) {\n throw new Error(format(PTR_INVALID_FAR_TARGET, p));\n }\n return t;\n}\nfunction getTargetStructSize(p) {\n return getStructSize(followFars(p));\n}\nfunction initPointer(contentSegment, contentOffset, p) {\n if (p.segment !== contentSegment) {\n if (!contentSegment.hasCapacity(8)) {\n const landingPad2 = p.segment.allocate(16);\n setFarPointer(true, landingPad2.byteOffset / 8, landingPad2.segment.id, p);\n setFarPointer(false, contentOffset / 8, contentSegment.id, landingPad2);\n landingPad2.byteOffset += 8;\n return new PointerAllocationResult(landingPad2, 0);\n }\n const landingPad = contentSegment.allocate(8);\n if (landingPad.segment.id !== contentSegment.id) {\n throw new Error(INVARIANT_UNREACHABLE_CODE);\n }\n setFarPointer(false, landingPad.byteOffset / 8, landingPad.segment.id, p);\n return new PointerAllocationResult(\n landingPad,\n (contentOffset - landingPad.byteOffset - 8) / 8\n );\n }\n return new PointerAllocationResult(p, (contentOffset - p.byteOffset - 8) / 8);\n}\nfunction isDoubleFar(p) {\n return getPointerType(p) === PointerType.FAR && (p.segment.getUint32(p.byteOffset) & POINTER_DOUBLE_FAR_MASK) !== 0;\n}\nfunction isNull(p) {\n return p.segment.isWordZero(p.byteOffset);\n}\nfunction relocateTo(dst, src) {\n const t = followFars(src);\n const lo = t.segment.getUint8(t.byteOffset) & 3;\n const hi = t.segment.getUint32(t.byteOffset + 4);\n erase(dst);\n const res = initPointer(\n t.segment,\n t.byteOffset + 8 + getOffsetWords(t) * 8,\n dst\n );\n res.pointer.segment.setUint32(\n res.pointer.byteOffset,\n lo | res.offsetWords << 2\n );\n res.pointer.segment.setUint32(res.pointer.byteOffset + 4, hi);\n erasePointer(src);\n}\nfunction setFarPointer(doubleFar, offsetWords, segmentId, p) {\n const A = PointerType.FAR;\n const B = doubleFar ? 1 : 0;\n const C = offsetWords;\n const D = segmentId;\n p.segment.setUint32(p.byteOffset, A | B << 2 | C << 3);\n p.segment.setUint32(p.byteOffset + 4, D);\n}\nfunction setInterfacePointer(capId, p) {\n p.segment.setUint32(p.byteOffset, PointerType.OTHER);\n p.segment.setUint32(p.byteOffset + 4, capId);\n}\nfunction getInterfacePointer(p) {\n return p.segment.getUint32(p.byteOffset + 4);\n}\nfunction setListPointer(offsetWords, size, length, p, compositeSize) {\n const A = PointerType.LIST;\n const B = offsetWords;\n const C = size;\n let D = length;\n if (size === ListElementSize.COMPOSITE) {\n if (compositeSize === undefined) {\n throw new TypeError(TYPE_COMPOSITE_SIZE_UNDEFINED);\n }\n D *= getWordLength(compositeSize);\n }\n p.segment.setUint32(p.byteOffset, A | B << 2);\n p.segment.setUint32(p.byteOffset + 4, C | D << 3);\n}\nfunction setStructPointer(offsetWords, size, p) {\n const A = PointerType.STRUCT;\n const B = offsetWords;\n const C = getDataWordLength(size);\n const D = size.pointerLength;\n p.segment.setUint32(p.byteOffset, A | B << 2);\n p.segment.setUint16(p.byteOffset + 4, C);\n p.segment.setUint16(p.byteOffset + 6, D);\n}\nfunction validate(pointerType, p, elementSize) {\n if (isNull(p)) {\n return;\n }\n const t = followFars(p);\n const A = t.segment.getUint32(t.byteOffset) & POINTER_TYPE_MASK;\n if (A !== pointerType) {\n throw new Error(format(PTR_WRONG_POINTER_TYPE, p, pointerType));\n }\n if (elementSize !== undefined) {\n const C = t.segment.getUint32(t.byteOffset + 4) & LIST_SIZE_MASK;\n if (C !== elementSize) {\n throw new Error(\n format(PTR_WRONG_LIST_TYPE, p, ListElementSize[elementSize])\n );\n }\n }\n}\nfunction copyFromInterface(src, dst) {\n const srcCapId = getInterfacePointer(src);\n if (srcCapId < 0) {\n return;\n }\n const srcCapTable = src.segment.message._capnp.capTable;\n if (!srcCapTable) {\n return;\n }\n const client = srcCapTable[srcCapId];\n if (!client) {\n return;\n }\n const dstCapId = dst.segment.message.addCap(client);\n setInterfacePointer(dstCapId, dst);\n}\nfunction copyFromList(src, dst) {\n if (dst._capnp.depthLimit <= 0) {\n throw new Error(PTR_DEPTH_LIMIT_EXCEEDED);\n }\n const srcContent = getContent(src);\n const srcElementSize = getTargetListElementSize(src);\n const srcLength = getTargetListLength(src);\n let srcCompositeSize;\n let srcStructByteLength;\n let dstContent;\n if (srcElementSize === ListElementSize.POINTER) {\n dstContent = dst.segment.allocate(srcLength << 3);\n for (let i = 0; i < srcLength; i++) {\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + (i << 3),\n src._capnp.depthLimit - 1\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + (i << 3),\n dst._capnp.depthLimit - 1\n );\n copyFrom(srcPtr, dstPtr);\n }\n } else if (srcElementSize === ListElementSize.COMPOSITE) {\n srcCompositeSize = padToWord(getTargetCompositeListSize(src));\n srcStructByteLength = getByteLength(srcCompositeSize);\n dstContent = dst.segment.allocate(\n getByteLength(srcCompositeSize) * srcLength + 8\n );\n dstContent.segment.copyWord(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset - 8\n );\n if (srcCompositeSize.dataByteLength > 0) {\n const wordLength = getWordLength(srcCompositeSize) * srcLength;\n dstContent.segment.copyWords(\n dstContent.byteOffset + 8,\n srcContent.segment,\n srcContent.byteOffset,\n wordLength\n );\n }\n for (let i = 0; i < srcLength; i++) {\n for (let j = 0; j < srcCompositeSize.pointerLength; j++) {\n const offset = i * srcStructByteLength + srcCompositeSize.dataByteLength + (j << 3);\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + offset,\n src._capnp.depthLimit - 1\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + offset + 8,\n dst._capnp.depthLimit - 1\n );\n copyFrom(srcPtr, dstPtr);\n }\n }\n } else {\n const byteLength = padToWord$1(\n srcElementSize === ListElementSize.BIT ? srcLength + 7 >>> 3 : getListElementByteLength(srcElementSize) * srcLength\n );\n const wordLength = byteLength >>> 3;\n dstContent = dst.segment.allocate(byteLength);\n dstContent.segment.copyWords(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset,\n wordLength\n );\n }\n const res = initPointer(dstContent.segment, dstContent.byteOffset, dst);\n setListPointer(\n res.offsetWords,\n srcElementSize,\n srcLength,\n res.pointer,\n srcCompositeSize\n );\n}\nfunction copyFromStruct(src, dst) {\n if (dst._capnp.depthLimit <= 0) {\n throw new Error(PTR_DEPTH_LIMIT_EXCEEDED);\n }\n const srcContent = getContent(src);\n const srcSize = getTargetStructSize(src);\n const srcDataWordLength = getDataWordLength(srcSize);\n const dstContent = dst.segment.allocate(getByteLength(srcSize));\n dstContent.segment.copyWords(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset,\n srcDataWordLength\n );\n for (let i = 0; i < srcSize.pointerLength; i++) {\n const offset = srcSize.dataByteLength + i * 8;\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + offset,\n src._capnp.depthLimit - 1\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + offset,\n dst._capnp.depthLimit - 1\n );\n copyFrom(srcPtr, dstPtr);\n }\n if (dst._capnp.compositeList) {\n return;\n }\n const res = initPointer(dstContent.segment, dstContent.byteOffset, dst);\n setStructPointer(res.offsetWords, srcSize, res.pointer);\n}\nfunction trackPointerAllocation(message, p) {\n message._capnp.traversalLimit -= 8;\n if (message._capnp.traversalLimit <= 0) {\n throw new Error(format(PTR_TRAVERSAL_LIMIT_EXCEEDED, p));\n }\n}\nclass PointerAllocationResult {\n constructor(pointer, offsetWords) {\n this.pointer = pointer;\n this.offsetWords = offsetWords;\n }\n}\n\nvar PointerType = /* @__PURE__ */ ((PointerType2) => {\n PointerType2[PointerType2[\"STRUCT\"] = 0] = \"STRUCT\";\n PointerType2[PointerType2[\"LIST\"] = 1] = \"LIST\";\n PointerType2[PointerType2[\"FAR\"] = 2] = \"FAR\";\n PointerType2[PointerType2[\"OTHER\"] = 3] = \"OTHER\";\n return PointerType2;\n})(PointerType || {});\nclass Pointer {\n static _capnp = {\n displayName: \"Pointer\"\n };\n _capnp;\n /** Offset, in bytes, from the start of the segment to the beginning of this pointer. */\n byteOffset;\n /**\n * The starting segment for this pointer's data. In the case of a far pointer, the actual content this pointer is\n * referencing will be in another segment within the same message.\n */\n segment;\n constructor(segment, byteOffset, depthLimit = MAX_DEPTH) {\n this._capnp = { compositeList: false, depthLimit };\n this.segment = segment;\n this.byteOffset = byteOffset;\n if (depthLimit < 1) {\n throw new Error(format(PTR_DEPTH_LIMIT_EXCEEDED, this));\n }\n trackPointerAllocation(segment.message, this);\n if (byteOffset < 0 || byteOffset > segment.byteLength) {\n throw new Error(format(PTR_OFFSET_OUT_OF_BOUNDS, byteOffset));\n }\n }\n [Symbol.toStringTag]() {\n return format(\"Pointer_%d\", this.segment.id);\n }\n toString() {\n return format(\"->%d@%a%s\", this.segment.id, this.byteOffset, dump(this));\n }\n}\n\nclass List extends Pointer {\n static _capnp = {\n displayName: \"List<Generic>\",\n size: ListElementSize.VOID\n };\n constructor(segment, byteOffset, depthLimit) {\n super(segment, byteOffset, depthLimit);\n return new Proxy(this, List.#proxyHandler);\n }\n static #proxyHandler = {\n get(target, prop, receiver) {\n const val = Reflect.get(target, prop, receiver);\n if (val !== undefined) {\n return val;\n }\n if (typeof prop === \"string\") {\n return target.get(+prop);\n }\n }\n };\n get length() {\n return getTargetListLength(this);\n }\n toArray() {\n const { length } = this;\n const res = Array.from({ length });\n for (let i = 0; i < length; i++) {\n res[i] = this.at(i);\n }\n return res;\n }\n get(_index) {\n throw new TypeError(\"Cannot get from a generic list.\");\n }\n set(_index, _value) {\n throw new TypeError(\"Cannot set on a generic list.\");\n }\n at(index) {\n return this.get(index < 0 ? this.length + index : index);\n }\n concat(other) {\n const { length } = this;\n const otherLength = other.length;\n const res = Array.from({ length: length + otherLength });\n for (let i = 0; i < length; i++) res[i] = this.at(i);\n for (let i = 0; i < otherLength; i++) res[i + length] = other.at(i);\n return res;\n }\n some(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n if (cb.call(_this, this.at(i), i, this)) {\n return true;\n }\n }\n return false;\n }\n filter(cb, _this) {\n const res = [];\n for (let i = 0; i < this.length; i++) {\n const value = this.at(i);\n if (cb.call(_this, value, i, this)) {\n res.push(value);\n }\n }\n return res;\n }\n find(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n const value = this.at(i);\n if (cb.call(_this, value, i, this)) {\n return value;\n }\n }\n return undefined;\n }\n findIndex(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n const value = this.at(i);\n if (cb.call(_this, value, i, this)) {\n return i;\n }\n }\n return -1;\n }\n forEach(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n cb.call(_this, this.at(i), i, this);\n }\n }\n map(cb, _this) {\n const { length } = this;\n const res = Array.from({ length });\n for (let i = 0; i < length; i++) {\n res[i] = cb.call(_this, this.at(i), i, this);\n }\n return res;\n }\n flatMap(cb, _this) {\n const res = [];\n for (let i = 0; i < this.length; i++) {\n const r = cb.call(_this, this.at(i), i, this);\n res.push(...Array.isArray(r) ? r : [r]);\n }\n return res;\n }\n every(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n if (!cb.call(_this, this.at(i), i, this)) {\n return false;\n }\n }\n return true;\n }\n reduce(cb, initialValue) {\n let i = 0;\n let res;\n if (initialValue === undefined) {\n res = this.at(0);\n i++;\n } else {\n res = initialValue;\n }\n for (; i < this.length; i++) {\n res = cb(res, this.at(i), i, this);\n }\n return res;\n }\n reduceRight(cb, initialValue) {\n let i = this.length - 1;\n let res;\n if (initialValue === undefined) {\n res = this.at(i);\n i--;\n } else {\n res = initialValue;\n }\n for (; i >= 0; i--) {\n res = cb(res, this.at(i), i, this);\n }\n return res;\n }\n slice(start = 0, end) {\n const length = end ? Math.min(this.length, end) : this.length;\n const res = Array.from({ length: length - start });\n for (let i = start; i < length; i++) {\n res[i] = this.at(i);\n }\n return res;\n }\n join(separator) {\n return this.toArray().join(separator);\n }\n toReversed() {\n return this.toArray().reverse();\n }\n toSorted(compareFn) {\n return this.toArray().sort(compareFn);\n }\n toSpliced(start, deleteCount, ...items) {\n return this.toArray().splice(start, deleteCount, ...items);\n }\n fill(value, start, end) {\n const { length } = this;\n const s = Math.max(start ?? 0, 0);\n const e = Math.min(end ?? length, length);\n for (let i = s; i < e; i++) {\n this.set(i, value);\n }\n return this;\n }\n copyWithin(target, start, end) {\n const { length } = this;\n const e = end ?? length;\n const s = start < 0 ? Math.max(length + start, 0) : start;\n const t = target < 0 ? Math.max(length + target, 0) : target;\n const len = Math.min(e - s, length - t);\n for (let i = 0; i < len; i++) {\n this.set(t + i, this.at(s + i));\n }\n return this;\n }\n keys() {\n return Array.from({ length: this.length }, (_, i) => i)[Symbol.iterator]();\n }\n values() {\n return this.toArray().values();\n }\n entries() {\n return this.toArray().entries();\n }\n flat(depth) {\n return this.toArray().flat(depth);\n }\n with(index, value) {\n return this.toArray().with(index, value);\n }\n includes(_searchElement, _fromIndex) {\n throw new Error(LIST_NO_SEARCH);\n }\n findLast(_cb, _thisArg) {\n throw new Error(LIST_NO_SEARCH);\n }\n findLastIndex(_cb, _t) {\n throw new Error(LIST_NO_SEARCH);\n }\n indexOf(_searchElement, _fromIndex) {\n throw new Error(LIST_NO_SEARCH);\n }\n lastIndexOf(_searchElement, _fromIndex) {\n throw new Error(LIST_NO_SEARCH);\n }\n pop() {\n throw new Error(LIST_NO_MUTABLE);\n }\n push(..._items) {\n throw new Error(LIST_NO_MUTABLE);\n }\n reverse() {\n throw new Error(LIST_NO_MUTABLE);\n }\n shift() {\n throw new Error(LIST_NO_MUTABLE);\n }\n unshift(..._items) {\n throw new Error(LIST_NO_MUTABLE);\n }\n splice(_start, _deleteCount, ..._rest) {\n throw new Error(LIST_NO_MUTABLE);\n }\n sort(_fn) {\n throw new Error(LIST_NO_MUTABLE);\n }\n get [Symbol.unscopables]() {\n return Array.prototype[Symbol.unscopables];\n }\n [Symbol.iterator]() {\n return this.values();\n }\n toJSON() {\n return this.toArray();\n }\n toString() {\n return this.join(\",\");\n }\n toLocaleString(_locales, _options) {\n return this.toString();\n }\n [Symbol.toStringTag]() {\n return \"[object Array]\";\n }\n static [Symbol.toStringTag]() {\n return this._capnp.displayName;\n }\n}\nfunction initList$1(elementSize, length, list, compositeSize) {\n let c;\n switch (elementSize) {\n case ListElementSize.BIT: {\n c = list.segment.allocate(Math.ceil(length / 8));\n break;\n }\n case ListElementSize.BYTE:\n case ListElementSize.BYTE_2:\n case ListElementSize.BYTE_4:\n case ListElementSize.BYTE_8:\n case ListElementSize.POINTER: {\n c = list.segment.allocate(length * getListElementByteLength(elementSize));\n break;\n }\n case ListElementSize.COMPOSITE: {\n if (compositeSize === undefined) {\n throw new Error(format(PTR_COMPOSITE_SIZE_UNDEFINED));\n }\n compositeSize = padToWord(compositeSize);\n const byteLength = getByteLength(compositeSize) * length;\n c = list.segment.allocate(byteLength + 8);\n setStructPointer(length, compositeSize, c);\n break;\n }\n case ListElementSize.VOID: {\n setListPointer(0, elementSize, length, list);\n return;\n }\n default: {\n throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize));\n }\n }\n const res = initPointer(c.segment, c.byteOffset, list);\n setListPointer(\n res.offsetWords,\n elementSize,\n length,\n res.pointer,\n compositeSize\n );\n}\n\nclass Data extends List {\n static fromPointer(pointer) {\n validate(PointerType.LIST, pointer, ListElementSize.BYTE);\n return this._fromPointerUnchecked(pointer);\n }\n static _fromPointerUnchecked(pointer) {\n return new this(\n pointer.segment,\n pointer.byteOffset,\n pointer._capnp.depthLimit\n );\n }\n /**\n * Copy the contents of `src` into this Data pointer. If `src` is smaller than the length of this pointer then the\n * remaining bytes will be zeroed out. Extra bytes in `src` are ignored.\n *\n * @param src The source buffer.\n */\n // TODO: Would be nice to have a way to zero-copy a buffer by allocating a new segment into the message with that\n // buffer data.\n copyBuffer(src) {\n const c = getContent(this);\n const dstLength = this.length;\n const srcLength = src.byteLength;\n const i = src instanceof ArrayBuffer ? new Uint8Array(src) : new Uint8Array(\n src.buffer,\n src.byteOffset,\n Math.min(dstLength, srcLength)\n );\n const o = new Uint8Array(c.segment.buffer, c.byteOffset, this.length);\n o.set(i);\n if (dstLength > srcLength) {\n o.fill(0, srcLength, dstLength);\n }\n }\n /**\n * Read a byte from the specified offset.\n *\n * @param byteOffset The byte offset to read.\n * @returns The byte value.\n */\n get(byteOffset) {\n const c = getContent(this);\n return c.segment.getUint8(c.byteOffset + byteOffset);\n }\n /**\n * Write a byte at the specified offset.\n *\n * @param byteOffset The byte offset to set.\n * @param value The byte value to set.\n */\n set(byteOffset, value) {\n const c = getContent(this);\n c.segment.setUint8(c.byteOffset + byteOffset, value);\n }\n /**\n * Creates a **copy** of the underlying buffer data and returns it as an ArrayBuffer.\n *\n * To obtain a reference to the underlying buffer instead, use `toUint8Array()` or `toDataView()`.\n *\n * @returns A copy of this data buffer.\n */\n toArrayBuffer() {\n const c = getContent(this);\n return c.segment.buffer.slice(c.byteOffset, c.byteOffset + this.length);\n }\n /**\n * Convert this Data pointer to a DataView representing the pointer's contents.\n *\n * WARNING: The DataView references memory from a message segment, so do not venture outside the bounds of the\n * DataView or else BAD THINGS.\n *\n * @returns A live reference to the underlying buffer.\n */\n toDataView() {\n const c = getContent(this);\n return new DataView(c.segment.buffer, c.byteOffset, this.length);\n }\n [Symbol.toStringTag]() {\n return `Data_${super.toString()}`;\n }\n /**\n * Convert this Data pointer to a Uint8Array representing the pointer's contents.\n *\n * WARNING: The Uint8Array references memory from a message segment, so do not venture outside the bounds of the\n * Uint8Array or else BAD THINGS.\n *\n * @returns A live reference to the underlying buffer.\n */\n toUint8Array() {\n const c = getContent(this);\n return new Uint8Array(c.segment.buffer, c.byteOffset, this.length);\n }\n}\n\nconst textEncoder = new TextEncoder();\nconst textDecoder = new TextDecoder();\nclass Text extends List {\n static fromPointer(pointer) {\n validate(PointerType.LIST, pointer, ListElementSize.BYTE);\n return textFromPointerUnchecked(pointer);\n }\n /**\n * Read a utf-8 encoded string value from this pointer.\n *\n * @param index The index at which to start reading; defaults to zero.\n * @returns The string value.\n */\n get(index = 0) {\n if (isNull(this)) {\n return \"\";\n }\n const c = getContent(this);\n return textDecoder.decode(\n new Uint8Array(\n c.segment.buffer,\n c.byteOffset + index,\n this.length - index\n )\n );\n }\n /**\n * Get the number of utf-8 encoded bytes in this text. This does **not** include the NUL byte.\n *\n * @returns The number of bytes allocated for the text.\n */\n get length() {\n return super.length - 1;\n }\n /**\n * Write a utf-8 encoded string value starting at the specified index.\n *\n * @param index The index at which to start copying the string. Note that if this is not zero the bytes\n * before `index` will be left as-is. All bytes after `index` will be overwritten.\n * @param value The string value to set.\n */\n set(index, value) {\n const src = textEncoder.encode(value);\n const dstLength = src.byteLength + index;\n let c;\n let original;\n if (!isNull(this)) {\n c = getContent(this);\n const originalLength = Math.min(this.length, index);\n original = new Uint8Array(\n c.segment.buffer.slice(c.byteOffset, c.byteOffset + originalLength)\n );\n erase(this);\n }\n initList$1(ListElementSize.BYTE, dstLength + 1, this);\n c = getContent(this);\n const dst = new Uint8Array(c.segment.buffer, c.byteOffset, dstLength);\n if (original) {\n dst.set(original);\n }\n dst.set(src, index);\n }\n toString() {\n return this.get();\n }\n toJSON() {\n return this.get();\n }\n [Symbol.toPrimitive]() {\n return this.get();\n }\n [Symbol.toStringTag]() {\n return `Text_${super.toString()}`;\n }\n}\nfunction textFromPointerUnchecked(pointer) {\n return new Text(\n pointer.segment,\n pointer.byteOffset,\n pointer._capnp.depthLimit\n );\n}\n\nclass Struct extends Pointer {\n static _capnp = {\n displayName: \"Struct\"\n };\n /**\n * Create a new pointer to a struct.\n *\n * @param segment The segment the pointer resides in.\n * @param byteOffset The offset from the beginning of the segment to the beginning of the pointer data.\n * @param depthLimit The nesting depth limit for this object.\n * @param compositeIndex If set, then this pointer is actually a reference to a composite list\n * (`this._getPointerTargetType() === PointerType.LIST`), and this number is used as the index of the struct within\n * the list. It is not valid to call `initStruct()` on a composite struct – the struct contents are initialized when\n * the list pointer is initialized.\n */\n constructor(segment, byteOffset, depthLimit = MAX_DEPTH, compositeIndex) {\n super(segment, byteOffset, depthLimit);\n this._capnp.compositeIndex = compositeIndex;\n this._capnp.compositeList = compositeIndex !== undefined;\n }\n static [Symbol.toStringTag]() {\n return this._capnp.displayName;\n }\n [Symbol.toStringTag]() {\n return `Struct_${super.toString()}${this._capnp.compositeIndex === undefined ? \"\" : `,ci:${this._capnp.compositeIndex}`} > ${getContent(this).toString()}`;\n }\n}\nclass AnyStruct extends Struct {\n static _capnp = {\n displayName: \"AnyStruct\",\n id: \"0\",\n size: new ObjectSize(0, 0)\n };\n}\n\nclass FixedAnswer {\n struct() {\n return Promise.resolve(this.structSync());\n }\n}\n\nclass ErrorAnswer extends FixedAnswer {\n constructor(err) {\n super();\n this.err = err;\n }\n structSync() {\n throw this.err;\n }\n pipelineCall(_transform, _call) {\n return this;\n }\n pipelineClose(_transform) {\n throw this.err;\n }\n}\n\nclass ErrorClient {\n constructor(err) {\n this.err = err;\n }\n call(_call) {\n return new ErrorAnswer(this.err);\n }\n close() {\n throw this.err;\n }\n}\nfunction clientOrNull(client) {\n return client ?? new ErrorClient(new Error(RPC_NULL_CLIENT));\n}\n\nconst TMP_WORD = new DataView(new ArrayBuffer(8));\nfunction initStruct(size, s) {\n if (s._capnp.compositeIndex !== undefined) {\n throw new Error(format(PTR_INIT_COMPOSITE_STRUCT, s));\n }\n erase(s);\n const c = s.segment.allocate(getByteLength(size));\n const res = initPointer(c.segment, c.byteOffset, s);\n setStructPointer(res.offsetWords, size, res.pointer);\n}\nfunction initStructAt(index, StructClass, p) {\n const s = getPointerAs(index, StructClass, p);\n initStruct(StructClass._capnp.size, s);\n return s;\n}\nfunction checkPointerBounds(index, s) {\n const { pointerLength } = getSize(s);\n if (index < 0 || index >= pointerLength) {\n throw new Error(\n format(PTR_STRUCT_POINTER_OUT_OF_BOUNDS, s, index, pointerLength)\n );\n }\n}\nfunction getInterfaceClientOrNullAt(index, s) {\n return getInterfaceClientOrNull(getPointer(index, s));\n}\nfunction getInterfaceClientOrNull(p) {\n let client = null;\n const capId = getInterfacePointer(p);\n const { capTable } = p.segment.message._capnp;\n if (capTable && capId >= 0 && capId < capTable.length) {\n client = capTable[capId];\n }\n return clientOrNull(client);\n}\nfunction resize(dstSize, s) {\n const srcSize = getSize(s);\n const srcContent = getContent(s);\n const dstContent = s.segment.allocate(getByteLength(dstSize));\n dstContent.segment.copyWords(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset,\n Math.min(getDataWordLength(srcSize), getDataWordLength(dstSize))\n );\n const res = initPointer(dstContent.segment, dstContent.byteOffset, s);\n setStructPointer(res.offsetWords, dstSize, res.pointer);\n for (let i = 0; i < Math.min(srcSize.pointerLength, dstSize.pointerLength); i++) {\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + srcSize.dataByteLength + i * 8\n );\n if (isNull(srcPtr)) {\n continue;\n }\n const srcPtrTarget = followFars(srcPtr);\n const srcPtrContent = getContent(srcPtr);\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + dstSize.dataByteLength + i * 8\n );\n if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) {\n srcPtrContent.byteOffset -= 8;\n }\n const r = initPointer(\n srcPtrContent.segment,\n srcPtrContent.byteOffset,\n dstPtr\n );\n const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3;\n const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4);\n r.pointer.segment.setUint32(r.pointer.byteOffset, a | r.offsetWords << 2);\n r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b);\n }\n srcContent.segment.fillZeroWords(\n srcContent.byteOffset,\n getWordLength(srcSize)\n );\n}\nfunction getAs(StructClass, s) {\n return new StructClass(\n s.segment,\n s.byteOffset,\n s._capnp.depthLimit,\n s._capnp.compositeIndex\n );\n}\nfunction getBit(bitOffset, s, defaultMask) {\n const byteOffset = Math.floor(bitOffset / 8);\n const bitMask = 1 << bitOffset % 8;\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n const v = ds.segment.getUint8(ds.byteOffset + byteOffset);\n if (defaultMask === undefined) {\n return (v & bitMask) !== 0;\n }\n const defaultValue = defaultMask.getUint8(0);\n return ((v ^ defaultValue) & bitMask) !== 0;\n}\nfunction getData(index, s, defaultValue) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n if (isNull(l)) {\n if (defaultValue) {\n copyFrom(defaultValue, l);\n } else {\n initList$1(ListElementSize.BYTE, 0, l);\n }\n }\n return l;\n}\nfunction getDataSection(s) {\n return getContent(s);\n}\nfunction getFloat32(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getFloat32(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getFloat32(0, NATIVE_LITTLE_ENDIAN);\n}\nfunction getFloat64(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true);\n TMP_WORD.setUint32(0, lo, NATIVE_LITTLE_ENDIAN);\n TMP_WORD.setUint32(4, hi, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getFloat64(0, NATIVE_LITTLE_ENDIAN);\n }\n return ds.segment.getFloat64(ds.byteOffset + byteOffset);\n}\nfunction getInt16(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getInt16(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true);\n TMP_WORD.setUint16(0, v, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getInt16(0, NATIVE_LITTLE_ENDIAN);\n}\nfunction getInt32(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getInt32(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true);\n TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getInt32(0, NATIVE_LITTLE_ENDIAN);\n}\nfunction getInt64(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getBigInt64(0, NATIVE_LITTLE_ENDIAN);\n }\n return ds.segment.getInt64(ds.byteOffset + byteOffset);\n}\nfunction getInt8(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getInt8(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0);\n TMP_WORD.setUint8(0, v);\n return TMP_WORD.getInt8(0);\n}\nfunction getList(index, ListClass, s, defaultValue) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n if (isNull(l)) {\n if (defaultValue) {\n copyFrom(defaultValue, l);\n } else {\n initList$1(ListClass._capnp.size, 0, l, ListClass._capnp.compositeSize);\n }\n } else if (ListClass._capnp.compositeSize !== undefined) {\n const srcSize = getTargetCompositeListSize(l);\n const dstSize = ListClass._capnp.compositeSize;\n if (dstSize.dataByteLength > srcSize.dataByteLength || dstSize.pointerLength > srcSize.pointerLength) {\n const srcContent = getContent(l);\n const srcLength = getTargetListLength(l);\n const dstContent = l.segment.allocate(\n getByteLength(dstSize) * srcLength + 8\n );\n const res = initPointer(dstContent.segment, dstContent.byteOffset, l);\n setListPointer(\n res.offsetWords,\n ListClass._capnp.size,\n srcLength,\n res.pointer,\n dstSize\n );\n setStructPointer(srcLength, dstSize, dstContent);\n dstContent.byteOffset += 8;\n for (let i = 0; i < srcLength; i++) {\n const srcElementOffset = srcContent.byteOffset + i * getByteLength(srcSize);\n const dstElementOffset = dstContent.byteOffset + i * getByteLength(dstSize);\n dstContent.segment.copyWords(\n dstElementOffset,\n srcContent.segment,\n srcElementOffset,\n getWordLength(srcSize)\n );\n for (let j = 0; j < srcSize.pointerLength; j++) {\n const srcPtr = new Pointer(\n srcContent.segment,\n srcElementOffset + srcSize.dataByteLength + j * 8\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstElementOffset + dstSize.dataByteLength + j * 8\n );\n const srcPtrTarget = followFars(srcPtr);\n const srcPtrContent = getContent(srcPtr);\n if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) {\n srcPtrContent.byteOffset -= 8;\n }\n const r = initPointer(\n srcPtrContent.segment,\n srcPtrContent.byteOffset,\n dstPtr\n );\n const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3;\n const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4);\n r.pointer.segment.setUint32(\n r.pointer.byteOffset,\n a | r.offsetWords << 2\n );\n r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b);\n }\n }\n srcContent.segment.fillZeroWords(\n srcContent.byteOffset,\n getWordLength(srcSize) * srcLength\n );\n }\n }\n return l;\n}\nfunction getPointer(index, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n return new Pointer(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n}\nfunction getPointerAs(index, PointerClass, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n return new PointerClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n}\nfunction getPointerSection(s) {\n const ps = getContent(s);\n ps.byteOffset += padToWord$1(getSize(s).dataByteLength);\n return ps;\n}\nfunction getSize(s) {\n if (s._capnp.compositeIndex !== undefined) {\n const c = getContent(s, true);\n c.byteOffset -= 8;\n return getStructSize(c);\n }\n return getTargetStructSize(s);\n}\nfunction getStruct(index, StructClass, s, defaultValue) {\n const t = getPointerAs(index, StructClass, s);\n if (isNull(t)) {\n if (defaultValue) {\n copyFrom(defaultValue, t);\n } else {\n initStruct(StructClass._capnp.size, t);\n }\n } else {\n validate(PointerType.STRUCT, t);\n const ts = getTargetStructSize(t);\n if (ts.dataByteLength < StructClass._capnp.size.dataByteLength || ts.pointerLength < StructClass._capnp.size.pointerLength) {\n resize(StructClass._capnp.size, t);\n }\n }\n return t;\n}\nfunction getText(index, s, defaultValue) {\n const t = Text.fromPointer(getPointer(index, s));\n if (isNull(t) && defaultValue) {\n t.set(0, defaultValue);\n }\n return t.get(0);\n}\nfunction getUint16(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getUint16(ds.byteOffset + byteOffset);\n }\n return ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true);\n}\nfunction getUint32(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getUint32(ds.byteOffset + byteOffset);\n }\n return ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n}\nfunction getUint64(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getBigUint64(0, NATIVE_LITTLE_ENDIAN);\n }\n return ds.segment.getUint64(ds.byteOffset + byteOffset);\n}\nfunction getUint8(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getUint8(ds.byteOffset + byteOffset);\n }\n return ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0);\n}\nfunction initData(index, length, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n erase(l);\n initList$1(ListElementSize.BYTE, length, l);\n return l;\n}\nfunction initList(index, ListClass, length, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n erase(l);\n initList$1(ListClass._capnp.size, length, l, ListClass._capnp.compositeSize);\n return l;\n}\nfunction setBit(bitOffset, value, s, defaultMask) {\n const byteOffset = Math.floor(bitOffset / 8);\n const bitMask = 1 << bitOffset % 8;\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n const b = ds.segment.getUint8(ds.byteOffset + byteOffset);\n if (defaultMask !== undefined) {\n value = (defaultMask.getUint8(0) & bitMask) === 0 ? value : !value;\n }\n ds.segment.setUint8(\n ds.byteOffset + byteOffset,\n value ? b | bitMask : b & ~bitMask\n );\n}\nfunction setFloat32(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setFloat32(0, value, NATIVE_LITTLE_ENDIAN);\n const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setFloat32(ds.byteOffset + byteOffset, value);\n}\nfunction setFloat64(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setFloat64(0, value, NATIVE_LITTLE_ENDIAN);\n const lo = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n const hi = TMP_WORD.getUint32(4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, lo);\n ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi);\n return;\n }\n ds.segment.setFloat64(ds.byteOffset + byteOffset, value);\n}\nfunction setInt16(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setInt16(0, value, NATIVE_LITTLE_ENDIAN);\n const v = TMP_WORD.getUint16(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint16(0, true);\n ds.segment.setUint16(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setInt16(ds.byteOffset + byteOffset, value);\n}\nfunction setInt32(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setInt32(0, value, NATIVE_LITTLE_ENDIAN);\n const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setInt32(ds.byteOffset + byteOffset, value);\n}\nfunction setInt64(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setBigInt64(0, value, NATIVE_LITTLE_ENDIAN);\n const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, lo);\n ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi);\n return;\n }\n ds.segment.setInt64(ds.byteOffset + byteOffset, value);\n}\nfunction setInt8(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setInt8(0, value);\n const v = TMP_WORD.getUint8(0) ^ defaultMask.getUint8(0);\n ds.segment.setUint8(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setInt8(ds.byteOffset + byteOffset, value);\n}\nfunction setText(index, value, s) {\n Text.fromPointer(getPointer(index, s)).set(0, value);\n}\nfunction setUint16(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n value ^= defaultMask.getUint16(0, true);\n }\n ds.segment.setUint16(ds.byteOffset + byteOffset, value);\n}\nfunction setUint32(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n value ^= defaultMask.getUint32(0, true);\n }\n ds.segment.setUint32(ds.byteOffset + byteOffset, value);\n}\nfunction setUint64(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setBigUint64(0, value, NATIVE_LITTLE_ENDIAN);\n const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, lo);\n ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi);\n return;\n }\n ds.segment.setUint64(ds.byteOffset + byteOffset, value);\n}\nfunction setUint8(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n value ^= defaultMask.getUint8(0);\n }\n ds.segment.setUint8(ds.byteOffset + byteOffset, value);\n}\nfunction testWhich(name, found, wanted, s) {\n if (found !== wanted) {\n throw new Error(format(PTR_INVALID_UNION_ACCESS, s, name, found, wanted));\n }\n}\nfunction checkDataBounds(byteOffset, byteLength, s) {\n const { dataByteLength } = getSize(s);\n if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > dataByteLength) {\n throw new Error(\n format(\n PTR_STRUCT_DATA_OUT_OF_BOUNDS,\n s,\n byteLength,\n byteOffset,\n dataByteLength\n )\n );\n }\n}\n\nexport { Pointer as $, setInt16 as A, getInt32 as B, setInt32 as C, getInt64 as D, setInt64 as E, getFloat32 as F, setFloat32 as G, getFloat64 as H, setFloat64 as I, getData as J, initData as K, List as L, ListElementSize as M, format as N, ObjectSize as O, SEG_NOT_WORD_ALIGNED as P, DEFAULT_BUFFER_SIZE as Q, SEG_ID_OUT_OF_BOUNDS as R, Struct as S, padToWord$1 as T, SEG_GET_NON_ZERO_SINGLE as U, MIN_SINGLE_SEGMENT_GROWTH as V, assertNever as W, MSG_PACK_NOT_WORD_ALIGNED as X, PACK_SPAN_THRESHOLD as Y, MAX_SEGMENT_LENGTH as Z, SEG_SIZE_OVERFLOW as _, adopt as a, setListPointer as a$, NATIVE_LITTLE_ENDIAN as a0, SEG_REPLACEMENT_BUFFER_TOO_SMALL as a1, DEFAULT_TRAVERSE_LIMIT as a2, MSG_INVALID_FRAME_HEADER as a3, MSG_SEGMENT_TOO_SMALL as a4, MSG_SEGMENT_OUT_OF_BOUNDS as a5, dumpBuffer as a6, validate as a7, PointerType as a8, getTargetStructSize as a9, getCapabilityId as aA, getContent as aB, getDataSection as aC, getFarSegmentId as aD, getInterfaceClientOrNullAt as aE, getInterfacePointer as aF, getListByteLength as aG, getListElementByteLength as aH, getListElementSize as aI, getListLength as aJ, getOffsetWords as aK, getPointerAs as aL, getPointerSection as aM, getPointerType as aN, getSize as aO, getStructDataWords as aP, getStructPointerLength as aQ, getStructSize as aR, getTargetCompositeListSize as aS, getTargetCompositeListTag as aT, getTargetListElementSize as aU, getTargetListLength as aV, initPointer as aW, isDoubleFar as aX, relocateTo as aY, setFarPointer as aZ, setInterfacePointer as a_, resize as aa, initStruct as ab, MAX_DEPTH as ac, getTargetPointerType as ad, FixedAnswer as ae, getInterfaceClientOrNull as af, ErrorAnswer as ag, RPC_CALL_QUEUE_FULL as ah, INVARIANT_UNREACHABLE_CODE as ai, RPC_QUEUE_CALL_CANCEL as aj, RPC_NULL_CLIENT as ak, RPC_METHOD_ERROR as al, RPC_METHOD_NOT_IMPLEMENTED as am, pad as an, PointerAllocationResult as ao, add as ap, checkDataBounds as aq, checkPointerBounds as ar, copyFromInterface as as, copyFromList as at, copyFromStruct as au, dump as av, erase as aw, erasePointer as ax, followFar as ay, followFars as az, getUint16 as b, setStructPointer as b0, trackPointerAllocation as b1, Data as b2, Text as b3, ErrorClient as b4, RPC_ZERO_REF as b5, RPC_ERROR as b6, RPC_FULFILL_ALREADY_CALLED as b7, NOT_IMPLEMENTED as b8, RPC_IMPORT_CLOSED as b9, AnyStruct as ba, RPC_QUESTION_ID_REUSED as bb, RPC_NO_MAIN_INTERFACE as bc, RPC_BAD_TARGET as bd, RPC_UNKNOWN_CAP_DESCRIPTOR as be, RPC_FINISH_UNKNOWN_ANSWER as bf, RPC_RETURN_FOR_UNKNOWN_QUESTION as bg, RPC_UNKNOWN_ANSWER_ID as bh, RPC_UNKNOWN_EXPORT_ID as bi, Orphan as bj, clientOrNull as bk, copyFrom as c, disown as d, getUint32 as e, setUint32 as f, getPointer as g, getBit as h, isNull as i, setBit as j, getStruct as k, initStructAt as l, getList as m, initList as n, getUint8 as o, setUint8 as p, getText as q, setText as r, setUint16 as s, testWhich as t, getUint64 as u, setUint64 as v, getAs as w, getInt8 as x, setInt8 as y, getInt16 as z };\n","import { L as List, M as ListElementSize, c as copyFrom } from './capnp-es.0-_cOx6D.mjs';\n\nfunction CompositeList(CompositeClass) {\n return class extends List {\n static _capnp = {\n compositeSize: CompositeClass._capnp.size,\n displayName: `List<${CompositeClass._capnp.displayName}>`,\n size: ListElementSize.COMPOSITE\n };\n get(index) {\n return new CompositeClass(\n this.segment,\n this.byteOffset,\n this._capnp.depthLimit - 1,\n index\n );\n }\n set(index, value) {\n copyFrom(value, this.get(index));\n }\n [Symbol.toStringTag]() {\n return `Composite_${super.toString()},cls:${CompositeClass.toString()}`;\n }\n };\n}\n\nfunction _makePrimitiveMaskFn(byteLength, setter) {\n return (x) => {\n const dv = new DataView(new ArrayBuffer(byteLength));\n setter.call(dv, 0, x, true);\n return dv;\n };\n}\nconst getFloat32Mask = _makePrimitiveMaskFn(\n 4,\n DataView.prototype.setFloat32\n);\nconst getFloat64Mask = _makePrimitiveMaskFn(\n 8,\n DataView.prototype.setFloat64\n);\nconst getInt16Mask = _makePrimitiveMaskFn(\n 2,\n DataView.prototype.setInt16\n);\nconst getInt32Mask = _makePrimitiveMaskFn(\n 4,\n DataView.prototype.setInt32\n);\nconst getInt64Mask = _makePrimitiveMaskFn(\n 8,\n DataView.prototype.setBigInt64\n);\nconst getInt8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setInt8);\nconst getUint16Mask = _makePrimitiveMaskFn(\n 2,\n DataView.prototype.setUint16\n);\nconst getUint32Mask = _makePrimitiveMaskFn(\n 4,\n DataView.prototype.setUint32\n);\nconst getUint64Mask = _makePrimitiveMaskFn(\n 8,\n DataView.prototype.setBigUint64\n);\nconst getUint8Mask = _makePrimitiveMaskFn(\n 1,\n DataView.prototype.setUint8\n);\nfunction getBitMask(value, bitOffset) {\n const dv = new DataView(new ArrayBuffer(1));\n if (!value) {\n return dv;\n }\n dv.setUint8(0, 1 << bitOffset % 8);\n return dv;\n}\n\nexport { CompositeList as C, getUint8Mask as a, getUint16Mask as b, getFloat32Mask as c, getFloat64Mask as d, getInt16Mask as e, getInt32Mask as f, getBitMask as g, getInt64Mask as h, getInt8Mask as i, getUint32Mask as j, getUint64Mask as k };\n","import { S as Struct, O as ObjectSize, q as getText, r as setText, b as getUint16, s as setUint16, a as adopt, g as getPointer, d as disown, m as getList, i as isNull, n as initList, c as copyFrom, t as testWhich, w as getAs, u as getUint64, v as setUint64, h as getBit, j as setBit, e as getUint32, f as setUint32, k as getStruct, l as initStructAt, x as getInt8, y as setInt8, z as getInt16, A as setInt16, B as getInt32, C as setInt32, D as getInt64, E as setInt64, o as getUint8, p as setUint8, F as getFloat32, G as setFloat32, H as getFloat64, I as setFloat64, J as getData, K as initData } from '../shared/capnp-es.0-_cOx6D.mjs';\nimport { b as getUint16Mask, C as CompositeList } from '../shared/capnp-es.BvfUH5E6.mjs';\n\nconst _capnpFileId = BigInt(\"0xa93fc509624c72d9\");\nclass Node_Parameter extends Struct {\n static _capnp = {\n displayName: \"Parameter\",\n id: \"b9521bccf10fa3b1\",\n size: new ObjectSize(0, 1)\n };\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n toString() {\n return \"Node_Parameter_\" + super.toString();\n }\n}\nclass Node_NestedNode extends Struct {\n static _capnp = {\n displayName: \"NestedNode\",\n id: \"debf55bbfa0fc242\",\n size: new ObjectSize(8, 1)\n };\n /**\n * Unqualified symbol name. Unlike Node.displayName, this *can* be used programmatically.\n *\n * (On Zooko's triangle, this is the node's petname according to its parent scope.)\n *\n */\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * ID of the nested node. Typically, the target node's scopeId points back to this node, but\n * robust code should avoid relying on this.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n toString() {\n return \"Node_NestedNode_\" + super.toString();\n }\n}\nclass Node_SourceInfo_Member extends Struct {\n static _capnp = {\n displayName: \"Member\",\n id: \"c2ba9038898e1fa2\",\n size: new ObjectSize(0, 1)\n };\n /**\n * Doc comment on the member.\n *\n */\n get docComment() {\n return getText(0, this);\n }\n set docComment(value) {\n setText(0, value, this);\n }\n toString() {\n return \"Node_SourceInfo_Member_\" + super.toString();\n }\n}\nclass Node_SourceInfo extends Struct {\n static Member = Node_SourceInfo_Member;\n static _capnp = {\n displayName: \"SourceInfo\",\n id: \"f38e1de3041357ae\",\n size: new ObjectSize(8, 2)\n };\n static _Members;\n /**\n * ID of the Node which this info describes.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * The top-level doc comment for the Node.\n *\n */\n get docComment() {\n return getText(0, this);\n }\n set docComment(value) {\n setText(0, value, this);\n }\n _adoptMembers(value) {\n adopt(value, getPointer(1, this));\n }\n _disownMembers() {\n return disown(this.members);\n }\n /**\n * Information about each member -- i.e. fields (for structs), enumerants (for enums), or\n * methods (for interfaces).\n *\n * This list is the same length and order as the corresponding list in the Node, i.e.\n * Node.struct.fields, Node.enum.enumerants, or Node.interface.methods.\n *\n */\n get members() {\n return getList(1, Node_SourceInfo._Members, this);\n }\n _hasMembers() {\n return !isNull(getPointer(1, this));\n }\n _initMembers(length) {\n return initList(1, Node_SourceInfo._Members, length, this);\n }\n set members(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Node_SourceInfo_\" + super.toString();\n }\n}\nclass Node_Struct extends Struct {\n static _capnp = {\n displayName: \"struct\",\n id: \"9ea0b19b37fb4435\",\n size: new ObjectSize(40, 6)\n };\n static _Fields;\n /**\n * Size of the data section, in words.\n *\n */\n get dataWordCount() {\n return getUint16(14, this);\n }\n set dataWordCount(value) {\n setUint16(14, value, this);\n }\n /**\n * Size of the pointer section, in pointers (which are one word each).\n *\n */\n get pointerCount() {\n return getUint16(24, this);\n }\n set pointerCount(value) {\n setUint16(24, value, this);\n }\n /**\n * The preferred element size to use when encoding a list of this struct. If this is anything\n * other than `inlineComposite` then the struct is one word or less in size and is a candidate\n * for list packing optimization.\n *\n */\n get preferredListEncoding() {\n return getUint16(26, this);\n }\n set preferredListEncoding(value) {\n setUint16(26, value, this);\n }\n /**\n * If true, then this \"struct\" node is actually not an independent node, but merely represents\n * some named union or group within a particular parent struct. This node's scopeId refers\n * to the parent struct, which may itself be a union/group in yet another struct.\n *\n * All group nodes share the same dataWordCount and pointerCount as the top-level\n * struct, and their fields live in the same ordinal and offset spaces as all other fields in\n * the struct.\n *\n * Note that a named union is considered a special kind of group -- in fact, a named union\n * is exactly equivalent to a group that contains nothing but an unnamed union.\n *\n */\n get isGroup() {\n return getBit(224, this);\n }\n set isGroup(value) {\n setBit(224, value, this);\n }\n /**\n * Number of fields in this struct which are members of an anonymous union, and thus may\n * overlap. If this is non-zero, then a 16-bit discriminant is present indicating which\n * of the overlapping fields is active. This can never be 1 -- if it is non-zero, it must be\n * two or more.\n *\n * Note that the fields of an unnamed union are considered fields of the scope containing the\n * union -- an unnamed union is not its own group. So, a top-level struct may contain a\n * non-zero discriminant count. Named unions, on the other hand, are equivalent to groups\n * containing unnamed unions. So, a named union has its own independent schema node, with\n * `isGroup` = true.\n *\n */\n get discriminantCount() {\n return getUint16(30, this);\n }\n set discriminantCount(value) {\n setUint16(30, value, this);\n }\n /**\n * If `discriminantCount` is non-zero, this is the offset of the union discriminant, in\n * multiples of 16 bits.\n *\n */\n get discriminantOffset() {\n return getUint32(32, this);\n }\n set discriminantOffset(value) {\n setUint32(32, value, this);\n }\n _adoptFields(value) {\n adopt(value, getPointer(3, this));\n }\n _disownFields() {\n return disown(this.fields);\n }\n /**\n * Fields defined within this scope (either the struct's top-level fields, or the fields of\n * a particular group; see `isGroup`).\n *\n * The fields are sorted by ordinal number, but note that because groups share the same\n * ordinal space, the field's index in this list is not necessarily exactly its ordinal.\n * On the other hand, the field's position in this list does remain the same even as the\n * protocol evolves, since it is not possible to insert or remove an earlier ordinal.\n * Therefore, for most use cases, if you want to identify a field by number, it may make the\n * most sense to use the field's index in this list rather than its ordinal.\n *\n */\n get fields() {\n return getList(3, Node_Struct._Fields, this);\n }\n _hasFields() {\n return !isNull(getPointer(3, this));\n }\n _initFields(length) {\n return initList(3, Node_Struct._Fields, length, this);\n }\n set fields(value) {\n copyFrom(value, getPointer(3, this));\n }\n toString() {\n return \"Node_Struct_\" + super.toString();\n }\n}\nclass Node_Enum extends Struct {\n static _capnp = {\n displayName: \"enum\",\n id: \"b54ab3364333f598\",\n size: new ObjectSize(40, 6)\n };\n static _Enumerants;\n _adoptEnumerants(value) {\n adopt(value, getPointer(3, this));\n }\n _disownEnumerants() {\n return disown(this.enumerants);\n }\n /**\n * Enumerants ordered by numeric value (ordinal).\n *\n */\n get enumerants() {\n return getList(3, Node_Enum._Enumerants, this);\n }\n _hasEnumerants() {\n return !isNull(getPointer(3, this));\n }\n _initEnumerants(length) {\n return initList(3, Node_Enum._Enumerants, length, this);\n }\n set enumerants(value) {\n copyFrom(value, getPointer(3, this));\n }\n toString() {\n return \"Node_Enum_\" + super.toString();\n }\n}\nclass Node_Interface extends Struct {\n static _capnp = {\n displayName: \"interface\",\n id: \"e82753cff0c2218f\",\n size: new ObjectSize(40, 6)\n };\n static _Methods;\n static _Superclasses;\n _adoptMethods(value) {\n adopt(value, getPointer(3, this));\n }\n _disownMethods() {\n return disown(this.methods);\n }\n /**\n * Methods ordered by ordinal.\n *\n */\n get methods() {\n return getList(3, Node_Interface._Methods, this);\n }\n _hasMethods() {\n return !isNull(getPointer(3, this));\n }\n _initMethods(length) {\n return initList(3, Node_Interface._Methods, length, this);\n }\n set methods(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptSuperclasses(value) {\n adopt(value, getPointer(4, this));\n }\n _disownSuperclasses() {\n return disown(this.superclasses);\n }\n /**\n * Superclasses of this interface.\n *\n */\n get superclasses() {\n return getList(4, Node_Interface._Superclasses, this);\n }\n _hasSuperclasses() {\n return !isNull(getPointer(4, this));\n }\n _initSuperclasses(length) {\n return initList(4, Node_Interface._Superclasses, length, this);\n }\n set superclasses(value) {\n copyFrom(value, getPointer(4, this));\n }\n toString() {\n return \"Node_Interface_\" + super.toString();\n }\n}\nclass Node_Const extends Struct {\n static _capnp = {\n displayName: \"const\",\n id: \"b18aa5ac7a0d9420\",\n size: new ObjectSize(40, 6)\n };\n _adoptType(value) {\n adopt(value, getPointer(3, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(3, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(3, this));\n }\n _initType() {\n return initStructAt(3, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptValue(value) {\n adopt(value, getPointer(4, this));\n }\n _disownValue() {\n return disown(this.value);\n }\n get value() {\n return getStruct(4, Value, this);\n }\n _hasValue() {\n return !isNull(getPointer(4, this));\n }\n _initValue() {\n return initStructAt(4, Value, this);\n }\n set value(value) {\n copyFrom(value, getPointer(4, this));\n }\n toString() {\n return \"Node_Const_\" + super.toString();\n }\n}\nclass Node_Annotation extends Struct {\n static _capnp = {\n displayName: \"annotation\",\n id: \"ec1619d4400a0290\",\n size: new ObjectSize(40, 6)\n };\n _adoptType(value) {\n adopt(value, getPointer(3, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(3, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(3, this));\n }\n _initType() {\n return initStructAt(3, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(3, this));\n }\n get targetsFile() {\n return getBit(112, this);\n }\n set targetsFile(value) {\n setBit(112, value, this);\n }\n get targetsConst() {\n return getBit(113, this);\n }\n set targetsConst(value) {\n setBit(113, value, this);\n }\n get targetsEnum() {\n return getBit(114, this);\n }\n set targetsEnum(value) {\n setBit(114, value, this);\n }\n get targetsEnumerant() {\n return getBit(115, this);\n }\n set targetsEnumerant(value) {\n setBit(115, value, this);\n }\n get targetsStruct() {\n return getBit(116, this);\n }\n set targetsStruct(value) {\n setBit(116, value, this);\n }\n get targetsField() {\n return getBit(117, this);\n }\n set targetsField(value) {\n setBit(117, value, this);\n }\n get targetsUnion() {\n return getBit(118, this);\n }\n set targetsUnion(value) {\n setBit(118, value, this);\n }\n get targetsGroup() {\n return getBit(119, this);\n }\n set targetsGroup(value) {\n setBit(119, value, this);\n }\n get targetsInterface() {\n return getBit(120, this);\n }\n set targetsInterface(value) {\n setBit(120, value, this);\n }\n get targetsMethod() {\n return getBit(121, this);\n }\n set targetsMethod(value) {\n setBit(121, value, this);\n }\n get targetsParam() {\n return getBit(122, this);\n }\n set targetsParam(value) {\n setBit(122, value, this);\n }\n get targetsAnnotation() {\n return getBit(123, this);\n }\n set targetsAnnotation(value) {\n setBit(123, value, this);\n }\n toString() {\n return \"Node_Annotation_\" + super.toString();\n }\n}\nconst Node_Which = {\n FILE: 0,\n /**\n * Name to present to humans to identify this Node. You should not attempt to parse this. Its\n * format could change. It is not guaranteed to be unique.\n *\n * (On Zooko's triangle, this is the node's nickname.)\n *\n */\n STRUCT: 1,\n /**\n * If you want a shorter version of `displayName` (just naming this node, without its surrounding\n * scope), chop off this many characters from the beginning of `displayName`.\n *\n */\n ENUM: 2,\n /**\n * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back\n * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not\n * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is\n * zero if the node has no parent, which is normally only the case with files, but should be\n * allowed for any kind of node (in order to make runtime type generation easier).\n *\n */\n INTERFACE: 3,\n /**\n * List of nodes nested within this node, along with the names under which they were declared.\n *\n */\n CONST: 4,\n /**\n * Annotations applied to this node.\n *\n */\n ANNOTATION: 5\n};\nclass Node extends Struct {\n static FILE = Node_Which.FILE;\n static STRUCT = Node_Which.STRUCT;\n static ENUM = Node_Which.ENUM;\n static INTERFACE = Node_Which.INTERFACE;\n static CONST = Node_Which.CONST;\n static ANNOTATION = Node_Which.ANNOTATION;\n static Parameter = Node_Parameter;\n static NestedNode = Node_NestedNode;\n static SourceInfo = Node_SourceInfo;\n static _capnp = {\n displayName: \"Node\",\n id: \"e682ab4cf923a417\",\n size: new ObjectSize(40, 6)\n };\n static _Parameters;\n static _NestedNodes;\n static _Annotations;\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * Name to present to humans to identify this Node. You should not attempt to parse this. Its\n * format could change. It is not guaranteed to be unique.\n *\n * (On Zooko's triangle, this is the node's nickname.)\n *\n */\n get displayName() {\n return getText(0, this);\n }\n set displayName(value) {\n setText(0, value, this);\n }\n /**\n * If you want a shorter version of `displayName` (just naming this node, without its surrounding\n * scope), chop off this many characters from the beginning of `displayName`.\n *\n */\n get displayNamePrefixLength() {\n return getUint32(8, this);\n }\n set displayNamePrefixLength(value) {\n setUint32(8, value, this);\n }\n /**\n * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back\n * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not\n * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is\n * zero if the node has no parent, which is normally only the case with files, but should be\n * allowed for any kind of node (in order to make runtime type generation easier).\n *\n */\n get scopeId() {\n return getUint64(16, this);\n }\n set scopeId(value) {\n setUint64(16, value, this);\n }\n _adoptParameters(value) {\n adopt(value, getPointer(5, this));\n }\n _disownParameters() {\n return disown(this.parameters);\n }\n /**\n * If this node is parameterized (generic), the list of parameters. Empty for non-generic types.\n *\n */\n get parameters() {\n return getList(5, Node._Parameters, this);\n }\n _hasParameters() {\n return !isNull(getPointer(5, this));\n }\n _initParameters(length) {\n return initList(5, Node._Parameters, length, this);\n }\n set parameters(value) {\n copyFrom(value, getPointer(5, this));\n }\n /**\n * True if this node is generic, meaning that it or one of its parent scopes has a non-empty\n * `parameters`.\n *\n */\n get isGeneric() {\n return getBit(288, this);\n }\n set isGeneric(value) {\n setBit(288, value, this);\n }\n _adoptNestedNodes(value) {\n adopt(value, getPointer(1, this));\n }\n _disownNestedNodes() {\n return disown(this.nestedNodes);\n }\n /**\n * List of nodes nested within this node, along with the names under which they were declared.\n *\n */\n get nestedNodes() {\n return getList(1, Node._NestedNodes, this);\n }\n _hasNestedNodes() {\n return !isNull(getPointer(1, this));\n }\n _initNestedNodes(length) {\n return initList(1, Node._NestedNodes, length, this);\n }\n set nestedNodes(value) {\n copyFrom(value, getPointer(1, this));\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(2, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n /**\n * Annotations applied to this node.\n *\n */\n get annotations() {\n return getList(2, Node._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(2, this));\n }\n _initAnnotations(length) {\n return initList(2, Node._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(2, this));\n }\n get _isFile() {\n return getUint16(12, this) === 0;\n }\n set file(_) {\n setUint16(12, 0, this);\n }\n get struct() {\n testWhich(\"struct\", getUint16(12, this), 1, this);\n return getAs(Node_Struct, this);\n }\n _initStruct() {\n setUint16(12, 1, this);\n return getAs(Node_Struct, this);\n }\n get _isStruct() {\n return getUint16(12, this) === 1;\n }\n set struct(_) {\n setUint16(12, 1, this);\n }\n get enum() {\n testWhich(\"enum\", getUint16(12, this), 2, this);\n return getAs(Node_Enum, this);\n }\n _initEnum() {\n setUint16(12, 2, this);\n return getAs(Node_Enum, this);\n }\n get _isEnum() {\n return getUint16(12, this) === 2;\n }\n set enum(_) {\n setUint16(12, 2, this);\n }\n get interface() {\n testWhich(\"interface\", getUint16(12, this), 3, this);\n return getAs(Node_Interface, this);\n }\n _initInterface() {\n setUint16(12, 3, this);\n return getAs(Node_Interface, this);\n }\n get _isInterface() {\n return getUint16(12, this) === 3;\n }\n set interface(_) {\n setUint16(12, 3, this);\n }\n get const() {\n testWhich(\"const\", getUint16(12, this), 4, this);\n return getAs(Node_Const, this);\n }\n _initConst() {\n setUint16(12, 4, this);\n return getAs(Node_Const, this);\n }\n get _isConst() {\n return getUint16(12, this) === 4;\n }\n set const(_) {\n setUint16(12, 4, this);\n }\n get annotation() {\n testWhich(\"annotation\", getUint16(12, this), 5, this);\n return getAs(Node_Annotation, this);\n }\n _initAnnotation() {\n setUint16(12, 5, this);\n return getAs(Node_Annotation, this);\n }\n get _isAnnotation() {\n return getUint16(12, this) === 5;\n }\n set annotation(_) {\n setUint16(12, 5, this);\n }\n toString() {\n return \"Node_\" + super.toString();\n }\n which() {\n return getUint16(12, this);\n }\n}\nclass Field_Slot extends Struct {\n static _capnp = {\n displayName: \"slot\",\n id: \"c42305476bb4746f\",\n size: new ObjectSize(24, 4)\n };\n /**\n * Offset, in units of the field's size, from the beginning of the section in which the field\n * resides. E.g. for a UInt32 field, multiply this by 4 to get the byte offset from the\n * beginning of the data section.\n *\n */\n get offset() {\n return getUint32(4, this);\n }\n set offset(value) {\n setUint32(4, value, this);\n }\n _adoptType(value) {\n adopt(value, getPointer(2, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(2, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(2, this));\n }\n _initType() {\n return initStructAt(2, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(2, this));\n }\n _adoptDefaultValue(value) {\n adopt(value, getPointer(3, this));\n }\n _disownDefaultValue() {\n return disown(this.defaultValue);\n }\n get defaultValue() {\n return getStruct(3, Value, this);\n }\n _hasDefaultValue() {\n return !isNull(getPointer(3, this));\n }\n _initDefaultValue() {\n return initStructAt(3, Value, this);\n }\n set defaultValue(value) {\n copyFrom(value, getPointer(3, this));\n }\n /**\n * Whether the default value was specified explicitly. Non-explicit default values are always\n * zero or empty values. Usually, whether the default value was explicit shouldn't matter.\n * The main use case for this flag is for structs representing method parameters:\n * explicitly-defaulted parameters may be allowed to be omitted when calling the method.\n *\n */\n get hadExplicitDefault() {\n return getBit(128, this);\n }\n set hadExplicitDefault(value) {\n setBit(128, value, this);\n }\n toString() {\n return \"Field_Slot_\" + super.toString();\n }\n}\nclass Field_Group extends Struct {\n static _capnp = {\n displayName: \"group\",\n id: \"cafccddb68db1d11\",\n size: new ObjectSize(24, 4)\n };\n /**\n * The ID of the group's node.\n *\n */\n get typeId() {\n return getUint64(16, this);\n }\n set typeId(value) {\n setUint64(16, value, this);\n }\n toString() {\n return \"Field_Group_\" + super.toString();\n }\n}\nconst Field_Ordinal_Which = {\n IMPLICIT: 0,\n /**\n * The original ordinal number given to the field. You probably should NOT use this; if you need\n * a numeric identifier for a field, use its position within the field array for its scope.\n * The ordinal is given here mainly just so that the original schema text can be reproduced given\n * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.\n *\n */\n EXPLICIT: 1\n};\nclass Field_Ordinal extends Struct {\n static IMPLICIT = Field_Ordinal_Which.IMPLICIT;\n static EXPLICIT = Field_Ordinal_Which.EXPLICIT;\n static _capnp = {\n displayName: \"ordinal\",\n id: \"bb90d5c287870be6\",\n size: new ObjectSize(24, 4)\n };\n get _isImplicit() {\n return getUint16(10, this) === 0;\n }\n set implicit(_) {\n setUint16(10, 0, this);\n }\n /**\n * The original ordinal number given to the field. You probably should NOT use this; if you need\n * a numeric identifier for a field, use its position within the field array for its scope.\n * The ordinal is given here mainly just so that the original schema text can be reproduced given\n * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.\n *\n */\n get explicit() {\n testWhich(\"explicit\", getUint16(10, this), 1, this);\n return getUint16(12, this);\n }\n get _isExplicit() {\n return getUint16(10, this) === 1;\n }\n set explicit(value) {\n setUint16(10, 1, this);\n setUint16(12, value, this);\n }\n toString() {\n return \"Field_Ordinal_\" + super.toString();\n }\n which() {\n return getUint16(10, this);\n }\n}\nconst Field_Which = {\n SLOT: 0,\n /**\n * Indicates where this member appeared in the code, relative to other members.\n * Code ordering may have semantic relevance -- programmers tend to place related fields\n * together. So, using code ordering makes sense in human-readable formats where ordering is\n * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum\n * value is count(members) - 1. Fields that are members of a union are only ordered relative to\n * the other members of that union, so the maximum value there is count(union.members).\n *\n */\n GROUP: 1\n};\nclass Field extends Struct {\n static NO_DISCRIMINANT = 65535;\n static SLOT = Field_Which.SLOT;\n static GROUP = Field_Which.GROUP;\n static _capnp = {\n displayName: \"Field\",\n id: \"9aad50a41f4af45f\",\n size: new ObjectSize(24, 4),\n defaultDiscriminantValue: getUint16Mask(65535)\n };\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Indicates where this member appeared in the code, relative to other members.\n * Code ordering may have semantic relevance -- programmers tend to place related fields\n * together. So, using code ordering makes sense in human-readable formats where ordering is\n * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum\n * value is count(members) - 1. Fields that are members of a union are only ordered relative to\n * the other members of that union, so the maximum value there is count(union.members).\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Field._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Field._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n /**\n * If the field is in a union, this is the value which the union's discriminant should take when\n * the field is active. If the field is not in a union, this is 0xffff.\n *\n */\n get discriminantValue() {\n return getUint16(2, this, Field._capnp.defaultDiscriminantValue);\n }\n set discriminantValue(value) {\n setUint16(2, value, this, Field._capnp.defaultDiscriminantValue);\n }\n /**\n * A regular, non-group, non-fixed-list field.\n *\n */\n get slot() {\n testWhich(\"slot\", getUint16(8, this), 0, this);\n return getAs(Field_Slot, this);\n }\n _initSlot() {\n setUint16(8, 0, this);\n return getAs(Field_Slot, this);\n }\n get _isSlot() {\n return getUint16(8, this) === 0;\n }\n set slot(_) {\n setUint16(8, 0, this);\n }\n /**\n * A group.\n *\n */\n get group() {\n testWhich(\"group\", getUint16(8, this), 1, this);\n return getAs(Field_Group, this);\n }\n _initGroup() {\n setUint16(8, 1, this);\n return getAs(Field_Group, this);\n }\n get _isGroup() {\n return getUint16(8, this) === 1;\n }\n set group(_) {\n setUint16(8, 1, this);\n }\n get ordinal() {\n return getAs(Field_Ordinal, this);\n }\n _initOrdinal() {\n return getAs(Field_Ordinal, this);\n }\n toString() {\n return \"Field_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nclass Enumerant extends Struct {\n static _capnp = {\n displayName: \"Enumerant\",\n id: \"978a7cebdc549a4d\",\n size: new ObjectSize(8, 2)\n };\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Specifies order in which the enumerants were declared in the code.\n * Like utils.Field.codeOrder.\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Enumerant._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Enumerant._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Enumerant_\" + super.toString();\n }\n}\nclass Superclass extends Struct {\n static _capnp = {\n displayName: \"Superclass\",\n id: \"a9962a9ed0a4d7f8\",\n size: new ObjectSize(8, 1)\n };\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Superclass_\" + super.toString();\n }\n}\nclass Method extends Struct {\n static _capnp = {\n displayName: \"Method\",\n id: \"9500cce23b334d80\",\n size: new ObjectSize(24, 5)\n };\n static _ImplicitParameters;\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Specifies order in which the methods were declared in the code.\n * Like utils.Field.codeOrder.\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptImplicitParameters(value) {\n adopt(value, getPointer(4, this));\n }\n _disownImplicitParameters() {\n return disown(this.implicitParameters);\n }\n /**\n * The parameters listed in [] (typically, type / generic parameters), whose bindings are intended\n * to be inferred rather than specified explicitly, although not all languages support this.\n *\n */\n get implicitParameters() {\n return getList(4, Method._ImplicitParameters, this);\n }\n _hasImplicitParameters() {\n return !isNull(getPointer(4, this));\n }\n _initImplicitParameters(length) {\n return initList(4, Method._ImplicitParameters, length, this);\n }\n set implicitParameters(value) {\n copyFrom(value, getPointer(4, this));\n }\n /**\n * ID of the parameter struct type. If a named parameter list was specified in the method\n * declaration (rather than a single struct parameter type) then a corresponding struct type is\n * auto-generated. Such an auto-generated type will not be listed in the interface's\n * `nestedNodes` and its `scopeId` will be zero -- it is completely detached from the namespace.\n * (Awkwardly, it does of course inherit generic parameters from the method's scope, which makes\n * this a situation where you can't just climb the scope chain to find where a particular\n * generic parameter was introduced. Making the `scopeId` zero was a mistake.)\n *\n */\n get paramStructType() {\n return getUint64(8, this);\n }\n set paramStructType(value) {\n setUint64(8, value, this);\n }\n _adoptParamBrand(value) {\n adopt(value, getPointer(2, this));\n }\n _disownParamBrand() {\n return disown(this.paramBrand);\n }\n /**\n * Brand of param struct type.\n *\n */\n get paramBrand() {\n return getStruct(2, Brand, this);\n }\n _hasParamBrand() {\n return !isNull(getPointer(2, this));\n }\n _initParamBrand() {\n return initStructAt(2, Brand, this);\n }\n set paramBrand(value) {\n copyFrom(value, getPointer(2, this));\n }\n /**\n * ID of the return struct type; similar to `paramStructType`.\n *\n */\n get resultStructType() {\n return getUint64(16, this);\n }\n set resultStructType(value) {\n setUint64(16, value, this);\n }\n _adoptResultBrand(value) {\n adopt(value, getPointer(3, this));\n }\n _disownResultBrand() {\n return disown(this.resultBrand);\n }\n /**\n * Brand of result struct type.\n *\n */\n get resultBrand() {\n return getStruct(3, Brand, this);\n }\n _hasResultBrand() {\n return !isNull(getPointer(3, this));\n }\n _initResultBrand() {\n return initStructAt(3, Brand, this);\n }\n set resultBrand(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Method._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Method._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Method_\" + super.toString();\n }\n}\nclass Type_List extends Struct {\n static _capnp = {\n displayName: \"list\",\n id: \"87e739250a60ea97\",\n size: new ObjectSize(24, 1)\n };\n _adoptElementType(value) {\n adopt(value, getPointer(0, this));\n }\n _disownElementType() {\n return disown(this.elementType);\n }\n get elementType() {\n return getStruct(0, Type, this);\n }\n _hasElementType() {\n return !isNull(getPointer(0, this));\n }\n _initElementType() {\n return initStructAt(0, Type, this);\n }\n set elementType(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_List_\" + super.toString();\n }\n}\nclass Type_Enum extends Struct {\n static _capnp = {\n displayName: \"enum\",\n id: \"9e0e78711a7f87a9\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Enum_\" + super.toString();\n }\n}\nclass Type_Struct extends Struct {\n static _capnp = {\n displayName: \"struct\",\n id: \"ac3a6f60ef4cc6d3\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Struct_\" + super.toString();\n }\n}\nclass Type_Interface extends Struct {\n static _capnp = {\n displayName: \"interface\",\n id: \"ed8bca69f7fb0cbf\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Interface_\" + super.toString();\n }\n}\nconst Type_AnyPointer_Unconstrained_Which = {\n /**\n * truly AnyPointer\n *\n */\n ANY_KIND: 0,\n /**\n * AnyStruct\n *\n */\n STRUCT: 1,\n /**\n * AnyList\n *\n */\n LIST: 2,\n /**\n * Capability\n *\n */\n CAPABILITY: 3\n};\nclass Type_AnyPointer_Unconstrained extends Struct {\n static ANY_KIND = Type_AnyPointer_Unconstrained_Which.ANY_KIND;\n static STRUCT = Type_AnyPointer_Unconstrained_Which.STRUCT;\n static LIST = Type_AnyPointer_Unconstrained_Which.LIST;\n static CAPABILITY = Type_AnyPointer_Unconstrained_Which.CAPABILITY;\n static _capnp = {\n displayName: \"unconstrained\",\n id: \"8e3b5f79fe593656\",\n size: new ObjectSize(24, 1)\n };\n get _isAnyKind() {\n return getUint16(10, this) === 0;\n }\n set anyKind(_) {\n setUint16(10, 0, this);\n }\n get _isStruct() {\n return getUint16(10, this) === 1;\n }\n set struct(_) {\n setUint16(10, 1, this);\n }\n get _isList() {\n return getUint16(10, this) === 2;\n }\n set list(_) {\n setUint16(10, 2, this);\n }\n get _isCapability() {\n return getUint16(10, this) === 3;\n }\n set capability(_) {\n setUint16(10, 3, this);\n }\n toString() {\n return \"Type_AnyPointer_Unconstrained_\" + super.toString();\n }\n which() {\n return getUint16(10, this);\n }\n}\nclass Type_AnyPointer_Parameter extends Struct {\n static _capnp = {\n displayName: \"parameter\",\n id: \"9dd1f724f4614a85\",\n size: new ObjectSize(24, 1)\n };\n /**\n * ID of the generic type whose parameter we're referencing. This should be a parent of the\n * current scope.\n *\n */\n get scopeId() {\n return getUint64(16, this);\n }\n set scopeId(value) {\n setUint64(16, value, this);\n }\n /**\n * Index of the parameter within the generic type's parameter list.\n *\n */\n get parameterIndex() {\n return getUint16(10, this);\n }\n set parameterIndex(value) {\n setUint16(10, value, this);\n }\n toString() {\n return \"Type_AnyPointer_Parameter_\" + super.toString();\n }\n}\nclass Type_AnyPointer_ImplicitMethodParameter extends Struct {\n static _capnp = {\n displayName: \"implicitMethodParameter\",\n id: \"baefc9120c56e274\",\n size: new ObjectSize(24, 1)\n };\n get parameterIndex() {\n return getUint16(10, this);\n }\n set parameterIndex(value) {\n setUint16(10, value, this);\n }\n toString() {\n return \"Type_AnyPointer_ImplicitMethodParameter_\" + super.toString();\n }\n}\nconst Type_AnyPointer_Which = {\n /**\n * A regular AnyPointer.\n *\n * The name \"unconstrained\" means as opposed to constraining it to match a type parameter.\n * In retrospect this name is probably a poor choice given that it may still be constrained\n * to be a struct, list, or capability.\n *\n */\n UNCONSTRAINED: 0,\n /**\n * This is actually a reference to a type parameter defined within this scope.\n *\n */\n PARAMETER: 1,\n /**\n * This is actually a reference to an implicit (generic) parameter of a method. The only\n * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.\n *\n */\n IMPLICIT_METHOD_PARAMETER: 2\n};\nclass Type_AnyPointer extends Struct {\n static UNCONSTRAINED = Type_AnyPointer_Which.UNCONSTRAINED;\n static PARAMETER = Type_AnyPointer_Which.PARAMETER;\n static IMPLICIT_METHOD_PARAMETER = Type_AnyPointer_Which.IMPLICIT_METHOD_PARAMETER;\n static _capnp = {\n displayName: \"anyPointer\",\n id: \"c2573fe8a23e49f1\",\n size: new ObjectSize(24, 1)\n };\n /**\n * A regular AnyPointer.\n *\n * The name \"unconstrained\" means as opposed to constraining it to match a type parameter.\n * In retrospect this name is probably a poor choice given that it may still be constrained\n * to be a struct, list, or capability.\n *\n */\n get unconstrained() {\n testWhich(\"unconstrained\", getUint16(8, this), 0, this);\n return getAs(Type_AnyPointer_Unconstrained, this);\n }\n _initUnconstrained() {\n setUint16(8, 0, this);\n return getAs(Type_AnyPointer_Unconstrained, this);\n }\n get _isUnconstrained() {\n return getUint16(8, this) === 0;\n }\n set unconstrained(_) {\n setUint16(8, 0, this);\n }\n /**\n * This is actually a reference to a type parameter defined within this scope.\n *\n */\n get parameter() {\n testWhich(\"parameter\", getUint16(8, this), 1, this);\n return getAs(Type_AnyPointer_Parameter, this);\n }\n _initParameter() {\n setUint16(8, 1, this);\n return getAs(Type_AnyPointer_Parameter, this);\n }\n get _isParameter() {\n return getUint16(8, this) === 1;\n }\n set parameter(_) {\n setUint16(8, 1, this);\n }\n /**\n * This is actually a reference to an implicit (generic) parameter of a method. The only\n * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.\n *\n */\n get implicitMethodParameter() {\n testWhich(\"implicitMethodParameter\", getUint16(8, this), 2, this);\n return getAs(Type_AnyPointer_ImplicitMethodParameter, this);\n }\n _initImplicitMethodParameter() {\n setUint16(8, 2, this);\n return getAs(Type_AnyPointer_ImplicitMethodParameter, this);\n }\n get _isImplicitMethodParameter() {\n return getUint16(8, this) === 2;\n }\n set implicitMethodParameter(_) {\n setUint16(8, 2, this);\n }\n toString() {\n return \"Type_AnyPointer_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nconst Type_Which = {\n VOID: 0,\n BOOL: 1,\n INT8: 2,\n INT16: 3,\n INT32: 4,\n INT64: 5,\n UINT8: 6,\n UINT16: 7,\n UINT32: 8,\n UINT64: 9,\n FLOAT32: 10,\n FLOAT64: 11,\n TEXT: 12,\n DATA: 13,\n LIST: 14,\n ENUM: 15,\n STRUCT: 16,\n INTERFACE: 17,\n ANY_POINTER: 18\n};\nclass Type extends Struct {\n static VOID = Type_Which.VOID;\n static BOOL = Type_Which.BOOL;\n static INT8 = Type_Which.INT8;\n static INT16 = Type_Which.INT16;\n static INT32 = Type_Which.INT32;\n static INT64 = Type_Which.INT64;\n static UINT8 = Type_Which.UINT8;\n static UINT16 = Type_Which.UINT16;\n static UINT32 = Type_Which.UINT32;\n static UINT64 = Type_Which.UINT64;\n static FLOAT32 = Type_Which.FLOAT32;\n static FLOAT64 = Type_Which.FLOAT64;\n static TEXT = Type_Which.TEXT;\n static DATA = Type_Which.DATA;\n static LIST = Type_Which.LIST;\n static ENUM = Type_Which.ENUM;\n static STRUCT = Type_Which.STRUCT;\n static INTERFACE = Type_Which.INTERFACE;\n static ANY_POINTER = Type_Which.ANY_POINTER;\n static _capnp = {\n displayName: \"Type\",\n id: \"d07378ede1f9cc60\",\n size: new ObjectSize(24, 1)\n };\n get _isVoid() {\n return getUint16(0, this) === 0;\n }\n set void(_) {\n setUint16(0, 0, this);\n }\n get _isBool() {\n return getUint16(0, this) === 1;\n }\n set bool(_) {\n setUint16(0, 1, this);\n }\n get _isInt8() {\n return getUint16(0, this) === 2;\n }\n set int8(_) {\n setUint16(0, 2, this);\n }\n get _isInt16() {\n return getUint16(0, this) === 3;\n }\n set int16(_) {\n setUint16(0, 3, this);\n }\n get _isInt32() {\n return getUint16(0, this) === 4;\n }\n set int32(_) {\n setUint16(0, 4, this);\n }\n get _isInt64() {\n return getUint16(0, this) === 5;\n }\n set int64(_) {\n setUint16(0, 5, this);\n }\n get _isUint8() {\n return getUint16(0, this) === 6;\n }\n set uint8(_) {\n setUint16(0, 6, this);\n }\n get _isUint16() {\n return getUint16(0, this) === 7;\n }\n set uint16(_) {\n setUint16(0, 7, this);\n }\n get _isUint32() {\n return getUint16(0, this) === 8;\n }\n set uint32(_) {\n setUint16(0, 8, this);\n }\n get _isUint64() {\n return getUint16(0, this) === 9;\n }\n set uint64(_) {\n setUint16(0, 9, this);\n }\n get _isFloat32() {\n return getUint16(0, this) === 10;\n }\n set float32(_) {\n setUint16(0, 10, this);\n }\n get _isFloat64() {\n return getUint16(0, this) === 11;\n }\n set float64(_) {\n setUint16(0, 11, this);\n }\n get _isText() {\n return getUint16(0, this) === 12;\n }\n set text(_) {\n setUint16(0, 12, this);\n }\n get _isData() {\n return getUint16(0, this) === 13;\n }\n set data(_) {\n setUint16(0, 13, this);\n }\n get list() {\n testWhich(\"list\", getUint16(0, this), 14, this);\n return getAs(Type_List, this);\n }\n _initList() {\n setUint16(0, 14, this);\n return getAs(Type_List, this);\n }\n get _isList() {\n return getUint16(0, this) === 14;\n }\n set list(_) {\n setUint16(0, 14, this);\n }\n get enum() {\n testWhich(\"enum\", getUint16(0, this), 15, this);\n return getAs(Type_Enum, this);\n }\n _initEnum() {\n setUint16(0, 15, this);\n return getAs(Type_Enum, this);\n }\n get _isEnum() {\n return getUint16(0, this) === 15;\n }\n set enum(_) {\n setUint16(0, 15, this);\n }\n get struct() {\n testWhich(\"struct\", getUint16(0, this), 16, this);\n return getAs(Type_Struct, this);\n }\n _initStruct() {\n setUint16(0, 16, this);\n return getAs(Type_Struct, this);\n }\n get _isStruct() {\n return getUint16(0, this) === 16;\n }\n set struct(_) {\n setUint16(0, 16, this);\n }\n get interface() {\n testWhich(\"interface\", getUint16(0, this), 17, this);\n return getAs(Type_Interface, this);\n }\n _initInterface() {\n setUint16(0, 17, this);\n return getAs(Type_Interface, this);\n }\n get _isInterface() {\n return getUint16(0, this) === 17;\n }\n set interface(_) {\n setUint16(0, 17, this);\n }\n get anyPointer() {\n testWhich(\"anyPointer\", getUint16(0, this), 18, this);\n return getAs(Type_AnyPointer, this);\n }\n _initAnyPointer() {\n setUint16(0, 18, this);\n return getAs(Type_AnyPointer, this);\n }\n get _isAnyPointer() {\n return getUint16(0, this) === 18;\n }\n set anyPointer(_) {\n setUint16(0, 18, this);\n }\n toString() {\n return \"Type_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nconst Brand_Scope_Which = {\n /**\n * ID of the scope to which these params apply.\n *\n */\n BIND: 0,\n /**\n * List of parameter bindings.\n *\n */\n INHERIT: 1\n};\nclass Brand_Scope extends Struct {\n static BIND = Brand_Scope_Which.BIND;\n static INHERIT = Brand_Scope_Which.INHERIT;\n static _capnp = {\n displayName: \"Scope\",\n id: \"abd73485a9636bc9\",\n size: new ObjectSize(16, 1)\n };\n static _Bind;\n /**\n * ID of the scope to which these params apply.\n *\n */\n get scopeId() {\n return getUint64(0, this);\n }\n set scopeId(value) {\n setUint64(0, value, this);\n }\n _adoptBind(value) {\n setUint16(8, 0, this);\n adopt(value, getPointer(0, this));\n }\n _disownBind() {\n return disown(this.bind);\n }\n /**\n * List of parameter bindings.\n *\n */\n get bind() {\n testWhich(\"bind\", getUint16(8, this), 0, this);\n return getList(0, Brand_Scope._Bind, this);\n }\n _hasBind() {\n return !isNull(getPointer(0, this));\n }\n _initBind(length) {\n setUint16(8, 0, this);\n return initList(0, Brand_Scope._Bind, length, this);\n }\n get _isBind() {\n return getUint16(8, this) === 0;\n }\n set bind(value) {\n setUint16(8, 0, this);\n copyFrom(value, getPointer(0, this));\n }\n get _isInherit() {\n return getUint16(8, this) === 1;\n }\n set inherit(_) {\n setUint16(8, 1, this);\n }\n toString() {\n return \"Brand_Scope_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nconst Brand_Binding_Which = {\n UNBOUND: 0,\n TYPE: 1\n};\nclass Brand_Binding extends Struct {\n static UNBOUND = Brand_Binding_Which.UNBOUND;\n static TYPE = Brand_Binding_Which.TYPE;\n static _capnp = {\n displayName: \"Binding\",\n id: \"c863cd16969ee7fc\",\n size: new ObjectSize(8, 1)\n };\n get _isUnbound() {\n return getUint16(0, this) === 0;\n }\n set unbound(_) {\n setUint16(0, 0, this);\n }\n _adoptType(value) {\n setUint16(0, 1, this);\n adopt(value, getPointer(0, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n testWhich(\"type\", getUint16(0, this), 1, this);\n return getStruct(0, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(0, this));\n }\n _initType() {\n setUint16(0, 1, this);\n return initStructAt(0, Type, this);\n }\n get _isType() {\n return getUint16(0, this) === 1;\n }\n set type(value) {\n setUint16(0, 1, this);\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Brand_Binding_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nclass Brand extends Struct {\n static Scope = Brand_Scope;\n static Binding = Brand_Binding;\n static _capnp = {\n displayName: \"Brand\",\n id: \"903455f06065422b\",\n size: new ObjectSize(0, 1)\n };\n static _Scopes;\n _adoptScopes(value) {\n adopt(value, getPointer(0, this));\n }\n _disownScopes() {\n return disown(this.scopes);\n }\n /**\n * For each of the target type and each of its parent scopes, a parameterization may be included\n * in this list. If no parameterization is included for a particular relevant scope, then either\n * that scope has no parameters or all parameters should be considered to be `AnyPointer`.\n *\n */\n get scopes() {\n return getList(0, Brand._Scopes, this);\n }\n _hasScopes() {\n return !isNull(getPointer(0, this));\n }\n _initScopes(length) {\n return initList(0, Brand._Scopes, length, this);\n }\n set scopes(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Brand_\" + super.toString();\n }\n}\nconst Value_Which = {\n VOID: 0,\n BOOL: 1,\n INT8: 2,\n INT16: 3,\n INT32: 4,\n INT64: 5,\n UINT8: 6,\n UINT16: 7,\n UINT32: 8,\n UINT64: 9,\n FLOAT32: 10,\n FLOAT64: 11,\n TEXT: 12,\n DATA: 13,\n LIST: 14,\n ENUM: 15,\n STRUCT: 16,\n /**\n * The only interface value that can be represented statically is \"null\", whose methods always\n * throw exceptions.\n *\n */\n INTERFACE: 17,\n ANY_POINTER: 18\n};\nclass Value extends Struct {\n static VOID = Value_Which.VOID;\n static BOOL = Value_Which.BOOL;\n static INT8 = Value_Which.INT8;\n static INT16 = Value_Which.INT16;\n static INT32 = Value_Which.INT32;\n static INT64 = Value_Which.INT64;\n static UINT8 = Value_Which.UINT8;\n static UINT16 = Value_Which.UINT16;\n static UINT32 = Value_Which.UINT32;\n static UINT64 = Value_Which.UINT64;\n static FLOAT32 = Value_Which.FLOAT32;\n static FLOAT64 = Value_Which.FLOAT64;\n static TEXT = Value_Which.TEXT;\n static DATA = Value_Which.DATA;\n static LIST = Value_Which.LIST;\n static ENUM = Value_Which.ENUM;\n static STRUCT = Value_Which.STRUCT;\n static INTERFACE = Value_Which.INTERFACE;\n static ANY_POINTER = Value_Which.ANY_POINTER;\n static _capnp = {\n displayName: \"Value\",\n id: \"ce23dcd2d7b00c9b\",\n size: new ObjectSize(16, 1)\n };\n get _isVoid() {\n return getUint16(0, this) === 0;\n }\n set void(_) {\n setUint16(0, 0, this);\n }\n get bool() {\n testWhich(\"bool\", getUint16(0, this), 1, this);\n return getBit(16, this);\n }\n get _isBool() {\n return getUint16(0, this) === 1;\n }\n set bool(value) {\n setUint16(0, 1, this);\n setBit(16, value, this);\n }\n get int8() {\n testWhich(\"int8\", getUint16(0, this), 2, this);\n return getInt8(2, this);\n }\n get _isInt8() {\n return getUint16(0, this) === 2;\n }\n set int8(value) {\n setUint16(0, 2, this);\n setInt8(2, value, this);\n }\n get int16() {\n testWhich(\"int16\", getUint16(0, this), 3, this);\n return getInt16(2, this);\n }\n get _isInt16() {\n return getUint16(0, this) === 3;\n }\n set int16(value) {\n setUint16(0, 3, this);\n setInt16(2, value, this);\n }\n get int32() {\n testWhich(\"int32\", getUint16(0, this), 4, this);\n return getInt32(4, this);\n }\n get _isInt32() {\n return getUint16(0, this) === 4;\n }\n set int32(value) {\n setUint16(0, 4, this);\n setInt32(4, value, this);\n }\n get int64() {\n testWhich(\"int64\", getUint16(0, this), 5, this);\n return getInt64(8, this);\n }\n get _isInt64() {\n return getUint16(0, this) === 5;\n }\n set int64(value) {\n setUint16(0, 5, this);\n setInt64(8, value, this);\n }\n get uint8() {\n testWhich(\"uint8\", getUint16(0, this), 6, this);\n return getUint8(2, this);\n }\n get _isUint8() {\n return getUint16(0, this) === 6;\n }\n set uint8(value) {\n setUint16(0, 6, this);\n setUint8(2, value, this);\n }\n get uint16() {\n testWhich(\"uint16\", getUint16(0, this), 7, this);\n return getUint16(2, this);\n }\n get _isUint16() {\n return getUint16(0, this) === 7;\n }\n set uint16(value) {\n setUint16(0, 7, this);\n setUint16(2, value, this);\n }\n get uint32() {\n testWhich(\"uint32\", getUint16(0, this), 8, this);\n return getUint32(4, this);\n }\n get _isUint32() {\n return getUint16(0, this) === 8;\n }\n set uint32(value) {\n setUint16(0, 8, this);\n setUint32(4, value, this);\n }\n get uint64() {\n testWhich(\"uint64\", getUint16(0, this), 9, this);\n return getUint64(8, this);\n }\n get _isUint64() {\n return getUint16(0, this) === 9;\n }\n set uint64(value) {\n setUint16(0, 9, this);\n setUint64(8, value, this);\n }\n get float32() {\n testWhich(\"float32\", getUint16(0, this), 10, this);\n return getFloat32(4, this);\n }\n get _isFloat32() {\n return getUint16(0, this) === 10;\n }\n set float32(value) {\n setUint16(0, 10, this);\n setFloat32(4, value, this);\n }\n get float64() {\n testWhich(\"float64\", getUint16(0, this), 11, this);\n return getFloat64(8, this);\n }\n get _isFloat64() {\n return getUint16(0, this) === 11;\n }\n set float64(value) {\n setUint16(0, 11, this);\n setFloat64(8, value, this);\n }\n get text() {\n testWhich(\"text\", getUint16(0, this), 12, this);\n return getText(0, this);\n }\n get _isText() {\n return getUint16(0, this) === 12;\n }\n set text(value) {\n setUint16(0, 12, this);\n setText(0, value, this);\n }\n _adoptData(value) {\n setUint16(0, 13, this);\n adopt(value, getPointer(0, this));\n }\n _disownData() {\n return disown(this.data);\n }\n get data() {\n testWhich(\"data\", getUint16(0, this), 13, this);\n return getData(0, this);\n }\n _hasData() {\n return !isNull(getPointer(0, this));\n }\n _initData(length) {\n setUint16(0, 13, this);\n return initData(0, length, this);\n }\n get _isData() {\n return getUint16(0, this) === 13;\n }\n set data(value) {\n setUint16(0, 13, this);\n copyFrom(value, getPointer(0, this));\n }\n _adoptList(value) {\n setUint16(0, 14, this);\n adopt(value, getPointer(0, this));\n }\n _disownList() {\n return disown(this.list);\n }\n get list() {\n testWhich(\"list\", getUint16(0, this), 14, this);\n return getPointer(0, this);\n }\n _hasList() {\n return !isNull(getPointer(0, this));\n }\n get _isList() {\n return getUint16(0, this) === 14;\n }\n set list(value) {\n setUint16(0, 14, this);\n copyFrom(value, getPointer(0, this));\n }\n get enum() {\n testWhich(\"enum\", getUint16(0, this), 15, this);\n return getUint16(2, this);\n }\n get _isEnum() {\n return getUint16(0, this) === 15;\n }\n set enum(value) {\n setUint16(0, 15, this);\n setUint16(2, value, this);\n }\n _adoptStruct(value) {\n setUint16(0, 16, this);\n adopt(value, getPointer(0, this));\n }\n _disownStruct() {\n return disown(this.struct);\n }\n get struct() {\n testWhich(\"struct\", getUint16(0, this), 16, this);\n return getPointer(0, this);\n }\n _hasStruct() {\n return !isNull(getPointer(0, this));\n }\n get _isStruct() {\n return getUint16(0, this) === 16;\n }\n set struct(value) {\n setUint16(0, 16, this);\n copyFrom(value, getPointer(0, this));\n }\n get _isInterface() {\n return getUint16(0, this) === 17;\n }\n set interface(_) {\n setUint16(0, 17, this);\n }\n _adoptAnyPointer(value) {\n setUint16(0, 18, this);\n adopt(value, getPointer(0, this));\n }\n _disownAnyPointer() {\n return disown(this.anyPointer);\n }\n get anyPointer() {\n testWhich(\"anyPointer\", getUint16(0, this), 18, this);\n return getPointer(0, this);\n }\n _hasAnyPointer() {\n return !isNull(getPointer(0, this));\n }\n get _isAnyPointer() {\n return getUint16(0, this) === 18;\n }\n set anyPointer(value) {\n setUint16(0, 18, this);\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Value_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nclass Annotation extends Struct {\n static _capnp = {\n displayName: \"Annotation\",\n id: \"f1c8950dab257542\",\n size: new ObjectSize(8, 2)\n };\n /**\n * ID of the annotation node.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(1, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n /**\n * Brand of the annotation.\n *\n * Note that the annotation itself is not allowed to be parameterized, but its scope might be.\n *\n */\n get brand() {\n return getStruct(1, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(1, this));\n }\n _initBrand() {\n return initStructAt(1, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(1, this));\n }\n _adoptValue(value) {\n adopt(value, getPointer(0, this));\n }\n _disownValue() {\n return disown(this.value);\n }\n get value() {\n return getStruct(0, Value, this);\n }\n _hasValue() {\n return !isNull(getPointer(0, this));\n }\n _initValue() {\n return initStructAt(0, Value, this);\n }\n set value(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Annotation_\" + super.toString();\n }\n}\nconst ElementSize = {\n /**\n * aka \"void\", but that's a keyword.\n *\n */\n EMPTY: 0,\n BIT: 1,\n BYTE: 2,\n TWO_BYTES: 3,\n FOUR_BYTES: 4,\n EIGHT_BYTES: 5,\n POINTER: 6,\n INLINE_COMPOSITE: 7\n};\nclass CapnpVersion extends Struct {\n static _capnp = {\n displayName: \"CapnpVersion\",\n id: \"d85d305b7d839963\",\n size: new ObjectSize(8, 0)\n };\n get major() {\n return getUint16(0, this);\n }\n set major(value) {\n setUint16(0, value, this);\n }\n get minor() {\n return getUint8(2, this);\n }\n set minor(value) {\n setUint8(2, value, this);\n }\n get micro() {\n return getUint8(3, this);\n }\n set micro(value) {\n setUint8(3, value, this);\n }\n toString() {\n return \"CapnpVersion_\" + super.toString();\n }\n}\nclass CodeGeneratorRequest_RequestedFile_Import extends Struct {\n static _capnp = {\n displayName: \"Import\",\n id: \"ae504193122357e5\",\n size: new ObjectSize(8, 1)\n };\n /**\n * ID of the imported file.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * Name which *this* file used to refer to the foreign file. This may be a relative name.\n * This information is provided because it might be useful for code generation, e.g. to\n * generate #include directives in C++. We don't put this in Node.file because this\n * information is only meaningful at compile time anyway.\n *\n * (On Zooko's triangle, this is the import's petname according to the importing file.)\n *\n */\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n toString() {\n return \"CodeGeneratorRequest_RequestedFile_Import_\" + super.toString();\n }\n}\nclass CodeGeneratorRequest_RequestedFile extends Struct {\n static Import = CodeGeneratorRequest_RequestedFile_Import;\n static _capnp = {\n displayName: \"RequestedFile\",\n id: \"cfea0eb02e810062\",\n size: new ObjectSize(8, 2)\n };\n static _Imports;\n /**\n * ID of the file.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * Name of the file as it appeared on the command-line (minus the src-prefix). You may use\n * this to decide where to write the output.\n *\n */\n get filename() {\n return getText(0, this);\n }\n set filename(value) {\n setText(0, value, this);\n }\n _adoptImports(value) {\n adopt(value, getPointer(1, this));\n }\n _disownImports() {\n return disown(this.imports);\n }\n /**\n * List of all imported paths seen in this file.\n *\n */\n get imports() {\n return getList(1, CodeGeneratorRequest_RequestedFile._Imports, this);\n }\n _hasImports() {\n return !isNull(getPointer(1, this));\n }\n _initImports(length) {\n return initList(1, CodeGeneratorRequest_RequestedFile._Imports, length, this);\n }\n set imports(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"CodeGeneratorRequest_RequestedFile_\" + super.toString();\n }\n}\nclass CodeGeneratorRequest extends Struct {\n static RequestedFile = CodeGeneratorRequest_RequestedFile;\n static _capnp = {\n displayName: \"CodeGeneratorRequest\",\n id: \"bfc546f6210ad7ce\",\n size: new ObjectSize(0, 4)\n };\n static _Nodes;\n static _SourceInfo;\n static _RequestedFiles;\n _adoptCapnpVersion(value) {\n adopt(value, getPointer(2, this));\n }\n _disownCapnpVersion() {\n return disown(this.capnpVersion);\n }\n /**\n * Version of the `capnp` executable. Generally, code generators should ignore this, but the code\n * generators that ship with `capnp` itself will print a warning if this mismatches since that\n * probably indicates something is misconfigured.\n *\n * The first version of 'capnp' to set this was 0.6.0. So, if it's missing, the compiler version\n * is older than that.\n *\n */\n get capnpVersion() {\n return getStruct(2, CapnpVersion, this);\n }\n _hasCapnpVersion() {\n return !isNull(getPointer(2, this));\n }\n _initCapnpVersion() {\n return initStructAt(2, CapnpVersion, this);\n }\n set capnpVersion(value) {\n copyFrom(value, getPointer(2, this));\n }\n _adoptNodes(value) {\n adopt(value, getPointer(0, this));\n }\n _disownNodes() {\n return disown(this.nodes);\n }\n /**\n * All nodes parsed by the compiler, including for the files on the command line and their\n * imports.\n *\n */\n get nodes() {\n return getList(0, CodeGeneratorRequest._Nodes, this);\n }\n _hasNodes() {\n return !isNull(getPointer(0, this));\n }\n _initNodes(length) {\n return initList(0, CodeGeneratorRequest._Nodes, length, this);\n }\n set nodes(value) {\n copyFrom(value, getPointer(0, this));\n }\n _adoptSourceInfo(value) {\n adopt(value, getPointer(3, this));\n }\n _disownSourceInfo() {\n return disown(this.sourceInfo);\n }\n /**\n * Information about the original source code for each node, where available. This array may be\n * omitted or may be missing some nodes if no info is available for them.\n *\n */\n get sourceInfo() {\n return getList(3, CodeGeneratorRequest._SourceInfo, this);\n }\n _hasSourceInfo() {\n return !isNull(getPointer(3, this));\n }\n _initSourceInfo(length) {\n return initList(3, CodeGeneratorRequest._SourceInfo, length, this);\n }\n set sourceInfo(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptRequestedFiles(value) {\n adopt(value, getPointer(1, this));\n }\n _disownRequestedFiles() {\n return disown(this.requestedFiles);\n }\n /**\n * Files which were listed on the command line.\n *\n */\n get requestedFiles() {\n return getList(1, CodeGeneratorRequest._RequestedFiles, this);\n }\n _hasRequestedFiles() {\n return !isNull(getPointer(1, this));\n }\n _initRequestedFiles(length) {\n return initList(1, CodeGeneratorRequest._RequestedFiles, length, this);\n }\n set requestedFiles(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"CodeGeneratorRequest_\" + super.toString();\n }\n}\nNode_SourceInfo._Members = CompositeList(Node_SourceInfo_Member);\nNode_Struct._Fields = CompositeList(Field);\nNode_Enum._Enumerants = CompositeList(Enumerant);\nNode_Interface._Methods = CompositeList(Method);\nNode_Interface._Superclasses = CompositeList(Superclass);\nNode._Parameters = CompositeList(Node_Parameter);\nNode._NestedNodes = CompositeList(Node_NestedNode);\nNode._Annotations = CompositeList(Annotation);\nField._Annotations = CompositeList(Annotation);\nEnumerant._Annotations = CompositeList(Annotation);\nMethod._ImplicitParameters = CompositeList(Node_Parameter);\nMethod._Annotations = CompositeList(Annotation);\nBrand_Scope._Bind = CompositeList(Brand_Binding);\nBrand._Scopes = CompositeList(Brand_Scope);\nCodeGeneratorRequest_RequestedFile._Imports = CompositeList(CodeGeneratorRequest_RequestedFile_Import);\nCodeGeneratorRequest._Nodes = CompositeList(Node);\nCodeGeneratorRequest._SourceInfo = CompositeList(Node_SourceInfo);\nCodeGeneratorRequest._RequestedFiles = CompositeList(CodeGeneratorRequest_RequestedFile);\n\nexport { Annotation, Brand, Brand_Binding, Brand_Binding_Which, Brand_Scope, Brand_Scope_Which, CapnpVersion, CodeGeneratorRequest, CodeGeneratorRequest_RequestedFile, CodeGeneratorRequest_RequestedFile_Import, ElementSize, Enumerant, Field, Field_Group, Field_Ordinal, Field_Ordinal_Which, Field_Slot, Field_Which, Method, Node, Node_Annotation, Node_Const, Node_Enum, Node_Interface, Node_NestedNode, Node_Parameter, Node_SourceInfo, Node_SourceInfo_Member, Node_Struct, Node_Which, Superclass, Type, Type_AnyPointer, Type_AnyPointer_ImplicitMethodParameter, Type_AnyPointer_Parameter, Type_AnyPointer_Unconstrained, Type_AnyPointer_Unconstrained_Which, Type_AnyPointer_Which, Type_Enum, Type_Interface, Type_List, Type_Struct, Type_Which, Value, Value_Which, _capnpFileId };\n","import { N as format, P as SEG_NOT_WORD_ALIGNED, Q as DEFAULT_BUFFER_SIZE, R as SEG_ID_OUT_OF_BOUNDS, T as padToWord, U as SEG_GET_NON_ZERO_SINGLE, V as MIN_SINGLE_SEGMENT_GROWTH, W as assertNever, X as MSG_PACK_NOT_WORD_ALIGNED, Y as PACK_SPAN_THRESHOLD, Z as MAX_SEGMENT_LENGTH, _ as SEG_SIZE_OVERFLOW, $ as Pointer, a0 as NATIVE_LITTLE_ENDIAN, a1 as SEG_REPLACEMENT_BUFFER_TOO_SMALL, a2 as DEFAULT_TRAVERSE_LIMIT, a3 as MSG_INVALID_FRAME_HEADER, a4 as MSG_SEGMENT_TOO_SMALL, a5 as MSG_SEGMENT_OUT_OF_BOUNDS, a6 as dumpBuffer, a7 as validate, a8 as PointerType, a9 as getTargetStructSize, aa as resize, ab as initStruct, c as copyFrom } from './capnp-es.0-_cOx6D.mjs';\n\nvar ArenaKind = /* @__PURE__ */ ((ArenaKind2) => {\n ArenaKind2[ArenaKind2[\"SINGLE_SEGMENT\"] = 0] = \"SINGLE_SEGMENT\";\n ArenaKind2[ArenaKind2[\"MULTI_SEGMENT\"] = 1] = \"MULTI_SEGMENT\";\n return ArenaKind2;\n})(ArenaKind || {});\n\nclass ArenaAllocationResult {\n /**\n * The newly allocated buffer. This buffer might be a copy of an existing segment's buffer with free space appended.\n */\n buffer;\n /**\n * The id of the newly-allocated segment.\n */\n id;\n constructor(id, buffer) {\n this.id = id;\n this.buffer = buffer;\n }\n}\n\nclass MultiSegmentArena {\n constructor(buffers = [new ArrayBuffer(DEFAULT_BUFFER_SIZE)]) {\n this.buffers = buffers;\n let i = buffers.length;\n while (--i >= 0) {\n if ((buffers[i].byteLength & 7) !== 0) {\n throw new Error(format(SEG_NOT_WORD_ALIGNED, buffers[i].byteLength));\n }\n }\n }\n static allocate = allocate$2;\n static getBuffer = getBuffer$2;\n static getNumSegments = getNumSegments$2;\n kind = ArenaKind.MULTI_SEGMENT;\n toString() {\n return format(\"MultiSegmentArena_segments:%d\", getNumSegments$2(this));\n }\n}\nfunction allocate$2(minSize, m) {\n const b = new ArrayBuffer(padToWord(Math.max(minSize, DEFAULT_BUFFER_SIZE)));\n m.buffers.push(b);\n return new ArenaAllocationResult(m.buffers.length - 1, b);\n}\nfunction getBuffer$2(id, m) {\n if (id < 0 || id >= m.buffers.length) {\n throw new Error(format(SEG_ID_OUT_OF_BOUNDS, id));\n }\n return m.buffers[id];\n}\nfunction getNumSegments$2(m) {\n return m.buffers.length;\n}\n\nclass SingleSegmentArena {\n static allocate = allocate$1;\n static getBuffer = getBuffer$1;\n static getNumSegments = getNumSegments$1;\n buffer;\n kind = ArenaKind.SINGLE_SEGMENT;\n constructor(buffer = new ArrayBuffer(DEFAULT_BUFFER_SIZE)) {\n if ((buffer.byteLength & 7) !== 0) {\n throw new Error(format(SEG_NOT_WORD_ALIGNED, buffer.byteLength));\n }\n this.buffer = buffer;\n }\n toString() {\n return format(\"SingleSegmentArena_len:%x\", this.buffer.byteLength);\n }\n}\nfunction allocate$1(minSize, segments, s) {\n const srcBuffer = segments.length > 0 ? segments[0].buffer : s.buffer;\n minSize = minSize < MIN_SINGLE_SEGMENT_GROWTH ? MIN_SINGLE_SEGMENT_GROWTH : padToWord(minSize);\n s.buffer = new ArrayBuffer(srcBuffer.byteLength + minSize);\n new Float64Array(s.buffer).set(new Float64Array(srcBuffer));\n return new ArenaAllocationResult(0, s.buffer);\n}\nfunction getBuffer$1(id, s) {\n if (id !== 0) throw new Error(format(SEG_GET_NON_ZERO_SINGLE, id));\n return s.buffer;\n}\nfunction getNumSegments$1() {\n return 1;\n}\n\nclass Arena {\n static allocate = allocate;\n static copy = copy$1;\n static getBuffer = getBuffer;\n static getNumSegments = getNumSegments;\n}\nfunction allocate(minSize, segments, a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n return MultiSegmentArena.allocate(minSize, a);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return SingleSegmentArena.allocate(minSize, segments, a);\n }\n default: {\n return assertNever(a);\n }\n }\n}\nfunction copy$1(a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n let i = a.buffers.length;\n const buffers = Array.from({ length: i });\n while (--i >= 0) {\n buffers[i] = a.buffers[i].slice(0);\n }\n return new MultiSegmentArena(buffers);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return new SingleSegmentArena(a.buffer.slice(0));\n }\n default: {\n return assertNever(a);\n }\n }\n}\nfunction getBuffer(id, a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n return MultiSegmentArena.getBuffer(id, a);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return SingleSegmentArena.getBuffer(id, a);\n }\n default: {\n return assertNever(a);\n }\n }\n}\nfunction getNumSegments(a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n return MultiSegmentArena.getNumSegments(a);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return SingleSegmentArena.getNumSegments();\n }\n default: {\n return assertNever(a);\n }\n }\n}\n\nfunction getHammingWeight(x) {\n let w = x - (x >> 1 & 1431655765);\n w = (w & 858993459) + (w >> 2 & 858993459);\n return (w + (w >> 4) & 252645135) * 16843009 >> 24;\n}\nfunction getTagByte(a, b, c, d, e, f, g, h) {\n return (a === 0 ? 0 : 1) | (b === 0 ? 0 : 2) | (c === 0 ? 0 : 4) | (d === 0 ? 0 : 8) | (e === 0 ? 0 : 16) | (f === 0 ? 0 : 32) | (g === 0 ? 0 : 64) | (h === 0 ? 0 : 128);\n}\nfunction getUnpackedByteLength(packed) {\n const p = new Uint8Array(packed);\n let wordCount = 0;\n let lastTag = 119 /* NONZERO_NONSPAN */;\n for (let i = 0; i < p.byteLength; ) {\n const tag = p[i];\n if (lastTag === 0 /* ZERO */) {\n wordCount += tag;\n i++;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else if (lastTag === 255 /* SPAN */) {\n wordCount += tag;\n i += tag * 8 + 1;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else {\n wordCount++;\n i += getHammingWeight(tag) + 1;\n lastTag = tag;\n }\n }\n return wordCount * 8;\n}\nfunction getZeroByteCount(a, b, c, d, e, f, g, h) {\n return (a === 0 ? 1 : 0) + (b === 0 ? 1 : 0) + (c === 0 ? 1 : 0) + (d === 0 ? 1 : 0) + (e === 0 ? 1 : 0) + (f === 0 ? 1 : 0) + (g === 0 ? 1 : 0) + (h === 0 ? 1 : 0);\n}\nfunction pack(unpacked, byteOffset = 0, byteLength) {\n if (unpacked.byteLength % 8 !== 0) {\n throw new Error(MSG_PACK_NOT_WORD_ALIGNED);\n }\n const src = new Uint8Array(unpacked, byteOffset, byteLength);\n const dst = [];\n let lastTag = 119 /* NONZERO_NONSPAN */;\n let spanWordCountOffset = 0;\n let rangeWordCount = 0;\n for (let srcByteOffset = 0; srcByteOffset < src.byteLength; srcByteOffset += 8) {\n const a = src[srcByteOffset];\n const b = src[srcByteOffset + 1];\n const c = src[srcByteOffset + 2];\n const d = src[srcByteOffset + 3];\n const e = src[srcByteOffset + 4];\n const f = src[srcByteOffset + 5];\n const g = src[srcByteOffset + 6];\n const h = src[srcByteOffset + 7];\n const tag = getTagByte(a, b, c, d, e, f, g, h);\n let skipWriteWord = true;\n switch (lastTag) {\n case 0 /* ZERO */: {\n if (tag !== 0 /* ZERO */ || rangeWordCount >= 255) {\n dst.push(rangeWordCount);\n rangeWordCount = 0;\n skipWriteWord = false;\n } else {\n rangeWordCount++;\n }\n break;\n }\n case 255 /* SPAN */: {\n const zeroCount = getZeroByteCount(a, b, c, d, e, f, g, h);\n if (zeroCount >= PACK_SPAN_THRESHOLD || rangeWordCount >= 255) {\n dst[spanWordCountOffset] = rangeWordCount;\n rangeWordCount = 0;\n skipWriteWord = false;\n } else {\n dst.push(a, b, c, d, e, f, g, h);\n rangeWordCount++;\n }\n break;\n }\n default: {\n skipWriteWord = false;\n break;\n }\n }\n if (skipWriteWord) {\n continue;\n }\n dst.push(tag);\n lastTag = tag;\n if (a !== 0) dst.push(a);\n if (b !== 0) dst.push(b);\n if (c !== 0) dst.push(c);\n if (d !== 0) dst.push(d);\n if (e !== 0) dst.push(e);\n if (f !== 0) dst.push(f);\n if (g !== 0) dst.push(g);\n if (h !== 0) dst.push(h);\n if (tag === 255 /* SPAN */) {\n spanWordCountOffset = dst.length;\n dst.push(0);\n }\n }\n if (lastTag === 0 /* ZERO */) {\n dst.push(rangeWordCount);\n } else if (lastTag === 255 /* SPAN */) {\n dst[spanWordCountOffset] = rangeWordCount;\n }\n return new Uint8Array(dst).buffer;\n}\nfunction unpack(packed) {\n const src = new Uint8Array(packed);\n const dst = new Uint8Array(new ArrayBuffer(getUnpackedByteLength(packed)));\n let lastTag = 119 /* NONZERO_NONSPAN */;\n for (let srcByteOffset = 0, dstByteOffset = 0; srcByteOffset < src.byteLength; ) {\n const tag = src[srcByteOffset];\n if (lastTag === 0 /* ZERO */) {\n dstByteOffset += tag * 8;\n srcByteOffset++;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else if (lastTag === 255 /* SPAN */) {\n const spanByteLength = tag * 8;\n dst.set(\n src.subarray(srcByteOffset + 1, srcByteOffset + 1 + spanByteLength),\n dstByteOffset\n );\n dstByteOffset += spanByteLength;\n srcByteOffset += 1 + spanByteLength;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else {\n srcByteOffset++;\n for (let i = 1; i <= 128; i <<= 1) {\n if ((tag & i) !== 0) {\n dst[dstByteOffset] = src[srcByteOffset++];\n }\n dstByteOffset++;\n }\n lastTag = tag;\n }\n }\n return dst.buffer;\n}\n\nclass Segment {\n constructor(id, message, buffer, byteLength = 0) {\n this.id = id;\n this.message = message;\n this.message = message;\n this.buffer = buffer;\n this._dv = new DataView(buffer);\n this.byteOffset = 0;\n this.byteLength = byteLength;\n }\n buffer;\n /** The number of bytes currently allocated in the segment. */\n byteLength;\n /**\n * This value should always be zero. It's only here to satisfy the DataView interface.\n *\n * In the future the Segment implementation (or a child class) may allow accessing the buffer from a nonzero offset,\n * but that adds a lot of extra arithmetic.\n */\n byteOffset;\n [Symbol.toStringTag] = \"Segment\";\n _dv;\n /**\n * Attempt to allocate the requested number of bytes in this segment. If this segment is full this method will return\n * a pointer to freshly allocated space in another segment from the same message.\n *\n * @param byteLength The number of bytes to allocate, will be rounded up to the nearest word.\n * @returns A pointer to the newly allocated space.\n */\n allocate(byteLength) {\n let segment = this;\n byteLength = padToWord(byteLength);\n if (byteLength > MAX_SEGMENT_LENGTH - 8) {\n throw new Error(format(SEG_SIZE_OVERFLOW, byteLength));\n }\n if (!segment.hasCapacity(byteLength)) {\n segment = segment.message.allocateSegment(byteLength);\n }\n const byteOffset = segment.byteLength;\n segment.byteLength += byteLength;\n return new Pointer(segment, byteOffset);\n }\n /**\n * Quickly copy a word (8 bytes) from `srcSegment` into this one at the given offset.\n *\n * @param byteOffset The offset to write the word to.\n * @param srcSegment The segment to copy the word from.\n * @param srcByteOffset The offset from the start of `srcSegment` to copy from.\n */\n copyWord(byteOffset, srcSegment, srcByteOffset) {\n const value = srcSegment._dv.getFloat64(\n srcByteOffset,\n NATIVE_LITTLE_ENDIAN\n );\n this._dv.setFloat64(byteOffset, value, NATIVE_LITTLE_ENDIAN);\n }\n /**\n * Quickly copy words from `srcSegment` into this one.\n *\n * @param byteOffset The offset to start copying into.\n * @param srcSegment The segment to copy from.\n * @param srcByteOffset The start offset to copy from.\n * @param wordLength The number of words to copy.\n */\n copyWords(byteOffset, srcSegment, srcByteOffset, wordLength) {\n const dst = new Float64Array(this.buffer, byteOffset, wordLength);\n const src = new Float64Array(srcSegment.buffer, srcByteOffset, wordLength);\n dst.set(src);\n }\n /**\n * Quickly fill a number of words in the buffer with zeroes.\n *\n * @param byteOffset The first byte to set to zero.\n * @param wordLength The number of words (not bytes!) to zero out.\n */\n fillZeroWords(byteOffset, wordLength) {\n new Float64Array(this.buffer, byteOffset, wordLength).fill(0);\n }\n getBigInt64(byteOffset, littleEndian) {\n return this._dv.getBigInt64(byteOffset, littleEndian);\n }\n getBigUint64(byteOffset, littleEndian) {\n return this._dv.getBigUint64(byteOffset, littleEndian);\n }\n /**\n * Get the total number of bytes available in this segment (the size of its underlying buffer).\n *\n * @returns The total number of bytes this segment can hold.\n */\n getCapacity() {\n return this.buffer.byteLength;\n }\n /**\n * Read a float32 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getFloat32(byteOffset) {\n return this._dv.getFloat32(byteOffset, true);\n }\n /**\n * Read a float64 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getFloat64(byteOffset) {\n return this._dv.getFloat64(byteOffset, true);\n }\n /**\n * Read an int16 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt16(byteOffset) {\n return this._dv.getInt16(byteOffset, true);\n }\n /**\n * Read an int32 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt32(byteOffset) {\n return this._dv.getInt32(byteOffset, true);\n }\n /**\n * Read an int64 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt64(byteOffset) {\n return this._dv.getBigInt64(byteOffset, true);\n }\n /**\n * Read an int8 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt8(byteOffset) {\n return this._dv.getInt8(byteOffset);\n }\n /**\n * Read a uint16 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint16(byteOffset) {\n return this._dv.getUint16(byteOffset, true);\n }\n /**\n * Read a uint32 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint32(byteOffset) {\n return this._dv.getUint32(byteOffset, true);\n }\n /**\n * Read a uint64 value (as a bigint) out of this segment.\n * NOTE: this does not copy the memory region, so updates to the underlying buffer will affect the returned value!\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint64(byteOffset) {\n return this._dv.getBigUint64(byteOffset, true);\n }\n /**\n * Read a uint8 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint8(byteOffset) {\n return this._dv.getUint8(byteOffset);\n }\n hasCapacity(byteLength) {\n return this.buffer.byteLength - this.byteLength >= byteLength;\n }\n /**\n * Quickly check the word at the given offset to see if it is equal to zero.\n *\n * PERF_V8: Fastest way to do this is by reading the whole word as a `number` (float64) in the _native_ endian format\n * and see if it's zero.\n *\n * Benchmark: http://jsben.ch/#/Pjooc\n *\n * @param byteOffset The offset to the word.\n * @returns `true` if the word is zero.\n */\n isWordZero(byteOffset) {\n return this._dv.getFloat64(byteOffset, NATIVE_LITTLE_ENDIAN) === 0;\n }\n /**\n * Swap out this segment's underlying buffer with a new one. It's assumed that the new buffer has the same content but\n * more free space, otherwise all existing pointers to this segment will be hilariously broken.\n *\n * @param buffer The new buffer to use.\n */\n replaceBuffer(buffer) {\n if (this.buffer === buffer) {\n return;\n }\n if (buffer.byteLength < this.byteLength) {\n throw new Error(SEG_REPLACEMENT_BUFFER_TOO_SMALL);\n }\n this._dv = new DataView(buffer);\n this.buffer = buffer;\n }\n setBigInt64(byteOffset, value, littleEndian) {\n this._dv.setBigInt64(byteOffset, value, littleEndian);\n }\n /** WARNING: This function is not yet implemented. */\n setBigUint64(byteOffset, value, littleEndian) {\n this._dv.setBigUint64(byteOffset, value, littleEndian);\n }\n /**\n * Write a float32 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setFloat32(byteOffset, val) {\n this._dv.setFloat32(byteOffset, val, true);\n }\n /**\n * Write an float64 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setFloat64(byteOffset, val) {\n this._dv.setFloat64(byteOffset, val, true);\n }\n /**\n * Write an int16 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt16(byteOffset, val) {\n this._dv.setInt16(byteOffset, val, true);\n }\n /**\n * Write an int32 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt32(byteOffset, val) {\n this._dv.setInt32(byteOffset, val, true);\n }\n /**\n * Write an int8 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt8(byteOffset, val) {\n this._dv.setInt8(byteOffset, val);\n }\n /**\n * Write an int64 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt64(byteOffset, val) {\n this._dv.setBigInt64(byteOffset, val, true);\n }\n /**\n * Write a uint16 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint16(byteOffset, val) {\n this._dv.setUint16(byteOffset, val, true);\n }\n /**\n * Write a uint32 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint32(byteOffset, val) {\n this._dv.setUint32(byteOffset, val, true);\n }\n /**\n * Write a uint64 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint64(byteOffset, val) {\n this._dv.setBigUint64(byteOffset, val, true);\n }\n /**\n * Write a uint8 (byte) value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint8(byteOffset, val) {\n this._dv.setUint8(byteOffset, val);\n }\n /**\n * Write a zero word (8 bytes) to the specified offset. This is slightly faster than calling `setUint64` or\n * `setFloat64` with a zero value.\n *\n * Benchmark: http://jsben.ch/#/dUdPI\n *\n * @param byteOffset The offset of the word to set to zero.\n */\n setWordZero(byteOffset) {\n this._dv.setFloat64(byteOffset, 0, NATIVE_LITTLE_ENDIAN);\n }\n toString() {\n return format(\n \"Segment_id:%d,off:%a,len:%a,cap:%a\",\n this.id,\n this.byteLength,\n this.byteOffset,\n this.buffer.byteLength\n );\n }\n}\n\nclass Message {\n static allocateSegment = allocateSegment;\n static dump = dump;\n static getRoot = getRoot;\n static getSegment = getSegment;\n static initRoot = initRoot;\n static readRawPointer = readRawPointer;\n static toArrayBuffer = toArrayBuffer;\n static toPackedArrayBuffer = toPackedArrayBuffer;\n _capnp;\n /**\n * A Cap'n Proto message.\n *\n * SECURITY WARNING: In Node.js do not pass a Buffer's internal array buffer into this constructor. Pass the buffer\n * directly and everything will be fine. If not, your message will potentially be initialized with random memory\n * contents!\n *\n * The constructor method creates a new Message, optionally using a provided arena for segment allocation, or a buffer\n * to read from.\n *\n * @param src The source for the message.\n * A value of `undefined` will cause the message to initialize with a single segment arena only big enough for the\n * root pointer; it will expand as you go. This is a reasonable choice for most messages.\n *\n * Passing an arena will cause the message to use that arena for its segment allocation. Contents will be accepted\n * as-is.\n *\n * Passing an array buffer view (like `DataView`, `Uint8Array` or `Buffer`) will create a **copy** of the source\n * buffer; beware of the potential performance cost!\n *\n * @param packed Whether or not the message is packed. If `true` (the default), the message will be\n * unpacked.\n *\n * @param singleSegment If true, `src` will be treated as a message consisting of a single segment without\n * a framing header.\n *\n */\n constructor(src, packed = true, singleSegment = false) {\n this._capnp = initMessage(src, packed, singleSegment);\n if (src) {\n preallocateSegments(this);\n }\n }\n allocateSegment(byteLength) {\n return allocateSegment(byteLength, this);\n }\n /**\n * Copies the contents of this message into an identical message with its own ArrayBuffers.\n *\n * @returns A copy of this message.\n */\n copy() {\n return copy(this);\n }\n /**\n * Create a pretty-printed string dump of this message; incredibly useful for debugging.\n *\n * WARNING: Do not call this method on large messages!\n *\n * @returns A big steaming pile of pretty hex digits.\n */\n dump() {\n return dump(this);\n }\n /**\n * Get a struct pointer for the root of this message. This is primarily used when reading a message; it will not\n * overwrite existing data.\n *\n * @param RootStruct The struct type to use as the root.\n * @returns A struct representing the root of the message.\n */\n getRoot(RootStruct) {\n return getRoot(RootStruct, this);\n }\n /**\n * Get a segment by its id.\n *\n * This will lazily allocate the first segment if it doesn't already exist.\n *\n * @param id The segment id.\n * @returns The requested segment.\n */\n getSegment(id) {\n return getSegment(id, this);\n }\n /**\n * Initialize a new message using the provided struct type as the root.\n *\n * @param RootStruct The struct type to use as the root.\n * @returns An initialized struct pointing to the root of the message.\n */\n initRoot(RootStruct) {\n return initRoot(RootStruct, this);\n }\n /**\n * Set the root of the message to a copy of the given pointer. Used internally\n * to make copies of pointers for default values.\n *\n * @param src The source pointer to copy.\n */\n setRoot(src) {\n setRoot(src, this);\n }\n /**\n * Combine the contents of this message's segments into a single array buffer and prepend a stream framing header\n * containing information about the following segment data.\n *\n * @returns An ArrayBuffer with the contents of this message.\n */\n toArrayBuffer() {\n return toArrayBuffer(this);\n }\n /**\n * Like `toArrayBuffer()`, but also applies the packing algorithm to the output. This is typically what you want to\n * use if you're sending the message over a network link or other slow I/O interface where size matters.\n *\n * @returns A packed message.\n */\n toPackedArrayBuffer() {\n return toPackedArrayBuffer(this);\n }\n addCap(client) {\n if (!this._capnp.capTable) {\n this._capnp.capTable = [];\n }\n const id = this._capnp.capTable.length;\n this._capnp.capTable.push(client);\n return id;\n }\n toString() {\n return `Message_arena:${this._capnp.arena}`;\n }\n}\nfunction initMessage(src, packed = true, singleSegment = false) {\n if (src === undefined) {\n return {\n arena: new SingleSegmentArena(),\n segments: [],\n traversalLimit: DEFAULT_TRAVERSE_LIMIT\n };\n }\n if (isAnyArena(src)) {\n return { arena: src, segments: [], traversalLimit: DEFAULT_TRAVERSE_LIMIT };\n }\n let buf = src;\n if (isArrayBufferView(buf)) {\n buf = buf.buffer.slice(\n buf.byteOffset,\n buf.byteOffset + buf.byteLength\n );\n }\n if (packed) {\n buf = unpack(buf);\n }\n if (singleSegment) {\n return {\n arena: new SingleSegmentArena(buf),\n segments: [],\n traversalLimit: DEFAULT_TRAVERSE_LIMIT\n };\n }\n return {\n arena: new MultiSegmentArena(getFramedSegments(buf)),\n segments: [],\n traversalLimit: DEFAULT_TRAVERSE_LIMIT\n };\n}\nfunction getFramedSegments(message) {\n const dv = new DataView(message);\n const segmentCount = dv.getUint32(0, true) + 1;\n const segments = Array.from({ length: segmentCount });\n let byteOffset = 4 + segmentCount * 4;\n byteOffset += byteOffset % 8;\n if (byteOffset + segmentCount * 4 > message.byteLength) {\n throw new Error(MSG_INVALID_FRAME_HEADER);\n }\n for (let i = 0; i < segmentCount; i++) {\n const byteLength = dv.getUint32(4 + i * 4, true) * 8;\n if (byteOffset + byteLength > message.byteLength) {\n throw new Error(MSG_INVALID_FRAME_HEADER);\n }\n segments[i] = message.slice(byteOffset, byteOffset + byteLength);\n byteOffset += byteLength;\n }\n return segments;\n}\nfunction preallocateSegments(m) {\n const numSegments = Arena.getNumSegments(m._capnp.arena);\n m._capnp.segments = Array.from({ length: numSegments });\n for (let i = 0; i < numSegments; i++) {\n if (i === 0 && Arena.getBuffer(i, m._capnp.arena).byteLength < 8) {\n throw new Error(MSG_SEGMENT_TOO_SMALL);\n }\n const buffer = Arena.getBuffer(i, m._capnp.arena);\n const segment = new Segment(i, m, buffer, buffer.byteLength);\n m._capnp.segments[i] = segment;\n }\n}\nfunction isArrayBufferView(src) {\n return src.byteOffset !== undefined;\n}\nfunction isAnyArena(o) {\n return o.kind !== undefined;\n}\nfunction allocateSegment(byteLength, m) {\n const res = Arena.allocate(byteLength, m._capnp.segments, m._capnp.arena);\n let s;\n if (res.id === m._capnp.segments.length) {\n s = new Segment(res.id, m, res.buffer);\n m._capnp.segments.push(s);\n } else if (res.id < 0 || res.id > m._capnp.segments.length) {\n throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, res.id, m));\n } else {\n s = m._capnp.segments[res.id];\n s.replaceBuffer(res.buffer);\n }\n return s;\n}\nfunction dump(m) {\n let r = \"\";\n if (m._capnp.segments.length === 0) {\n return \"================\\nNo Segments\\n================\\n\";\n }\n for (let i = 0; i < m._capnp.segments.length; i++) {\n r += `================\nSegment #${i}\n================\n`;\n const { buffer, byteLength } = m._capnp.segments[i];\n const b = new Uint8Array(buffer, 0, byteLength);\n r += dumpBuffer(b);\n }\n return r;\n}\nfunction getRoot(RootStruct, m) {\n const root = new RootStruct(m.getSegment(0), 0);\n validate(PointerType.STRUCT, root);\n const ts = getTargetStructSize(root);\n if (ts.dataByteLength < RootStruct._capnp.size.dataByteLength || ts.pointerLength < RootStruct._capnp.size.pointerLength) {\n resize(RootStruct._capnp.size, root);\n }\n return root;\n}\nfunction getSegment(id, m) {\n const segmentLength = m._capnp.segments.length;\n if (id === 0 && segmentLength === 0) {\n const arenaSegments = Arena.getNumSegments(m._capnp.arena);\n if (arenaSegments === 0) {\n allocateSegment(DEFAULT_BUFFER_SIZE, m);\n } else {\n m._capnp.segments[0] = new Segment(\n 0,\n m,\n Arena.getBuffer(0, m._capnp.arena)\n );\n }\n if (!m._capnp.segments[0].hasCapacity(8)) {\n throw new Error(MSG_SEGMENT_TOO_SMALL);\n }\n m._capnp.segments[0].allocate(8);\n return m._capnp.segments[0];\n }\n if (id < 0 || id >= segmentLength) {\n throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, id, m));\n }\n return m._capnp.segments[id];\n}\nfunction initRoot(RootStruct, m) {\n const root = new RootStruct(m.getSegment(0), 0);\n initStruct(RootStruct._capnp.size, root);\n return root;\n}\nfunction readRawPointer(data) {\n return new Pointer(new Message(data).getSegment(0), 0);\n}\nfunction setRoot(src, m) {\n copyFrom(src, new Pointer(m.getSegment(0), 0));\n}\nfunction toArrayBuffer(m) {\n const streamFrame = getStreamFrame(m);\n if (m._capnp.segments.length === 0) {\n getSegment(0, m);\n }\n const { segments } = m._capnp;\n const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + padToWord(s.byteLength), 0);\n const out = new Uint8Array(new ArrayBuffer(totalLength));\n let o = streamFrame.byteLength;\n out.set(new Uint8Array(streamFrame));\n for (const s of segments) {\n const segmentLength = padToWord(s.byteLength);\n out.set(new Uint8Array(s.buffer, 0, segmentLength), o);\n o += segmentLength;\n }\n return out.buffer;\n}\nfunction toPackedArrayBuffer(m) {\n const streamFrame = pack(getStreamFrame(m));\n if (m._capnp.segments.length === 0) {\n m.getSegment(0);\n }\n const segments = m._capnp.segments.map(\n (s) => pack(s.buffer, 0, padToWord(s.byteLength))\n );\n const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + s.byteLength, 0);\n const out = new Uint8Array(new ArrayBuffer(totalLength));\n let o = streamFrame.byteLength;\n out.set(new Uint8Array(streamFrame));\n for (const s of segments) {\n out.set(new Uint8Array(s), o);\n o += s.byteLength;\n }\n return out.buffer;\n}\nfunction getStreamFrame(m) {\n const { length } = m._capnp.segments;\n if (length === 0) {\n return new Float64Array(1).buffer;\n }\n const frameLength = 4 + length * 4 + (1 - length % 2) * 4;\n const out = new DataView(new ArrayBuffer(frameLength));\n out.setUint32(0, length - 1, true);\n for (const [i, s] of m._capnp.segments.entries()) {\n out.setUint32(i * 4 + 4, s.byteLength / 8, true);\n }\n return out.buffer;\n}\nfunction copy(m) {\n return new Message(Arena.copy(m._capnp.arena));\n}\n\nexport { Message as M, readRawPointer as r };\n","import ts from 'typescript';\nimport { Type, ElementSize, Field, Type_Which, Value, Node, CodeGeneratorRequest } from '../capnp/schema.mjs';\nimport { M as Message } from './capnp-es.GpvEvMIK.mjs';\nimport { N as format, t as testWhich, b as getUint16, g as getPointer, an as pad } from './capnp-es.0-_cOx6D.mjs';\n\nconst GEN_EXPLICIT_DEFAULT_NON_PRIMITIVE = \"CAPNP-ES000 Don't know how to generate a %s field with an explicit default value.\";\nconst GEN_FIELD_NON_INLINE_STRUCT_LIST = \"CAPNP-ES001 Don't know how to generate non-inline struct lists.\";\nconst GEN_NODE_LOOKUP_FAIL = \"CAPNP-ES002 Failed to look up node id %s.\";\nconst GEN_NODE_UNKNOWN_TYPE = `CAPNP-ES003 Don't know how to generate a \"%s\" node.`;\nconst GEN_SERIALIZE_UNKNOWN_VALUE = \"CAPNP-ES004 Don't know how to serialize a value of kind %s.\";\nconst GEN_UNKNOWN_STRUCT_FIELD = \"CAPNP-ES005 Don't know how to generate a struct field of kind %d.\";\nconst GEN_UNKNOWN_TYPE = \"CAPNP-ES006 Unknown slot type encountered: %d\";\nconst GEN_UNSUPPORTED_LIST_ELEMENT_TYPE = \"CAPNP-ES007 Encountered an unsupported list element type: %d\";\nconst GEN_TS_EMIT_FAILED = \"CAPNP-ES009 Failed to transpile emitted schema source code; see above for error messages.\";\nconst GEN_UNKNOWN_DEFAULT = \"CAPNP-ES010 Don't know how to generate a default value for %s fields.\";\n\nconst ConcreteListType = {\n [Type.ANY_POINTER]: \"$.AnyPointerList\",\n [Type.BOOL]: \"$.BoolList\",\n [Type.DATA]: \"$.DataList\",\n [Type.ENUM]: \"$.Uint16List\",\n [Type.FLOAT32]: \"$.Float32List\",\n [Type.FLOAT64]: \"$.Float64List\",\n [Type.INT16]: \"$.Int16List\",\n [Type.INT32]: \"$.Int32List\",\n [Type.INT64]: \"$.Int64List\",\n [Type.INT8]: \"$.Int8List\",\n [Type.INTERFACE]: \"$.InterfaceList\",\n [Type.LIST]: \"$.PointerList\",\n [Type.STRUCT]: \"$.CompositeList\",\n [Type.TEXT]: \"$.TextList\",\n [Type.UINT16]: \"$.Uint16List\",\n [Type.UINT32]: \"$.Uint32List\",\n [Type.UINT64]: \"$.Uint64List\",\n [Type.UINT8]: \"$.Uint8List\",\n [Type.VOID]: \"$.VoidList\"\n};\nconst Primitives = {\n [Type.BOOL]: {\n byteLength: 1,\n getter: \"getBit\",\n mask: \"getBitMask\",\n setter: \"setBit\"\n },\n [Type.ENUM]: {\n byteLength: 2,\n getter: \"getUint16\",\n mask: \"getUint16Mask\",\n setter: \"setUint16\"\n },\n [Type.FLOAT32]: {\n byteLength: 4,\n getter: \"getFloat32\",\n mask: \"getFloat32Mask\",\n setter: \"setFloat32\"\n },\n [Type.FLOAT64]: {\n byteLength: 8,\n getter: \"getFloat64\",\n mask: \"getFloat64Mask\",\n setter: \"setFloat64\"\n },\n [Type.INT16]: {\n byteLength: 2,\n getter: \"getInt16\",\n mask: \"getInt16Mask\",\n setter: \"setInt16\"\n },\n [Type.INT32]: {\n byteLength: 4,\n getter: \"getInt32\",\n mask: \"getInt32Mask\",\n setter: \"setInt32\"\n },\n [Type.INT64]: {\n byteLength: 8,\n getter: \"getInt64\",\n mask: \"getInt64Mask\",\n setter: \"setInt64\"\n },\n [Type.INT8]: {\n byteLength: 1,\n getter: \"getInt8\",\n mask: \"getInt8Mask\",\n setter: \"setInt8\"\n },\n [Type.UINT16]: {\n byteLength: 2,\n getter: \"getUint16\",\n mask: \"getUint16Mask\",\n setter: \"setUint16\"\n },\n [Type.UINT32]: {\n byteLength: 4,\n getter: \"getUint32\",\n mask: \"getUint32Mask\",\n setter: \"setUint32\"\n },\n [Type.UINT64]: {\n byteLength: 8,\n getter: \"getUint64\",\n mask: \"getUint64Mask\",\n setter: \"setUint64\"\n },\n [Type.UINT8]: {\n byteLength: 1,\n getter: \"getUint8\",\n mask: \"getUint8Mask\",\n setter: \"setUint8\"\n },\n [Type.VOID]: {\n byteLength: 0,\n getter: \"getVoid\",\n mask: \"getVoidMask\",\n setter: \"setVoid\"\n }\n};\n\nconst SOURCE_COMMENT = `\n/* eslint-disable */\n// biome-ignore lint: disable\n\n// Generated by storm-capnpc\n// Note: Do not edit this file manually - it will be overwritten automatically\n\n`;\nconst TS_FILE_ID = \"e37ded525a68a7c9\";\n\n/**\n * A function for converting hex <-> dec w/o loss of precision.\n *\n * The problem is that parseInt(\"0x12345...\") isn't precise enough to convert\n * 64-bit integers correctly.\n *\n * Internally, this uses arrays to encode decimal digits starting with the least\n * significant:\n * 8 = [8]\n * 16 = [6, 1]\n * 1024 = [4, 2, 0, 1]\n *\n * Source: http://www.danvk.org/hex2dec.html\n */\n\nvar hex2dec;\nvar hasRequiredHex2dec;\n\nfunction requireHex2dec () {\n\tif (hasRequiredHex2dec) return hex2dec;\n\thasRequiredHex2dec = 1;\n\t// Adds two arrays for the given base (10 or 16), returning the result.\n\t// This turns out to be the only \"primitive\" operation we need.\n\tfunction add(x, y, base) {\n\t var z = [];\n\t var n = Math.max(x.length, y.length);\n\t var carry = 0;\n\t var i = 0;\n\t while (i < n || carry) {\n\t var xi = i < x.length ? x[i] : 0;\n\t var yi = i < y.length ? y[i] : 0;\n\t var zi = carry + xi + yi;\n\t z.push(zi % base);\n\t carry = Math.floor(zi / base);\n\t i++;\n\t }\n\t return z;\n\t}\n\n\t// Returns a*x, where x is an array of decimal digits and a is an ordinary\n\t// JavaScript number. base is the number base of the array x.\n\tfunction multiplyByNumber(num, x, base) {\n\t if (num < 0) return null;\n\t if (num == 0) return [];\n\n\t var result = [];\n\t var power = x;\n\t while (true) {\n\t if (num & 1) {\n\t result = add(result, power, base);\n\t }\n\t num = num >> 1;\n\t if (num === 0) break;\n\t power = add(power, power, base);\n\t }\n\n\t return result;\n\t}\n\n\tfunction parseToDigitsArray(str, base) {\n\t var digits = str.split('');\n\t var ary = [];\n\t for (var i = digits.length - 1; i >= 0; i--) {\n\t var n = parseInt(digits[i], base);\n\t if (isNaN(n)) return null;\n\t ary.push(n);\n\t }\n\t return ary;\n\t}\n\n\tfunction convertBase(str, fromBase, toBase) {\n\t var digits = parseToDigitsArray(str, fromBase);\n\t if (digits === null) return null;\n\n\t var outArray = [];\n\t var power = [1];\n\t for (var i = 0; i < digits.length; i++) {\n\t // invariant: at this point, fromBase^i = power\n\t if (digits[i]) {\n\t outArray = add(outArray, multiplyByNumber(digits[i], power, toBase), toBase);\n\t }\n\t power = multiplyByNumber(fromBase, power, toBase);\n\t }\n\n\t var out = '';\n\t for (var i = outArray.length - 1; i >= 0; i--) {\n\t out += outArray[i].toString(toBase);\n\t }\n\t if (out === '') {\n\t out = '0';\n\t }\n\t return out;\n\t}\n\n\tfunction decToHex(decStr, opts) {\n\t var hidePrefix = opts && opts.prefix === false;\n\t var hex = convertBase(decStr, 10, 16);\n\t return hex ? (hidePrefix ? hex : '0x' + hex) : null;\n\t}\n\n\tfunction hexToDec(hexStr) {\n\t if (hexStr.substring(0, 2) === '0x') hexStr = hexStr.substring(2);\n\t hexStr = hexStr.toLowerCase();\n\t return convertBase(hexStr, 16, 10);\n\t}\n\n\thex2dec = {\n\t hexToDec: hexToDec,\n\t decToHex: decToHex\n\t};\n\treturn hex2dec;\n}\n\nvar hex2decExports = requireHex2dec();\n\nfunction c2s(s) {\n return splitCamel(s).map((x) => x.toUpperCase()).join(\"_\");\n}\nfunction c2t(s) {\n return s[0].toUpperCase() + s.slice(1);\n}\nfunction splitCamel(s) {\n let wasLo = false;\n return s.split(\"\").reduce((a, c) => {\n const lo = c.toUpperCase() !== c;\n const up = c.toLowerCase() !== c;\n if (a.length === 0 || wasLo && up) {\n a.push(c);\n } else {\n const i = a.length - 1;\n a[i] = a[i] + c;\n }\n wasLo = lo;\n return a;\n }, []);\n}\nfunction hexToBigInt(hexString) {\n return BigInt(hex2decExports.hexToDec(hexString));\n}\n\nfunction compareCodeOrder(a, b) {\n return a.codeOrder - b.codeOrder;\n}\nfunction getConcreteListType(ctx, type) {\n if (!type._isList) {\n return getJsType(ctx, type, false);\n }\n const { elementType } = type.list;\n const elementTypeWhich = elementType.which();\n if (elementTypeWhich === Type.LIST) {\n return `$.PointerList(${getConcreteListType(ctx, elementType)})`;\n } else if (elementTypeWhich === Type.STRUCT) {\n const structNode = lookupNode(ctx, elementType.struct.typeId);\n if (structNode.struct.preferredListEncoding !== ElementSize.INLINE_COMPOSITE) {\n throw new Error(GEN_FIELD_NON_INLINE_STRUCT_LIST);\n }\n return `$.CompositeList(${getJsType(ctx, elementType, false)})`;\n }\n return ConcreteListType[elementTypeWhich];\n}\nfunction getDisplayNamePrefix(node) {\n return node.displayName.slice(node.displayNamePrefixLength);\n}\nfunction getFullClassName(node) {\n return node.displayName.split(\":\")[1].split(\".\").map((s) => c2t(s)).join(\"_\");\n}\nfunction getJsType(ctx, type, constructor) {\n const whichType = type.which();\n switch (whichType) {\n case Type.ANY_POINTER: {\n return \"$.Pointer\";\n }\n case Type.BOOL: {\n return \"boolean\";\n }\n case Type.DATA: {\n return \"$.Data\";\n }\n case Type.ENUM: {\n return getFullClassName(lookupNode(ctx, type.enum.typeId));\n }\n case Type.FLOAT32:\n case Type.FLOAT64:\n case Type.INT16:\n case Type.INT32:\n case Type.INT8:\n case Type.UINT16:\n case Type.UINT32:\n case Type.UINT8: {\n return \"number\";\n }\n case Type.UINT64:\n case Type.INT64: {\n return \"bigint\";\n }\n case Type.INTERFACE: {\n return getFullClassName(lookupNode(ctx, type.interface.typeId));\n }\n case Type.LIST: {\n return `$.List${constructor ? \"Ctor\" : \"\"}<${getJsType(ctx, type.list.elementType, false)}>`;\n }\n case Type.STRUCT: {\n const c = getFullClassName(lookupNode(ctx, type.struct.typeId));\n return constructor ? `$.StructCtor<${c}>` : c;\n }\n case Type.TEXT: {\n return \"string\";\n }\n case Type.VOID: {\n return \"$.Void\";\n }\n default: {\n throw new Error(format(GEN_UNKNOWN_TYPE, whichType));\n }\n }\n}\nfunction getUnnamedUnionFields(node) {\n return node.struct.fields.filter(\n (field) => field.discriminantValue !== Field.NO_DISCRIMINANT\n );\n}\nfunction hasNode(ctx, lookup) {\n const id = typeof lookup === \"bigint\" ? lookup : lookup.id;\n return ctx.nodes.some((n) => n.id === id);\n}\nfunction loadRequestedFile(req, file) {\n const ctx = new CodeGeneratorFileContext(req, file);\n const schema2 = lookupNode(ctx, file.id);\n ctx.tsPath = schema2.displayName.replace(/\\.capnp$/, \"\") + \".ts\";\n return ctx;\n}\nfunction lookupNode(ctx, lookup) {\n const id = typeof lookup === \"bigint\" ? lookup : lookup.id;\n const node = ctx.nodes.find((n) => n.id === id);\n if (node === undefined) {\n throw new Error(format(GEN_NODE_LOOKUP_FAIL, id));\n }\n return node;\n}\nfunction lookupNodeSourceInfo(ctx, lookup) {\n const id = typeof lookup === \"bigint\" ? lookup : lookup.id;\n return ctx.req.sourceInfo.find((s) => s.id === id);\n}\nfunction needsConcreteListClass(field) {\n if (!field._isSlot) {\n return false;\n }\n const slotType = field.slot.type;\n if (!slotType._isList) {\n return false;\n }\n const { elementType } = slotType.list;\n return elementType._isStruct || elementType._isList;\n}\n\nfunction createBigInt(value) {\n let v = value.toString(16);\n let sign = \"\";\n if (v[0] === \"-\") {\n v = v.slice(1);\n sign = \"-\";\n }\n return `${sign}BigInt(\"0x${v}\")`;\n}\nfunction extractJSDocs(sourceInfo) {\n const docComment = sourceInfo?.docComment;\n if (!docComment) {\n return \"\";\n }\n return \"/**\\n\" + docComment.toString().split(\"\\n\").map((l) => `* ${l}`).join(\"\\n\") + \"\\n*/\";\n}\n\nfunction generateEnumNode(ctx, className, parentNode, fields) {\n const fieldIndexInCodeOrder = fields.map(({ codeOrder }, fieldIndex) => ({ fieldIndex, codeOrder })).sort(compareCodeOrder).map(({ fieldIndex }) => fieldIndex);\n const sourceInfo = lookupNodeSourceInfo(ctx, parentNode);\n const propInits = fieldIndexInCodeOrder.map((index) => {\n const field = fields[index];\n const docComment = extractJSDocs(sourceInfo?.members.at(index));\n const key = c2s(field.name);\n const val = field.discriminantValue || index;\n return `\n ${docComment}\n ${key}: ${val}`;\n });\n ctx.codeParts.push(`\n export const ${className} = {\n ${propInits.join(\",\\n\")}\n } as const;\n\n export type ${className} = (typeof ${className})[keyof typeof ${className}];\n `);\n}\n\nfunction generateInterfaceClasses(ctx, node) {\n generateMethodStructs(ctx, node);\n generateClient(ctx, node);\n generateServer(ctx, node);\n}\nfunction generateMethodStructs(ctx, node) {\n for (const method of node.interface.methods) {\n const paramNode = lookupNode(ctx, method.paramStructType);\n const resultNode = lookupNode(ctx, method.resultStructType);\n generateNode(ctx, paramNode);\n generateNode(ctx, resultNode);\n generateResultPromise(ctx, resultNode);\n }\n}\nfunction generateServer(ctx, node) {\n const fullClassName = getFullClassName(node);\n const serverName = `${fullClassName}$Server`;\n const serverTargetName = `${serverName}$Target`;\n const clientName = `${fullClassName}$Client`;\n const methodSignatures = node.interface.methods.map((method) => {\n const paramTypeName = getFullClassName(\n lookupNode(ctx, method.paramStructType)\n );\n const resultTypeName = getFullClassName(\n lookupNode(ctx, method.resultStructType)\n );\n return `${method.name}(params: ${paramTypeName}, results: ${resultTypeName}): Promise<void>;`;\n }).join(\"\\n\");\n ctx.codeParts.push(`\n export interface ${serverTargetName} {\n ${methodSignatures}\n }`);\n const members = [];\n members.push(`public override readonly target: ${serverTargetName};`);\n const codeServerMethods = [];\n let index = 0;\n for (const method of node.interface.methods) {\n codeServerMethods.push(`{\n ...${clientName}.methods[${index}],\n impl: target.${method.name}\n }`);\n index++;\n }\n members.push(`\n constructor(target: ${serverTargetName}) {\n super(target, [\n ${codeServerMethods.join(\",\\n\")}\n ]);\n this.target = target;\n }\n client(): ${clientName} {\n return new ${clientName}(this);\n }\n `);\n ctx.codeParts.push(`\n export class ${serverName} extends $.Server {\n ${members.join(\"\\n\")}\n }\n `);\n}\nfunction generateClient(ctx, node) {\n const fullClassName = getFullClassName(node);\n const clientName = `${fullClassName}$Client`;\n const members = [];\n members.push(`\n client: $.Client;\n static readonly interfaceId: bigint = ${createBigInt(node.id)};\n constructor(client: $.Client) {\n this.client = client;\n }\n `);\n const methods = [];\n const methodDefs = [];\n const methodDefTypes = [];\n for (let index = 0; index < node.interface.methods.length; index++) {\n generateClientMethod(\n ctx,\n node,\n clientName,\n methods,\n methodDefs,\n methodDefTypes,\n index\n );\n }\n members.push(`\n static readonly methods:[\n ${methodDefTypes.join(\",\\n\")}\n ] = [\n ${methodDefs.join(\",\\n\")}\n ];\n ${methods.join(\"\\n\")}\n `);\n ctx.codeParts.push(`\n export class ${clientName} {\n ${members.join(\"\\n\")}\n }\n $.Registry.register(${clientName}.interfaceId, ${clientName});\n `);\n}\nfunction generateResultPromise(ctx, node) {\n const nodeId = node.id;\n if (ctx.generatedResultsPromiseIds.has(nodeId)) {\n return;\n }\n ctx.generatedResultsPromiseIds.add(nodeId);\n const resultsClassName = getFullClassName(node);\n const fullClassName = `${resultsClassName}$Promise`;\n const members = [];\n members.push(`\n pipeline: $.Pipeline<any, any, ${resultsClassName}>;\n constructor(pipeline: $.Pipeline<any, any, ${resultsClassName}>) {\n this.pipeline = pipeline;\n }\n `);\n const { struct } = node;\n const fields = struct.fields.toArray().sort(compareCodeOrder);\n const generatePromiseFieldMethod = (field) => {\n let jsType;\n let isInterface = false;\n let slot;\n if (field._isSlot) {\n slot = field.slot;\n const slotType = slot.type;\n if (slotType.which() !== Type.INTERFACE) {\n return;\n }\n isInterface = true;\n jsType = getJsType(ctx, slotType, false);\n } else if (field._isGroup) {\n return;\n } else {\n throw new Error(format(GEN_UNKNOWN_STRUCT_FIELD, field.which()));\n }\n const promisedJsType = jsType;\n if (isInterface) {\n jsType = `${jsType}$Client`;\n }\n const { name } = field;\n const properName = c2t(name);\n members.push(`\n get${properName}(): ${jsType} {\n return new ${jsType}(this.pipeline.getPipeline(${promisedJsType}, ${slot.offset}).client());\n }\n `);\n };\n for (const field of fields) {\n generatePromiseFieldMethod(field);\n }\n members.push(`\n async promise(): Promise<${resultsClassName}> {\n return await this.pipeline.struct();\n }\n `);\n ctx.codeParts.push(`\n export class ${fullClassName} {\n ${members.join(\"\\n\")}\n }\n `);\n}\nfunction generateClientMethod(ctx, node, clientName, methodsCode, methodDefs, methodDefTypes, index) {\n const method = node.interface.methods[index];\n const { name } = method;\n const paramTypeName = getFullClassName(\n lookupNode(ctx, method.paramStructType)\n );\n const resultTypeName = getFullClassName(\n lookupNode(ctx, method.resultStructType)\n );\n methodDefTypes.push(`$.Method<${paramTypeName}, ${resultTypeName}>`);\n methodDefs.push(`{\n ParamsClass: ${paramTypeName},\n ResultsClass: ${resultTypeName},\n interfaceId: ${clientName}.interfaceId,\n methodId: ${index},\n interfaceName: \"${node.displayName}\",\n methodName: \"${method.name}\"\n }`);\n const docComment = extractJSDocs(\n lookupNodeSourceInfo(ctx, node)?.members.at(index)\n );\n methodsCode.push(`\n ${docComment}\n ${name}(paramsFunc?: (params: ${paramTypeName}) => void): ${resultTypeName}$Promise {\n const answer = this.client.call({\n method: ${clientName}.methods[${index}],\n paramsFunc: paramsFunc\n });\n const pipeline = new $.Pipeline(${resultTypeName}, answer);\n return new ${resultTypeName}$Promise(pipeline);\n }\n `);\n}\n\nfunction generateStructNode(ctx, node) {\n const displayNamePrefix = getDisplayNamePrefix(node);\n const fullClassName = getFullClassName(node);\n const nestedNodes = node.nestedNodes.map(({ id }) => lookupNode(ctx, id)).filter((node2) => !node2._isConst && !node2._isAnnotation);\n const nodeId = node.id;\n const nodeIdHex = nodeId.toString(16);\n const unionFields = getUnnamedUnionFields(node);\n const { struct } = node;\n const { dataWordCount, discriminantCount, discriminantOffset, pointerCount } = struct;\n const dataByteLength = dataWordCount * 8;\n const fields = struct.fields.toArray();\n const fieldIndexInCodeOrder = fields.map(({ codeOrder }, fieldIndex) => ({ fieldIndex, codeOrder })).sort(compareCodeOrder).map(({ fieldIndex }) => fieldIndex);\n const concreteLists = fields.filter((field) => needsConcreteListClass(field)).sort(compareCodeOrder);\n const consts = ctx.nodes.filter(\n (node2) => node2.scopeId === nodeId && node2._isConst\n );\n const hasUnnamedUnion = discriminantCount !== 0;\n if (hasUnnamedUnion) {\n generateEnumNode(ctx, fullClassName + \"_Which\", node, unionFields);\n }\n const members = [];\n members.push(\n ...consts.map((node2) => {\n const name = c2s(getDisplayNamePrefix(node2));\n const value = createValue(node2.const.value);\n return `static readonly ${name} = ${value}`;\n }),\n ...unionFields.sort(compareCodeOrder).map((field) => createUnionConstProperty(fullClassName, field)),\n ...nestedNodes.map((node2) => createNestedNodeProperty(node2))\n );\n const defaultValues = [];\n for (const index of fieldIndexInCodeOrder) {\n const field = fields[index];\n if (field._isSlot && field.slot.hadExplicitDefault && field.slot.type.which() !== Type.VOID) {\n defaultValues.push(generateDefaultValue(field));\n }\n }\n members.push(\n `\n public static override readonly _capnp = {\n displayName: \"${displayNamePrefix}\",\n id: \"${nodeIdHex}\",\n size: new $.ObjectSize(${dataByteLength}, ${pointerCount}),\n ${defaultValues.join(\",\")}\n }`,\n ...concreteLists.map((field) => createConcreteListProperty(ctx, field))\n );\n for (const index of fieldIndexInCodeOrder) {\n const field = fields[index];\n generateStructFieldMethods(ctx, members, node, field, index);\n }\n members.push(\n `public override toString(): string { return \"${fullClassName}_\" + super.toString(); }`\n );\n if (hasUnnamedUnion) {\n members.push(`\n which(): ${fullClassName}_Which {\n return $.utils.getUint16(${discriminantOffset * 2}, this) as ${fullClassName}_Which;\n }\n `);\n }\n const docComment = extractJSDocs(lookupNodeSourceInfo(ctx, node));\n const classCode = `\n ${docComment}\n export class ${fullClassName} extends $.Struct {\n ${members.join(\"\\n\")}\n }`;\n ctx.codeParts.push(classCode);\n ctx.concreteLists.push(\n ...concreteLists.map((field) => [\n fullClassName,\n field\n ])\n );\n}\nfunction generateStructFieldMethods(ctx, members, node, field, fieldIndex) {\n let jsType;\n let whichType;\n if (field._isSlot) {\n const slotType = field.slot.type;\n jsType = getJsType(ctx, slotType, false);\n whichType = slotType.which();\n } else if (field._isGroup) {\n jsType = getFullClassName(lookupNode(ctx, field.group.typeId));\n whichType = \"group\";\n } else {\n throw new Error(format(GEN_UNKNOWN_STRUCT_FIELD, field.which()));\n }\n const isInterface = whichType === Type.INTERFACE;\n if (isInterface) {\n jsType = `${jsType}$Client`;\n }\n const { discriminantOffset } = node.struct;\n const { name } = field;\n const accessorName = name === \"constructor\" ? \"$constructor\" : name;\n const capitalizedName = c2t(name);\n const { discriminantValue } = field;\n const fullClassName = getFullClassName(node);\n const hadExplicitDefault = field._isSlot && field.slot.hadExplicitDefault;\n const maybeDefaultArg = hadExplicitDefault ? `, ${fullClassName}._capnp.default${capitalizedName}` : \"\";\n const union = discriminantValue !== Field.NO_DISCRIMINANT;\n const offset = field._isSlot ? field.slot.offset : 0;\n let adopt = false;\n let disown = false;\n let has = false;\n let init;\n let get;\n let set;\n switch (whichType) {\n case Type.ANY_POINTER: {\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getPointer(${offset}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, ${get})`;\n break;\n }\n case Type.BOOL:\n case Type.ENUM:\n case Type.FLOAT32:\n case Type.FLOAT64:\n case Type.INT16:\n case Type.INT32:\n case Type.INT64:\n case Type.INT8:\n case Type.UINT16:\n case Type.UINT32:\n case Type.UINT64:\n case Type.UINT8: {\n const { byteLength, getter, setter } = Primitives[whichType];\n const byteOffset = offset * byteLength;\n get = `$.utils.${getter}(${byteOffset}, this${maybeDefaultArg})`;\n set = `$.utils.${setter}(${byteOffset}, value, this${maybeDefaultArg})`;\n if (whichType === Type.ENUM) {\n get = `${get} as ${jsType}`;\n }\n break;\n }\n case Type.DATA: {\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getData(${offset}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;\n init = `$.utils.initData(${offset}, length, this)`;\n break;\n }\n case Type.INTERFACE: {\n get = `new ${jsType}($.utils.getInterfaceClientOrNullAt(${offset}, this))`;\n set = `$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(${offset}, this))`;\n break;\n }\n case Type.LIST: {\n const elementType = field.slot.type.list.elementType.which();\n let listClass = ConcreteListType[elementType];\n if (elementType === Type.LIST || elementType === Type.STRUCT) {\n listClass = `${fullClassName}._${capitalizedName}`;\n } else if (listClass === undefined) {\n throw new Error(\n format(GEN_UNSUPPORTED_LIST_ELEMENT_TYPE, elementType)\n );\n }\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getList(${offset}, ${listClass}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;\n init = `$.utils.initList(${offset}, ${listClass}, length, this)`;\n if (elementType === Type.ENUM) {\n get = `${get} as ${jsType}`;\n init = `${init} as ${jsType}`;\n }\n break;\n }\n case Type.STRUCT: {\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getStruct(${offset}, ${jsType}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;\n init = `$.utils.initStructAt(${offset}, ${jsType}, this)`;\n break;\n }\n case Type.TEXT: {\n get = `$.utils.getText(${offset}, this${maybeDefaultArg})`;\n set = `$.utils.setText(${offset}, value, this)`;\n break;\n }\n case Type.VOID: {\n break;\n }\n case \"group\": {\n if (hadExplicitDefault) {\n throw new Error(format(GEN_EXPLICIT_DEFAULT_NON_PRIMITIVE, \"group\"));\n }\n get = `$.utils.getAs(${jsType}, this)`;\n init = get;\n break;\n }\n }\n if (adopt) {\n members.push(`\n _adopt${capitalizedName}(value: $.Orphan<${jsType}>): void {\n ${union ? `$.utils.setUint16(${discriminantOffset * 2}, ${discriminantValue}, this);` : \"\"}\n $.utils.adopt(value, $.utils.getPointer(${offset}, this));\n }\n `);\n }\n if (disown) {\n members.push(`\n _disown${capitalizedName}(): $.Orphan<${jsType}> {\n return $.utils.disown(this.${name === \"constructor\" ? `$${name}` : name});\n }\n `);\n }\n if (get) {\n const docComment = extractJSDocs(\n lookupNodeSourceInfo(ctx, node)?.members.at(fieldIndex)\n );\n members.push(`\n ${docComment}\n get ${accessorName}(): ${jsType} {\n ${union ? `$.utils.testWhich(${JSON.stringify(name)}, $.utils.getUint16(${discriminantOffset * 2}, this), ${discriminantValue}, this);` : \"\"}\n return ${get};\n }\n `);\n }\n if (has) {\n members.push(`\n _has${capitalizedName}(): boolean {\n return !$.utils.isNull($.utils.getPointer(${offset}, this));\n }\n `);\n }\n if (init) {\n const params = whichType === Type.DATA || whichType === Type.LIST ? `length: number` : \"\";\n members.push(`\n _init${capitalizedName}(${params}): ${jsType} {\n ${union ? `$.utils.setUint16(${discriminantOffset * 2}, ${discriminantValue}, this);` : \"\"}\n return ${init};\n }\n `);\n }\n if (union) {\n members.push(`\n get _is${capitalizedName}(): boolean {\n return $.utils.getUint16(${discriminantOffset * 2}, this) === ${discriminantValue};\n }\n `);\n }\n if (set || union) {\n const param = set ? `value: ${jsType}` : `_: true`;\n members.push(`\n set ${accessorName}(${param}) {\n ${union ? `$.utils.setUint16(${discriminantOffset * 2}, ${discriminantValue}, this);` : \"\"}\n ${set ? `${set};` : \"\"}\n }\n `);\n }\n}\nfunction generateDefaultValue(field) {\n const { name, slot } = field;\n const whichSlotType = slot.type.which();\n const primitive = Primitives[whichSlotType];\n let initializer;\n switch (whichSlotType) {\n case Type_Which.ANY_POINTER:\n case Type_Which.DATA:\n case Type_Which.LIST:\n case Type_Which.STRUCT:\n case Type_Which.INTERFACE: {\n initializer = createValue(slot.defaultValue);\n break;\n }\n case Type_Which.TEXT: {\n initializer = JSON.stringify(slot.defaultValue.text);\n break;\n }\n case Type_Which.BOOL: {\n const value = createValue(slot.defaultValue);\n const bitOffset = slot.offset % 8;\n initializer = `$.${primitive.mask}(${value}, ${bitOffset})`;\n break;\n }\n case Type_Which.ENUM:\n case Type_Which.FLOAT32:\n case Type_Which.FLOAT64:\n case Type_Which.INT16:\n case Type_Which.INT32:\n case Type_Which.INT64:\n case Type_Which.INT8:\n case Type_Which.UINT16:\n case Type_Which.UINT32:\n case Type_Which.UINT64:\n case Type_Which.UINT8: {\n const value = createValue(slot.defaultValue);\n initializer = `$.${primitive.mask}(${value})`;\n break;\n }\n default: {\n throw new Error(\n format(\n GEN_UNKNOWN_DEFAULT,\n whichSlotType\n )\n );\n }\n }\n return `default${c2t(name)}: ${initializer}`;\n}\nfunction createConcreteListProperty(ctx, field) {\n const name = `_${c2t(field.name)}`;\n const type = getJsType(ctx, field.slot.type, true);\n return `static ${name}: ${type};`;\n}\nfunction createUnionConstProperty(fullClassName, field) {\n const name = c2s(field.name);\n const initializer = `${fullClassName}_Which.${name}`;\n return `static readonly ${name} = ${initializer};`;\n}\nfunction createValue(value) {\n let p;\n switch (value.which()) {\n case Value.BOOL: {\n return value.bool ? `true` : `false`;\n }\n case Value.ENUM: {\n return String(value.enum);\n }\n case Value.FLOAT32: {\n return String(value.float32);\n }\n case Value.FLOAT64: {\n return String(value.float64);\n }\n case Value.INT8: {\n return String(value.int8);\n }\n case Value.INT16: {\n return String(value.int16);\n }\n case Value.INT32: {\n return String(value.int32);\n }\n case Value.INT64: {\n return createBigInt(value.int64);\n }\n case Value.UINT8: {\n return String(value.uint8);\n }\n case Value.UINT16: {\n return String(value.uint16);\n }\n case Value.UINT32: {\n return String(value.uint32);\n }\n case Value.UINT64: {\n return createBigInt(value.uint64);\n }\n case Value.TEXT: {\n return JSON.stringify(value.text);\n }\n case Value.VOID: {\n return \"undefined\";\n }\n case Value.ANY_POINTER: {\n p = value.anyPointer;\n break;\n }\n case Value.DATA: {\n p = value.data;\n break;\n }\n case Value.LIST: {\n p = value.list;\n break;\n }\n case Value.STRUCT: {\n p = value.struct;\n break;\n }\n case Value.INTERFACE: {\n testWhich(\"interface\", getUint16(0, value), 17, value);\n p = getPointer(0, value);\n break;\n }\n default: {\n throw new Error(format(GEN_SERIALIZE_UNKNOWN_VALUE, value.which()));\n }\n }\n const message = new Message();\n message.setRoot(p);\n const buf = new Uint8Array(message.toPackedArrayBuffer());\n const values = [];\n for (let i = 0; i < buf.byteLength; i++) {\n values.push(`0x${pad(buf[i].toString(16), 2)}`);\n }\n return `$.readRawPointer(new Uint8Array([${values.join(\",\")}]).buffer)`;\n}\nfunction createNestedNodeProperty(node) {\n const name = getDisplayNamePrefix(node);\n const initializer = getFullClassName(node);\n return `static readonly ${name} = ${initializer};`;\n}\n\nfunction generateInterfaceNode(ctx, node) {\n const displayNamePrefix = getDisplayNamePrefix(node);\n const fullClassName = getFullClassName(node);\n const nestedNodes = node.nestedNodes.map((n) => lookupNode(ctx, n)).filter((n) => !n._isConst && !n._isAnnotation);\n const nodeId = node.id;\n const nodeIdHex = nodeId.toString(16);\n const consts = ctx.nodes.filter((n) => n.scopeId === nodeId && n._isConst);\n const members = [];\n members.push(\n ...consts.map((node2) => {\n const name = c2s(getDisplayNamePrefix(node2));\n const value = createValue(node2.const.value);\n return `static readonly ${name} = ${value}`;\n }),\n ...nestedNodes.map((node2) => createNestedNodeProperty(node2)),\n `static readonly Client = ${fullClassName}$Client;\n static readonly Server = ${fullClassName}$Server;\n public static override readonly _capnp = {\n displayName: \"${displayNamePrefix}\",\n id: \"${nodeIdHex}\",\n size: new $.ObjectSize(0, 0),\n }\n public override toString(): string { return \"${fullClassName}_\" + super.toString(); }`\n );\n const docComment = extractJSDocs(lookupNodeSourceInfo(ctx, node));\n const classCode = `\n ${docComment}\n export class ${fullClassName} extends $.Interface {\n ${members.join(\"\\n\")}\n }`;\n generateInterfaceClasses(ctx, node);\n ctx.codeParts.push(classCode);\n}\n\nfunction generateNode(ctx, node) {\n const nodeId = node.id;\n const nodeIdHex = nodeId.toString(16);\n if (ctx.generatedNodeIds.has(nodeIdHex)) {\n return;\n }\n ctx.generatedNodeIds.add(nodeIdHex);\n const nestedNodes = node.nestedNodes.map((node2) => lookupNode(ctx, node2));\n for (const nestedNode of nestedNodes) {\n generateNode(ctx, nestedNode);\n }\n const groupNodes = ctx.nodes.filter(\n (node2) => node2.scopeId === nodeId && node2._isStruct && node2.struct.isGroup\n );\n for (const groupNode of groupNodes) {\n generateNode(ctx, groupNode);\n }\n const nodeType = node.which();\n switch (nodeType) {\n case Node.STRUCT: {\n generateStructNode(ctx, node);\n break;\n }\n case Node.CONST: {\n break;\n }\n case Node.ENUM: {\n generateEnumNode(\n ctx,\n getFullClassName(node),\n node,\n node.enum.enumerants.toArray()\n );\n break;\n }\n case Node.INTERFACE: {\n generateInterfaceNode(ctx, node);\n break;\n }\n case Node.ANNOTATION: {\n break;\n }\n // case s.Node.FILE:\n default: {\n throw new Error(\n format(\n GEN_NODE_UNKNOWN_TYPE,\n nodeType\n /* s.Node_Which[whichNode] */\n )\n );\n }\n }\n}\nclass CodeGeneratorContext {\n files = [];\n}\nclass CodeGeneratorFileContext {\n constructor(req, file) {\n this.req = req;\n this.file = file;\n this.nodes = req.nodes.toArray();\n this.imports = file.imports.toArray();\n }\n // inputs\n nodes;\n imports;\n // outputs\n concreteLists = [];\n generatedNodeIds = /* @__PURE__ */ new Set();\n generatedResultsPromiseIds = /* @__PURE__ */ new Set();\n tsPath = \"\";\n codeParts = [];\n toString() {\n return this.file?.filename ?? \"CodeGeneratorFileContext()\";\n }\n}\n\nfunction generateFileId(ctx) {\n ctx.codeParts.push(\n `export const _capnpFileId = BigInt(\"0x${ctx.file.id.toString(16)}\");`\n );\n}\n\nfunction generateConcreteListInitializer(ctx, fullClassName, field) {\n const name = `_${c2t(field.name)}`;\n const type = getConcreteListType(ctx, field.slot.type);\n ctx.codeParts.push(`${fullClassName}.${name} = ${type};`);\n}\n\nfunction generateCapnpImport(ctx) {\n const fileNode = lookupNode(ctx, ctx.file);\n const tsFileId = hexToBigInt(TS_FILE_ID);\n const tsAnnotationFile = ctx.nodes.find((n) => n.id === tsFileId);\n const tsImportPathAnnotation = tsAnnotationFile?.nestedNodes.find(\n (n) => n.name === \"importPath\"\n );\n const importAnnotation = tsImportPathAnnotation && fileNode.annotations.find((a) => a.id === tsImportPathAnnotation.id);\n const importPath = importAnnotation === undefined ? \"@stryke/capnp\" : importAnnotation.value.text;\n ctx.codeParts.push(`import * as $ from '${importPath}';`);\n}\nfunction generateNestedImports(ctx) {\n for (const imp of ctx.imports) {\n const { name } = imp;\n let importPath;\n if (name.startsWith(\"/capnp/\")) {\n importPath = `@stryke/capnp/schemas/${name.slice(7).replace(/\\.capnp$/, \"\")}`;\n } else {\n importPath = name.replace(/\\.capnp$/, \"\");\n if (importPath[0] !== \".\") {\n importPath = `./${importPath}`;\n }\n }\n const importNode = lookupNode(ctx, imp);\n const imports = getImportNodes(ctx, importNode).flatMap((node) => {\n const fullClassName = getFullClassName(node);\n if (node._isInterface) {\n return [fullClassName, `${fullClassName}$Client`];\n }\n return fullClassName;\n }).sort().join(\", \");\n if (imports.length === 0) {\n continue;\n }\n ctx.codeParts.push(`import { ${imports} } from \"${importPath}\";`);\n }\n}\nfunction getImportNodes(ctx, node, visitedIds = /* @__PURE__ */ new Set()) {\n visitedIds.add(node.id);\n const nestedNodes = node.nestedNodes.filter(({ id }) => hasNode(ctx, id));\n const newNestedNodes = nestedNodes.filter(({ id }) => !visitedIds.has(id));\n const nodes = newNestedNodes.map(({ id }) => lookupNode(ctx, id)).filter((node2) => node2._isStruct || node2._isEnum || node2._isInterface);\n return nodes.concat(\n nodes.flatMap((node2) => getImportNodes(ctx, node2, visitedIds))\n );\n}\n\nasync function compileAll(codeGenRequest, opts) {\n const req = new Message(codeGenRequest, false).getRoot(\n CodeGeneratorRequest\n );\n\n const ctx = new CodeGeneratorContext();\n ctx.files = req.requestedFiles.map((file) => loadRequestedFile(req, file));\n if (ctx.files.length === 0) {\n throw new Error(GEN_NO_FILES);\n } \n\n const files = new Map(\n ctx.files.map((file) => [file.tsPath, compileFile(file)])\n );\n if (files.size === 0) {\n throw new Error(GEN_NO_FILES);\n } \n\n if (opts?.dts === true || opts?.js === true) {\n tsCompile(files, opts?.dts === true, opts?.js === true, opts?.tsconfig);\n }\n\n if (!opts?.ts) {\n for (const [fileName] of files) {\n if (fileName.endsWith(\".ts\") && !fileName.endsWith(\".d.ts\")) {\n files.delete(fileName);\n }\n }\n }\n\n return {\n ctx,\n files\n };\n}\n\nfunction compileFile(ctx) {\n generateCapnpImport(ctx);\n generateNestedImports(ctx);\n generateFileId(ctx);\n const nestedNodes = lookupNode(ctx, ctx.file).nestedNodes.map(\n (n) => lookupNode(ctx, n)\n );\n for (const node of nestedNodes) {\n generateNode(ctx, node);\n }\n for (const [fullClassName, field] of ctx.concreteLists) {\n generateConcreteListInitializer(ctx, fullClassName, field);\n }\n const sourceFile = ts.createSourceFile(\n ctx.tsPath,\n ctx.codeParts.map((p) => p.toString()).join(\"\"),\n ts.ScriptTarget.Latest,\n false,\n ts.ScriptKind.TS\n );\n return SOURCE_COMMENT + ts.createPrinter().printFile(sourceFile);\n}\n\nfunction tsCompile(files, dts, js, tsconfig) {\n if (!dts && !js) {\n return;\n }\n const compileOptions = {\n moduleResolution: ts.ModuleResolutionKind.Bundler,\n target: ts.ScriptTarget.ESNext,\n strict: true,\n ...tsconfig,\n noEmitOnError: false,\n noFallthroughCasesInSwitch: true,\n preserveConstEnums: true,\n noImplicitReturns: true,\n noUnusedLocals: false,\n noUnusedParameters: false,\n removeComments: false,\n skipLibCheck: true,\n sourceMap: false,\n emitDeclarationOnly: dts && !js,\n declaration: dts\n };\n const compilerHost = ts.createCompilerHost(compileOptions);\n compilerHost.writeFile = (fileName, declaration) => {\n files.set(fileName, declaration);\n };\n const _readFile = compilerHost.readFile;\n compilerHost.readFile = (filename) => {\n if (files.has(filename)) {\n return files.get(filename);\n }\n return _readFile(filename);\n };\n const program = ts.createProgram(\n [...files.keys()],\n compileOptions,\n compilerHost\n );\n const emitResult = program.emit();\n const allDiagnostics = [\n ...ts.getPreEmitDiagnostics(program),\n ...emitResult.diagnostics\n ];\n if (allDiagnostics.length > 0) {\n for (const diagnostic of allDiagnostics) {\n const message = ts.flattenDiagnosticMessageText(\n diagnostic.messageText,\n \"\\n\"\n );\n if (diagnostic.file && diagnostic.start) {\n const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);\n console.log(\n `${diagnostic.file.fileName}:${line + 1}:${character + 1} ${message}`\n );\n } else {\n console.log(`==> ${message}`);\n }\n }\n throw new Error(GEN_TS_EMIT_FAILED);\n }\n}\n\nexport { compileAll as c };\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Arrayable } from \"@stryke/types/array\";\nimport type { Nullable } from \"@stryke/types/utilities\";\n\n/**\n * Convert `Arrayable<T>` to `Array<T>`\n *\n * @param array - The `Arrayable<T>` to convert\n * @returns An `Array<T>` containing the elements of the input\n */\nexport function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T> {\n array = array ?? [];\n return Array.isArray(array) ? array : [array];\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n writeFatal,\n writeWarning\n} from \"@storm-software/config-tools/logger/console\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { findFilePath, relativePath } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport type { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport type { ParsedCommandLine } from \"typescript\";\nimport { parseJsonConfigFileContent, sys } from \"typescript\";\nimport type { CapnpcOptions, CapnpcResolvedOptions } from \"./types.js\";\n\n/**\n * Resolves the options for the Cap'n Proto compiler.\n *\n * @param options - The options to resolve\n * @returns The resolved options\n */\nexport async function resolveOptions(\n options: Omit<CapnpcOptions, \"workspaceRoot\" | \"projectRoot\"> &\n Required<Pick<CapnpcOptions, \"workspaceRoot\" | \"projectRoot\">>\n): Promise<CapnpcResolvedOptions | null> {\n const tsconfigPath = options.tsconfigPath\n ? options.tsconfigPath\n .replace(\"{projectRoot}\", options.projectRoot)\n .replace(\"{workspaceRoot}\", options.workspaceRoot)\n : joinPaths(options.projectRoot, \"tsconfig.json\");\n const schemas = toArray(\n options.schemas\n ? options.schemas\n : joinPaths(options.projectRoot, \"schemas/**/*.capnp\")\n )\n .filter(Boolean)\n .map(schema =>\n schema\n .replace(\"{projectRoot}\", options.projectRoot)\n .replace(\"{workspaceRoot}\", options.workspaceRoot)\n );\n\n let resolvedTsconfig!: ParsedCommandLine;\n if (options.tsconfig) {\n resolvedTsconfig = options.tsconfig;\n } else {\n if (!tsconfigPath || !existsSync(tsconfigPath)) {\n const errorMessage = tsconfigPath\n ? `✖ The specified TypeScript configuration file \"${tsconfigPath}\" does not exist. Please provide a valid path.`\n : \"✖ The specified TypeScript configuration file does not exist. Please provide a valid path.\";\n writeFatal(errorMessage, { logLevel: \"all\" });\n\n throw new Error(errorMessage);\n }\n\n const tsconfigFile = await readJsonFile<TsConfigJson>(tsconfigPath);\n resolvedTsconfig = parseJsonConfigFileContent(\n tsconfigFile,\n sys,\n findFilePath(tsconfigPath)\n );\n if (!resolvedTsconfig) {\n const errorMessage = `✖ The specified TypeScript configuration file \"${tsconfigPath}\" is invalid. Please provide a valid configuration.`;\n writeFatal(errorMessage, { logLevel: \"all\" });\n\n throw new Error(errorMessage);\n }\n\n resolvedTsconfig.options.configFilePath = tsconfigPath;\n resolvedTsconfig.options.noImplicitOverride = false;\n resolvedTsconfig.options.noUnusedLocals = false;\n resolvedTsconfig.options.noUnusedParameters = false;\n }\n\n const resolvedSchemas = [] as string[];\n for (const schema of schemas) {\n let formattedSchema = schema;\n if (!schema.endsWith(\".capnp\") && !schema.includes(\"*\")) {\n formattedSchema = `${schema.replace(/\\/$/g, \"\")}/*.capnp`;\n }\n\n resolvedSchemas.push(...(await listFiles(formattedSchema)));\n }\n\n if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {\n writeWarning(\n `✖ No Cap'n Proto schema files found in the specified source paths: ${schemas.join(\n \", \"\n )}. As a result, the Cap'n Proto compiler will not be able to generate any output files. Please ensure that the paths are correct and contain .capnp files.`,\n { logLevel: \"all\" }\n );\n\n return null;\n }\n\n const output = options.output\n ? options.output\n .replace(\"{projectRoot}\", options.projectRoot)\n .replace(\"{workspaceRoot}\", options.workspaceRoot)\n : joinPaths(\n options.projectRoot,\n relativePath(\n tsconfigPath ? findFilePath(tsconfigPath) : options.projectRoot,\n joinPaths(\n options.workspaceRoot,\n resolvedSchemas[0].endsWith(\".capnp\")\n ? findFilePath(resolvedSchemas[0])\n : resolvedSchemas[0]\n )\n )\n );\n resolvedTsconfig.options.outDir = output;\n\n return {\n ...options,\n importPath: options.importPath\n ? options.importPath.split(\",\").map(dir => dir.trim())\n : [],\n workspaceRoot: options.workspaceRoot,\n projectRoot: options.projectRoot,\n schemas: resolvedSchemas,\n output,\n js: options.js === true,\n ts: options.noTs !== true,\n dts: options.dts ?? options.noDts !== true,\n tsconfig: resolvedTsconfig\n };\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { writeWarning } from \"@storm-software/config-tools/logger/console\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { compileAll } from \"capnp-es/compiler\";\nimport defu from \"defu\";\nimport { Buffer } from \"node:buffer\";\nimport { exec } from \"node:child_process\";\nimport { resolveOptions } from \"./helpers.js\";\nimport type {\n CapnpcOptions,\n CapnpcResolvedOptions,\n CapnpcResult\n} from \"./types.js\";\n\n/**\n * Compiles Cap'n Proto schemas into TypeScript files.\n *\n * @param options - The options for the compilation process.\n * @returns A promise that resolves to the compilation result.\n */\nexport async function capnpc(\n options: CapnpcResolvedOptions\n): Promise<CapnpcResult> {\n const { output, tsconfig, schemas = [], tty } = options;\n\n let dataBuf: Buffer = Buffer.alloc(0);\n if (tty) {\n const chunks: Buffer[] = [];\n process.stdin.on(\"data\", (chunk: Buffer) => {\n chunks.push(chunk);\n });\n\n await new Promise(resolve => {\n process.stdin.on(\"end\", resolve);\n });\n\n const reqBuffer = Buffer.alloc(\n chunks.reduce((l, chunk) => l + chunk.byteLength, 0)\n );\n\n let i = 0;\n for (const chunk of chunks) {\n chunk.copy(reqBuffer, i);\n i += chunk.byteLength;\n }\n\n dataBuf = reqBuffer;\n }\n\n if (dataBuf.byteLength === 0) {\n const opts: string[] = [];\n\n if (output && existsSync(output)) {\n opts.push(`-o-:${output}`);\n } else {\n if (output && !existsSync(output)) {\n writeWarning(\n `Output directory \"${output}\" does not exist, will write to schema path...`\n );\n }\n\n opts.push(\"-o-\");\n }\n\n dataBuf = await new Promise<Buffer>(resolve => {\n exec(\n `capnpc ${opts.join(\" \")} ${schemas.join(\" \")}`,\n { encoding: \"buffer\" },\n (error, stdout, stderr) => {\n if (stderr.length > 0) {\n process.stderr.write(stderr);\n }\n if (error) {\n throw error;\n }\n resolve(stdout);\n }\n );\n });\n }\n\n return compileAll(dataBuf, {\n ts: options.ts ?? true,\n js: false,\n dts: false,\n tsconfig: tsconfig.options\n });\n}\n\n/**\n * Compiles Cap'n Proto schemas into TypeScript files.\n *\n * @param dataBuf - The buffer containing the Cap'n Proto schema data.\n * @param options - The options for the compilation process.\n * @returns A promise that resolves to the compilation result.\n */\nexport async function compile(dataBuf: Buffer, options: CapnpcOptions) {\n const resolvedOptions = await resolveOptions(\n options as Parameters<typeof resolveOptions>[0]\n );\n if (!resolvedOptions) {\n writeWarning(\n \"✖ Unable to resolve Cap'n Proto compiler options - the program will terminate\",\n { logLevel: \"all\" }\n );\n return;\n }\n\n return compileAll(\n dataBuf,\n defu(\n {\n tsconfig: resolvedOptions.tsconfig.options\n },\n resolvedOptions,\n {\n ts: true,\n js: false,\n dts: false\n }\n )\n );\n}\n","#!/usr/bin/env node\n/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n writeFatal,\n writeInfo,\n writeSuccess,\n writeWarning\n} from \"@storm-software/config-tools/logger/console\";\nimport {\n exitWithError,\n exitWithSuccess,\n findWorkspaceRootSafe,\n handleProcess\n} from \"@storm-software/config-tools/utilities\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { findFilePath } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { Command } from \"commander\";\nimport { writeFile } from \"node:fs/promises\";\nimport { capnpc } from \"../src/compile.js\";\nimport { resolveOptions } from \"../src/helpers.js\";\nimport type { CapnpcCLIOptions } from \"../src/types.js\";\n\nconst compileAction =\n (workspaceRoot: string) => async (options: CapnpcCLIOptions) => {\n if (!options.projectRoot) {\n throw new Error(\n \"✖ The project root directory must be specified using the -p or --project-root option.\"\n );\n }\n\n const resolvedOptions = await resolveOptions({\n workspaceRoot,\n ...options,\n tsconfig: undefined,\n tsconfigPath: options.tsconfig,\n schemas: options.schema\n } as Parameters<typeof resolveOptions>[0]);\n if (!resolvedOptions) {\n writeWarning(\n \"✖ Unable to resolve Cap'n Proto compiler options - the program will terminate\",\n { logLevel: \"all\" }\n );\n return;\n }\n\n writeInfo(\n `📦 Storm Cap'n Proto Compiler will output ${\n resolvedOptions.ts ? \"TypeScript code\" : \"\"\n }${\n resolvedOptions.js\n ? resolvedOptions.ts\n ? \", JavaScript code\"\n : \"JavaScript code\"\n : \"\"\n }${\n resolvedOptions.dts\n ? resolvedOptions.ts || resolvedOptions.js\n ? \", TypeScript declarations\"\n : \"TypeScript declarations\"\n : \"\"\n } files from schemas at ${\n options.schema\n ? options.schema\n .replace(\"{projectRoot}\", resolvedOptions.projectRoot)\n .replace(\"{workspaceRoot}\", resolvedOptions.workspaceRoot)\n : resolvedOptions.projectRoot\n } to ${resolvedOptions.tsconfig.options.outDir}...`,\n {\n logLevel: \"all\"\n }\n );\n\n const result = await capnpc(resolvedOptions);\n if (result.files.size === 0) {\n writeWarning(\n \"⚠️ No files were generated. Please check your schema files.\",\n {\n logLevel: \"all\"\n }\n );\n return;\n }\n\n writeInfo(`📋 Writing ${result.files.size} generated files to disk...`, {\n logLevel: \"all\"\n });\n\n for (const [fileName, content] of result.files) {\n let filePath = fileName;\n if (!existsSync(findFilePath(filePath))) {\n const fullPath = `/${filePath}`;\n if (existsSync(findFilePath(fullPath))) {\n filePath = fullPath;\n }\n }\n\n if (options.output) {\n filePath = joinPaths(options.output, fileName);\n if (!existsSync(findFilePath(options.output))) {\n writeWarning(\n `Output directory \"${findFilePath(options.output)}\" does not exist, it will be created...`\n );\n // await createDirectory(\n // replacePath(findFilePath(options.output), getWorkspaceRoot())\n // );\n }\n }\n\n await writeFile(\n filePath,\n // https://github.com/microsoft/TypeScript/issues/54632\n content.replace(/^\\s+/gm, match => \" \".repeat(match.length / 2))\n );\n }\n\n writeSuccess(\"⚡ Storm Cap'n Proto Compiler completed successfully.\", {\n logLevel: \"all\"\n });\n };\n\nexport function createProgram() {\n writeInfo(\"⚡ Running Storm Cap'n Proto Compiler Tools\", { logLevel: \"all\" });\n\n const root = findWorkspaceRootSafe(process.cwd());\n process.env.STORM_WORKSPACE_ROOT ??= root;\n process.env.NX_WORKSPACE_ROOT_PATH ??= root;\n if (root) {\n process.chdir(root);\n }\n\n const program = new Command();\n program\n .name(\"storm-capnpc\")\n .description(\"Run the Storm Cap'n Proto compiler\")\n .version(\"1.0.0\", \"-v --version\", \"display CLI version\");\n\n program\n .command(\"compile\", { isDefault: true })\n .option(\n \"-p --project-root <path>\",\n \"The path to the project root directory\"\n )\n .option(\n \"-s --schema <path>\",\n \"The directory (or a glob to the directory) containing the Cap'n Proto schema files to compile (default: current working directory)\"\n )\n .option(\n \"-o --output <path>\",\n \"The directory to output the generated files to\"\n )\n .option(\n \"--tsconfig <path>\",\n \"The path to the TypeScript configuration file to use for compilation\"\n )\n .option(\n \"--skip-generating-id\",\n \"Skip generating a new 64-bit unique ID for use in a Cap'n Proto schema\"\n )\n .option(\n \"--no-standard-imports\",\n \"Skip adding default import paths; use only those specified by -I\"\n )\n .option(\"--no-ts\", \"An indicator to disable generation of TypeScript files\")\n .option(\"--js\", \"An indicator to generate JavaScript files\")\n .option(\"--dts\", \"An indicator to generate TypeScript declaration files\")\n .option(\n \"--no-dts\",\n \"An indicator to disable generation of TypeScript declaration files\"\n )\n .option(\n \"-w --workspace-root <path>\",\n \"The path to the workspace root directory\",\n root || process.cwd()\n )\n .option(\"--tty\", \"An indicator to enable TTY mode for the compiler\")\n .action(compileAction(root!));\n\n return program;\n}\n\nvoid (async () => {\n try {\n handleProcess();\n\n const program = createProgram();\n await program.parseAsync(process.argv);\n\n exitWithSuccess();\n } catch (error) {\n writeFatal(\n `✖ A fatal error occurred while running the Storm Cap'n Proto compiler tool:\n${(error as Error)?.message ? ((error as Error)?.name ? `[${(error as Error).name}]: ${(error as Error).message}` : (error as Error).message) : JSON.stringify(error)}${\n (error as Error)?.stack\n ? `\n\nStack Trace: ${(error as Error).stack}`\n : \"\"\n }`,\n { logLevel: \"all\" }\n );\n\n exitWithError();\n }\n})();\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"mappings":";0oCACI,GAAuB,CACzB,MAAO,CACL,WAAY,UACZ,WAAY,UACZ,MAAO,UACP,UAAW,UACX,KAAM,UACN,QAAS,UACT,KAAM,UACN,QAAS,UACT,OAAQ,UACR,MAAO,UACP,KAAM,UACN,SAAU,UACV,SAAU,UACV,SAAU,CAAC,UAAW,UAAW,UAAU,CAC5C,CACD,KAAM,CACJ,WAAY,UACZ,WAAY,UACZ,MAAO,UACP,UAAW,UACX,KAAM,UACN,QAAS,UACT,KAAM,UACN,QAAS,UACT,OAAQ,UACR,MAAO,UACP,KAAM,UACN,SAAU,UACV,SAAU,UACV,SAAU,CAAC,UAAW,UAAW,UAAU,CAC5C,CACF,eChCD,EAAO,QAAU,CAChB,UAAa,CAAC,IAAK,IAAK,IAAI,CAC5B,aAAgB,CAAC,IAAK,IAAK,IAAI,CAC/B,KAAQ,CAAC,EAAG,IAAK,IAAI,CACrB,WAAc,CAAC,IAAK,IAAK,IAAI,CAC7B,MAAS,CAAC,IAAK,IAAK,IAAI,CACxB,MAAS,CAAC,IAAK,IAAK,IAAI,CACxB,OAAU,CAAC,IAAK,IAAK,IAAI,CACzB,MAAS,CAAC,EAAG,EAAG,EAAE,CAClB,eAAkB,CAAC,IAAK,IAAK,IAAI,CACjC,KAAQ,CAAC,EAAG,EAAG,IAAI,CACnB,WAAc,CAAC,IAAK,GAAI,IAAI,CAC5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":"capnpc.mjs","names":["convert","conversions","models","path","styles","stringReplaceAll","stringEncaseCRLFWithFirstIndex","styles","chalk","chalk","chalk","MAX_DEPTH","depth","path","CommanderError","InvalidArgumentError","Argument","InvalidArgumentError","humanReadableArgName","Help","cmd","humanReadableArgName","stripColor","Option","InvalidArgumentError","DualOptions","str","suggestSimilar","process","Command","Help","Argument","CommanderError","Option","option","path","Command","Option","Argument","Help","CommanderError","InvalidArgumentError","commander","dump","#proxyHandler","depth","ts","padToWord","ts","add","adopt","disown","program","resolvedTsconfig!: ParsedCommandLine","existsSync","dataBuf: Buffer","Buffer","tty","chunks: Buffer[]","opts: string[]","existsSync","existsSync","program"],"sources":["../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-LA3S35UI.js","../../../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js","../../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js","../../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js","../../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js","../../../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js","../../../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js","../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js","../../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js","../../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js","../../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-LM2UMGYA.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-UU2P3WKA.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-VOC4Q4SE.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-6JBGUE4A.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-V3GMJ4TX.js","../../../../node_modules/.pnpm/@storm-software+config-tools@1.188.60/node_modules/@storm-software/config-tools/dist/chunk-4A2P7H63.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/error.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/argument.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/help.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/option.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/suggestSimilar.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/command.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/index.js","../../../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/esm.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.0-_cOx6D.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.BvfUH5E6.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/capnp/schema.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.GpvEvMIK.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@5.9.3/node_modules/capnp-es/dist/shared/capnp-es.CbTQkT9D.mjs","../../../convert/src/to-array.ts","../../src/helpers.ts","../../src/compile.ts","../../bin/capnpc.ts"],"sourcesContent":["// src/utilities/colors.ts\nvar DEFAULT_COLOR_CONFIG = {\n light: {\n background: \"#fafafa\",\n foreground: \"#1d1e22\",\n brand: \"#1fb2a6\",\n alternate: \"#db2777\",\n help: \"#5C4EE5\",\n success: \"#087f5b\",\n info: \"#0550ae\",\n warning: \"#e3b341\",\n danger: \"#D8314A\",\n fatal: \"#51070f\",\n link: \"#3fa6ff\",\n positive: \"#22c55e\",\n negative: \"#dc2626\",\n gradient: [\"#1fb2a6\", \"#db2777\", \"#5C4EE5\"]\n },\n dark: {\n background: \"#1d1e22\",\n foreground: \"#cbd5e1\",\n brand: \"#2dd4bf\",\n alternate: \"#db2777\",\n help: \"#818cf8\",\n success: \"#10b981\",\n info: \"#58a6ff\",\n warning: \"#f3d371\",\n danger: \"#D8314A\",\n fatal: \"#a40e26\",\n link: \"#3fa6ff\",\n positive: \"#22c55e\",\n negative: \"#dc2626\",\n gradient: [\"#1fb2a6\", \"#db2777\", \"#818cf8\"]\n }\n};\nfunction getColors(config) {\n if (!config?.colors || typeof config.colors !== \"object\" || !config.colors[\"dark\"] && (!config.colors[\"base\"] || typeof config.colors !== \"object\" || !config.colors[\"base\"]?.[\"dark\"])) {\n return DEFAULT_COLOR_CONFIG;\n }\n if (config.colors[\"base\"]) {\n if (typeof config.colors[\"base\"][\"dark\"] === \"object\") {\n return config.colors[\"base\"][\"dark\"];\n } else if (config.colors[\"base\"][\"dark\"] === \"string\") {\n return config.colors[\"base\"];\n }\n }\n if (typeof config.colors[\"dark\"] === \"object\") {\n return config.colors[\"dark\"];\n }\n return config.colors ?? DEFAULT_COLOR_CONFIG;\n}\nfunction getColor(key, config) {\n const colors = getColors(config);\n const result = (typeof colors[\"dark\"] === \"object\" ? colors[\"dark\"][key] : colors[key]) || DEFAULT_COLOR_CONFIG[\"dark\"][key] || DEFAULT_COLOR_CONFIG[key];\n if (result) {\n return result;\n }\n if (key === \"link\") {\n return getColor(\"info\", config);\n } else if (key === \"fatal\") {\n return getColor(\"danger\", config);\n }\n return getColor(\"brand\", config);\n}\nfunction getGradient(config) {\n const colors = getColors(config);\n const result = (typeof colors[\"dark\"] === \"object\" ? colors[\"dark\"].gradient : colors.gradient) || DEFAULT_COLOR_CONFIG[\"dark\"].gradient;\n if (result && Array.isArray(result) && result.length > 0) {\n return result;\n }\n return void 0;\n}\n\nexport {\n DEFAULT_COLOR_CONFIG,\n getColors,\n getColor,\n getGradient\n};\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","'use strict';\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n","'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n","'use strict';\nconst ansiStyles = require('ansi-styles');\nconst {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = require('./util');\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = require('./templates');\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n","// src/logger/chalk.ts\nimport chalk from \"chalk\";\nvar chalkDefault = {\n hex: (_) => (message) => message,\n bgHex: (_) => ({\n whiteBright: (message) => message,\n white: (message) => message\n }),\n white: (message) => message,\n whiteBright: (message) => message,\n gray: (message) => message,\n bold: {\n hex: (_) => (message) => message,\n bgHex: (_) => ({\n whiteBright: (message) => message,\n white: (message) => message\n }),\n whiteBright: (message) => message,\n white: (message) => message\n },\n dim: {\n hex: (_) => (message) => message,\n gray: (message) => message\n }\n};\nvar getChalk = () => {\n let _chalk = chalk;\n if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {\n _chalk = chalkDefault;\n }\n return _chalk;\n};\n\nexport {\n getChalk\n};\n","// src/logger/is-unicode-supported.ts\nfunction isUnicodeSupported() {\n if (process.platform !== \"win32\") {\n return process.env.TERM !== \"linux\";\n }\n return Boolean(process.env.WT_SESSION) || // Windows Terminal\n Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)\n process.env.ConEmuTask === \"{cmd::Cmder}\" || // ConEmu and cmder\n process.env.TERM_PROGRAM === \"Terminus-Sublime\" || process.env.TERM_PROGRAM === \"vscode\" || process.env.TERM === \"xterm-256color\" || process.env.TERM === \"alacritty\" || process.env.TERM === \"rxvt-unicode\" || process.env.TERM === \"rxvt-unicode-256color\" || process.env.TERMINAL_EMULATOR === \"JetBrains-JediTerm\";\n}\n\nexport {\n isUnicodeSupported\n};\n","// src/types.ts\nvar LogLevel = {\n SILENT: 0,\n FATAL: 10,\n ERROR: 20,\n WARN: 30,\n SUCCESS: 35,\n INFO: 40,\n DEBUG: 60,\n TRACE: 70,\n ALL: 100\n};\nvar LogLevelLabel = {\n SILENT: \"silent\",\n FATAL: \"fatal\",\n ERROR: \"error\",\n WARN: \"warn\",\n SUCCESS: \"success\",\n INFO: \"info\",\n DEBUG: \"debug\",\n TRACE: \"trace\",\n ALL: \"all\"\n};\n\nexport {\n LogLevel,\n LogLevelLabel\n};\n","import {\n isUnicodeSupported\n} from \"./chunk-G2MK47WL.js\";\nimport {\n LogLevelLabel\n} from \"./chunk-POXTJ6GF.js\";\n\n// src/logger/console-icons.ts\nvar useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;\nvar CONSOLE_ICONS = {\n [LogLevelLabel.ERROR]: useIcon(\"\\u2718\", \"\\xD7\"),\n [LogLevelLabel.FATAL]: useIcon(\"\\u{1F480}\", \"\\xD7\"),\n [LogLevelLabel.WARN]: useIcon(\"\\u26A0\", \"\\u203C\"),\n [LogLevelLabel.INFO]: useIcon(\"\\u2139\", \"i\"),\n [LogLevelLabel.SUCCESS]: useIcon(\"\\u2714\", \"\\u221A\"),\n [LogLevelLabel.DEBUG]: useIcon(\"\\u{1F6E0}\", \"D\"),\n [LogLevelLabel.TRACE]: useIcon(\"\\u{1F6E0}\", \"T\"),\n [LogLevelLabel.ALL]: useIcon(\"\\u2709\", \"\\u2192\")\n};\n\nexport {\n CONSOLE_ICONS\n};\n","// src/logger/format-timestamp.ts\nvar formatTimestamp = (date = /* @__PURE__ */ new Date()) => {\n return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;\n};\n\nexport {\n formatTimestamp\n};\n","import {\n LogLevel,\n LogLevelLabel\n} from \"./chunk-POXTJ6GF.js\";\n\n// src/logger/get-log-level.ts\nvar getLogLevel = (label) => {\n switch (label) {\n case \"all\":\n return LogLevel.ALL;\n case \"trace\":\n return LogLevel.TRACE;\n case \"debug\":\n return LogLevel.DEBUG;\n case \"info\":\n return LogLevel.INFO;\n case \"warn\":\n return LogLevel.WARN;\n case \"error\":\n return LogLevel.ERROR;\n case \"fatal\":\n return LogLevel.FATAL;\n case \"silent\":\n return LogLevel.SILENT;\n default:\n return LogLevel.INFO;\n }\n};\nvar getLogLevelLabel = (logLevel = LogLevel.INFO) => {\n if (logLevel >= LogLevel.ALL) {\n return LogLevelLabel.ALL;\n }\n if (logLevel >= LogLevel.TRACE) {\n return LogLevelLabel.TRACE;\n }\n if (logLevel >= LogLevel.DEBUG) {\n return LogLevelLabel.DEBUG;\n }\n if (logLevel >= LogLevel.INFO) {\n return LogLevelLabel.INFO;\n }\n if (logLevel >= LogLevel.WARN) {\n return LogLevelLabel.WARN;\n }\n if (logLevel >= LogLevel.ERROR) {\n return LogLevelLabel.ERROR;\n }\n if (logLevel >= LogLevel.FATAL) {\n return LogLevelLabel.FATAL;\n }\n if (logLevel <= LogLevel.SILENT) {\n return LogLevelLabel.SILENT;\n }\n return LogLevelLabel.INFO;\n};\nvar isVerbose = (label = LogLevelLabel.SILENT) => {\n const logLevel = typeof label === \"string\" ? getLogLevel(label) : label;\n return logLevel >= LogLevel.DEBUG;\n};\n\nexport {\n getLogLevel,\n getLogLevelLabel,\n isVerbose\n};\n","import {\n DEFAULT_COLOR_CONFIG\n} from \"./chunk-LA3S35UI.js\";\nimport {\n getChalk\n} from \"./chunk-HVVJHTFS.js\";\nimport {\n CONSOLE_ICONS\n} from \"./chunk-LM2UMGYA.js\";\nimport {\n formatTimestamp\n} from \"./chunk-CZ4IE2QN.js\";\nimport {\n getLogLevel\n} from \"./chunk-K4CDYUQR.js\";\nimport {\n LogLevel,\n LogLevelLabel\n} from \"./chunk-POXTJ6GF.js\";\n\n// src/logger/console.ts\nimport { formatDistanceToNow } from \"date-fns/formatDistanceToNow\";\nvar getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {\n const colors = !config.colors?.dark && !config.colors?.[\"base\"] && !config.colors?.[\"base\"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === \"string\" ? config.colors : config.colors?.[\"base\"]?.dark && typeof config.colors[\"base\"].dark === \"string\" ? config.colors[\"base\"].dark : config.colors?.[\"base\"] ? config.colors?.[\"base\"] : DEFAULT_COLOR_CONFIG;\n const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;\n if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {\n return (_) => {\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.FATAL >= logLevel) {\n return (message) => {\n console.error(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.ERROR >= logLevel) {\n return (message) => {\n console.error(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.WARN >= logLevel) {\n return (message) => {\n console.warn(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.SUCCESS >= logLevel) {\n return (message) => {\n console.info(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.INFO >= logLevel) {\n return (message) => {\n console.info(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.DEBUG >= logLevel) {\n return (message) => {\n console.debug(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n if (typeof logLevel === \"number\" && LogLevel.TRACE >= logLevel) {\n return (message) => {\n console.debug(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n }\n return (message) => {\n console.log(\n `\n${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}\n`\n );\n };\n};\nvar writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);\nvar writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);\nvar writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);\nvar writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);\nvar writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);\nvar writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);\nvar writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);\nvar writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);\nvar getStopwatch = (name) => {\n const start = /* @__PURE__ */ new Date();\n return () => {\n console.info(\n `\n> \\u23F1\\uFE0F The${name ? ` ${name}` : \"\"} process took ${formatDistanceToNow(start, {\n includeSeconds: true\n })} to complete\n`\n );\n };\n};\nvar MAX_DEPTH = 4;\nvar formatLogMessage = (message, options = {}, depth = 0) => {\n if (depth > MAX_DEPTH) {\n return \"<max depth>\";\n }\n const prefix = options.prefix ?? \"-\";\n const skip = options.skip ?? [];\n return typeof message === \"undefined\" || message === null || !message && typeof message !== \"boolean\" ? \"<none>\" : typeof message === \"string\" ? message : Array.isArray(message) ? `\n${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth + 1)}`).join(\"\\n\")}` : typeof message === \"object\" ? `\n${Object.keys(message).filter((key) => !skip.includes(key)).map(\n (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? \"<function>\" : typeof message[key] === \"object\" ? formatLogMessage(\n message[key],\n { prefix: `${prefix}-`, skip },\n depth + 1\n ) : message[key]}`\n ).join(\"\\n\")}` : message;\n};\nvar _isFunction = (value) => {\n try {\n return value instanceof Function || typeof value === \"function\" || !!(value?.constructor && value?.call && value?.apply);\n } catch {\n return false;\n }\n};\n\nexport {\n getLogFn,\n writeFatal,\n writeError,\n writeWarning,\n writeInfo,\n writeSuccess,\n writeDebug,\n writeTrace,\n writeSystem,\n getStopwatch,\n formatLogMessage\n};\n","import {\n writeError,\n writeFatal,\n writeSuccess,\n writeTrace\n} from \"./chunk-UU2P3WKA.js\";\n\n// src/utilities/process-handler.ts\nvar exitWithError = (config) => {\n writeFatal(\"Exiting script with an error status...\", config);\n process.exit(1);\n};\nvar exitWithSuccess = (config) => {\n writeSuccess(\"Script completed successfully. Exiting...\", config);\n process.exit(0);\n};\nvar handleProcess = (config) => {\n writeTrace(\n `Using the following arguments to process the script: ${process.argv.join(\", \")}`,\n config\n );\n process.on(\"unhandledRejection\", (error) => {\n writeError(\n `An Unhandled Rejection occurred while running the program: ${error}`,\n config\n );\n exitWithError(config);\n });\n process.on(\"uncaughtException\", (error) => {\n writeError(\n `An Uncaught Exception occurred while running the program: ${error.message} \nStacktrace: ${error.stack}`,\n config\n );\n exitWithError(config);\n });\n process.on(\"SIGTERM\", (signal) => {\n writeError(`The program terminated with signal code: ${signal}`, config);\n exitWithError(config);\n });\n process.on(\"SIGINT\", (signal) => {\n writeError(`The program terminated with signal code: ${signal}`, config);\n exitWithError(config);\n });\n process.on(\"SIGHUP\", (signal) => {\n writeError(`The program terminated with signal code: ${signal}`, config);\n exitWithError(config);\n });\n};\n\nexport {\n exitWithError,\n exitWithSuccess,\n handleProcess\n};\n","// src/utilities/find-up.ts\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nvar MAX_PATH_SEARCH_DEPTH = 30;\nvar depth = 0;\nfunction findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {\n const _startPath = startPath ?? process.cwd();\n if (endDirectoryNames.some(\n (endDirName) => existsSync(join(_startPath, endDirName))\n )) {\n return _startPath;\n }\n if (endFileNames.some(\n (endFileName) => existsSync(join(_startPath, endFileName))\n )) {\n return _startPath;\n }\n if (_startPath !== \"/\" && depth++ < MAX_PATH_SEARCH_DEPTH) {\n const parent = join(_startPath, \"..\");\n return findFolderUp(parent, endFileNames, endDirectoryNames);\n }\n return void 0;\n}\n\nexport {\n findFolderUp\n};\n","// src/utilities/correct-paths.ts\nvar _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\nvar _UNC_REGEX = /^[/\\\\]{2}/;\nvar _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nvar _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nvar _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nvar _EXTNAME_RE = /.(\\.[^./]+|\\.)$/;\nvar _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nvar sep = \"/\";\nvar correctPaths = function(path) {\n if (!path || path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path?.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nvar joinPaths = function(...segments) {\n let path = \"\";\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n return correctPaths(path);\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nvar resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) {\n } else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nvar isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nvar toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nvar extname = function(p) {\n if (p === \"..\") return \"\";\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nvar relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nvar dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nvar format = function(p) {\n const ext = p.ext ? p.ext.startsWith(\".\") ? p.ext : `.${p.ext}` : \"\";\n const segments = [p.root, p.dir, p.base ?? (p.name ?? \"\") + ext].filter(\n Boolean\n );\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nvar basename = function(p, extension) {\n const segments = normalizeWindowsPath(p).split(\"/\");\n let lastSegment = \"\";\n for (let i = segments.length - 1; i >= 0; i--) {\n const val = segments[i];\n if (val) {\n lastSegment = val;\n break;\n }\n }\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nvar parse = function(p) {\n const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\n\nexport {\n normalizeWindowsPath,\n sep,\n correctPaths,\n joinPaths,\n resolve,\n normalizeString,\n isAbsolute,\n toNamespacedPath,\n extname,\n relative,\n dirname,\n format,\n basename,\n parse\n};\n","import {\n findFolderUp\n} from \"./chunk-6JBGUE4A.js\";\nimport {\n correctPaths\n} from \"./chunk-V3GMJ4TX.js\";\n\n// src/utilities/find-workspace-root.ts\nvar rootFiles = [\n \"storm-workspace.json\",\n \"storm-workspace.yaml\",\n \"storm-workspace.yml\",\n \"storm-workspace.js\",\n \"storm-workspace.ts\",\n \".storm-workspace.json\",\n \".storm-workspace.yaml\",\n \".storm-workspace.yml\",\n \".storm-workspace.js\",\n \".storm-workspace.ts\",\n \"lerna.json\",\n \"nx.json\",\n \"turbo.json\",\n \"npm-workspace.json\",\n \"yarn-workspace.json\",\n \"pnpm-workspace.json\",\n \"npm-workspace.yaml\",\n \"yarn-workspace.yaml\",\n \"pnpm-workspace.yaml\",\n \"npm-workspace.yml\",\n \"yarn-workspace.yml\",\n \"pnpm-workspace.yml\",\n \"npm-lock.json\",\n \"yarn-lock.json\",\n \"pnpm-lock.json\",\n \"npm-lock.yaml\",\n \"yarn-lock.yaml\",\n \"pnpm-lock.yaml\",\n \"npm-lock.yml\",\n \"yarn-lock.yml\",\n \"pnpm-lock.yml\",\n \"bun.lockb\"\n];\nvar rootDirectories = [\n \".storm-workspace\",\n \".nx\",\n \".git\",\n \".github\",\n \".vscode\",\n \".verdaccio\"\n];\nfunction findWorkspaceRootSafe(pathInsideMonorepo) {\n if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {\n return correctPaths(\n process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH\n );\n }\n return correctPaths(\n findFolderUp(\n pathInsideMonorepo ?? process.cwd(),\n rootFiles,\n rootDirectories\n )\n );\n}\nfunction findWorkspaceRoot(pathInsideMonorepo) {\n const result = findWorkspaceRootSafe(pathInsideMonorepo);\n if (!result) {\n throw new Error(\n `Cannot find workspace root upwards from known path. Files search list includes: \n${rootFiles.join(\n \"\\n\"\n )}\nPath: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`\n );\n }\n return result;\n}\n\nexport {\n findWorkspaceRootSafe,\n findWorkspaceRoot\n};\n","/**\n * CommanderError class\n */\nclass 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 */\nclass 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\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass 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\nfunction humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';\n}\n\nexports.Argument = Argument;\nexports.humanReadableArgName = humanReadableArgName;\n","const { humanReadableArgName } = require('./argument.js');\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.\nclass 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 stripColor(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\n/**\n * Strip style ANSI escape sequences from the string. In particular, SGR (Select Graphic Rendition) codes.\n *\n * @param {string} str\n * @returns {string}\n * @package\n */\n\nfunction stripColor(str) {\n // eslint-disable-next-line no-control-regex\n const sgrPattern = /\\x1b\\[\\d*(;\\d*)*m/g;\n return str.replace(sgrPattern, '');\n}\n\nexports.Help = Help;\nexports.stripColor = stripColor;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass 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 */\nclass 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\nexports.Option = Option;\nexports.DualOptions = DualOptions;\n","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 = 1;\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\nfunction 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\nexports.suggestSimilar = suggestSimilar;\n","const EventEmitter = require('node:events').EventEmitter;\nconst childProcess = require('node:child_process');\nconst path = require('node:path');\nconst fs = require('node:fs');\nconst process = require('node:process');\n\nconst { Argument, humanReadableArgName } = require('./argument.js');\nconst { CommanderError } = require('./error.js');\nconst { Help, stripColor } = require('./help.js');\nconst { Option, DualOptions } = require('./option.js');\nconst { suggestSimilar } = require('./suggestSimilar');\n\nclass 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) => stripColor(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.negate) {\n // --no-foo is special and defaults foo to true, unless a --foo option is already defined\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(\n name,\n option.defaultValue === undefined ? true : option.defaultValue,\n 'default',\n );\n }\n } else 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 if (this._savedState === null) {\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 let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\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 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 forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\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 require.main.filename, or __filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(require.main.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(__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 * @returns {boolean | undefined}\n * @package\n */\nfunction 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\nexports.Command = Command;\nexports.useColor = useColor; // exporting for tests\n","const { Argument } = require('./lib/argument.js');\nconst { Command } = require('./lib/command.js');\nconst { CommanderError, InvalidArgumentError } = require('./lib/error.js');\nconst { Help } = require('./lib/help.js');\nconst { Option } = require('./lib/option.js');\n\nexports.program = new Command();\n\nexports.createCommand = (name) => new Command(name);\nexports.createOption = (flags, description) => new Option(flags, description);\nexports.createArgument = (name, description) => new Argument(name, description);\n\n/**\n * Expose classes\n */\n\nexports.Command = Command;\nexports.Option = Option;\nexports.Argument = Argument;\nexports.Help = Help;\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\nexports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated\n","import commander from './index.js';\n\n// wrapper to provide named exports for ESM.\nexport const {\n program,\n createCommand,\n createArgument,\n createOption,\n CommanderError,\n InvalidArgumentError,\n InvalidOptionArgumentError, // deprecated old name\n Command,\n Argument,\n Option,\n Help,\n} = commander;\n","var ListElementSize = /* @__PURE__ */ ((ListElementSize2) => {\n ListElementSize2[ListElementSize2[\"VOID\"] = 0] = \"VOID\";\n ListElementSize2[ListElementSize2[\"BIT\"] = 1] = \"BIT\";\n ListElementSize2[ListElementSize2[\"BYTE\"] = 2] = \"BYTE\";\n ListElementSize2[ListElementSize2[\"BYTE_2\"] = 3] = \"BYTE_2\";\n ListElementSize2[ListElementSize2[\"BYTE_4\"] = 4] = \"BYTE_4\";\n ListElementSize2[ListElementSize2[\"BYTE_8\"] = 5] = \"BYTE_8\";\n ListElementSize2[ListElementSize2[\"POINTER\"] = 6] = \"POINTER\";\n ListElementSize2[ListElementSize2[\"COMPOSITE\"] = 7] = \"COMPOSITE\";\n return ListElementSize2;\n})(ListElementSize || {});\n\nconst tmpWord = new DataView(new ArrayBuffer(8));\nnew Uint16Array(tmpWord.buffer)[0] = 258;\nconst DEFAULT_BUFFER_SIZE = 4096;\nconst DEFAULT_TRAVERSE_LIMIT = 64 << 20;\nconst LIST_SIZE_MASK = 7;\nconst MAX_BUFFER_DUMP_BYTES = 8192;\nconst MAX_INT32 = 2147483647;\nconst MAX_UINT32 = 4294967295;\nconst MIN_SINGLE_SEGMENT_GROWTH = 4096;\nconst NATIVE_LITTLE_ENDIAN = tmpWord.getUint8(0) === 2;\nconst PACK_SPAN_THRESHOLD = 2;\nconst POINTER_DOUBLE_FAR_MASK = 4;\nconst POINTER_TYPE_MASK = 3;\nconst MAX_DEPTH = MAX_INT32;\nconst MAX_SEGMENT_LENGTH = MAX_UINT32;\n\nconst INVARIANT_UNREACHABLE_CODE = \"CAPNP-TS000 Unreachable code detected.\";\nfunction assertNever(n) {\n throw new Error(INVARIANT_UNREACHABLE_CODE + ` (never block hit with: ${n})`);\n}\nconst MSG_INVALID_FRAME_HEADER = \"CAPNP-TS001 Attempted to parse an invalid message frame header; are you sure this is a Cap'n Proto message?\";\nconst MSG_PACK_NOT_WORD_ALIGNED = \"CAPNP-TS003 Attempted to pack a message that was not word-aligned.\";\nconst MSG_SEGMENT_OUT_OF_BOUNDS = \"CAPNP-TS004 Segment ID %X is out of bounds for message %s.\";\nconst MSG_SEGMENT_TOO_SMALL = \"CAPNP-TS005 First segment must have at least enough room to hold the root pointer (8 bytes).\";\nconst NOT_IMPLEMENTED = \"CAPNP-TS006 %s is not implemented.\";\nconst PTR_ADOPT_WRONG_MESSAGE = \"CAPNP-TS008 Attempted to adopt %s into a pointer in a different message %s.\";\nconst PTR_ALREADY_ADOPTED = \"CAPNP-TS009 Attempted to adopt %s more than once.\";\nconst PTR_COMPOSITE_SIZE_UNDEFINED = \"CAPNP-TS010 Attempted to set a composite list without providing a composite element size.\";\nconst PTR_DEPTH_LIMIT_EXCEEDED = \"CAPNP-TS011 Nesting depth limit exceeded for %s.\";\nconst PTR_INIT_COMPOSITE_STRUCT = \"CAPNP-TS013 Attempted to initialize a struct member from a composite list (%s).\";\nconst PTR_INVALID_FAR_TARGET = \"CAPNP-TS015 Target of a far pointer (%s) is another far pointer.\";\nconst PTR_INVALID_LIST_SIZE = \"CAPNP-TS016 Invalid list element size: %x.\";\nconst PTR_INVALID_POINTER_TYPE = \"CAPNP-TS017 Invalid pointer type: %x.\";\nconst PTR_INVALID_UNION_ACCESS = \"CAPNP-TS018 Attempted to access getter on %s for union field %s that is not currently set (wanted: %d, found: %d).\";\nconst PTR_OFFSET_OUT_OF_BOUNDS = \"CAPNP-TS019 Pointer offset %a is out of bounds for underlying buffer.\";\nconst PTR_STRUCT_DATA_OUT_OF_BOUNDS = \"CAPNP-TS020 Attempted to access out-of-bounds struct data (struct: %s, %d bytes at %a, data words: %d).\";\nconst PTR_STRUCT_POINTER_OUT_OF_BOUNDS = \"CAPNP-TS021 Attempted to access out-of-bounds struct pointer (%s, index: %d, length: %d).\";\nconst PTR_TRAVERSAL_LIMIT_EXCEEDED = \"CAPNP-TS022 Traversal limit exceeded! Slow down! %s\";\nconst PTR_WRONG_LIST_TYPE = \"CAPNP-TS023 Cannot convert %s to a %s list.\";\nconst PTR_WRONG_POINTER_TYPE = \"CAPNP-TS024 Attempted to convert pointer %s to a %s type.\";\nconst SEG_GET_NON_ZERO_SINGLE = \"CAPNP-TS035 Attempted to get a segment other than 0 (%d) from a single segment arena.\";\nconst SEG_ID_OUT_OF_BOUNDS = \"CAPNP-TS036 Attempted to get an out-of-bounds segment (%d).\";\nconst SEG_NOT_WORD_ALIGNED = \"CAPNP-TS037 Segment buffer length %d is not a multiple of 8.\";\nconst SEG_REPLACEMENT_BUFFER_TOO_SMALL = \"CAPNP-TS038 Attempted to replace a segment buffer with one that is smaller than the allocated space.\";\nconst SEG_SIZE_OVERFLOW = `CAPNP-TS039 Requested size %x exceeds maximum value (${MAX_SEGMENT_LENGTH}).`;\nconst TYPE_COMPOSITE_SIZE_UNDEFINED = \"CAPNP-TS040 Must provide a composite element size for composite list pointers.\";\nconst LIST_NO_MUTABLE = \"CAPNP-TS045: Cannot call mutative methods on an immutable list.\";\nconst LIST_NO_SEARCH = \"CAPNP-TS046: Search is not supported for list.\";\nconst RPC_NULL_CLIENT = \"CAPNP-TS100 Call on null client.\";\nconst RPC_CALL_QUEUE_FULL = \"CAPNP-TS101 Promised answer call queue full.\";\nconst RPC_QUEUE_CALL_CANCEL = \"CAPNP-TS102 Queue call canceled.\";\nconst RPC_ZERO_REF = \"CAPNP-TS105 Ref() called on zeroed refcount.\";\nconst RPC_IMPORT_CLOSED = \"CAPNP-TS106 Call on closed import.\";\nconst RPC_METHOD_NOT_IMPLEMENTED = \"CAPNP-TS107 Method not implemented.\";\nconst RPC_BAD_TARGET = \"CAPNP-TS109 Target not found.\";\nconst RPC_RETURN_FOR_UNKNOWN_QUESTION = \"CAPNP-TS111 Received return for unknown question (id=%s).\";\nconst RPC_QUESTION_ID_REUSED = \"CAPNP-TS112 Attempted to re-use question id (%s).\";\nconst RPC_UNKNOWN_EXPORT_ID = \"CAPNP-TS113 Capability table references unknown export ID (%s).\";\nconst RPC_UNKNOWN_ANSWER_ID = \"CAPNP-TS114 Capability table references unknown answer ID (%s).\";\nconst RPC_UNKNOWN_CAP_DESCRIPTOR = \"CAPNP-TS115 Unknown cap descriptor type (which: %s).\";\nconst RPC_METHOD_ERROR = \"CAPNP-TS116 RPC method failed at %s.%s(): %s\";\nconst RPC_ERROR = \"CAPNP-TS117 RPC call failed, reason: %s\";\nconst RPC_NO_MAIN_INTERFACE = \"CAPNP-TS118 Received bootstrap message without main interface set.\";\nconst RPC_FINISH_UNKNOWN_ANSWER = \"CAPNP-TS119 Received finish message for unknown answer ID (%s).\";\nconst RPC_FULFILL_ALREADY_CALLED = \"CAPNP-TS120 Fulfill called more than once for question (%s).\";\n\nfunction bufferToHex(buffer) {\n const a = new Uint8Array(buffer);\n const h = [];\n for (let i = 0; i < a.byteLength; i++) {\n h.push(pad(a[i].toString(16), 2));\n }\n return `[${h.join(\" \")}]`;\n}\nfunction dumpBuffer(buffer) {\n const b = buffer instanceof ArrayBuffer ? new Uint8Array(buffer) : new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n const byteLength = Math.min(b.byteLength, MAX_BUFFER_DUMP_BYTES);\n let r = format(\"\\n=== buffer[%d] ===\", byteLength);\n for (let j = 0; j < byteLength; j += 16) {\n r += `\n${pad(j.toString(16), 8)}: `;\n let s = \"\";\n let k;\n for (k = 0; k < 16 && j + k < b.byteLength; k++) {\n const v = b[j + k];\n r += `${pad(v.toString(16), 2)} `;\n s += v > 31 && v < 255 ? String.fromCharCode(v) : \"\\xB7\";\n if (k === 7) {\n r += \" \";\n }\n }\n r += `${\" \".repeat((17 - k) * 3)}${s}`;\n }\n r += \"\\n\";\n if (byteLength !== b.byteLength) {\n r += format(\"=== (truncated %d bytes) ===\\n\", b.byteLength - byteLength);\n }\n return r;\n}\nfunction format(s, ...args) {\n const n = s.length;\n let arg;\n let argIndex = 0;\n let c;\n let escaped = false;\n let i = 0;\n let leadingZero = false;\n let precision;\n let result = \"\";\n function nextArg() {\n return args[argIndex++];\n }\n function slurpNumber() {\n let digits = \"\";\n while (/\\d/.test(s[i])) {\n digits += s[i++];\n c = s[i];\n }\n return digits.length > 0 ? Number.parseInt(digits, 10) : null;\n }\n for (; i < n; ++i) {\n c = s[i];\n if (escaped) {\n escaped = false;\n if (c === \".\") {\n leadingZero = false;\n c = s[++i];\n } else if (c === \"0\" && s[i + 1] === \".\") {\n leadingZero = true;\n i += 2;\n c = s[i];\n } else {\n leadingZero = true;\n }\n precision = slurpNumber();\n switch (c) {\n case \"a\": {\n result += \"0x\" + pad(Number.parseInt(String(nextArg()), 10).toString(16), 8);\n break;\n }\n case \"b\": {\n result += Number.parseInt(String(nextArg()), 10).toString(2);\n break;\n }\n case \"c\": {\n arg = nextArg();\n result += typeof arg === \"string\" || arg instanceof String ? arg : String.fromCharCode(Number.parseInt(String(arg), 10));\n break;\n }\n case \"d\": {\n result += Number.parseInt(String(nextArg()), 10);\n break;\n }\n case \"f\": {\n const tmp = Number.parseFloat(String(nextArg())).toFixed(\n precision || 6\n );\n result += leadingZero ? tmp : tmp.replace(/^0/, \"\");\n break;\n }\n case \"j\": {\n result += JSON.stringify(nextArg());\n break;\n }\n case \"o\": {\n result += \"0\" + Number.parseInt(String(nextArg()), 10).toString(8);\n break;\n }\n case \"s\": {\n result += nextArg();\n break;\n }\n case \"x\": {\n result += \"0x\" + Number.parseInt(String(nextArg()), 10).toString(16);\n break;\n }\n case \"X\": {\n result += \"0x\" + Number.parseInt(String(nextArg()), 10).toString(16).toUpperCase();\n break;\n }\n default: {\n result += c;\n break;\n }\n }\n } else if (c === \"%\") {\n escaped = true;\n } else {\n result += c;\n }\n }\n return result;\n}\nfunction pad(v, width, pad2 = \"0\") {\n return v.length >= width ? v : Array.from({ length: width - v.length + 1 }).join(pad2) + v;\n}\nfunction padToWord$1(size) {\n return size + 7 & -8;\n}\n\nclass ObjectSize {\n /**\n * Creates a new ObjectSize instance.\n *\n * @param dataByteLength - The number of bytes in the data section of the struct\n * @param pointerLength - The number of pointers in the pointer section of the struct\n */\n constructor(dataByteLength, pointerLength) {\n this.dataByteLength = dataByteLength;\n this.pointerLength = pointerLength;\n }\n toString() {\n return format(\n \"ObjectSize_dw:%d,pc:%d\",\n getDataWordLength(this),\n this.pointerLength\n );\n }\n}\nfunction getByteLength(o) {\n return o.dataByteLength + o.pointerLength * 8;\n}\nfunction getDataWordLength(o) {\n return o.dataByteLength / 8;\n}\nfunction getWordLength(o) {\n return o.dataByteLength / 8 + o.pointerLength;\n}\nfunction padToWord(o) {\n return new ObjectSize(padToWord$1(o.dataByteLength), o.pointerLength);\n}\n\nclass Orphan {\n /** If this member is not present then the orphan has already been adopted, or something went very wrong. */\n _capnp;\n byteOffset;\n segment;\n constructor(src) {\n const c = getContent(src);\n this.segment = c.segment;\n this.byteOffset = c.byteOffset;\n this._capnp = {};\n this._capnp.type = getTargetPointerType(src);\n switch (this._capnp.type) {\n case PointerType.STRUCT: {\n this._capnp.size = getTargetStructSize(src);\n break;\n }\n case PointerType.LIST: {\n this._capnp.length = getTargetListLength(src);\n this._capnp.elementSize = getTargetListElementSize(src);\n if (this._capnp.elementSize === ListElementSize.COMPOSITE) {\n this._capnp.size = getTargetCompositeListSize(src);\n }\n break;\n }\n case PointerType.OTHER: {\n this._capnp.capId = getCapabilityId(src);\n break;\n }\n default: {\n throw new Error(PTR_INVALID_POINTER_TYPE);\n }\n }\n erasePointer(src);\n }\n /**\n * Adopt (move) this orphan into the target pointer location. This will allocate far pointers in `dst` as needed.\n *\n * @param dst The destination pointer.\n */\n _moveTo(dst) {\n if (this._capnp === undefined) {\n throw new Error(format(PTR_ALREADY_ADOPTED, this));\n }\n if (this.segment.message !== dst.segment.message) {\n throw new Error(format(PTR_ADOPT_WRONG_MESSAGE, this, dst));\n }\n erase(dst);\n const res = initPointer(this.segment, this.byteOffset, dst);\n switch (this._capnp.type) {\n case PointerType.STRUCT: {\n setStructPointer(res.offsetWords, this._capnp.size, res.pointer);\n break;\n }\n case PointerType.LIST: {\n let { offsetWords } = res;\n if (this._capnp.elementSize === ListElementSize.COMPOSITE) {\n offsetWords--;\n }\n setListPointer(\n offsetWords,\n this._capnp.elementSize,\n this._capnp.length,\n res.pointer,\n this._capnp.size\n );\n break;\n }\n case PointerType.OTHER: {\n setInterfacePointer(this._capnp.capId, res.pointer);\n break;\n }\n /* istanbul ignore next */\n default: {\n throw new Error(PTR_INVALID_POINTER_TYPE);\n }\n }\n this._capnp = undefined;\n }\n dispose() {\n if (this._capnp === undefined) {\n return;\n }\n switch (this._capnp.type) {\n case PointerType.STRUCT: {\n this.segment.fillZeroWords(\n this.byteOffset,\n getWordLength(this._capnp.size)\n );\n break;\n }\n case PointerType.LIST: {\n const byteLength = getListByteLength(\n this._capnp.elementSize,\n this._capnp.length,\n this._capnp.size\n );\n this.segment.fillZeroWords(this.byteOffset, byteLength);\n break;\n }\n }\n this._capnp = undefined;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n return format(\n \"Orphan_%d@%a,type:%s\",\n this.segment.id,\n this.byteOffset,\n this._capnp && this._capnp.type\n );\n }\n}\n\nfunction adopt(src, p) {\n src._moveTo(p);\n}\nfunction disown(p) {\n return new Orphan(p);\n}\nfunction dump(p) {\n return bufferToHex(p.segment.buffer.slice(p.byteOffset, p.byteOffset + 8));\n}\nfunction getListByteLength(elementSize, length, compositeSize) {\n switch (elementSize) {\n case ListElementSize.BIT: {\n return padToWord$1(length + 7 >>> 3);\n }\n case ListElementSize.BYTE:\n case ListElementSize.BYTE_2:\n case ListElementSize.BYTE_4:\n case ListElementSize.BYTE_8:\n case ListElementSize.POINTER:\n case ListElementSize.VOID: {\n return padToWord$1(getListElementByteLength(elementSize) * length);\n }\n /* istanbul ignore next */\n case ListElementSize.COMPOSITE: {\n if (compositeSize === undefined) {\n throw new Error(format(PTR_INVALID_LIST_SIZE, Number.NaN));\n }\n return length * padToWord$1(getByteLength(compositeSize));\n }\n /* istanbul ignore next */\n default: {\n throw new Error(PTR_INVALID_LIST_SIZE);\n }\n }\n}\nfunction getListElementByteLength(elementSize) {\n switch (elementSize) {\n /* istanbul ignore next */\n case ListElementSize.BIT: {\n return Number.NaN;\n }\n case ListElementSize.BYTE: {\n return 1;\n }\n case ListElementSize.BYTE_2: {\n return 2;\n }\n case ListElementSize.BYTE_4: {\n return 4;\n }\n case ListElementSize.BYTE_8:\n case ListElementSize.POINTER: {\n return 8;\n }\n /* istanbul ignore next */\n case ListElementSize.COMPOSITE: {\n return Number.NaN;\n }\n /* istanbul ignore next */\n case ListElementSize.VOID: {\n return 0;\n }\n /* istanbul ignore next */\n default: {\n throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize));\n }\n }\n}\nfunction add(offset, p) {\n return new Pointer(p.segment, p.byteOffset + offset, p._capnp.depthLimit);\n}\nfunction copyFrom(src, p) {\n if (p.segment === src.segment && p.byteOffset === src.byteOffset) {\n return;\n }\n erase(p);\n if (isNull(src)) return;\n switch (getTargetPointerType(src)) {\n case PointerType.STRUCT: {\n copyFromStruct(src, p);\n break;\n }\n case PointerType.LIST: {\n copyFromList(src, p);\n break;\n }\n case PointerType.OTHER: {\n copyFromInterface(src, p);\n break;\n }\n /* istanbul ignore next */\n default: {\n throw new Error(\n format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p))\n );\n }\n }\n}\nfunction erase(p) {\n if (isNull(p)) return;\n let c;\n switch (getTargetPointerType(p)) {\n case PointerType.STRUCT: {\n const size = getTargetStructSize(p);\n c = getContent(p);\n c.segment.fillZeroWords(c.byteOffset, size.dataByteLength / 8);\n for (let i = 0; i < size.pointerLength; i++) {\n erase(add(i * 8, c));\n }\n break;\n }\n case PointerType.LIST: {\n const elementSize = getTargetListElementSize(p);\n const length = getTargetListLength(p);\n let contentWords = padToWord$1(\n length * getListElementByteLength(elementSize)\n );\n c = getContent(p);\n if (elementSize === ListElementSize.POINTER) {\n for (let i = 0; i < length; i++) {\n erase(\n new Pointer(\n c.segment,\n c.byteOffset + i * 8,\n p._capnp.depthLimit - 1\n )\n );\n }\n break;\n } else if (elementSize === ListElementSize.COMPOSITE) {\n const tag = add(-8, c);\n const compositeSize = getStructSize(tag);\n const compositeByteLength = getByteLength(compositeSize);\n contentWords = getOffsetWords(tag);\n c.segment.setWordZero(c.byteOffset - 8);\n for (let i = 0; i < length; i++) {\n for (let j = 0; j < compositeSize.pointerLength; j++) {\n erase(\n new Pointer(\n c.segment,\n c.byteOffset + i * compositeByteLength + j * 8,\n p._capnp.depthLimit - 1\n )\n );\n }\n }\n }\n c.segment.fillZeroWords(c.byteOffset, contentWords);\n break;\n }\n case PointerType.OTHER: {\n break;\n }\n default: {\n throw new Error(\n format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p))\n );\n }\n }\n erasePointer(p);\n}\nfunction erasePointer(p) {\n if (getPointerType(p) === PointerType.FAR) {\n const landingPad = followFar(p);\n if (isDoubleFar(p)) {\n landingPad.segment.setWordZero(landingPad.byteOffset + 8);\n }\n landingPad.segment.setWordZero(landingPad.byteOffset);\n }\n p.segment.setWordZero(p.byteOffset);\n}\nfunction followFar(p) {\n const targetSegment = p.segment.message.getSegment(\n p.segment.getUint32(p.byteOffset + 4)\n );\n const targetWordOffset = p.segment.getUint32(p.byteOffset) >>> 3;\n return new Pointer(\n targetSegment,\n targetWordOffset * 8,\n p._capnp.depthLimit - 1\n );\n}\nfunction followFars(p) {\n if (getPointerType(p) === PointerType.FAR) {\n const landingPad = followFar(p);\n if (isDoubleFar(p)) {\n landingPad.byteOffset += 8;\n }\n return landingPad;\n }\n return p;\n}\nfunction getCapabilityId(p) {\n return p.segment.getUint32(p.byteOffset + 4);\n}\nfunction isCompositeList(p) {\n return getTargetPointerType(p) === PointerType.LIST && getTargetListElementSize(p) === ListElementSize.COMPOSITE;\n}\nfunction getContent(p, ignoreCompositeIndex) {\n let c;\n if (isDoubleFar(p)) {\n const landingPad = followFar(p);\n c = new Pointer(\n p.segment.message.getSegment(getFarSegmentId(landingPad)),\n getOffsetWords(landingPad) * 8\n );\n } else {\n const target = followFars(p);\n c = new Pointer(\n target.segment,\n target.byteOffset + 8 + getOffsetWords(target) * 8\n );\n }\n if (isCompositeList(p)) {\n c.byteOffset += 8;\n }\n if (!ignoreCompositeIndex && p._capnp.compositeIndex !== undefined) {\n c.byteOffset -= 8;\n c.byteOffset += 8 + p._capnp.compositeIndex * getByteLength(padToWord(getStructSize(c)));\n }\n return c;\n}\nfunction getFarSegmentId(p) {\n return p.segment.getUint32(p.byteOffset + 4);\n}\nfunction getListElementSize(p) {\n return p.segment.getUint32(p.byteOffset + 4) & LIST_SIZE_MASK;\n}\nfunction getListLength(p) {\n return p.segment.getUint32(p.byteOffset + 4) >>> 3;\n}\nfunction getOffsetWords(p) {\n const o = p.segment.getInt32(p.byteOffset);\n return o & 2 ? o >> 3 : o >> 2;\n}\nfunction getPointerType(p) {\n return p.segment.getUint32(p.byteOffset) & POINTER_TYPE_MASK;\n}\nfunction getStructDataWords(p) {\n return p.segment.getUint16(p.byteOffset + 4);\n}\nfunction getStructPointerLength(p) {\n return p.segment.getUint16(p.byteOffset + 6);\n}\nfunction getStructSize(p) {\n return new ObjectSize(getStructDataWords(p) * 8, getStructPointerLength(p));\n}\nfunction getTargetCompositeListTag(p) {\n const c = getContent(p);\n c.byteOffset -= 8;\n return c;\n}\nfunction getTargetCompositeListSize(p) {\n return getStructSize(getTargetCompositeListTag(p));\n}\nfunction getTargetListElementSize(p) {\n return getListElementSize(followFars(p));\n}\nfunction getTargetListLength(p) {\n const t = followFars(p);\n if (getListElementSize(t) === ListElementSize.COMPOSITE) {\n return getOffsetWords(getTargetCompositeListTag(p));\n }\n return getListLength(t);\n}\nfunction getTargetPointerType(p) {\n const t = getPointerType(followFars(p));\n if (t === PointerType.FAR) {\n throw new Error(format(PTR_INVALID_FAR_TARGET, p));\n }\n return t;\n}\nfunction getTargetStructSize(p) {\n return getStructSize(followFars(p));\n}\nfunction initPointer(contentSegment, contentOffset, p) {\n if (p.segment !== contentSegment) {\n if (!contentSegment.hasCapacity(8)) {\n const landingPad2 = p.segment.allocate(16);\n setFarPointer(true, landingPad2.byteOffset / 8, landingPad2.segment.id, p);\n setFarPointer(false, contentOffset / 8, contentSegment.id, landingPad2);\n landingPad2.byteOffset += 8;\n return new PointerAllocationResult(landingPad2, 0);\n }\n const landingPad = contentSegment.allocate(8);\n if (landingPad.segment.id !== contentSegment.id) {\n throw new Error(INVARIANT_UNREACHABLE_CODE);\n }\n setFarPointer(false, landingPad.byteOffset / 8, landingPad.segment.id, p);\n return new PointerAllocationResult(\n landingPad,\n (contentOffset - landingPad.byteOffset - 8) / 8\n );\n }\n return new PointerAllocationResult(p, (contentOffset - p.byteOffset - 8) / 8);\n}\nfunction isDoubleFar(p) {\n return getPointerType(p) === PointerType.FAR && (p.segment.getUint32(p.byteOffset) & POINTER_DOUBLE_FAR_MASK) !== 0;\n}\nfunction isNull(p) {\n return p.segment.isWordZero(p.byteOffset);\n}\nfunction relocateTo(dst, src) {\n const t = followFars(src);\n const lo = t.segment.getUint8(t.byteOffset) & 3;\n const hi = t.segment.getUint32(t.byteOffset + 4);\n erase(dst);\n const res = initPointer(\n t.segment,\n t.byteOffset + 8 + getOffsetWords(t) * 8,\n dst\n );\n res.pointer.segment.setUint32(\n res.pointer.byteOffset,\n lo | res.offsetWords << 2\n );\n res.pointer.segment.setUint32(res.pointer.byteOffset + 4, hi);\n erasePointer(src);\n}\nfunction setFarPointer(doubleFar, offsetWords, segmentId, p) {\n const A = PointerType.FAR;\n const B = doubleFar ? 1 : 0;\n const C = offsetWords;\n const D = segmentId;\n p.segment.setUint32(p.byteOffset, A | B << 2 | C << 3);\n p.segment.setUint32(p.byteOffset + 4, D);\n}\nfunction setInterfacePointer(capId, p) {\n p.segment.setUint32(p.byteOffset, PointerType.OTHER);\n p.segment.setUint32(p.byteOffset + 4, capId);\n}\nfunction getInterfacePointer(p) {\n return p.segment.getUint32(p.byteOffset + 4);\n}\nfunction setListPointer(offsetWords, size, length, p, compositeSize) {\n const A = PointerType.LIST;\n const B = offsetWords;\n const C = size;\n let D = length;\n if (size === ListElementSize.COMPOSITE) {\n if (compositeSize === undefined) {\n throw new TypeError(TYPE_COMPOSITE_SIZE_UNDEFINED);\n }\n D *= getWordLength(compositeSize);\n }\n p.segment.setUint32(p.byteOffset, A | B << 2);\n p.segment.setUint32(p.byteOffset + 4, C | D << 3);\n}\nfunction setStructPointer(offsetWords, size, p) {\n const A = PointerType.STRUCT;\n const B = offsetWords;\n const C = getDataWordLength(size);\n const D = size.pointerLength;\n p.segment.setUint32(p.byteOffset, A | B << 2);\n p.segment.setUint16(p.byteOffset + 4, C);\n p.segment.setUint16(p.byteOffset + 6, D);\n}\nfunction validate(pointerType, p, elementSize) {\n if (isNull(p)) {\n return;\n }\n const t = followFars(p);\n const A = t.segment.getUint32(t.byteOffset) & POINTER_TYPE_MASK;\n if (A !== pointerType) {\n throw new Error(format(PTR_WRONG_POINTER_TYPE, p, pointerType));\n }\n if (elementSize !== undefined) {\n const C = t.segment.getUint32(t.byteOffset + 4) & LIST_SIZE_MASK;\n if (C !== elementSize) {\n throw new Error(\n format(PTR_WRONG_LIST_TYPE, p, ListElementSize[elementSize])\n );\n }\n }\n}\nfunction copyFromInterface(src, dst) {\n const srcCapId = getInterfacePointer(src);\n if (srcCapId < 0) {\n return;\n }\n const srcCapTable = src.segment.message._capnp.capTable;\n if (!srcCapTable) {\n return;\n }\n const client = srcCapTable[srcCapId];\n if (!client) {\n return;\n }\n const dstCapId = dst.segment.message.addCap(client);\n setInterfacePointer(dstCapId, dst);\n}\nfunction copyFromList(src, dst) {\n if (dst._capnp.depthLimit <= 0) {\n throw new Error(PTR_DEPTH_LIMIT_EXCEEDED);\n }\n const srcContent = getContent(src);\n const srcElementSize = getTargetListElementSize(src);\n const srcLength = getTargetListLength(src);\n let srcCompositeSize;\n let srcStructByteLength;\n let dstContent;\n if (srcElementSize === ListElementSize.POINTER) {\n dstContent = dst.segment.allocate(srcLength << 3);\n for (let i = 0; i < srcLength; i++) {\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + (i << 3),\n src._capnp.depthLimit - 1\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + (i << 3),\n dst._capnp.depthLimit - 1\n );\n copyFrom(srcPtr, dstPtr);\n }\n } else if (srcElementSize === ListElementSize.COMPOSITE) {\n srcCompositeSize = padToWord(getTargetCompositeListSize(src));\n srcStructByteLength = getByteLength(srcCompositeSize);\n dstContent = dst.segment.allocate(\n getByteLength(srcCompositeSize) * srcLength + 8\n );\n dstContent.segment.copyWord(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset - 8\n );\n if (srcCompositeSize.dataByteLength > 0) {\n const wordLength = getWordLength(srcCompositeSize) * srcLength;\n dstContent.segment.copyWords(\n dstContent.byteOffset + 8,\n srcContent.segment,\n srcContent.byteOffset,\n wordLength\n );\n }\n for (let i = 0; i < srcLength; i++) {\n for (let j = 0; j < srcCompositeSize.pointerLength; j++) {\n const offset = i * srcStructByteLength + srcCompositeSize.dataByteLength + (j << 3);\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + offset,\n src._capnp.depthLimit - 1\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + offset + 8,\n dst._capnp.depthLimit - 1\n );\n copyFrom(srcPtr, dstPtr);\n }\n }\n } else {\n const byteLength = padToWord$1(\n srcElementSize === ListElementSize.BIT ? srcLength + 7 >>> 3 : getListElementByteLength(srcElementSize) * srcLength\n );\n const wordLength = byteLength >>> 3;\n dstContent = dst.segment.allocate(byteLength);\n dstContent.segment.copyWords(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset,\n wordLength\n );\n }\n const res = initPointer(dstContent.segment, dstContent.byteOffset, dst);\n setListPointer(\n res.offsetWords,\n srcElementSize,\n srcLength,\n res.pointer,\n srcCompositeSize\n );\n}\nfunction copyFromStruct(src, dst) {\n if (dst._capnp.depthLimit <= 0) {\n throw new Error(PTR_DEPTH_LIMIT_EXCEEDED);\n }\n const srcContent = getContent(src);\n const srcSize = getTargetStructSize(src);\n const srcDataWordLength = getDataWordLength(srcSize);\n const dstContent = dst.segment.allocate(getByteLength(srcSize));\n dstContent.segment.copyWords(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset,\n srcDataWordLength\n );\n for (let i = 0; i < srcSize.pointerLength; i++) {\n const offset = srcSize.dataByteLength + i * 8;\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + offset,\n src._capnp.depthLimit - 1\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + offset,\n dst._capnp.depthLimit - 1\n );\n copyFrom(srcPtr, dstPtr);\n }\n if (dst._capnp.compositeList) {\n return;\n }\n const res = initPointer(dstContent.segment, dstContent.byteOffset, dst);\n setStructPointer(res.offsetWords, srcSize, res.pointer);\n}\nfunction trackPointerAllocation(message, p) {\n message._capnp.traversalLimit -= 8;\n if (message._capnp.traversalLimit <= 0) {\n throw new Error(format(PTR_TRAVERSAL_LIMIT_EXCEEDED, p));\n }\n}\nclass PointerAllocationResult {\n constructor(pointer, offsetWords) {\n this.pointer = pointer;\n this.offsetWords = offsetWords;\n }\n}\n\nvar PointerType = /* @__PURE__ */ ((PointerType2) => {\n PointerType2[PointerType2[\"STRUCT\"] = 0] = \"STRUCT\";\n PointerType2[PointerType2[\"LIST\"] = 1] = \"LIST\";\n PointerType2[PointerType2[\"FAR\"] = 2] = \"FAR\";\n PointerType2[PointerType2[\"OTHER\"] = 3] = \"OTHER\";\n return PointerType2;\n})(PointerType || {});\nclass Pointer {\n static _capnp = {\n displayName: \"Pointer\"\n };\n _capnp;\n /** Offset, in bytes, from the start of the segment to the beginning of this pointer. */\n byteOffset;\n /**\n * The starting segment for this pointer's data. In the case of a far pointer, the actual content this pointer is\n * referencing will be in another segment within the same message.\n */\n segment;\n constructor(segment, byteOffset, depthLimit = MAX_DEPTH) {\n this._capnp = { compositeList: false, depthLimit };\n this.segment = segment;\n this.byteOffset = byteOffset;\n if (depthLimit < 1) {\n throw new Error(format(PTR_DEPTH_LIMIT_EXCEEDED, this));\n }\n trackPointerAllocation(segment.message, this);\n if (byteOffset < 0 || byteOffset > segment.byteLength) {\n throw new Error(format(PTR_OFFSET_OUT_OF_BOUNDS, byteOffset));\n }\n }\n [Symbol.toStringTag]() {\n return format(\"Pointer_%d\", this.segment.id);\n }\n toString() {\n return format(\"->%d@%a%s\", this.segment.id, this.byteOffset, dump(this));\n }\n}\n\nclass List extends Pointer {\n static _capnp = {\n displayName: \"List<Generic>\",\n size: ListElementSize.VOID\n };\n constructor(segment, byteOffset, depthLimit) {\n super(segment, byteOffset, depthLimit);\n return new Proxy(this, List.#proxyHandler);\n }\n static #proxyHandler = {\n get(target, prop, receiver) {\n const val = Reflect.get(target, prop, receiver);\n if (val !== undefined) {\n return val;\n }\n if (typeof prop === \"string\") {\n return target.get(+prop);\n }\n }\n };\n get length() {\n return getTargetListLength(this);\n }\n toArray() {\n const { length } = this;\n const res = Array.from({ length });\n for (let i = 0; i < length; i++) {\n res[i] = this.at(i);\n }\n return res;\n }\n get(_index) {\n throw new TypeError(\"Cannot get from a generic list.\");\n }\n set(_index, _value) {\n throw new TypeError(\"Cannot set on a generic list.\");\n }\n at(index) {\n return this.get(index < 0 ? this.length + index : index);\n }\n concat(other) {\n const { length } = this;\n const otherLength = other.length;\n const res = Array.from({ length: length + otherLength });\n for (let i = 0; i < length; i++) res[i] = this.at(i);\n for (let i = 0; i < otherLength; i++) res[i + length] = other.at(i);\n return res;\n }\n some(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n if (cb.call(_this, this.at(i), i, this)) {\n return true;\n }\n }\n return false;\n }\n filter(cb, _this) {\n const res = [];\n for (let i = 0; i < this.length; i++) {\n const value = this.at(i);\n if (cb.call(_this, value, i, this)) {\n res.push(value);\n }\n }\n return res;\n }\n find(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n const value = this.at(i);\n if (cb.call(_this, value, i, this)) {\n return value;\n }\n }\n return undefined;\n }\n findIndex(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n const value = this.at(i);\n if (cb.call(_this, value, i, this)) {\n return i;\n }\n }\n return -1;\n }\n forEach(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n cb.call(_this, this.at(i), i, this);\n }\n }\n map(cb, _this) {\n const { length } = this;\n const res = Array.from({ length });\n for (let i = 0; i < length; i++) {\n res[i] = cb.call(_this, this.at(i), i, this);\n }\n return res;\n }\n flatMap(cb, _this) {\n const res = [];\n for (let i = 0; i < this.length; i++) {\n const r = cb.call(_this, this.at(i), i, this);\n res.push(...Array.isArray(r) ? r : [r]);\n }\n return res;\n }\n every(cb, _this) {\n for (let i = 0; i < this.length; i++) {\n if (!cb.call(_this, this.at(i), i, this)) {\n return false;\n }\n }\n return true;\n }\n reduce(cb, initialValue) {\n let i = 0;\n let res;\n if (initialValue === undefined) {\n res = this.at(0);\n i++;\n } else {\n res = initialValue;\n }\n for (; i < this.length; i++) {\n res = cb(res, this.at(i), i, this);\n }\n return res;\n }\n reduceRight(cb, initialValue) {\n let i = this.length - 1;\n let res;\n if (initialValue === undefined) {\n res = this.at(i);\n i--;\n } else {\n res = initialValue;\n }\n for (; i >= 0; i--) {\n res = cb(res, this.at(i), i, this);\n }\n return res;\n }\n slice(start = 0, end) {\n const length = end ? Math.min(this.length, end) : this.length;\n const res = Array.from({ length: length - start });\n for (let i = start; i < length; i++) {\n res[i] = this.at(i);\n }\n return res;\n }\n join(separator) {\n return this.toArray().join(separator);\n }\n toReversed() {\n return this.toArray().reverse();\n }\n toSorted(compareFn) {\n return this.toArray().sort(compareFn);\n }\n toSpliced(start, deleteCount, ...items) {\n return this.toArray().splice(start, deleteCount, ...items);\n }\n fill(value, start, end) {\n const { length } = this;\n const s = Math.max(start ?? 0, 0);\n const e = Math.min(end ?? length, length);\n for (let i = s; i < e; i++) {\n this.set(i, value);\n }\n return this;\n }\n copyWithin(target, start, end) {\n const { length } = this;\n const e = end ?? length;\n const s = start < 0 ? Math.max(length + start, 0) : start;\n const t = target < 0 ? Math.max(length + target, 0) : target;\n const len = Math.min(e - s, length - t);\n for (let i = 0; i < len; i++) {\n this.set(t + i, this.at(s + i));\n }\n return this;\n }\n keys() {\n return Array.from({ length: this.length }, (_, i) => i)[Symbol.iterator]();\n }\n values() {\n return this.toArray().values();\n }\n entries() {\n return this.toArray().entries();\n }\n flat(depth) {\n return this.toArray().flat(depth);\n }\n with(index, value) {\n return this.toArray().with(index, value);\n }\n includes(_searchElement, _fromIndex) {\n throw new Error(LIST_NO_SEARCH);\n }\n findLast(_cb, _thisArg) {\n throw new Error(LIST_NO_SEARCH);\n }\n findLastIndex(_cb, _t) {\n throw new Error(LIST_NO_SEARCH);\n }\n indexOf(_searchElement, _fromIndex) {\n throw new Error(LIST_NO_SEARCH);\n }\n lastIndexOf(_searchElement, _fromIndex) {\n throw new Error(LIST_NO_SEARCH);\n }\n pop() {\n throw new Error(LIST_NO_MUTABLE);\n }\n push(..._items) {\n throw new Error(LIST_NO_MUTABLE);\n }\n reverse() {\n throw new Error(LIST_NO_MUTABLE);\n }\n shift() {\n throw new Error(LIST_NO_MUTABLE);\n }\n unshift(..._items) {\n throw new Error(LIST_NO_MUTABLE);\n }\n splice(_start, _deleteCount, ..._rest) {\n throw new Error(LIST_NO_MUTABLE);\n }\n sort(_fn) {\n throw new Error(LIST_NO_MUTABLE);\n }\n get [Symbol.unscopables]() {\n return Array.prototype[Symbol.unscopables];\n }\n [Symbol.iterator]() {\n return this.values();\n }\n toJSON() {\n return this.toArray();\n }\n toString() {\n return this.join(\",\");\n }\n toLocaleString(_locales, _options) {\n return this.toString();\n }\n [Symbol.toStringTag]() {\n return \"[object Array]\";\n }\n static [Symbol.toStringTag]() {\n return this._capnp.displayName;\n }\n}\nfunction initList$1(elementSize, length, list, compositeSize) {\n let c;\n switch (elementSize) {\n case ListElementSize.BIT: {\n c = list.segment.allocate(Math.ceil(length / 8));\n break;\n }\n case ListElementSize.BYTE:\n case ListElementSize.BYTE_2:\n case ListElementSize.BYTE_4:\n case ListElementSize.BYTE_8:\n case ListElementSize.POINTER: {\n c = list.segment.allocate(length * getListElementByteLength(elementSize));\n break;\n }\n case ListElementSize.COMPOSITE: {\n if (compositeSize === undefined) {\n throw new Error(format(PTR_COMPOSITE_SIZE_UNDEFINED));\n }\n compositeSize = padToWord(compositeSize);\n const byteLength = getByteLength(compositeSize) * length;\n c = list.segment.allocate(byteLength + 8);\n setStructPointer(length, compositeSize, c);\n break;\n }\n case ListElementSize.VOID: {\n setListPointer(0, elementSize, length, list);\n return;\n }\n default: {\n throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize));\n }\n }\n const res = initPointer(c.segment, c.byteOffset, list);\n setListPointer(\n res.offsetWords,\n elementSize,\n length,\n res.pointer,\n compositeSize\n );\n}\n\nclass Data extends List {\n static fromPointer(pointer) {\n validate(PointerType.LIST, pointer, ListElementSize.BYTE);\n return this._fromPointerUnchecked(pointer);\n }\n static _fromPointerUnchecked(pointer) {\n return new this(\n pointer.segment,\n pointer.byteOffset,\n pointer._capnp.depthLimit\n );\n }\n /**\n * Copy the contents of `src` into this Data pointer. If `src` is smaller than the length of this pointer then the\n * remaining bytes will be zeroed out. Extra bytes in `src` are ignored.\n *\n * @param src The source buffer.\n */\n // TODO: Would be nice to have a way to zero-copy a buffer by allocating a new segment into the message with that\n // buffer data.\n copyBuffer(src) {\n const c = getContent(this);\n const dstLength = this.length;\n const srcLength = src.byteLength;\n const i = src instanceof ArrayBuffer ? new Uint8Array(src) : new Uint8Array(\n src.buffer,\n src.byteOffset,\n Math.min(dstLength, srcLength)\n );\n const o = new Uint8Array(c.segment.buffer, c.byteOffset, this.length);\n o.set(i);\n if (dstLength > srcLength) {\n o.fill(0, srcLength, dstLength);\n }\n }\n /**\n * Read a byte from the specified offset.\n *\n * @param byteOffset The byte offset to read.\n * @returns The byte value.\n */\n get(byteOffset) {\n const c = getContent(this);\n return c.segment.getUint8(c.byteOffset + byteOffset);\n }\n /**\n * Write a byte at the specified offset.\n *\n * @param byteOffset The byte offset to set.\n * @param value The byte value to set.\n */\n set(byteOffset, value) {\n const c = getContent(this);\n c.segment.setUint8(c.byteOffset + byteOffset, value);\n }\n /**\n * Creates a **copy** of the underlying buffer data and returns it as an ArrayBuffer.\n *\n * To obtain a reference to the underlying buffer instead, use `toUint8Array()` or `toDataView()`.\n *\n * @returns A copy of this data buffer.\n */\n toArrayBuffer() {\n const c = getContent(this);\n return c.segment.buffer.slice(c.byteOffset, c.byteOffset + this.length);\n }\n /**\n * Convert this Data pointer to a DataView representing the pointer's contents.\n *\n * WARNING: The DataView references memory from a message segment, so do not venture outside the bounds of the\n * DataView or else BAD THINGS.\n *\n * @returns A live reference to the underlying buffer.\n */\n toDataView() {\n const c = getContent(this);\n return new DataView(c.segment.buffer, c.byteOffset, this.length);\n }\n [Symbol.toStringTag]() {\n return `Data_${super.toString()}`;\n }\n /**\n * Convert this Data pointer to a Uint8Array representing the pointer's contents.\n *\n * WARNING: The Uint8Array references memory from a message segment, so do not venture outside the bounds of the\n * Uint8Array or else BAD THINGS.\n *\n * @returns A live reference to the underlying buffer.\n */\n toUint8Array() {\n const c = getContent(this);\n return new Uint8Array(c.segment.buffer, c.byteOffset, this.length);\n }\n}\n\nconst textEncoder = new TextEncoder();\nconst textDecoder = new TextDecoder();\nclass Text extends List {\n static fromPointer(pointer) {\n validate(PointerType.LIST, pointer, ListElementSize.BYTE);\n return textFromPointerUnchecked(pointer);\n }\n /**\n * Read a utf-8 encoded string value from this pointer.\n *\n * @param index The index at which to start reading; defaults to zero.\n * @returns The string value.\n */\n get(index = 0) {\n if (isNull(this)) {\n return \"\";\n }\n const c = getContent(this);\n return textDecoder.decode(\n new Uint8Array(\n c.segment.buffer,\n c.byteOffset + index,\n this.length - index\n )\n );\n }\n /**\n * Get the number of utf-8 encoded bytes in this text. This does **not** include the NUL byte.\n *\n * @returns The number of bytes allocated for the text.\n */\n get length() {\n return super.length - 1;\n }\n /**\n * Write a utf-8 encoded string value starting at the specified index.\n *\n * @param index The index at which to start copying the string. Note that if this is not zero the bytes\n * before `index` will be left as-is. All bytes after `index` will be overwritten.\n * @param value The string value to set.\n */\n set(index, value) {\n const src = textEncoder.encode(value);\n const dstLength = src.byteLength + index;\n let c;\n let original;\n if (!isNull(this)) {\n c = getContent(this);\n const originalLength = Math.min(this.length, index);\n original = new Uint8Array(\n c.segment.buffer.slice(c.byteOffset, c.byteOffset + originalLength)\n );\n erase(this);\n }\n initList$1(ListElementSize.BYTE, dstLength + 1, this);\n c = getContent(this);\n const dst = new Uint8Array(c.segment.buffer, c.byteOffset, dstLength);\n if (original) {\n dst.set(original);\n }\n dst.set(src, index);\n }\n toString() {\n return this.get();\n }\n toJSON() {\n return this.get();\n }\n [Symbol.toPrimitive]() {\n return this.get();\n }\n [Symbol.toStringTag]() {\n return `Text_${super.toString()}`;\n }\n}\nfunction textFromPointerUnchecked(pointer) {\n return new Text(\n pointer.segment,\n pointer.byteOffset,\n pointer._capnp.depthLimit\n );\n}\n\nclass Struct extends Pointer {\n static _capnp = {\n displayName: \"Struct\"\n };\n /**\n * Create a new pointer to a struct.\n *\n * @param segment The segment the pointer resides in.\n * @param byteOffset The offset from the beginning of the segment to the beginning of the pointer data.\n * @param depthLimit The nesting depth limit for this object.\n * @param compositeIndex If set, then this pointer is actually a reference to a composite list\n * (`this._getPointerTargetType() === PointerType.LIST`), and this number is used as the index of the struct within\n * the list. It is not valid to call `initStruct()` on a composite struct – the struct contents are initialized when\n * the list pointer is initialized.\n */\n constructor(segment, byteOffset, depthLimit = MAX_DEPTH, compositeIndex) {\n super(segment, byteOffset, depthLimit);\n this._capnp.compositeIndex = compositeIndex;\n this._capnp.compositeList = compositeIndex !== undefined;\n }\n static [Symbol.toStringTag]() {\n return this._capnp.displayName;\n }\n [Symbol.toStringTag]() {\n return `Struct_${super.toString()}${this._capnp.compositeIndex === undefined ? \"\" : `,ci:${this._capnp.compositeIndex}`} > ${getContent(this).toString()}`;\n }\n}\nclass AnyStruct extends Struct {\n static _capnp = {\n displayName: \"AnyStruct\",\n id: \"0\",\n size: new ObjectSize(0, 0)\n };\n}\n\nclass FixedAnswer {\n struct() {\n return Promise.resolve(this.structSync());\n }\n}\n\nclass ErrorAnswer extends FixedAnswer {\n constructor(err) {\n super();\n this.err = err;\n }\n structSync() {\n throw this.err;\n }\n pipelineCall(_transform, _call) {\n return this;\n }\n pipelineClose(_transform) {\n throw this.err;\n }\n}\n\nclass ErrorClient {\n constructor(err) {\n this.err = err;\n }\n call(_call) {\n return new ErrorAnswer(this.err);\n }\n close() {\n throw this.err;\n }\n}\nfunction clientOrNull(client) {\n return client ?? new ErrorClient(new Error(RPC_NULL_CLIENT));\n}\n\nconst TMP_WORD = new DataView(new ArrayBuffer(8));\nfunction initStruct(size, s) {\n if (s._capnp.compositeIndex !== undefined) {\n throw new Error(format(PTR_INIT_COMPOSITE_STRUCT, s));\n }\n erase(s);\n const c = s.segment.allocate(getByteLength(size));\n const res = initPointer(c.segment, c.byteOffset, s);\n setStructPointer(res.offsetWords, size, res.pointer);\n}\nfunction initStructAt(index, StructClass, p) {\n const s = getPointerAs(index, StructClass, p);\n initStruct(StructClass._capnp.size, s);\n return s;\n}\nfunction checkPointerBounds(index, s) {\n const { pointerLength } = getSize(s);\n if (index < 0 || index >= pointerLength) {\n throw new Error(\n format(PTR_STRUCT_POINTER_OUT_OF_BOUNDS, s, index, pointerLength)\n );\n }\n}\nfunction getInterfaceClientOrNullAt(index, s) {\n return getInterfaceClientOrNull(getPointer(index, s));\n}\nfunction getInterfaceClientOrNull(p) {\n let client = null;\n const capId = getInterfacePointer(p);\n const { capTable } = p.segment.message._capnp;\n if (capTable && capId >= 0 && capId < capTable.length) {\n client = capTable[capId];\n }\n return clientOrNull(client);\n}\nfunction resize(dstSize, s) {\n const srcSize = getSize(s);\n const srcContent = getContent(s);\n const dstContent = s.segment.allocate(getByteLength(dstSize));\n dstContent.segment.copyWords(\n dstContent.byteOffset,\n srcContent.segment,\n srcContent.byteOffset,\n Math.min(getDataWordLength(srcSize), getDataWordLength(dstSize))\n );\n const res = initPointer(dstContent.segment, dstContent.byteOffset, s);\n setStructPointer(res.offsetWords, dstSize, res.pointer);\n for (let i = 0; i < Math.min(srcSize.pointerLength, dstSize.pointerLength); i++) {\n const srcPtr = new Pointer(\n srcContent.segment,\n srcContent.byteOffset + srcSize.dataByteLength + i * 8\n );\n if (isNull(srcPtr)) {\n continue;\n }\n const srcPtrTarget = followFars(srcPtr);\n const srcPtrContent = getContent(srcPtr);\n const dstPtr = new Pointer(\n dstContent.segment,\n dstContent.byteOffset + dstSize.dataByteLength + i * 8\n );\n if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) {\n srcPtrContent.byteOffset -= 8;\n }\n const r = initPointer(\n srcPtrContent.segment,\n srcPtrContent.byteOffset,\n dstPtr\n );\n const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3;\n const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4);\n r.pointer.segment.setUint32(r.pointer.byteOffset, a | r.offsetWords << 2);\n r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b);\n }\n srcContent.segment.fillZeroWords(\n srcContent.byteOffset,\n getWordLength(srcSize)\n );\n}\nfunction getAs(StructClass, s) {\n return new StructClass(\n s.segment,\n s.byteOffset,\n s._capnp.depthLimit,\n s._capnp.compositeIndex\n );\n}\nfunction getBit(bitOffset, s, defaultMask) {\n const byteOffset = Math.floor(bitOffset / 8);\n const bitMask = 1 << bitOffset % 8;\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n const v = ds.segment.getUint8(ds.byteOffset + byteOffset);\n if (defaultMask === undefined) {\n return (v & bitMask) !== 0;\n }\n const defaultValue = defaultMask.getUint8(0);\n return ((v ^ defaultValue) & bitMask) !== 0;\n}\nfunction getData(index, s, defaultValue) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n if (isNull(l)) {\n if (defaultValue) {\n copyFrom(defaultValue, l);\n } else {\n initList$1(ListElementSize.BYTE, 0, l);\n }\n }\n return l;\n}\nfunction getDataSection(s) {\n return getContent(s);\n}\nfunction getFloat32(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getFloat32(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getFloat32(0, NATIVE_LITTLE_ENDIAN);\n}\nfunction getFloat64(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true);\n TMP_WORD.setUint32(0, lo, NATIVE_LITTLE_ENDIAN);\n TMP_WORD.setUint32(4, hi, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getFloat64(0, NATIVE_LITTLE_ENDIAN);\n }\n return ds.segment.getFloat64(ds.byteOffset + byteOffset);\n}\nfunction getInt16(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getInt16(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true);\n TMP_WORD.setUint16(0, v, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getInt16(0, NATIVE_LITTLE_ENDIAN);\n}\nfunction getInt32(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getInt32(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true);\n TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getInt32(0, NATIVE_LITTLE_ENDIAN);\n}\nfunction getInt64(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getBigInt64(0, NATIVE_LITTLE_ENDIAN);\n }\n return ds.segment.getInt64(ds.byteOffset + byteOffset);\n}\nfunction getInt8(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getInt8(ds.byteOffset + byteOffset);\n }\n const v = ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0);\n TMP_WORD.setUint8(0, v);\n return TMP_WORD.getInt8(0);\n}\nfunction getList(index, ListClass, s, defaultValue) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n if (isNull(l)) {\n if (defaultValue) {\n copyFrom(defaultValue, l);\n } else {\n initList$1(ListClass._capnp.size, 0, l, ListClass._capnp.compositeSize);\n }\n } else if (ListClass._capnp.compositeSize !== undefined) {\n const srcSize = getTargetCompositeListSize(l);\n const dstSize = ListClass._capnp.compositeSize;\n if (dstSize.dataByteLength > srcSize.dataByteLength || dstSize.pointerLength > srcSize.pointerLength) {\n const srcContent = getContent(l);\n const srcLength = getTargetListLength(l);\n const dstContent = l.segment.allocate(\n getByteLength(dstSize) * srcLength + 8\n );\n const res = initPointer(dstContent.segment, dstContent.byteOffset, l);\n setListPointer(\n res.offsetWords,\n ListClass._capnp.size,\n srcLength,\n res.pointer,\n dstSize\n );\n setStructPointer(srcLength, dstSize, dstContent);\n dstContent.byteOffset += 8;\n for (let i = 0; i < srcLength; i++) {\n const srcElementOffset = srcContent.byteOffset + i * getByteLength(srcSize);\n const dstElementOffset = dstContent.byteOffset + i * getByteLength(dstSize);\n dstContent.segment.copyWords(\n dstElementOffset,\n srcContent.segment,\n srcElementOffset,\n getWordLength(srcSize)\n );\n for (let j = 0; j < srcSize.pointerLength; j++) {\n const srcPtr = new Pointer(\n srcContent.segment,\n srcElementOffset + srcSize.dataByteLength + j * 8\n );\n const dstPtr = new Pointer(\n dstContent.segment,\n dstElementOffset + dstSize.dataByteLength + j * 8\n );\n const srcPtrTarget = followFars(srcPtr);\n const srcPtrContent = getContent(srcPtr);\n if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) {\n srcPtrContent.byteOffset -= 8;\n }\n const r = initPointer(\n srcPtrContent.segment,\n srcPtrContent.byteOffset,\n dstPtr\n );\n const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3;\n const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4);\n r.pointer.segment.setUint32(\n r.pointer.byteOffset,\n a | r.offsetWords << 2\n );\n r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b);\n }\n }\n srcContent.segment.fillZeroWords(\n srcContent.byteOffset,\n getWordLength(srcSize) * srcLength\n );\n }\n }\n return l;\n}\nfunction getPointer(index, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n return new Pointer(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n}\nfunction getPointerAs(index, PointerClass, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n return new PointerClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n}\nfunction getPointerSection(s) {\n const ps = getContent(s);\n ps.byteOffset += padToWord$1(getSize(s).dataByteLength);\n return ps;\n}\nfunction getSize(s) {\n if (s._capnp.compositeIndex !== undefined) {\n const c = getContent(s, true);\n c.byteOffset -= 8;\n return getStructSize(c);\n }\n return getTargetStructSize(s);\n}\nfunction getStruct(index, StructClass, s, defaultValue) {\n const t = getPointerAs(index, StructClass, s);\n if (isNull(t)) {\n if (defaultValue) {\n copyFrom(defaultValue, t);\n } else {\n initStruct(StructClass._capnp.size, t);\n }\n } else {\n validate(PointerType.STRUCT, t);\n const ts = getTargetStructSize(t);\n if (ts.dataByteLength < StructClass._capnp.size.dataByteLength || ts.pointerLength < StructClass._capnp.size.pointerLength) {\n resize(StructClass._capnp.size, t);\n }\n }\n return t;\n}\nfunction getText(index, s, defaultValue) {\n const t = Text.fromPointer(getPointer(index, s));\n if (isNull(t) && defaultValue) {\n t.set(0, defaultValue);\n }\n return t.get(0);\n}\nfunction getUint16(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getUint16(ds.byteOffset + byteOffset);\n }\n return ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true);\n}\nfunction getUint32(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getUint32(ds.byteOffset + byteOffset);\n }\n return ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n}\nfunction getUint64(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true);\n const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN);\n TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN);\n return TMP_WORD.getBigUint64(0, NATIVE_LITTLE_ENDIAN);\n }\n return ds.segment.getUint64(ds.byteOffset + byteOffset);\n}\nfunction getUint8(byteOffset, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask === undefined) {\n return ds.segment.getUint8(ds.byteOffset + byteOffset);\n }\n return ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0);\n}\nfunction initData(index, length, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n erase(l);\n initList$1(ListElementSize.BYTE, length, l);\n return l;\n}\nfunction initList(index, ListClass, length, s) {\n checkPointerBounds(index, s);\n const ps = getPointerSection(s);\n ps.byteOffset += index * 8;\n const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);\n erase(l);\n initList$1(ListClass._capnp.size, length, l, ListClass._capnp.compositeSize);\n return l;\n}\nfunction setBit(bitOffset, value, s, defaultMask) {\n const byteOffset = Math.floor(bitOffset / 8);\n const bitMask = 1 << bitOffset % 8;\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n const b = ds.segment.getUint8(ds.byteOffset + byteOffset);\n if (defaultMask !== undefined) {\n value = (defaultMask.getUint8(0) & bitMask) === 0 ? value : !value;\n }\n ds.segment.setUint8(\n ds.byteOffset + byteOffset,\n value ? b | bitMask : b & ~bitMask\n );\n}\nfunction setFloat32(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setFloat32(0, value, NATIVE_LITTLE_ENDIAN);\n const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setFloat32(ds.byteOffset + byteOffset, value);\n}\nfunction setFloat64(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setFloat64(0, value, NATIVE_LITTLE_ENDIAN);\n const lo = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n const hi = TMP_WORD.getUint32(4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, lo);\n ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi);\n return;\n }\n ds.segment.setFloat64(ds.byteOffset + byteOffset, value);\n}\nfunction setInt16(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setInt16(0, value, NATIVE_LITTLE_ENDIAN);\n const v = TMP_WORD.getUint16(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint16(0, true);\n ds.segment.setUint16(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setInt16(ds.byteOffset + byteOffset, value);\n}\nfunction setInt32(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setInt32(0, value, NATIVE_LITTLE_ENDIAN);\n const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setInt32(ds.byteOffset + byteOffset, value);\n}\nfunction setInt64(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setBigInt64(0, value, NATIVE_LITTLE_ENDIAN);\n const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, lo);\n ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi);\n return;\n }\n ds.segment.setInt64(ds.byteOffset + byteOffset, value);\n}\nfunction setInt8(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setInt8(0, value);\n const v = TMP_WORD.getUint8(0) ^ defaultMask.getUint8(0);\n ds.segment.setUint8(ds.byteOffset + byteOffset, v);\n return;\n }\n ds.segment.setInt8(ds.byteOffset + byteOffset, value);\n}\nfunction setText(index, value, s) {\n Text.fromPointer(getPointer(index, s)).set(0, value);\n}\nfunction setUint16(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 2, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n value ^= defaultMask.getUint16(0, true);\n }\n ds.segment.setUint16(ds.byteOffset + byteOffset, value);\n}\nfunction setUint32(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 4, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n value ^= defaultMask.getUint32(0, true);\n }\n ds.segment.setUint32(ds.byteOffset + byteOffset, value);\n}\nfunction setUint64(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 8, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n TMP_WORD.setBigUint64(0, value, NATIVE_LITTLE_ENDIAN);\n const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true);\n const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true);\n ds.segment.setUint32(ds.byteOffset + byteOffset, lo);\n ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi);\n return;\n }\n ds.segment.setUint64(ds.byteOffset + byteOffset, value);\n}\nfunction setUint8(byteOffset, value, s, defaultMask) {\n checkDataBounds(byteOffset, 1, s);\n const ds = getDataSection(s);\n if (defaultMask !== undefined) {\n value ^= defaultMask.getUint8(0);\n }\n ds.segment.setUint8(ds.byteOffset + byteOffset, value);\n}\nfunction testWhich(name, found, wanted, s) {\n if (found !== wanted) {\n throw new Error(format(PTR_INVALID_UNION_ACCESS, s, name, found, wanted));\n }\n}\nfunction checkDataBounds(byteOffset, byteLength, s) {\n const { dataByteLength } = getSize(s);\n if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > dataByteLength) {\n throw new Error(\n format(\n PTR_STRUCT_DATA_OUT_OF_BOUNDS,\n s,\n byteLength,\n byteOffset,\n dataByteLength\n )\n );\n }\n}\n\nexport { Pointer as $, setInt16 as A, getInt32 as B, setInt32 as C, getInt64 as D, setInt64 as E, getFloat32 as F, setFloat32 as G, getFloat64 as H, setFloat64 as I, getData as J, initData as K, List as L, ListElementSize as M, format as N, ObjectSize as O, SEG_NOT_WORD_ALIGNED as P, DEFAULT_BUFFER_SIZE as Q, SEG_ID_OUT_OF_BOUNDS as R, Struct as S, padToWord$1 as T, SEG_GET_NON_ZERO_SINGLE as U, MIN_SINGLE_SEGMENT_GROWTH as V, assertNever as W, MSG_PACK_NOT_WORD_ALIGNED as X, PACK_SPAN_THRESHOLD as Y, MAX_SEGMENT_LENGTH as Z, SEG_SIZE_OVERFLOW as _, adopt as a, setListPointer as a$, NATIVE_LITTLE_ENDIAN as a0, SEG_REPLACEMENT_BUFFER_TOO_SMALL as a1, DEFAULT_TRAVERSE_LIMIT as a2, MSG_INVALID_FRAME_HEADER as a3, MSG_SEGMENT_TOO_SMALL as a4, MSG_SEGMENT_OUT_OF_BOUNDS as a5, dumpBuffer as a6, validate as a7, PointerType as a8, getTargetStructSize as a9, getCapabilityId as aA, getContent as aB, getDataSection as aC, getFarSegmentId as aD, getInterfaceClientOrNullAt as aE, getInterfacePointer as aF, getListByteLength as aG, getListElementByteLength as aH, getListElementSize as aI, getListLength as aJ, getOffsetWords as aK, getPointerAs as aL, getPointerSection as aM, getPointerType as aN, getSize as aO, getStructDataWords as aP, getStructPointerLength as aQ, getStructSize as aR, getTargetCompositeListSize as aS, getTargetCompositeListTag as aT, getTargetListElementSize as aU, getTargetListLength as aV, initPointer as aW, isDoubleFar as aX, relocateTo as aY, setFarPointer as aZ, setInterfacePointer as a_, resize as aa, initStruct as ab, MAX_DEPTH as ac, getTargetPointerType as ad, FixedAnswer as ae, getInterfaceClientOrNull as af, ErrorAnswer as ag, RPC_CALL_QUEUE_FULL as ah, INVARIANT_UNREACHABLE_CODE as ai, RPC_QUEUE_CALL_CANCEL as aj, RPC_NULL_CLIENT as ak, RPC_METHOD_ERROR as al, RPC_METHOD_NOT_IMPLEMENTED as am, pad as an, PointerAllocationResult as ao, add as ap, checkDataBounds as aq, checkPointerBounds as ar, copyFromInterface as as, copyFromList as at, copyFromStruct as au, dump as av, erase as aw, erasePointer as ax, followFar as ay, followFars as az, getUint16 as b, setStructPointer as b0, trackPointerAllocation as b1, Data as b2, Text as b3, ErrorClient as b4, RPC_ZERO_REF as b5, RPC_ERROR as b6, RPC_FULFILL_ALREADY_CALLED as b7, NOT_IMPLEMENTED as b8, RPC_IMPORT_CLOSED as b9, AnyStruct as ba, RPC_QUESTION_ID_REUSED as bb, RPC_NO_MAIN_INTERFACE as bc, RPC_BAD_TARGET as bd, RPC_UNKNOWN_CAP_DESCRIPTOR as be, RPC_FINISH_UNKNOWN_ANSWER as bf, RPC_RETURN_FOR_UNKNOWN_QUESTION as bg, RPC_UNKNOWN_ANSWER_ID as bh, RPC_UNKNOWN_EXPORT_ID as bi, Orphan as bj, clientOrNull as bk, copyFrom as c, disown as d, getUint32 as e, setUint32 as f, getPointer as g, getBit as h, isNull as i, setBit as j, getStruct as k, initStructAt as l, getList as m, initList as n, getUint8 as o, setUint8 as p, getText as q, setText as r, setUint16 as s, testWhich as t, getUint64 as u, setUint64 as v, getAs as w, getInt8 as x, setInt8 as y, getInt16 as z };\n","import { L as List, M as ListElementSize, c as copyFrom } from './capnp-es.0-_cOx6D.mjs';\n\nfunction CompositeList(CompositeClass) {\n return class extends List {\n static _capnp = {\n compositeSize: CompositeClass._capnp.size,\n displayName: `List<${CompositeClass._capnp.displayName}>`,\n size: ListElementSize.COMPOSITE\n };\n get(index) {\n return new CompositeClass(\n this.segment,\n this.byteOffset,\n this._capnp.depthLimit - 1,\n index\n );\n }\n set(index, value) {\n copyFrom(value, this.get(index));\n }\n [Symbol.toStringTag]() {\n return `Composite_${super.toString()},cls:${CompositeClass.toString()}`;\n }\n };\n}\n\nfunction _makePrimitiveMaskFn(byteLength, setter) {\n return (x) => {\n const dv = new DataView(new ArrayBuffer(byteLength));\n setter.call(dv, 0, x, true);\n return dv;\n };\n}\nconst getFloat32Mask = _makePrimitiveMaskFn(\n 4,\n DataView.prototype.setFloat32\n);\nconst getFloat64Mask = _makePrimitiveMaskFn(\n 8,\n DataView.prototype.setFloat64\n);\nconst getInt16Mask = _makePrimitiveMaskFn(\n 2,\n DataView.prototype.setInt16\n);\nconst getInt32Mask = _makePrimitiveMaskFn(\n 4,\n DataView.prototype.setInt32\n);\nconst getInt64Mask = _makePrimitiveMaskFn(\n 8,\n DataView.prototype.setBigInt64\n);\nconst getInt8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setInt8);\nconst getUint16Mask = _makePrimitiveMaskFn(\n 2,\n DataView.prototype.setUint16\n);\nconst getUint32Mask = _makePrimitiveMaskFn(\n 4,\n DataView.prototype.setUint32\n);\nconst getUint64Mask = _makePrimitiveMaskFn(\n 8,\n DataView.prototype.setBigUint64\n);\nconst getUint8Mask = _makePrimitiveMaskFn(\n 1,\n DataView.prototype.setUint8\n);\nfunction getBitMask(value, bitOffset) {\n const dv = new DataView(new ArrayBuffer(1));\n if (!value) {\n return dv;\n }\n dv.setUint8(0, 1 << bitOffset % 8);\n return dv;\n}\n\nexport { CompositeList as C, getUint8Mask as a, getUint16Mask as b, getFloat32Mask as c, getFloat64Mask as d, getInt16Mask as e, getInt32Mask as f, getBitMask as g, getInt64Mask as h, getInt8Mask as i, getUint32Mask as j, getUint64Mask as k };\n","import { S as Struct, O as ObjectSize, q as getText, r as setText, b as getUint16, s as setUint16, a as adopt, g as getPointer, d as disown, m as getList, i as isNull, n as initList, c as copyFrom, t as testWhich, w as getAs, u as getUint64, v as setUint64, h as getBit, j as setBit, e as getUint32, f as setUint32, k as getStruct, l as initStructAt, x as getInt8, y as setInt8, z as getInt16, A as setInt16, B as getInt32, C as setInt32, D as getInt64, E as setInt64, o as getUint8, p as setUint8, F as getFloat32, G as setFloat32, H as getFloat64, I as setFloat64, J as getData, K as initData } from '../shared/capnp-es.0-_cOx6D.mjs';\nimport { b as getUint16Mask, C as CompositeList } from '../shared/capnp-es.BvfUH5E6.mjs';\n\nconst _capnpFileId = BigInt(\"0xa93fc509624c72d9\");\nclass Node_Parameter extends Struct {\n static _capnp = {\n displayName: \"Parameter\",\n id: \"b9521bccf10fa3b1\",\n size: new ObjectSize(0, 1)\n };\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n toString() {\n return \"Node_Parameter_\" + super.toString();\n }\n}\nclass Node_NestedNode extends Struct {\n static _capnp = {\n displayName: \"NestedNode\",\n id: \"debf55bbfa0fc242\",\n size: new ObjectSize(8, 1)\n };\n /**\n * Unqualified symbol name. Unlike Node.displayName, this *can* be used programmatically.\n *\n * (On Zooko's triangle, this is the node's petname according to its parent scope.)\n *\n */\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * ID of the nested node. Typically, the target node's scopeId points back to this node, but\n * robust code should avoid relying on this.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n toString() {\n return \"Node_NestedNode_\" + super.toString();\n }\n}\nclass Node_SourceInfo_Member extends Struct {\n static _capnp = {\n displayName: \"Member\",\n id: \"c2ba9038898e1fa2\",\n size: new ObjectSize(0, 1)\n };\n /**\n * Doc comment on the member.\n *\n */\n get docComment() {\n return getText(0, this);\n }\n set docComment(value) {\n setText(0, value, this);\n }\n toString() {\n return \"Node_SourceInfo_Member_\" + super.toString();\n }\n}\nclass Node_SourceInfo extends Struct {\n static Member = Node_SourceInfo_Member;\n static _capnp = {\n displayName: \"SourceInfo\",\n id: \"f38e1de3041357ae\",\n size: new ObjectSize(8, 2)\n };\n static _Members;\n /**\n * ID of the Node which this info describes.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * The top-level doc comment for the Node.\n *\n */\n get docComment() {\n return getText(0, this);\n }\n set docComment(value) {\n setText(0, value, this);\n }\n _adoptMembers(value) {\n adopt(value, getPointer(1, this));\n }\n _disownMembers() {\n return disown(this.members);\n }\n /**\n * Information about each member -- i.e. fields (for structs), enumerants (for enums), or\n * methods (for interfaces).\n *\n * This list is the same length and order as the corresponding list in the Node, i.e.\n * Node.struct.fields, Node.enum.enumerants, or Node.interface.methods.\n *\n */\n get members() {\n return getList(1, Node_SourceInfo._Members, this);\n }\n _hasMembers() {\n return !isNull(getPointer(1, this));\n }\n _initMembers(length) {\n return initList(1, Node_SourceInfo._Members, length, this);\n }\n set members(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Node_SourceInfo_\" + super.toString();\n }\n}\nclass Node_Struct extends Struct {\n static _capnp = {\n displayName: \"struct\",\n id: \"9ea0b19b37fb4435\",\n size: new ObjectSize(40, 6)\n };\n static _Fields;\n /**\n * Size of the data section, in words.\n *\n */\n get dataWordCount() {\n return getUint16(14, this);\n }\n set dataWordCount(value) {\n setUint16(14, value, this);\n }\n /**\n * Size of the pointer section, in pointers (which are one word each).\n *\n */\n get pointerCount() {\n return getUint16(24, this);\n }\n set pointerCount(value) {\n setUint16(24, value, this);\n }\n /**\n * The preferred element size to use when encoding a list of this struct. If this is anything\n * other than `inlineComposite` then the struct is one word or less in size and is a candidate\n * for list packing optimization.\n *\n */\n get preferredListEncoding() {\n return getUint16(26, this);\n }\n set preferredListEncoding(value) {\n setUint16(26, value, this);\n }\n /**\n * If true, then this \"struct\" node is actually not an independent node, but merely represents\n * some named union or group within a particular parent struct. This node's scopeId refers\n * to the parent struct, which may itself be a union/group in yet another struct.\n *\n * All group nodes share the same dataWordCount and pointerCount as the top-level\n * struct, and their fields live in the same ordinal and offset spaces as all other fields in\n * the struct.\n *\n * Note that a named union is considered a special kind of group -- in fact, a named union\n * is exactly equivalent to a group that contains nothing but an unnamed union.\n *\n */\n get isGroup() {\n return getBit(224, this);\n }\n set isGroup(value) {\n setBit(224, value, this);\n }\n /**\n * Number of fields in this struct which are members of an anonymous union, and thus may\n * overlap. If this is non-zero, then a 16-bit discriminant is present indicating which\n * of the overlapping fields is active. This can never be 1 -- if it is non-zero, it must be\n * two or more.\n *\n * Note that the fields of an unnamed union are considered fields of the scope containing the\n * union -- an unnamed union is not its own group. So, a top-level struct may contain a\n * non-zero discriminant count. Named unions, on the other hand, are equivalent to groups\n * containing unnamed unions. So, a named union has its own independent schema node, with\n * `isGroup` = true.\n *\n */\n get discriminantCount() {\n return getUint16(30, this);\n }\n set discriminantCount(value) {\n setUint16(30, value, this);\n }\n /**\n * If `discriminantCount` is non-zero, this is the offset of the union discriminant, in\n * multiples of 16 bits.\n *\n */\n get discriminantOffset() {\n return getUint32(32, this);\n }\n set discriminantOffset(value) {\n setUint32(32, value, this);\n }\n _adoptFields(value) {\n adopt(value, getPointer(3, this));\n }\n _disownFields() {\n return disown(this.fields);\n }\n /**\n * Fields defined within this scope (either the struct's top-level fields, or the fields of\n * a particular group; see `isGroup`).\n *\n * The fields are sorted by ordinal number, but note that because groups share the same\n * ordinal space, the field's index in this list is not necessarily exactly its ordinal.\n * On the other hand, the field's position in this list does remain the same even as the\n * protocol evolves, since it is not possible to insert or remove an earlier ordinal.\n * Therefore, for most use cases, if you want to identify a field by number, it may make the\n * most sense to use the field's index in this list rather than its ordinal.\n *\n */\n get fields() {\n return getList(3, Node_Struct._Fields, this);\n }\n _hasFields() {\n return !isNull(getPointer(3, this));\n }\n _initFields(length) {\n return initList(3, Node_Struct._Fields, length, this);\n }\n set fields(value) {\n copyFrom(value, getPointer(3, this));\n }\n toString() {\n return \"Node_Struct_\" + super.toString();\n }\n}\nclass Node_Enum extends Struct {\n static _capnp = {\n displayName: \"enum\",\n id: \"b54ab3364333f598\",\n size: new ObjectSize(40, 6)\n };\n static _Enumerants;\n _adoptEnumerants(value) {\n adopt(value, getPointer(3, this));\n }\n _disownEnumerants() {\n return disown(this.enumerants);\n }\n /**\n * Enumerants ordered by numeric value (ordinal).\n *\n */\n get enumerants() {\n return getList(3, Node_Enum._Enumerants, this);\n }\n _hasEnumerants() {\n return !isNull(getPointer(3, this));\n }\n _initEnumerants(length) {\n return initList(3, Node_Enum._Enumerants, length, this);\n }\n set enumerants(value) {\n copyFrom(value, getPointer(3, this));\n }\n toString() {\n return \"Node_Enum_\" + super.toString();\n }\n}\nclass Node_Interface extends Struct {\n static _capnp = {\n displayName: \"interface\",\n id: \"e82753cff0c2218f\",\n size: new ObjectSize(40, 6)\n };\n static _Methods;\n static _Superclasses;\n _adoptMethods(value) {\n adopt(value, getPointer(3, this));\n }\n _disownMethods() {\n return disown(this.methods);\n }\n /**\n * Methods ordered by ordinal.\n *\n */\n get methods() {\n return getList(3, Node_Interface._Methods, this);\n }\n _hasMethods() {\n return !isNull(getPointer(3, this));\n }\n _initMethods(length) {\n return initList(3, Node_Interface._Methods, length, this);\n }\n set methods(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptSuperclasses(value) {\n adopt(value, getPointer(4, this));\n }\n _disownSuperclasses() {\n return disown(this.superclasses);\n }\n /**\n * Superclasses of this interface.\n *\n */\n get superclasses() {\n return getList(4, Node_Interface._Superclasses, this);\n }\n _hasSuperclasses() {\n return !isNull(getPointer(4, this));\n }\n _initSuperclasses(length) {\n return initList(4, Node_Interface._Superclasses, length, this);\n }\n set superclasses(value) {\n copyFrom(value, getPointer(4, this));\n }\n toString() {\n return \"Node_Interface_\" + super.toString();\n }\n}\nclass Node_Const extends Struct {\n static _capnp = {\n displayName: \"const\",\n id: \"b18aa5ac7a0d9420\",\n size: new ObjectSize(40, 6)\n };\n _adoptType(value) {\n adopt(value, getPointer(3, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(3, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(3, this));\n }\n _initType() {\n return initStructAt(3, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptValue(value) {\n adopt(value, getPointer(4, this));\n }\n _disownValue() {\n return disown(this.value);\n }\n get value() {\n return getStruct(4, Value, this);\n }\n _hasValue() {\n return !isNull(getPointer(4, this));\n }\n _initValue() {\n return initStructAt(4, Value, this);\n }\n set value(value) {\n copyFrom(value, getPointer(4, this));\n }\n toString() {\n return \"Node_Const_\" + super.toString();\n }\n}\nclass Node_Annotation extends Struct {\n static _capnp = {\n displayName: \"annotation\",\n id: \"ec1619d4400a0290\",\n size: new ObjectSize(40, 6)\n };\n _adoptType(value) {\n adopt(value, getPointer(3, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(3, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(3, this));\n }\n _initType() {\n return initStructAt(3, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(3, this));\n }\n get targetsFile() {\n return getBit(112, this);\n }\n set targetsFile(value) {\n setBit(112, value, this);\n }\n get targetsConst() {\n return getBit(113, this);\n }\n set targetsConst(value) {\n setBit(113, value, this);\n }\n get targetsEnum() {\n return getBit(114, this);\n }\n set targetsEnum(value) {\n setBit(114, value, this);\n }\n get targetsEnumerant() {\n return getBit(115, this);\n }\n set targetsEnumerant(value) {\n setBit(115, value, this);\n }\n get targetsStruct() {\n return getBit(116, this);\n }\n set targetsStruct(value) {\n setBit(116, value, this);\n }\n get targetsField() {\n return getBit(117, this);\n }\n set targetsField(value) {\n setBit(117, value, this);\n }\n get targetsUnion() {\n return getBit(118, this);\n }\n set targetsUnion(value) {\n setBit(118, value, this);\n }\n get targetsGroup() {\n return getBit(119, this);\n }\n set targetsGroup(value) {\n setBit(119, value, this);\n }\n get targetsInterface() {\n return getBit(120, this);\n }\n set targetsInterface(value) {\n setBit(120, value, this);\n }\n get targetsMethod() {\n return getBit(121, this);\n }\n set targetsMethod(value) {\n setBit(121, value, this);\n }\n get targetsParam() {\n return getBit(122, this);\n }\n set targetsParam(value) {\n setBit(122, value, this);\n }\n get targetsAnnotation() {\n return getBit(123, this);\n }\n set targetsAnnotation(value) {\n setBit(123, value, this);\n }\n toString() {\n return \"Node_Annotation_\" + super.toString();\n }\n}\nconst Node_Which = {\n FILE: 0,\n /**\n * Name to present to humans to identify this Node. You should not attempt to parse this. Its\n * format could change. It is not guaranteed to be unique.\n *\n * (On Zooko's triangle, this is the node's nickname.)\n *\n */\n STRUCT: 1,\n /**\n * If you want a shorter version of `displayName` (just naming this node, without its surrounding\n * scope), chop off this many characters from the beginning of `displayName`.\n *\n */\n ENUM: 2,\n /**\n * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back\n * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not\n * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is\n * zero if the node has no parent, which is normally only the case with files, but should be\n * allowed for any kind of node (in order to make runtime type generation easier).\n *\n */\n INTERFACE: 3,\n /**\n * List of nodes nested within this node, along with the names under which they were declared.\n *\n */\n CONST: 4,\n /**\n * Annotations applied to this node.\n *\n */\n ANNOTATION: 5\n};\nclass Node extends Struct {\n static FILE = Node_Which.FILE;\n static STRUCT = Node_Which.STRUCT;\n static ENUM = Node_Which.ENUM;\n static INTERFACE = Node_Which.INTERFACE;\n static CONST = Node_Which.CONST;\n static ANNOTATION = Node_Which.ANNOTATION;\n static Parameter = Node_Parameter;\n static NestedNode = Node_NestedNode;\n static SourceInfo = Node_SourceInfo;\n static _capnp = {\n displayName: \"Node\",\n id: \"e682ab4cf923a417\",\n size: new ObjectSize(40, 6)\n };\n static _Parameters;\n static _NestedNodes;\n static _Annotations;\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * Name to present to humans to identify this Node. You should not attempt to parse this. Its\n * format could change. It is not guaranteed to be unique.\n *\n * (On Zooko's triangle, this is the node's nickname.)\n *\n */\n get displayName() {\n return getText(0, this);\n }\n set displayName(value) {\n setText(0, value, this);\n }\n /**\n * If you want a shorter version of `displayName` (just naming this node, without its surrounding\n * scope), chop off this many characters from the beginning of `displayName`.\n *\n */\n get displayNamePrefixLength() {\n return getUint32(8, this);\n }\n set displayNamePrefixLength(value) {\n setUint32(8, value, this);\n }\n /**\n * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back\n * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not\n * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is\n * zero if the node has no parent, which is normally only the case with files, but should be\n * allowed for any kind of node (in order to make runtime type generation easier).\n *\n */\n get scopeId() {\n return getUint64(16, this);\n }\n set scopeId(value) {\n setUint64(16, value, this);\n }\n _adoptParameters(value) {\n adopt(value, getPointer(5, this));\n }\n _disownParameters() {\n return disown(this.parameters);\n }\n /**\n * If this node is parameterized (generic), the list of parameters. Empty for non-generic types.\n *\n */\n get parameters() {\n return getList(5, Node._Parameters, this);\n }\n _hasParameters() {\n return !isNull(getPointer(5, this));\n }\n _initParameters(length) {\n return initList(5, Node._Parameters, length, this);\n }\n set parameters(value) {\n copyFrom(value, getPointer(5, this));\n }\n /**\n * True if this node is generic, meaning that it or one of its parent scopes has a non-empty\n * `parameters`.\n *\n */\n get isGeneric() {\n return getBit(288, this);\n }\n set isGeneric(value) {\n setBit(288, value, this);\n }\n _adoptNestedNodes(value) {\n adopt(value, getPointer(1, this));\n }\n _disownNestedNodes() {\n return disown(this.nestedNodes);\n }\n /**\n * List of nodes nested within this node, along with the names under which they were declared.\n *\n */\n get nestedNodes() {\n return getList(1, Node._NestedNodes, this);\n }\n _hasNestedNodes() {\n return !isNull(getPointer(1, this));\n }\n _initNestedNodes(length) {\n return initList(1, Node._NestedNodes, length, this);\n }\n set nestedNodes(value) {\n copyFrom(value, getPointer(1, this));\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(2, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n /**\n * Annotations applied to this node.\n *\n */\n get annotations() {\n return getList(2, Node._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(2, this));\n }\n _initAnnotations(length) {\n return initList(2, Node._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(2, this));\n }\n get _isFile() {\n return getUint16(12, this) === 0;\n }\n set file(_) {\n setUint16(12, 0, this);\n }\n get struct() {\n testWhich(\"struct\", getUint16(12, this), 1, this);\n return getAs(Node_Struct, this);\n }\n _initStruct() {\n setUint16(12, 1, this);\n return getAs(Node_Struct, this);\n }\n get _isStruct() {\n return getUint16(12, this) === 1;\n }\n set struct(_) {\n setUint16(12, 1, this);\n }\n get enum() {\n testWhich(\"enum\", getUint16(12, this), 2, this);\n return getAs(Node_Enum, this);\n }\n _initEnum() {\n setUint16(12, 2, this);\n return getAs(Node_Enum, this);\n }\n get _isEnum() {\n return getUint16(12, this) === 2;\n }\n set enum(_) {\n setUint16(12, 2, this);\n }\n get interface() {\n testWhich(\"interface\", getUint16(12, this), 3, this);\n return getAs(Node_Interface, this);\n }\n _initInterface() {\n setUint16(12, 3, this);\n return getAs(Node_Interface, this);\n }\n get _isInterface() {\n return getUint16(12, this) === 3;\n }\n set interface(_) {\n setUint16(12, 3, this);\n }\n get const() {\n testWhich(\"const\", getUint16(12, this), 4, this);\n return getAs(Node_Const, this);\n }\n _initConst() {\n setUint16(12, 4, this);\n return getAs(Node_Const, this);\n }\n get _isConst() {\n return getUint16(12, this) === 4;\n }\n set const(_) {\n setUint16(12, 4, this);\n }\n get annotation() {\n testWhich(\"annotation\", getUint16(12, this), 5, this);\n return getAs(Node_Annotation, this);\n }\n _initAnnotation() {\n setUint16(12, 5, this);\n return getAs(Node_Annotation, this);\n }\n get _isAnnotation() {\n return getUint16(12, this) === 5;\n }\n set annotation(_) {\n setUint16(12, 5, this);\n }\n toString() {\n return \"Node_\" + super.toString();\n }\n which() {\n return getUint16(12, this);\n }\n}\nclass Field_Slot extends Struct {\n static _capnp = {\n displayName: \"slot\",\n id: \"c42305476bb4746f\",\n size: new ObjectSize(24, 4)\n };\n /**\n * Offset, in units of the field's size, from the beginning of the section in which the field\n * resides. E.g. for a UInt32 field, multiply this by 4 to get the byte offset from the\n * beginning of the data section.\n *\n */\n get offset() {\n return getUint32(4, this);\n }\n set offset(value) {\n setUint32(4, value, this);\n }\n _adoptType(value) {\n adopt(value, getPointer(2, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(2, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(2, this));\n }\n _initType() {\n return initStructAt(2, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(2, this));\n }\n _adoptDefaultValue(value) {\n adopt(value, getPointer(3, this));\n }\n _disownDefaultValue() {\n return disown(this.defaultValue);\n }\n get defaultValue() {\n return getStruct(3, Value, this);\n }\n _hasDefaultValue() {\n return !isNull(getPointer(3, this));\n }\n _initDefaultValue() {\n return initStructAt(3, Value, this);\n }\n set defaultValue(value) {\n copyFrom(value, getPointer(3, this));\n }\n /**\n * Whether the default value was specified explicitly. Non-explicit default values are always\n * zero or empty values. Usually, whether the default value was explicit shouldn't matter.\n * The main use case for this flag is for structs representing method parameters:\n * explicitly-defaulted parameters may be allowed to be omitted when calling the method.\n *\n */\n get hadExplicitDefault() {\n return getBit(128, this);\n }\n set hadExplicitDefault(value) {\n setBit(128, value, this);\n }\n toString() {\n return \"Field_Slot_\" + super.toString();\n }\n}\nclass Field_Group extends Struct {\n static _capnp = {\n displayName: \"group\",\n id: \"cafccddb68db1d11\",\n size: new ObjectSize(24, 4)\n };\n /**\n * The ID of the group's node.\n *\n */\n get typeId() {\n return getUint64(16, this);\n }\n set typeId(value) {\n setUint64(16, value, this);\n }\n toString() {\n return \"Field_Group_\" + super.toString();\n }\n}\nconst Field_Ordinal_Which = {\n IMPLICIT: 0,\n /**\n * The original ordinal number given to the field. You probably should NOT use this; if you need\n * a numeric identifier for a field, use its position within the field array for its scope.\n * The ordinal is given here mainly just so that the original schema text can be reproduced given\n * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.\n *\n */\n EXPLICIT: 1\n};\nclass Field_Ordinal extends Struct {\n static IMPLICIT = Field_Ordinal_Which.IMPLICIT;\n static EXPLICIT = Field_Ordinal_Which.EXPLICIT;\n static _capnp = {\n displayName: \"ordinal\",\n id: \"bb90d5c287870be6\",\n size: new ObjectSize(24, 4)\n };\n get _isImplicit() {\n return getUint16(10, this) === 0;\n }\n set implicit(_) {\n setUint16(10, 0, this);\n }\n /**\n * The original ordinal number given to the field. You probably should NOT use this; if you need\n * a numeric identifier for a field, use its position within the field array for its scope.\n * The ordinal is given here mainly just so that the original schema text can be reproduced given\n * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.\n *\n */\n get explicit() {\n testWhich(\"explicit\", getUint16(10, this), 1, this);\n return getUint16(12, this);\n }\n get _isExplicit() {\n return getUint16(10, this) === 1;\n }\n set explicit(value) {\n setUint16(10, 1, this);\n setUint16(12, value, this);\n }\n toString() {\n return \"Field_Ordinal_\" + super.toString();\n }\n which() {\n return getUint16(10, this);\n }\n}\nconst Field_Which = {\n SLOT: 0,\n /**\n * Indicates where this member appeared in the code, relative to other members.\n * Code ordering may have semantic relevance -- programmers tend to place related fields\n * together. So, using code ordering makes sense in human-readable formats where ordering is\n * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum\n * value is count(members) - 1. Fields that are members of a union are only ordered relative to\n * the other members of that union, so the maximum value there is count(union.members).\n *\n */\n GROUP: 1\n};\nclass Field extends Struct {\n static NO_DISCRIMINANT = 65535;\n static SLOT = Field_Which.SLOT;\n static GROUP = Field_Which.GROUP;\n static _capnp = {\n displayName: \"Field\",\n id: \"9aad50a41f4af45f\",\n size: new ObjectSize(24, 4),\n defaultDiscriminantValue: getUint16Mask(65535)\n };\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Indicates where this member appeared in the code, relative to other members.\n * Code ordering may have semantic relevance -- programmers tend to place related fields\n * together. So, using code ordering makes sense in human-readable formats where ordering is\n * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum\n * value is count(members) - 1. Fields that are members of a union are only ordered relative to\n * the other members of that union, so the maximum value there is count(union.members).\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Field._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Field._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n /**\n * If the field is in a union, this is the value which the union's discriminant should take when\n * the field is active. If the field is not in a union, this is 0xffff.\n *\n */\n get discriminantValue() {\n return getUint16(2, this, Field._capnp.defaultDiscriminantValue);\n }\n set discriminantValue(value) {\n setUint16(2, value, this, Field._capnp.defaultDiscriminantValue);\n }\n /**\n * A regular, non-group, non-fixed-list field.\n *\n */\n get slot() {\n testWhich(\"slot\", getUint16(8, this), 0, this);\n return getAs(Field_Slot, this);\n }\n _initSlot() {\n setUint16(8, 0, this);\n return getAs(Field_Slot, this);\n }\n get _isSlot() {\n return getUint16(8, this) === 0;\n }\n set slot(_) {\n setUint16(8, 0, this);\n }\n /**\n * A group.\n *\n */\n get group() {\n testWhich(\"group\", getUint16(8, this), 1, this);\n return getAs(Field_Group, this);\n }\n _initGroup() {\n setUint16(8, 1, this);\n return getAs(Field_Group, this);\n }\n get _isGroup() {\n return getUint16(8, this) === 1;\n }\n set group(_) {\n setUint16(8, 1, this);\n }\n get ordinal() {\n return getAs(Field_Ordinal, this);\n }\n _initOrdinal() {\n return getAs(Field_Ordinal, this);\n }\n toString() {\n return \"Field_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nclass Enumerant extends Struct {\n static _capnp = {\n displayName: \"Enumerant\",\n id: \"978a7cebdc549a4d\",\n size: new ObjectSize(8, 2)\n };\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Specifies order in which the enumerants were declared in the code.\n * Like utils.Field.codeOrder.\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Enumerant._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Enumerant._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Enumerant_\" + super.toString();\n }\n}\nclass Superclass extends Struct {\n static _capnp = {\n displayName: \"Superclass\",\n id: \"a9962a9ed0a4d7f8\",\n size: new ObjectSize(8, 1)\n };\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Superclass_\" + super.toString();\n }\n}\nclass Method extends Struct {\n static _capnp = {\n displayName: \"Method\",\n id: \"9500cce23b334d80\",\n size: new ObjectSize(24, 5)\n };\n static _ImplicitParameters;\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Specifies order in which the methods were declared in the code.\n * Like utils.Field.codeOrder.\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptImplicitParameters(value) {\n adopt(value, getPointer(4, this));\n }\n _disownImplicitParameters() {\n return disown(this.implicitParameters);\n }\n /**\n * The parameters listed in [] (typically, type / generic parameters), whose bindings are intended\n * to be inferred rather than specified explicitly, although not all languages support this.\n *\n */\n get implicitParameters() {\n return getList(4, Method._ImplicitParameters, this);\n }\n _hasImplicitParameters() {\n return !isNull(getPointer(4, this));\n }\n _initImplicitParameters(length) {\n return initList(4, Method._ImplicitParameters, length, this);\n }\n set implicitParameters(value) {\n copyFrom(value, getPointer(4, this));\n }\n /**\n * ID of the parameter struct type. If a named parameter list was specified in the method\n * declaration (rather than a single struct parameter type) then a corresponding struct type is\n * auto-generated. Such an auto-generated type will not be listed in the interface's\n * `nestedNodes` and its `scopeId` will be zero -- it is completely detached from the namespace.\n * (Awkwardly, it does of course inherit generic parameters from the method's scope, which makes\n * this a situation where you can't just climb the scope chain to find where a particular\n * generic parameter was introduced. Making the `scopeId` zero was a mistake.)\n *\n */\n get paramStructType() {\n return getUint64(8, this);\n }\n set paramStructType(value) {\n setUint64(8, value, this);\n }\n _adoptParamBrand(value) {\n adopt(value, getPointer(2, this));\n }\n _disownParamBrand() {\n return disown(this.paramBrand);\n }\n /**\n * Brand of param struct type.\n *\n */\n get paramBrand() {\n return getStruct(2, Brand, this);\n }\n _hasParamBrand() {\n return !isNull(getPointer(2, this));\n }\n _initParamBrand() {\n return initStructAt(2, Brand, this);\n }\n set paramBrand(value) {\n copyFrom(value, getPointer(2, this));\n }\n /**\n * ID of the return struct type; similar to `paramStructType`.\n *\n */\n get resultStructType() {\n return getUint64(16, this);\n }\n set resultStructType(value) {\n setUint64(16, value, this);\n }\n _adoptResultBrand(value) {\n adopt(value, getPointer(3, this));\n }\n _disownResultBrand() {\n return disown(this.resultBrand);\n }\n /**\n * Brand of result struct type.\n *\n */\n get resultBrand() {\n return getStruct(3, Brand, this);\n }\n _hasResultBrand() {\n return !isNull(getPointer(3, this));\n }\n _initResultBrand() {\n return initStructAt(3, Brand, this);\n }\n set resultBrand(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Method._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Method._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Method_\" + super.toString();\n }\n}\nclass Type_List extends Struct {\n static _capnp = {\n displayName: \"list\",\n id: \"87e739250a60ea97\",\n size: new ObjectSize(24, 1)\n };\n _adoptElementType(value) {\n adopt(value, getPointer(0, this));\n }\n _disownElementType() {\n return disown(this.elementType);\n }\n get elementType() {\n return getStruct(0, Type, this);\n }\n _hasElementType() {\n return !isNull(getPointer(0, this));\n }\n _initElementType() {\n return initStructAt(0, Type, this);\n }\n set elementType(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_List_\" + super.toString();\n }\n}\nclass Type_Enum extends Struct {\n static _capnp = {\n displayName: \"enum\",\n id: \"9e0e78711a7f87a9\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Enum_\" + super.toString();\n }\n}\nclass Type_Struct extends Struct {\n static _capnp = {\n displayName: \"struct\",\n id: \"ac3a6f60ef4cc6d3\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Struct_\" + super.toString();\n }\n}\nclass Type_Interface extends Struct {\n static _capnp = {\n displayName: \"interface\",\n id: \"ed8bca69f7fb0cbf\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Interface_\" + super.toString();\n }\n}\nconst Type_AnyPointer_Unconstrained_Which = {\n /**\n * truly AnyPointer\n *\n */\n ANY_KIND: 0,\n /**\n * AnyStruct\n *\n */\n STRUCT: 1,\n /**\n * AnyList\n *\n */\n LIST: 2,\n /**\n * Capability\n *\n */\n CAPABILITY: 3\n};\nclass Type_AnyPointer_Unconstrained extends Struct {\n static ANY_KIND = Type_AnyPointer_Unconstrained_Which.ANY_KIND;\n static STRUCT = Type_AnyPointer_Unconstrained_Which.STRUCT;\n static LIST = Type_AnyPointer_Unconstrained_Which.LIST;\n static CAPABILITY = Type_AnyPointer_Unconstrained_Which.CAPABILITY;\n static _capnp = {\n displayName: \"unconstrained\",\n id: \"8e3b5f79fe593656\",\n size: new ObjectSize(24, 1)\n };\n get _isAnyKind() {\n return getUint16(10, this) === 0;\n }\n set anyKind(_) {\n setUint16(10, 0, this);\n }\n get _isStruct() {\n return getUint16(10, this) === 1;\n }\n set struct(_) {\n setUint16(10, 1, this);\n }\n get _isList() {\n return getUint16(10, this) === 2;\n }\n set list(_) {\n setUint16(10, 2, this);\n }\n get _isCapability() {\n return getUint16(10, this) === 3;\n }\n set capability(_) {\n setUint16(10, 3, this);\n }\n toString() {\n return \"Type_AnyPointer_Unconstrained_\" + super.toString();\n }\n which() {\n return getUint16(10, this);\n }\n}\nclass Type_AnyPointer_Parameter extends Struct {\n static _capnp = {\n displayName: \"parameter\",\n id: \"9dd1f724f4614a85\",\n size: new ObjectSize(24, 1)\n };\n /**\n * ID of the generic type whose parameter we're referencing. This should be a parent of the\n * current scope.\n *\n */\n get scopeId() {\n return getUint64(16, this);\n }\n set scopeId(value) {\n setUint64(16, value, this);\n }\n /**\n * Index of the parameter within the generic type's parameter list.\n *\n */\n get parameterIndex() {\n return getUint16(10, this);\n }\n set parameterIndex(value) {\n setUint16(10, value, this);\n }\n toString() {\n return \"Type_AnyPointer_Parameter_\" + super.toString();\n }\n}\nclass Type_AnyPointer_ImplicitMethodParameter extends Struct {\n static _capnp = {\n displayName: \"implicitMethodParameter\",\n id: \"baefc9120c56e274\",\n size: new ObjectSize(24, 1)\n };\n get parameterIndex() {\n return getUint16(10, this);\n }\n set parameterIndex(value) {\n setUint16(10, value, this);\n }\n toString() {\n return \"Type_AnyPointer_ImplicitMethodParameter_\" + super.toString();\n }\n}\nconst Type_AnyPointer_Which = {\n /**\n * A regular AnyPointer.\n *\n * The name \"unconstrained\" means as opposed to constraining it to match a type parameter.\n * In retrospect this name is probably a poor choice given that it may still be constrained\n * to be a struct, list, or capability.\n *\n */\n UNCONSTRAINED: 0,\n /**\n * This is actually a reference to a type parameter defined within this scope.\n *\n */\n PARAMETER: 1,\n /**\n * This is actually a reference to an implicit (generic) parameter of a method. The only\n * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.\n *\n */\n IMPLICIT_METHOD_PARAMETER: 2\n};\nclass Type_AnyPointer extends Struct {\n static UNCONSTRAINED = Type_AnyPointer_Which.UNCONSTRAINED;\n static PARAMETER = Type_AnyPointer_Which.PARAMETER;\n static IMPLICIT_METHOD_PARAMETER = Type_AnyPointer_Which.IMPLICIT_METHOD_PARAMETER;\n static _capnp = {\n displayName: \"anyPointer\",\n id: \"c2573fe8a23e49f1\",\n size: new ObjectSize(24, 1)\n };\n /**\n * A regular AnyPointer.\n *\n * The name \"unconstrained\" means as opposed to constraining it to match a type parameter.\n * In retrospect this name is probably a poor choice given that it may still be constrained\n * to be a struct, list, or capability.\n *\n */\n get unconstrained() {\n testWhich(\"unconstrained\", getUint16(8, this), 0, this);\n return getAs(Type_AnyPointer_Unconstrained, this);\n }\n _initUnconstrained() {\n setUint16(8, 0, this);\n return getAs(Type_AnyPointer_Unconstrained, this);\n }\n get _isUnconstrained() {\n return getUint16(8, this) === 0;\n }\n set unconstrained(_) {\n setUint16(8, 0, this);\n }\n /**\n * This is actually a reference to a type parameter defined within this scope.\n *\n */\n get parameter() {\n testWhich(\"parameter\", getUint16(8, this), 1, this);\n return getAs(Type_AnyPointer_Parameter, this);\n }\n _initParameter() {\n setUint16(8, 1, this);\n return getAs(Type_AnyPointer_Parameter, this);\n }\n get _isParameter() {\n return getUint16(8, this) === 1;\n }\n set parameter(_) {\n setUint16(8, 1, this);\n }\n /**\n * This is actually a reference to an implicit (generic) parameter of a method. The only\n * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.\n *\n */\n get implicitMethodParameter() {\n testWhich(\"implicitMethodParameter\", getUint16(8, this), 2, this);\n return getAs(Type_AnyPointer_ImplicitMethodParameter, this);\n }\n _initImplicitMethodParameter() {\n setUint16(8, 2, this);\n return getAs(Type_AnyPointer_ImplicitMethodParameter, this);\n }\n get _isImplicitMethodParameter() {\n return getUint16(8, this) === 2;\n }\n set implicitMethodParameter(_) {\n setUint16(8, 2, this);\n }\n toString() {\n return \"Type_AnyPointer_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nconst Type_Which = {\n VOID: 0,\n BOOL: 1,\n INT8: 2,\n INT16: 3,\n INT32: 4,\n INT64: 5,\n UINT8: 6,\n UINT16: 7,\n UINT32: 8,\n UINT64: 9,\n FLOAT32: 10,\n FLOAT64: 11,\n TEXT: 12,\n DATA: 13,\n LIST: 14,\n ENUM: 15,\n STRUCT: 16,\n INTERFACE: 17,\n ANY_POINTER: 18\n};\nclass Type extends Struct {\n static VOID = Type_Which.VOID;\n static BOOL = Type_Which.BOOL;\n static INT8 = Type_Which.INT8;\n static INT16 = Type_Which.INT16;\n static INT32 = Type_Which.INT32;\n static INT64 = Type_Which.INT64;\n static UINT8 = Type_Which.UINT8;\n static UINT16 = Type_Which.UINT16;\n static UINT32 = Type_Which.UINT32;\n static UINT64 = Type_Which.UINT64;\n static FLOAT32 = Type_Which.FLOAT32;\n static FLOAT64 = Type_Which.FLOAT64;\n static TEXT = Type_Which.TEXT;\n static DATA = Type_Which.DATA;\n static LIST = Type_Which.LIST;\n static ENUM = Type_Which.ENUM;\n static STRUCT = Type_Which.STRUCT;\n static INTERFACE = Type_Which.INTERFACE;\n static ANY_POINTER = Type_Which.ANY_POINTER;\n static _capnp = {\n displayName: \"Type\",\n id: \"d07378ede1f9cc60\",\n size: new ObjectSize(24, 1)\n };\n get _isVoid() {\n return getUint16(0, this) === 0;\n }\n set void(_) {\n setUint16(0, 0, this);\n }\n get _isBool() {\n return getUint16(0, this) === 1;\n }\n set bool(_) {\n setUint16(0, 1, this);\n }\n get _isInt8() {\n return getUint16(0, this) === 2;\n }\n set int8(_) {\n setUint16(0, 2, this);\n }\n get _isInt16() {\n return getUint16(0, this) === 3;\n }\n set int16(_) {\n setUint16(0, 3, this);\n }\n get _isInt32() {\n return getUint16(0, this) === 4;\n }\n set int32(_) {\n setUint16(0, 4, this);\n }\n get _isInt64() {\n return getUint16(0, this) === 5;\n }\n set int64(_) {\n setUint16(0, 5, this);\n }\n get _isUint8() {\n return getUint16(0, this) === 6;\n }\n set uint8(_) {\n setUint16(0, 6, this);\n }\n get _isUint16() {\n return getUint16(0, this) === 7;\n }\n set uint16(_) {\n setUint16(0, 7, this);\n }\n get _isUint32() {\n return getUint16(0, this) === 8;\n }\n set uint32(_) {\n setUint16(0, 8, this);\n }\n get _isUint64() {\n return getUint16(0, this) === 9;\n }\n set uint64(_) {\n setUint16(0, 9, this);\n }\n get _isFloat32() {\n return getUint16(0, this) === 10;\n }\n set float32(_) {\n setUint16(0, 10, this);\n }\n get _isFloat64() {\n return getUint16(0, this) === 11;\n }\n set float64(_) {\n setUint16(0, 11, this);\n }\n get _isText() {\n return getUint16(0, this) === 12;\n }\n set text(_) {\n setUint16(0, 12, this);\n }\n get _isData() {\n return getUint16(0, this) === 13;\n }\n set data(_) {\n setUint16(0, 13, this);\n }\n get list() {\n testWhich(\"list\", getUint16(0, this), 14, this);\n return getAs(Type_List, this);\n }\n _initList() {\n setUint16(0, 14, this);\n return getAs(Type_List, this);\n }\n get _isList() {\n return getUint16(0, this) === 14;\n }\n set list(_) {\n setUint16(0, 14, this);\n }\n get enum() {\n testWhich(\"enum\", getUint16(0, this), 15, this);\n return getAs(Type_Enum, this);\n }\n _initEnum() {\n setUint16(0, 15, this);\n return getAs(Type_Enum, this);\n }\n get _isEnum() {\n return getUint16(0, this) === 15;\n }\n set enum(_) {\n setUint16(0, 15, this);\n }\n get struct() {\n testWhich(\"struct\", getUint16(0, this), 16, this);\n return getAs(Type_Struct, this);\n }\n _initStruct() {\n setUint16(0, 16, this);\n return getAs(Type_Struct, this);\n }\n get _isStruct() {\n return getUint16(0, this) === 16;\n }\n set struct(_) {\n setUint16(0, 16, this);\n }\n get interface() {\n testWhich(\"interface\", getUint16(0, this), 17, this);\n return getAs(Type_Interface, this);\n }\n _initInterface() {\n setUint16(0, 17, this);\n return getAs(Type_Interface, this);\n }\n get _isInterface() {\n return getUint16(0, this) === 17;\n }\n set interface(_) {\n setUint16(0, 17, this);\n }\n get anyPointer() {\n testWhich(\"anyPointer\", getUint16(0, this), 18, this);\n return getAs(Type_AnyPointer, this);\n }\n _initAnyPointer() {\n setUint16(0, 18, this);\n return getAs(Type_AnyPointer, this);\n }\n get _isAnyPointer() {\n return getUint16(0, this) === 18;\n }\n set anyPointer(_) {\n setUint16(0, 18, this);\n }\n toString() {\n return \"Type_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nconst Brand_Scope_Which = {\n /**\n * ID of the scope to which these params apply.\n *\n */\n BIND: 0,\n /**\n * List of parameter bindings.\n *\n */\n INHERIT: 1\n};\nclass Brand_Scope extends Struct {\n static BIND = Brand_Scope_Which.BIND;\n static INHERIT = Brand_Scope_Which.INHERIT;\n static _capnp = {\n displayName: \"Scope\",\n id: \"abd73485a9636bc9\",\n size: new ObjectSize(16, 1)\n };\n static _Bind;\n /**\n * ID of the scope to which these params apply.\n *\n */\n get scopeId() {\n return getUint64(0, this);\n }\n set scopeId(value) {\n setUint64(0, value, this);\n }\n _adoptBind(value) {\n setUint16(8, 0, this);\n adopt(value, getPointer(0, this));\n }\n _disownBind() {\n return disown(this.bind);\n }\n /**\n * List of parameter bindings.\n *\n */\n get bind() {\n testWhich(\"bind\", getUint16(8, this), 0, this);\n return getList(0, Brand_Scope._Bind, this);\n }\n _hasBind() {\n return !isNull(getPointer(0, this));\n }\n _initBind(length) {\n setUint16(8, 0, this);\n return initList(0, Brand_Scope._Bind, length, this);\n }\n get _isBind() {\n return getUint16(8, this) === 0;\n }\n set bind(value) {\n setUint16(8, 0, this);\n copyFrom(value, getPointer(0, this));\n }\n get _isInherit() {\n return getUint16(8, this) === 1;\n }\n set inherit(_) {\n setUint16(8, 1, this);\n }\n toString() {\n return \"Brand_Scope_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nconst Brand_Binding_Which = {\n UNBOUND: 0,\n TYPE: 1\n};\nclass Brand_Binding extends Struct {\n static UNBOUND = Brand_Binding_Which.UNBOUND;\n static TYPE = Brand_Binding_Which.TYPE;\n static _capnp = {\n displayName: \"Binding\",\n id: \"c863cd16969ee7fc\",\n size: new ObjectSize(8, 1)\n };\n get _isUnbound() {\n return getUint16(0, this) === 0;\n }\n set unbound(_) {\n setUint16(0, 0, this);\n }\n _adoptType(value) {\n setUint16(0, 1, this);\n adopt(value, getPointer(0, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n testWhich(\"type\", getUint16(0, this), 1, this);\n return getStruct(0, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(0, this));\n }\n _initType() {\n setUint16(0, 1, this);\n return initStructAt(0, Type, this);\n }\n get _isType() {\n return getUint16(0, this) === 1;\n }\n set type(value) {\n setUint16(0, 1, this);\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Brand_Binding_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nclass Brand extends Struct {\n static Scope = Brand_Scope;\n static Binding = Brand_Binding;\n static _capnp = {\n displayName: \"Brand\",\n id: \"903455f06065422b\",\n size: new ObjectSize(0, 1)\n };\n static _Scopes;\n _adoptScopes(value) {\n adopt(value, getPointer(0, this));\n }\n _disownScopes() {\n return disown(this.scopes);\n }\n /**\n * For each of the target type and each of its parent scopes, a parameterization may be included\n * in this list. If no parameterization is included for a particular relevant scope, then either\n * that scope has no parameters or all parameters should be considered to be `AnyPointer`.\n *\n */\n get scopes() {\n return getList(0, Brand._Scopes, this);\n }\n _hasScopes() {\n return !isNull(getPointer(0, this));\n }\n _initScopes(length) {\n return initList(0, Brand._Scopes, length, this);\n }\n set scopes(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Brand_\" + super.toString();\n }\n}\nconst Value_Which = {\n VOID: 0,\n BOOL: 1,\n INT8: 2,\n INT16: 3,\n INT32: 4,\n INT64: 5,\n UINT8: 6,\n UINT16: 7,\n UINT32: 8,\n UINT64: 9,\n FLOAT32: 10,\n FLOAT64: 11,\n TEXT: 12,\n DATA: 13,\n LIST: 14,\n ENUM: 15,\n STRUCT: 16,\n /**\n * The only interface value that can be represented statically is \"null\", whose methods always\n * throw exceptions.\n *\n */\n INTERFACE: 17,\n ANY_POINTER: 18\n};\nclass Value extends Struct {\n static VOID = Value_Which.VOID;\n static BOOL = Value_Which.BOOL;\n static INT8 = Value_Which.INT8;\n static INT16 = Value_Which.INT16;\n static INT32 = Value_Which.INT32;\n static INT64 = Value_Which.INT64;\n static UINT8 = Value_Which.UINT8;\n static UINT16 = Value_Which.UINT16;\n static UINT32 = Value_Which.UINT32;\n static UINT64 = Value_Which.UINT64;\n static FLOAT32 = Value_Which.FLOAT32;\n static FLOAT64 = Value_Which.FLOAT64;\n static TEXT = Value_Which.TEXT;\n static DATA = Value_Which.DATA;\n static LIST = Value_Which.LIST;\n static ENUM = Value_Which.ENUM;\n static STRUCT = Value_Which.STRUCT;\n static INTERFACE = Value_Which.INTERFACE;\n static ANY_POINTER = Value_Which.ANY_POINTER;\n static _capnp = {\n displayName: \"Value\",\n id: \"ce23dcd2d7b00c9b\",\n size: new ObjectSize(16, 1)\n };\n get _isVoid() {\n return getUint16(0, this) === 0;\n }\n set void(_) {\n setUint16(0, 0, this);\n }\n get bool() {\n testWhich(\"bool\", getUint16(0, this), 1, this);\n return getBit(16, this);\n }\n get _isBool() {\n return getUint16(0, this) === 1;\n }\n set bool(value) {\n setUint16(0, 1, this);\n setBit(16, value, this);\n }\n get int8() {\n testWhich(\"int8\", getUint16(0, this), 2, this);\n return getInt8(2, this);\n }\n get _isInt8() {\n return getUint16(0, this) === 2;\n }\n set int8(value) {\n setUint16(0, 2, this);\n setInt8(2, value, this);\n }\n get int16() {\n testWhich(\"int16\", getUint16(0, this), 3, this);\n return getInt16(2, this);\n }\n get _isInt16() {\n return getUint16(0, this) === 3;\n }\n set int16(value) {\n setUint16(0, 3, this);\n setInt16(2, value, this);\n }\n get int32() {\n testWhich(\"int32\", getUint16(0, this), 4, this);\n return getInt32(4, this);\n }\n get _isInt32() {\n return getUint16(0, this) === 4;\n }\n set int32(value) {\n setUint16(0, 4, this);\n setInt32(4, value, this);\n }\n get int64() {\n testWhich(\"int64\", getUint16(0, this), 5, this);\n return getInt64(8, this);\n }\n get _isInt64() {\n return getUint16(0, this) === 5;\n }\n set int64(value) {\n setUint16(0, 5, this);\n setInt64(8, value, this);\n }\n get uint8() {\n testWhich(\"uint8\", getUint16(0, this), 6, this);\n return getUint8(2, this);\n }\n get _isUint8() {\n return getUint16(0, this) === 6;\n }\n set uint8(value) {\n setUint16(0, 6, this);\n setUint8(2, value, this);\n }\n get uint16() {\n testWhich(\"uint16\", getUint16(0, this), 7, this);\n return getUint16(2, this);\n }\n get _isUint16() {\n return getUint16(0, this) === 7;\n }\n set uint16(value) {\n setUint16(0, 7, this);\n setUint16(2, value, this);\n }\n get uint32() {\n testWhich(\"uint32\", getUint16(0, this), 8, this);\n return getUint32(4, this);\n }\n get _isUint32() {\n return getUint16(0, this) === 8;\n }\n set uint32(value) {\n setUint16(0, 8, this);\n setUint32(4, value, this);\n }\n get uint64() {\n testWhich(\"uint64\", getUint16(0, this), 9, this);\n return getUint64(8, this);\n }\n get _isUint64() {\n return getUint16(0, this) === 9;\n }\n set uint64(value) {\n setUint16(0, 9, this);\n setUint64(8, value, this);\n }\n get float32() {\n testWhich(\"float32\", getUint16(0, this), 10, this);\n return getFloat32(4, this);\n }\n get _isFloat32() {\n return getUint16(0, this) === 10;\n }\n set float32(value) {\n setUint16(0, 10, this);\n setFloat32(4, value, this);\n }\n get float64() {\n testWhich(\"float64\", getUint16(0, this), 11, this);\n return getFloat64(8, this);\n }\n get _isFloat64() {\n return getUint16(0, this) === 11;\n }\n set float64(value) {\n setUint16(0, 11, this);\n setFloat64(8, value, this);\n }\n get text() {\n testWhich(\"text\", getUint16(0, this), 12, this);\n return getText(0, this);\n }\n get _isText() {\n return getUint16(0, this) === 12;\n }\n set text(value) {\n setUint16(0, 12, this);\n setText(0, value, this);\n }\n _adoptData(value) {\n setUint16(0, 13, this);\n adopt(value, getPointer(0, this));\n }\n _disownData() {\n return disown(this.data);\n }\n get data() {\n testWhich(\"data\", getUint16(0, this), 13, this);\n return getData(0, this);\n }\n _hasData() {\n return !isNull(getPointer(0, this));\n }\n _initData(length) {\n setUint16(0, 13, this);\n return initData(0, length, this);\n }\n get _isData() {\n return getUint16(0, this) === 13;\n }\n set data(value) {\n setUint16(0, 13, this);\n copyFrom(value, getPointer(0, this));\n }\n _adoptList(value) {\n setUint16(0, 14, this);\n adopt(value, getPointer(0, this));\n }\n _disownList() {\n return disown(this.list);\n }\n get list() {\n testWhich(\"list\", getUint16(0, this), 14, this);\n return getPointer(0, this);\n }\n _hasList() {\n return !isNull(getPointer(0, this));\n }\n get _isList() {\n return getUint16(0, this) === 14;\n }\n set list(value) {\n setUint16(0, 14, this);\n copyFrom(value, getPointer(0, this));\n }\n get enum() {\n testWhich(\"enum\", getUint16(0, this), 15, this);\n return getUint16(2, this);\n }\n get _isEnum() {\n return getUint16(0, this) === 15;\n }\n set enum(value) {\n setUint16(0, 15, this);\n setUint16(2, value, this);\n }\n _adoptStruct(value) {\n setUint16(0, 16, this);\n adopt(value, getPointer(0, this));\n }\n _disownStruct() {\n return disown(this.struct);\n }\n get struct() {\n testWhich(\"struct\", getUint16(0, this), 16, this);\n return getPointer(0, this);\n }\n _hasStruct() {\n return !isNull(getPointer(0, this));\n }\n get _isStruct() {\n return getUint16(0, this) === 16;\n }\n set struct(value) {\n setUint16(0, 16, this);\n copyFrom(value, getPointer(0, this));\n }\n get _isInterface() {\n return getUint16(0, this) === 17;\n }\n set interface(_) {\n setUint16(0, 17, this);\n }\n _adoptAnyPointer(value) {\n setUint16(0, 18, this);\n adopt(value, getPointer(0, this));\n }\n _disownAnyPointer() {\n return disown(this.anyPointer);\n }\n get anyPointer() {\n testWhich(\"anyPointer\", getUint16(0, this), 18, this);\n return getPointer(0, this);\n }\n _hasAnyPointer() {\n return !isNull(getPointer(0, this));\n }\n get _isAnyPointer() {\n return getUint16(0, this) === 18;\n }\n set anyPointer(value) {\n setUint16(0, 18, this);\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Value_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nclass Annotation extends Struct {\n static _capnp = {\n displayName: \"Annotation\",\n id: \"f1c8950dab257542\",\n size: new ObjectSize(8, 2)\n };\n /**\n * ID of the annotation node.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(1, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n /**\n * Brand of the annotation.\n *\n * Note that the annotation itself is not allowed to be parameterized, but its scope might be.\n *\n */\n get brand() {\n return getStruct(1, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(1, this));\n }\n _initBrand() {\n return initStructAt(1, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(1, this));\n }\n _adoptValue(value) {\n adopt(value, getPointer(0, this));\n }\n _disownValue() {\n return disown(this.value);\n }\n get value() {\n return getStruct(0, Value, this);\n }\n _hasValue() {\n return !isNull(getPointer(0, this));\n }\n _initValue() {\n return initStructAt(0, Value, this);\n }\n set value(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Annotation_\" + super.toString();\n }\n}\nconst ElementSize = {\n /**\n * aka \"void\", but that's a keyword.\n *\n */\n EMPTY: 0,\n BIT: 1,\n BYTE: 2,\n TWO_BYTES: 3,\n FOUR_BYTES: 4,\n EIGHT_BYTES: 5,\n POINTER: 6,\n INLINE_COMPOSITE: 7\n};\nclass CapnpVersion extends Struct {\n static _capnp = {\n displayName: \"CapnpVersion\",\n id: \"d85d305b7d839963\",\n size: new ObjectSize(8, 0)\n };\n get major() {\n return getUint16(0, this);\n }\n set major(value) {\n setUint16(0, value, this);\n }\n get minor() {\n return getUint8(2, this);\n }\n set minor(value) {\n setUint8(2, value, this);\n }\n get micro() {\n return getUint8(3, this);\n }\n set micro(value) {\n setUint8(3, value, this);\n }\n toString() {\n return \"CapnpVersion_\" + super.toString();\n }\n}\nclass CodeGeneratorRequest_RequestedFile_Import extends Struct {\n static _capnp = {\n displayName: \"Import\",\n id: \"ae504193122357e5\",\n size: new ObjectSize(8, 1)\n };\n /**\n * ID of the imported file.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * Name which *this* file used to refer to the foreign file. This may be a relative name.\n * This information is provided because it might be useful for code generation, e.g. to\n * generate #include directives in C++. We don't put this in Node.file because this\n * information is only meaningful at compile time anyway.\n *\n * (On Zooko's triangle, this is the import's petname according to the importing file.)\n *\n */\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n toString() {\n return \"CodeGeneratorRequest_RequestedFile_Import_\" + super.toString();\n }\n}\nclass CodeGeneratorRequest_RequestedFile extends Struct {\n static Import = CodeGeneratorRequest_RequestedFile_Import;\n static _capnp = {\n displayName: \"RequestedFile\",\n id: \"cfea0eb02e810062\",\n size: new ObjectSize(8, 2)\n };\n static _Imports;\n /**\n * ID of the file.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * Name of the file as it appeared on the command-line (minus the src-prefix). You may use\n * this to decide where to write the output.\n *\n */\n get filename() {\n return getText(0, this);\n }\n set filename(value) {\n setText(0, value, this);\n }\n _adoptImports(value) {\n adopt(value, getPointer(1, this));\n }\n _disownImports() {\n return disown(this.imports);\n }\n /**\n * List of all imported paths seen in this file.\n *\n */\n get imports() {\n return getList(1, CodeGeneratorRequest_RequestedFile._Imports, this);\n }\n _hasImports() {\n return !isNull(getPointer(1, this));\n }\n _initImports(length) {\n return initList(1, CodeGeneratorRequest_RequestedFile._Imports, length, this);\n }\n set imports(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"CodeGeneratorRequest_RequestedFile_\" + super.toString();\n }\n}\nclass CodeGeneratorRequest extends Struct {\n static RequestedFile = CodeGeneratorRequest_RequestedFile;\n static _capnp = {\n displayName: \"CodeGeneratorRequest\",\n id: \"bfc546f6210ad7ce\",\n size: new ObjectSize(0, 4)\n };\n static _Nodes;\n static _SourceInfo;\n static _RequestedFiles;\n _adoptCapnpVersion(value) {\n adopt(value, getPointer(2, this));\n }\n _disownCapnpVersion() {\n return disown(this.capnpVersion);\n }\n /**\n * Version of the `capnp` executable. Generally, code generators should ignore this, but the code\n * generators that ship with `capnp` itself will print a warning if this mismatches since that\n * probably indicates something is misconfigured.\n *\n * The first version of 'capnp' to set this was 0.6.0. So, if it's missing, the compiler version\n * is older than that.\n *\n */\n get capnpVersion() {\n return getStruct(2, CapnpVersion, this);\n }\n _hasCapnpVersion() {\n return !isNull(getPointer(2, this));\n }\n _initCapnpVersion() {\n return initStructAt(2, CapnpVersion, this);\n }\n set capnpVersion(value) {\n copyFrom(value, getPointer(2, this));\n }\n _adoptNodes(value) {\n adopt(value, getPointer(0, this));\n }\n _disownNodes() {\n return disown(this.nodes);\n }\n /**\n * All nodes parsed by the compiler, including for the files on the command line and their\n * imports.\n *\n */\n get nodes() {\n return getList(0, CodeGeneratorRequest._Nodes, this);\n }\n _hasNodes() {\n return !isNull(getPointer(0, this));\n }\n _initNodes(length) {\n return initList(0, CodeGeneratorRequest._Nodes, length, this);\n }\n set nodes(value) {\n copyFrom(value, getPointer(0, this));\n }\n _adoptSourceInfo(value) {\n adopt(value, getPointer(3, this));\n }\n _disownSourceInfo() {\n return disown(this.sourceInfo);\n }\n /**\n * Information about the original source code for each node, where available. This array may be\n * omitted or may be missing some nodes if no info is available for them.\n *\n */\n get sourceInfo() {\n return getList(3, CodeGeneratorRequest._SourceInfo, this);\n }\n _hasSourceInfo() {\n return !isNull(getPointer(3, this));\n }\n _initSourceInfo(length) {\n return initList(3, CodeGeneratorRequest._SourceInfo, length, this);\n }\n set sourceInfo(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptRequestedFiles(value) {\n adopt(value, getPointer(1, this));\n }\n _disownRequestedFiles() {\n return disown(this.requestedFiles);\n }\n /**\n * Files which were listed on the command line.\n *\n */\n get requestedFiles() {\n return getList(1, CodeGeneratorRequest._RequestedFiles, this);\n }\n _hasRequestedFiles() {\n return !isNull(getPointer(1, this));\n }\n _initRequestedFiles(length) {\n return initList(1, CodeGeneratorRequest._RequestedFiles, length, this);\n }\n set requestedFiles(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"CodeGeneratorRequest_\" + super.toString();\n }\n}\nNode_SourceInfo._Members = CompositeList(Node_SourceInfo_Member);\nNode_Struct._Fields = CompositeList(Field);\nNode_Enum._Enumerants = CompositeList(Enumerant);\nNode_Interface._Methods = CompositeList(Method);\nNode_Interface._Superclasses = CompositeList(Superclass);\nNode._Parameters = CompositeList(Node_Parameter);\nNode._NestedNodes = CompositeList(Node_NestedNode);\nNode._Annotations = CompositeList(Annotation);\nField._Annotations = CompositeList(Annotation);\nEnumerant._Annotations = CompositeList(Annotation);\nMethod._ImplicitParameters = CompositeList(Node_Parameter);\nMethod._Annotations = CompositeList(Annotation);\nBrand_Scope._Bind = CompositeList(Brand_Binding);\nBrand._Scopes = CompositeList(Brand_Scope);\nCodeGeneratorRequest_RequestedFile._Imports = CompositeList(CodeGeneratorRequest_RequestedFile_Import);\nCodeGeneratorRequest._Nodes = CompositeList(Node);\nCodeGeneratorRequest._SourceInfo = CompositeList(Node_SourceInfo);\nCodeGeneratorRequest._RequestedFiles = CompositeList(CodeGeneratorRequest_RequestedFile);\n\nexport { Annotation, Brand, Brand_Binding, Brand_Binding_Which, Brand_Scope, Brand_Scope_Which, CapnpVersion, CodeGeneratorRequest, CodeGeneratorRequest_RequestedFile, CodeGeneratorRequest_RequestedFile_Import, ElementSize, Enumerant, Field, Field_Group, Field_Ordinal, Field_Ordinal_Which, Field_Slot, Field_Which, Method, Node, Node_Annotation, Node_Const, Node_Enum, Node_Interface, Node_NestedNode, Node_Parameter, Node_SourceInfo, Node_SourceInfo_Member, Node_Struct, Node_Which, Superclass, Type, Type_AnyPointer, Type_AnyPointer_ImplicitMethodParameter, Type_AnyPointer_Parameter, Type_AnyPointer_Unconstrained, Type_AnyPointer_Unconstrained_Which, Type_AnyPointer_Which, Type_Enum, Type_Interface, Type_List, Type_Struct, Type_Which, Value, Value_Which, _capnpFileId };\n","import { N as format, P as SEG_NOT_WORD_ALIGNED, Q as DEFAULT_BUFFER_SIZE, R as SEG_ID_OUT_OF_BOUNDS, T as padToWord, U as SEG_GET_NON_ZERO_SINGLE, V as MIN_SINGLE_SEGMENT_GROWTH, W as assertNever, X as MSG_PACK_NOT_WORD_ALIGNED, Y as PACK_SPAN_THRESHOLD, Z as MAX_SEGMENT_LENGTH, _ as SEG_SIZE_OVERFLOW, $ as Pointer, a0 as NATIVE_LITTLE_ENDIAN, a1 as SEG_REPLACEMENT_BUFFER_TOO_SMALL, a2 as DEFAULT_TRAVERSE_LIMIT, a3 as MSG_INVALID_FRAME_HEADER, a4 as MSG_SEGMENT_TOO_SMALL, a5 as MSG_SEGMENT_OUT_OF_BOUNDS, a6 as dumpBuffer, a7 as validate, a8 as PointerType, a9 as getTargetStructSize, aa as resize, ab as initStruct, c as copyFrom } from './capnp-es.0-_cOx6D.mjs';\n\nvar ArenaKind = /* @__PURE__ */ ((ArenaKind2) => {\n ArenaKind2[ArenaKind2[\"SINGLE_SEGMENT\"] = 0] = \"SINGLE_SEGMENT\";\n ArenaKind2[ArenaKind2[\"MULTI_SEGMENT\"] = 1] = \"MULTI_SEGMENT\";\n return ArenaKind2;\n})(ArenaKind || {});\n\nclass ArenaAllocationResult {\n /**\n * The newly allocated buffer. This buffer might be a copy of an existing segment's buffer with free space appended.\n */\n buffer;\n /**\n * The id of the newly-allocated segment.\n */\n id;\n constructor(id, buffer) {\n this.id = id;\n this.buffer = buffer;\n }\n}\n\nclass MultiSegmentArena {\n constructor(buffers = [new ArrayBuffer(DEFAULT_BUFFER_SIZE)]) {\n this.buffers = buffers;\n let i = buffers.length;\n while (--i >= 0) {\n if ((buffers[i].byteLength & 7) !== 0) {\n throw new Error(format(SEG_NOT_WORD_ALIGNED, buffers[i].byteLength));\n }\n }\n }\n static allocate = allocate$2;\n static getBuffer = getBuffer$2;\n static getNumSegments = getNumSegments$2;\n kind = ArenaKind.MULTI_SEGMENT;\n toString() {\n return format(\"MultiSegmentArena_segments:%d\", getNumSegments$2(this));\n }\n}\nfunction allocate$2(minSize, m) {\n const b = new ArrayBuffer(padToWord(Math.max(minSize, DEFAULT_BUFFER_SIZE)));\n m.buffers.push(b);\n return new ArenaAllocationResult(m.buffers.length - 1, b);\n}\nfunction getBuffer$2(id, m) {\n if (id < 0 || id >= m.buffers.length) {\n throw new Error(format(SEG_ID_OUT_OF_BOUNDS, id));\n }\n return m.buffers[id];\n}\nfunction getNumSegments$2(m) {\n return m.buffers.length;\n}\n\nclass SingleSegmentArena {\n static allocate = allocate$1;\n static getBuffer = getBuffer$1;\n static getNumSegments = getNumSegments$1;\n buffer;\n kind = ArenaKind.SINGLE_SEGMENT;\n constructor(buffer = new ArrayBuffer(DEFAULT_BUFFER_SIZE)) {\n if ((buffer.byteLength & 7) !== 0) {\n throw new Error(format(SEG_NOT_WORD_ALIGNED, buffer.byteLength));\n }\n this.buffer = buffer;\n }\n toString() {\n return format(\"SingleSegmentArena_len:%x\", this.buffer.byteLength);\n }\n}\nfunction allocate$1(minSize, segments, s) {\n const srcBuffer = segments.length > 0 ? segments[0].buffer : s.buffer;\n minSize = minSize < MIN_SINGLE_SEGMENT_GROWTH ? MIN_SINGLE_SEGMENT_GROWTH : padToWord(minSize);\n s.buffer = new ArrayBuffer(srcBuffer.byteLength + minSize);\n new Float64Array(s.buffer).set(new Float64Array(srcBuffer));\n return new ArenaAllocationResult(0, s.buffer);\n}\nfunction getBuffer$1(id, s) {\n if (id !== 0) throw new Error(format(SEG_GET_NON_ZERO_SINGLE, id));\n return s.buffer;\n}\nfunction getNumSegments$1() {\n return 1;\n}\n\nclass Arena {\n static allocate = allocate;\n static copy = copy$1;\n static getBuffer = getBuffer;\n static getNumSegments = getNumSegments;\n}\nfunction allocate(minSize, segments, a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n return MultiSegmentArena.allocate(minSize, a);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return SingleSegmentArena.allocate(minSize, segments, a);\n }\n default: {\n return assertNever(a);\n }\n }\n}\nfunction copy$1(a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n let i = a.buffers.length;\n const buffers = Array.from({ length: i });\n while (--i >= 0) {\n buffers[i] = a.buffers[i].slice(0);\n }\n return new MultiSegmentArena(buffers);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return new SingleSegmentArena(a.buffer.slice(0));\n }\n default: {\n return assertNever(a);\n }\n }\n}\nfunction getBuffer(id, a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n return MultiSegmentArena.getBuffer(id, a);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return SingleSegmentArena.getBuffer(id, a);\n }\n default: {\n return assertNever(a);\n }\n }\n}\nfunction getNumSegments(a) {\n switch (a.kind) {\n case ArenaKind.MULTI_SEGMENT: {\n return MultiSegmentArena.getNumSegments(a);\n }\n case ArenaKind.SINGLE_SEGMENT: {\n return SingleSegmentArena.getNumSegments();\n }\n default: {\n return assertNever(a);\n }\n }\n}\n\nfunction getHammingWeight(x) {\n let w = x - (x >> 1 & 1431655765);\n w = (w & 858993459) + (w >> 2 & 858993459);\n return (w + (w >> 4) & 252645135) * 16843009 >> 24;\n}\nfunction getTagByte(a, b, c, d, e, f, g, h) {\n return (a === 0 ? 0 : 1) | (b === 0 ? 0 : 2) | (c === 0 ? 0 : 4) | (d === 0 ? 0 : 8) | (e === 0 ? 0 : 16) | (f === 0 ? 0 : 32) | (g === 0 ? 0 : 64) | (h === 0 ? 0 : 128);\n}\nfunction getUnpackedByteLength(packed) {\n const p = new Uint8Array(packed);\n let wordCount = 0;\n let lastTag = 119 /* NONZERO_NONSPAN */;\n for (let i = 0; i < p.byteLength; ) {\n const tag = p[i];\n if (lastTag === 0 /* ZERO */) {\n wordCount += tag;\n i++;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else if (lastTag === 255 /* SPAN */) {\n wordCount += tag;\n i += tag * 8 + 1;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else {\n wordCount++;\n i += getHammingWeight(tag) + 1;\n lastTag = tag;\n }\n }\n return wordCount * 8;\n}\nfunction getZeroByteCount(a, b, c, d, e, f, g, h) {\n return (a === 0 ? 1 : 0) + (b === 0 ? 1 : 0) + (c === 0 ? 1 : 0) + (d === 0 ? 1 : 0) + (e === 0 ? 1 : 0) + (f === 0 ? 1 : 0) + (g === 0 ? 1 : 0) + (h === 0 ? 1 : 0);\n}\nfunction pack(unpacked, byteOffset = 0, byteLength) {\n if (unpacked.byteLength % 8 !== 0) {\n throw new Error(MSG_PACK_NOT_WORD_ALIGNED);\n }\n const src = new Uint8Array(unpacked, byteOffset, byteLength);\n const dst = [];\n let lastTag = 119 /* NONZERO_NONSPAN */;\n let spanWordCountOffset = 0;\n let rangeWordCount = 0;\n for (let srcByteOffset = 0; srcByteOffset < src.byteLength; srcByteOffset += 8) {\n const a = src[srcByteOffset];\n const b = src[srcByteOffset + 1];\n const c = src[srcByteOffset + 2];\n const d = src[srcByteOffset + 3];\n const e = src[srcByteOffset + 4];\n const f = src[srcByteOffset + 5];\n const g = src[srcByteOffset + 6];\n const h = src[srcByteOffset + 7];\n const tag = getTagByte(a, b, c, d, e, f, g, h);\n let skipWriteWord = true;\n switch (lastTag) {\n case 0 /* ZERO */: {\n if (tag !== 0 /* ZERO */ || rangeWordCount >= 255) {\n dst.push(rangeWordCount);\n rangeWordCount = 0;\n skipWriteWord = false;\n } else {\n rangeWordCount++;\n }\n break;\n }\n case 255 /* SPAN */: {\n const zeroCount = getZeroByteCount(a, b, c, d, e, f, g, h);\n if (zeroCount >= PACK_SPAN_THRESHOLD || rangeWordCount >= 255) {\n dst[spanWordCountOffset] = rangeWordCount;\n rangeWordCount = 0;\n skipWriteWord = false;\n } else {\n dst.push(a, b, c, d, e, f, g, h);\n rangeWordCount++;\n }\n break;\n }\n default: {\n skipWriteWord = false;\n break;\n }\n }\n if (skipWriteWord) {\n continue;\n }\n dst.push(tag);\n lastTag = tag;\n if (a !== 0) dst.push(a);\n if (b !== 0) dst.push(b);\n if (c !== 0) dst.push(c);\n if (d !== 0) dst.push(d);\n if (e !== 0) dst.push(e);\n if (f !== 0) dst.push(f);\n if (g !== 0) dst.push(g);\n if (h !== 0) dst.push(h);\n if (tag === 255 /* SPAN */) {\n spanWordCountOffset = dst.length;\n dst.push(0);\n }\n }\n if (lastTag === 0 /* ZERO */) {\n dst.push(rangeWordCount);\n } else if (lastTag === 255 /* SPAN */) {\n dst[spanWordCountOffset] = rangeWordCount;\n }\n return new Uint8Array(dst).buffer;\n}\nfunction unpack(packed) {\n const src = new Uint8Array(packed);\n const dst = new Uint8Array(new ArrayBuffer(getUnpackedByteLength(packed)));\n let lastTag = 119 /* NONZERO_NONSPAN */;\n for (let srcByteOffset = 0, dstByteOffset = 0; srcByteOffset < src.byteLength; ) {\n const tag = src[srcByteOffset];\n if (lastTag === 0 /* ZERO */) {\n dstByteOffset += tag * 8;\n srcByteOffset++;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else if (lastTag === 255 /* SPAN */) {\n const spanByteLength = tag * 8;\n dst.set(\n src.subarray(srcByteOffset + 1, srcByteOffset + 1 + spanByteLength),\n dstByteOffset\n );\n dstByteOffset += spanByteLength;\n srcByteOffset += 1 + spanByteLength;\n lastTag = 119 /* NONZERO_NONSPAN */;\n } else {\n srcByteOffset++;\n for (let i = 1; i <= 128; i <<= 1) {\n if ((tag & i) !== 0) {\n dst[dstByteOffset] = src[srcByteOffset++];\n }\n dstByteOffset++;\n }\n lastTag = tag;\n }\n }\n return dst.buffer;\n}\n\nclass Segment {\n constructor(id, message, buffer, byteLength = 0) {\n this.id = id;\n this.message = message;\n this.message = message;\n this.buffer = buffer;\n this._dv = new DataView(buffer);\n this.byteOffset = 0;\n this.byteLength = byteLength;\n }\n buffer;\n /** The number of bytes currently allocated in the segment. */\n byteLength;\n /**\n * This value should always be zero. It's only here to satisfy the DataView interface.\n *\n * In the future the Segment implementation (or a child class) may allow accessing the buffer from a nonzero offset,\n * but that adds a lot of extra arithmetic.\n */\n byteOffset;\n [Symbol.toStringTag] = \"Segment\";\n _dv;\n /**\n * Attempt to allocate the requested number of bytes in this segment. If this segment is full this method will return\n * a pointer to freshly allocated space in another segment from the same message.\n *\n * @param byteLength The number of bytes to allocate, will be rounded up to the nearest word.\n * @returns A pointer to the newly allocated space.\n */\n allocate(byteLength) {\n let segment = this;\n byteLength = padToWord(byteLength);\n if (byteLength > MAX_SEGMENT_LENGTH - 8) {\n throw new Error(format(SEG_SIZE_OVERFLOW, byteLength));\n }\n if (!segment.hasCapacity(byteLength)) {\n segment = segment.message.allocateSegment(byteLength);\n }\n const byteOffset = segment.byteLength;\n segment.byteLength += byteLength;\n return new Pointer(segment, byteOffset);\n }\n /**\n * Quickly copy a word (8 bytes) from `srcSegment` into this one at the given offset.\n *\n * @param byteOffset The offset to write the word to.\n * @param srcSegment The segment to copy the word from.\n * @param srcByteOffset The offset from the start of `srcSegment` to copy from.\n */\n copyWord(byteOffset, srcSegment, srcByteOffset) {\n const value = srcSegment._dv.getFloat64(\n srcByteOffset,\n NATIVE_LITTLE_ENDIAN\n );\n this._dv.setFloat64(byteOffset, value, NATIVE_LITTLE_ENDIAN);\n }\n /**\n * Quickly copy words from `srcSegment` into this one.\n *\n * @param byteOffset The offset to start copying into.\n * @param srcSegment The segment to copy from.\n * @param srcByteOffset The start offset to copy from.\n * @param wordLength The number of words to copy.\n */\n copyWords(byteOffset, srcSegment, srcByteOffset, wordLength) {\n const dst = new Float64Array(this.buffer, byteOffset, wordLength);\n const src = new Float64Array(srcSegment.buffer, srcByteOffset, wordLength);\n dst.set(src);\n }\n /**\n * Quickly fill a number of words in the buffer with zeroes.\n *\n * @param byteOffset The first byte to set to zero.\n * @param wordLength The number of words (not bytes!) to zero out.\n */\n fillZeroWords(byteOffset, wordLength) {\n new Float64Array(this.buffer, byteOffset, wordLength).fill(0);\n }\n getBigInt64(byteOffset, littleEndian) {\n return this._dv.getBigInt64(byteOffset, littleEndian);\n }\n getBigUint64(byteOffset, littleEndian) {\n return this._dv.getBigUint64(byteOffset, littleEndian);\n }\n /**\n * Get the total number of bytes available in this segment (the size of its underlying buffer).\n *\n * @returns The total number of bytes this segment can hold.\n */\n getCapacity() {\n return this.buffer.byteLength;\n }\n /**\n * Read a float32 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getFloat32(byteOffset) {\n return this._dv.getFloat32(byteOffset, true);\n }\n /**\n * Read a float64 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getFloat64(byteOffset) {\n return this._dv.getFloat64(byteOffset, true);\n }\n /**\n * Read an int16 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt16(byteOffset) {\n return this._dv.getInt16(byteOffset, true);\n }\n /**\n * Read an int32 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt32(byteOffset) {\n return this._dv.getInt32(byteOffset, true);\n }\n /**\n * Read an int64 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt64(byteOffset) {\n return this._dv.getBigInt64(byteOffset, true);\n }\n /**\n * Read an int8 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getInt8(byteOffset) {\n return this._dv.getInt8(byteOffset);\n }\n /**\n * Read a uint16 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint16(byteOffset) {\n return this._dv.getUint16(byteOffset, true);\n }\n /**\n * Read a uint32 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint32(byteOffset) {\n return this._dv.getUint32(byteOffset, true);\n }\n /**\n * Read a uint64 value (as a bigint) out of this segment.\n * NOTE: this does not copy the memory region, so updates to the underlying buffer will affect the returned value!\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint64(byteOffset) {\n return this._dv.getBigUint64(byteOffset, true);\n }\n /**\n * Read a uint8 value out of this segment.\n *\n * @param byteOffset The offset in bytes to the value.\n * @returns The value.\n */\n getUint8(byteOffset) {\n return this._dv.getUint8(byteOffset);\n }\n hasCapacity(byteLength) {\n return this.buffer.byteLength - this.byteLength >= byteLength;\n }\n /**\n * Quickly check the word at the given offset to see if it is equal to zero.\n *\n * PERF_V8: Fastest way to do this is by reading the whole word as a `number` (float64) in the _native_ endian format\n * and see if it's zero.\n *\n * Benchmark: http://jsben.ch/#/Pjooc\n *\n * @param byteOffset The offset to the word.\n * @returns `true` if the word is zero.\n */\n isWordZero(byteOffset) {\n return this._dv.getFloat64(byteOffset, NATIVE_LITTLE_ENDIAN) === 0;\n }\n /**\n * Swap out this segment's underlying buffer with a new one. It's assumed that the new buffer has the same content but\n * more free space, otherwise all existing pointers to this segment will be hilariously broken.\n *\n * @param buffer The new buffer to use.\n */\n replaceBuffer(buffer) {\n if (this.buffer === buffer) {\n return;\n }\n if (buffer.byteLength < this.byteLength) {\n throw new Error(SEG_REPLACEMENT_BUFFER_TOO_SMALL);\n }\n this._dv = new DataView(buffer);\n this.buffer = buffer;\n }\n setBigInt64(byteOffset, value, littleEndian) {\n this._dv.setBigInt64(byteOffset, value, littleEndian);\n }\n /** WARNING: This function is not yet implemented. */\n setBigUint64(byteOffset, value, littleEndian) {\n this._dv.setBigUint64(byteOffset, value, littleEndian);\n }\n /**\n * Write a float32 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setFloat32(byteOffset, val) {\n this._dv.setFloat32(byteOffset, val, true);\n }\n /**\n * Write an float64 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setFloat64(byteOffset, val) {\n this._dv.setFloat64(byteOffset, val, true);\n }\n /**\n * Write an int16 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt16(byteOffset, val) {\n this._dv.setInt16(byteOffset, val, true);\n }\n /**\n * Write an int32 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt32(byteOffset, val) {\n this._dv.setInt32(byteOffset, val, true);\n }\n /**\n * Write an int8 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt8(byteOffset, val) {\n this._dv.setInt8(byteOffset, val);\n }\n /**\n * Write an int64 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setInt64(byteOffset, val) {\n this._dv.setBigInt64(byteOffset, val, true);\n }\n /**\n * Write a uint16 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint16(byteOffset, val) {\n this._dv.setUint16(byteOffset, val, true);\n }\n /**\n * Write a uint32 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint32(byteOffset, val) {\n this._dv.setUint32(byteOffset, val, true);\n }\n /**\n * Write a uint64 value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint64(byteOffset, val) {\n this._dv.setBigUint64(byteOffset, val, true);\n }\n /**\n * Write a uint8 (byte) value to the specified offset.\n *\n * @param byteOffset The offset from the beginning of the buffer.\n * @param val The value to store.\n */\n setUint8(byteOffset, val) {\n this._dv.setUint8(byteOffset, val);\n }\n /**\n * Write a zero word (8 bytes) to the specified offset. This is slightly faster than calling `setUint64` or\n * `setFloat64` with a zero value.\n *\n * Benchmark: http://jsben.ch/#/dUdPI\n *\n * @param byteOffset The offset of the word to set to zero.\n */\n setWordZero(byteOffset) {\n this._dv.setFloat64(byteOffset, 0, NATIVE_LITTLE_ENDIAN);\n }\n toString() {\n return format(\n \"Segment_id:%d,off:%a,len:%a,cap:%a\",\n this.id,\n this.byteLength,\n this.byteOffset,\n this.buffer.byteLength\n );\n }\n}\n\nclass Message {\n static allocateSegment = allocateSegment;\n static dump = dump;\n static getRoot = getRoot;\n static getSegment = getSegment;\n static initRoot = initRoot;\n static readRawPointer = readRawPointer;\n static toArrayBuffer = toArrayBuffer;\n static toPackedArrayBuffer = toPackedArrayBuffer;\n _capnp;\n /**\n * A Cap'n Proto message.\n *\n * SECURITY WARNING: In Node.js do not pass a Buffer's internal array buffer into this constructor. Pass the buffer\n * directly and everything will be fine. If not, your message will potentially be initialized with random memory\n * contents!\n *\n * The constructor method creates a new Message, optionally using a provided arena for segment allocation, or a buffer\n * to read from.\n *\n * @param src The source for the message.\n * A value of `undefined` will cause the message to initialize with a single segment arena only big enough for the\n * root pointer; it will expand as you go. This is a reasonable choice for most messages.\n *\n * Passing an arena will cause the message to use that arena for its segment allocation. Contents will be accepted\n * as-is.\n *\n * Passing an array buffer view (like `DataView`, `Uint8Array` or `Buffer`) will create a **copy** of the source\n * buffer; beware of the potential performance cost!\n *\n * @param packed Whether or not the message is packed. If `true` (the default), the message will be\n * unpacked.\n *\n * @param singleSegment If true, `src` will be treated as a message consisting of a single segment without\n * a framing header.\n *\n */\n constructor(src, packed = true, singleSegment = false) {\n this._capnp = initMessage(src, packed, singleSegment);\n if (src) {\n preallocateSegments(this);\n }\n }\n allocateSegment(byteLength) {\n return allocateSegment(byteLength, this);\n }\n /**\n * Copies the contents of this message into an identical message with its own ArrayBuffers.\n *\n * @returns A copy of this message.\n */\n copy() {\n return copy(this);\n }\n /**\n * Create a pretty-printed string dump of this message; incredibly useful for debugging.\n *\n * WARNING: Do not call this method on large messages!\n *\n * @returns A big steaming pile of pretty hex digits.\n */\n dump() {\n return dump(this);\n }\n /**\n * Get a struct pointer for the root of this message. This is primarily used when reading a message; it will not\n * overwrite existing data.\n *\n * @param RootStruct The struct type to use as the root.\n * @returns A struct representing the root of the message.\n */\n getRoot(RootStruct) {\n return getRoot(RootStruct, this);\n }\n /**\n * Get a segment by its id.\n *\n * This will lazily allocate the first segment if it doesn't already exist.\n *\n * @param id The segment id.\n * @returns The requested segment.\n */\n getSegment(id) {\n return getSegment(id, this);\n }\n /**\n * Initialize a new message using the provided struct type as the root.\n *\n * @param RootStruct The struct type to use as the root.\n * @returns An initialized struct pointing to the root of the message.\n */\n initRoot(RootStruct) {\n return initRoot(RootStruct, this);\n }\n /**\n * Set the root of the message to a copy of the given pointer. Used internally\n * to make copies of pointers for default values.\n *\n * @param src The source pointer to copy.\n */\n setRoot(src) {\n setRoot(src, this);\n }\n /**\n * Combine the contents of this message's segments into a single array buffer and prepend a stream framing header\n * containing information about the following segment data.\n *\n * @returns An ArrayBuffer with the contents of this message.\n */\n toArrayBuffer() {\n return toArrayBuffer(this);\n }\n /**\n * Like `toArrayBuffer()`, but also applies the packing algorithm to the output. This is typically what you want to\n * use if you're sending the message over a network link or other slow I/O interface where size matters.\n *\n * @returns A packed message.\n */\n toPackedArrayBuffer() {\n return toPackedArrayBuffer(this);\n }\n addCap(client) {\n if (!this._capnp.capTable) {\n this._capnp.capTable = [];\n }\n const id = this._capnp.capTable.length;\n this._capnp.capTable.push(client);\n return id;\n }\n toString() {\n return `Message_arena:${this._capnp.arena}`;\n }\n}\nfunction initMessage(src, packed = true, singleSegment = false) {\n if (src === undefined) {\n return {\n arena: new SingleSegmentArena(),\n segments: [],\n traversalLimit: DEFAULT_TRAVERSE_LIMIT\n };\n }\n if (isAnyArena(src)) {\n return { arena: src, segments: [], traversalLimit: DEFAULT_TRAVERSE_LIMIT };\n }\n let buf = src;\n if (isArrayBufferView(buf)) {\n buf = buf.buffer.slice(\n buf.byteOffset,\n buf.byteOffset + buf.byteLength\n );\n }\n if (packed) {\n buf = unpack(buf);\n }\n if (singleSegment) {\n return {\n arena: new SingleSegmentArena(buf),\n segments: [],\n traversalLimit: DEFAULT_TRAVERSE_LIMIT\n };\n }\n return {\n arena: new MultiSegmentArena(getFramedSegments(buf)),\n segments: [],\n traversalLimit: DEFAULT_TRAVERSE_LIMIT\n };\n}\nfunction getFramedSegments(message) {\n const dv = new DataView(message);\n const segmentCount = dv.getUint32(0, true) + 1;\n const segments = Array.from({ length: segmentCount });\n let byteOffset = 4 + segmentCount * 4;\n byteOffset += byteOffset % 8;\n if (byteOffset + segmentCount * 4 > message.byteLength) {\n throw new Error(MSG_INVALID_FRAME_HEADER);\n }\n for (let i = 0; i < segmentCount; i++) {\n const byteLength = dv.getUint32(4 + i * 4, true) * 8;\n if (byteOffset + byteLength > message.byteLength) {\n throw new Error(MSG_INVALID_FRAME_HEADER);\n }\n segments[i] = message.slice(byteOffset, byteOffset + byteLength);\n byteOffset += byteLength;\n }\n return segments;\n}\nfunction preallocateSegments(m) {\n const numSegments = Arena.getNumSegments(m._capnp.arena);\n m._capnp.segments = Array.from({ length: numSegments });\n for (let i = 0; i < numSegments; i++) {\n if (i === 0 && Arena.getBuffer(i, m._capnp.arena).byteLength < 8) {\n throw new Error(MSG_SEGMENT_TOO_SMALL);\n }\n const buffer = Arena.getBuffer(i, m._capnp.arena);\n const segment = new Segment(i, m, buffer, buffer.byteLength);\n m._capnp.segments[i] = segment;\n }\n}\nfunction isArrayBufferView(src) {\n return src.byteOffset !== undefined;\n}\nfunction isAnyArena(o) {\n return o.kind !== undefined;\n}\nfunction allocateSegment(byteLength, m) {\n const res = Arena.allocate(byteLength, m._capnp.segments, m._capnp.arena);\n let s;\n if (res.id === m._capnp.segments.length) {\n s = new Segment(res.id, m, res.buffer);\n m._capnp.segments.push(s);\n } else if (res.id < 0 || res.id > m._capnp.segments.length) {\n throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, res.id, m));\n } else {\n s = m._capnp.segments[res.id];\n s.replaceBuffer(res.buffer);\n }\n return s;\n}\nfunction dump(m) {\n let r = \"\";\n if (m._capnp.segments.length === 0) {\n return \"================\\nNo Segments\\n================\\n\";\n }\n for (let i = 0; i < m._capnp.segments.length; i++) {\n r += `================\nSegment #${i}\n================\n`;\n const { buffer, byteLength } = m._capnp.segments[i];\n const b = new Uint8Array(buffer, 0, byteLength);\n r += dumpBuffer(b);\n }\n return r;\n}\nfunction getRoot(RootStruct, m) {\n const root = new RootStruct(m.getSegment(0), 0);\n validate(PointerType.STRUCT, root);\n const ts = getTargetStructSize(root);\n if (ts.dataByteLength < RootStruct._capnp.size.dataByteLength || ts.pointerLength < RootStruct._capnp.size.pointerLength) {\n resize(RootStruct._capnp.size, root);\n }\n return root;\n}\nfunction getSegment(id, m) {\n const segmentLength = m._capnp.segments.length;\n if (id === 0 && segmentLength === 0) {\n const arenaSegments = Arena.getNumSegments(m._capnp.arena);\n if (arenaSegments === 0) {\n allocateSegment(DEFAULT_BUFFER_SIZE, m);\n } else {\n m._capnp.segments[0] = new Segment(\n 0,\n m,\n Arena.getBuffer(0, m._capnp.arena)\n );\n }\n if (!m._capnp.segments[0].hasCapacity(8)) {\n throw new Error(MSG_SEGMENT_TOO_SMALL);\n }\n m._capnp.segments[0].allocate(8);\n return m._capnp.segments[0];\n }\n if (id < 0 || id >= segmentLength) {\n throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, id, m));\n }\n return m._capnp.segments[id];\n}\nfunction initRoot(RootStruct, m) {\n const root = new RootStruct(m.getSegment(0), 0);\n initStruct(RootStruct._capnp.size, root);\n return root;\n}\nfunction readRawPointer(data) {\n return new Pointer(new Message(data).getSegment(0), 0);\n}\nfunction setRoot(src, m) {\n copyFrom(src, new Pointer(m.getSegment(0), 0));\n}\nfunction toArrayBuffer(m) {\n const streamFrame = getStreamFrame(m);\n if (m._capnp.segments.length === 0) {\n getSegment(0, m);\n }\n const { segments } = m._capnp;\n const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + padToWord(s.byteLength), 0);\n const out = new Uint8Array(new ArrayBuffer(totalLength));\n let o = streamFrame.byteLength;\n out.set(new Uint8Array(streamFrame));\n for (const s of segments) {\n const segmentLength = padToWord(s.byteLength);\n out.set(new Uint8Array(s.buffer, 0, segmentLength), o);\n o += segmentLength;\n }\n return out.buffer;\n}\nfunction toPackedArrayBuffer(m) {\n const streamFrame = pack(getStreamFrame(m));\n if (m._capnp.segments.length === 0) {\n m.getSegment(0);\n }\n const segments = m._capnp.segments.map(\n (s) => pack(s.buffer, 0, padToWord(s.byteLength))\n );\n const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + s.byteLength, 0);\n const out = new Uint8Array(new ArrayBuffer(totalLength));\n let o = streamFrame.byteLength;\n out.set(new Uint8Array(streamFrame));\n for (const s of segments) {\n out.set(new Uint8Array(s), o);\n o += s.byteLength;\n }\n return out.buffer;\n}\nfunction getStreamFrame(m) {\n const { length } = m._capnp.segments;\n if (length === 0) {\n return new Float64Array(1).buffer;\n }\n const frameLength = 4 + length * 4 + (1 - length % 2) * 4;\n const out = new DataView(new ArrayBuffer(frameLength));\n out.setUint32(0, length - 1, true);\n for (const [i, s] of m._capnp.segments.entries()) {\n out.setUint32(i * 4 + 4, s.byteLength / 8, true);\n }\n return out.buffer;\n}\nfunction copy(m) {\n return new Message(Arena.copy(m._capnp.arena));\n}\n\nexport { Message as M, readRawPointer as r };\n","import ts from 'typescript';\nimport { Type, ElementSize, Field, Type_Which, Value, Node, CodeGeneratorRequest } from '../capnp/schema.mjs';\nimport { M as Message } from './capnp-es.GpvEvMIK.mjs';\nimport { N as format, t as testWhich, b as getUint16, g as getPointer, an as pad } from './capnp-es.0-_cOx6D.mjs';\n\nconst GEN_EXPLICIT_DEFAULT_NON_PRIMITIVE = \"CAPNP-ES000 Don't know how to generate a %s field with an explicit default value.\";\nconst GEN_FIELD_NON_INLINE_STRUCT_LIST = \"CAPNP-ES001 Don't know how to generate non-inline struct lists.\";\nconst GEN_NODE_LOOKUP_FAIL = \"CAPNP-ES002 Failed to look up node id %s.\";\nconst GEN_NODE_UNKNOWN_TYPE = `CAPNP-ES003 Don't know how to generate a \"%s\" node.`;\nconst GEN_SERIALIZE_UNKNOWN_VALUE = \"CAPNP-ES004 Don't know how to serialize a value of kind %s.\";\nconst GEN_UNKNOWN_STRUCT_FIELD = \"CAPNP-ES005 Don't know how to generate a struct field of kind %d.\";\nconst GEN_UNKNOWN_TYPE = \"CAPNP-ES006 Unknown slot type encountered: %d\";\nconst GEN_UNSUPPORTED_LIST_ELEMENT_TYPE = \"CAPNP-ES007 Encountered an unsupported list element type: %d\";\nconst GEN_TS_EMIT_FAILED = \"CAPNP-ES009 Failed to transpile emitted schema source code; see above for error messages.\";\nconst GEN_UNKNOWN_DEFAULT = \"CAPNP-ES010 Don't know how to generate a default value for %s fields.\";\n\nconst ConcreteListType = {\n [Type.ANY_POINTER]: \"$.AnyPointerList\",\n [Type.BOOL]: \"$.BoolList\",\n [Type.DATA]: \"$.DataList\",\n [Type.ENUM]: \"$.Uint16List\",\n [Type.FLOAT32]: \"$.Float32List\",\n [Type.FLOAT64]: \"$.Float64List\",\n [Type.INT16]: \"$.Int16List\",\n [Type.INT32]: \"$.Int32List\",\n [Type.INT64]: \"$.Int64List\",\n [Type.INT8]: \"$.Int8List\",\n [Type.INTERFACE]: \"$.InterfaceList\",\n [Type.LIST]: \"$.PointerList\",\n [Type.STRUCT]: \"$.CompositeList\",\n [Type.TEXT]: \"$.TextList\",\n [Type.UINT16]: \"$.Uint16List\",\n [Type.UINT32]: \"$.Uint32List\",\n [Type.UINT64]: \"$.Uint64List\",\n [Type.UINT8]: \"$.Uint8List\",\n [Type.VOID]: \"$.VoidList\"\n};\nconst Primitives = {\n [Type.BOOL]: {\n byteLength: 1,\n getter: \"getBit\",\n mask: \"getBitMask\",\n setter: \"setBit\"\n },\n [Type.ENUM]: {\n byteLength: 2,\n getter: \"getUint16\",\n mask: \"getUint16Mask\",\n setter: \"setUint16\"\n },\n [Type.FLOAT32]: {\n byteLength: 4,\n getter: \"getFloat32\",\n mask: \"getFloat32Mask\",\n setter: \"setFloat32\"\n },\n [Type.FLOAT64]: {\n byteLength: 8,\n getter: \"getFloat64\",\n mask: \"getFloat64Mask\",\n setter: \"setFloat64\"\n },\n [Type.INT16]: {\n byteLength: 2,\n getter: \"getInt16\",\n mask: \"getInt16Mask\",\n setter: \"setInt16\"\n },\n [Type.INT32]: {\n byteLength: 4,\n getter: \"getInt32\",\n mask: \"getInt32Mask\",\n setter: \"setInt32\"\n },\n [Type.INT64]: {\n byteLength: 8,\n getter: \"getInt64\",\n mask: \"getInt64Mask\",\n setter: \"setInt64\"\n },\n [Type.INT8]: {\n byteLength: 1,\n getter: \"getInt8\",\n mask: \"getInt8Mask\",\n setter: \"setInt8\"\n },\n [Type.UINT16]: {\n byteLength: 2,\n getter: \"getUint16\",\n mask: \"getUint16Mask\",\n setter: \"setUint16\"\n },\n [Type.UINT32]: {\n byteLength: 4,\n getter: \"getUint32\",\n mask: \"getUint32Mask\",\n setter: \"setUint32\"\n },\n [Type.UINT64]: {\n byteLength: 8,\n getter: \"getUint64\",\n mask: \"getUint64Mask\",\n setter: \"setUint64\"\n },\n [Type.UINT8]: {\n byteLength: 1,\n getter: \"getUint8\",\n mask: \"getUint8Mask\",\n setter: \"setUint8\"\n },\n [Type.VOID]: {\n byteLength: 0,\n getter: \"getVoid\",\n mask: \"getVoidMask\",\n setter: \"setVoid\"\n }\n};\n\nconst SOURCE_COMMENT = `\n/* eslint-disable */\n// biome-ignore lint: disable\n\n// Generated by storm-capnpc\n// Note: Do not edit this file manually - it will be overwritten automatically\n\n`;\nconst TS_FILE_ID = \"e37ded525a68a7c9\";\n\n/**\n * A function for converting hex <-> dec w/o loss of precision.\n *\n * The problem is that parseInt(\"0x12345...\") isn't precise enough to convert\n * 64-bit integers correctly.\n *\n * Internally, this uses arrays to encode decimal digits starting with the least\n * significant:\n * 8 = [8]\n * 16 = [6, 1]\n * 1024 = [4, 2, 0, 1]\n *\n * Source: http://www.danvk.org/hex2dec.html\n */\n\nvar hex2dec;\nvar hasRequiredHex2dec;\n\nfunction requireHex2dec () {\n\tif (hasRequiredHex2dec) return hex2dec;\n\thasRequiredHex2dec = 1;\n\t// Adds two arrays for the given base (10 or 16), returning the result.\n\t// This turns out to be the only \"primitive\" operation we need.\n\tfunction add(x, y, base) {\n\t var z = [];\n\t var n = Math.max(x.length, y.length);\n\t var carry = 0;\n\t var i = 0;\n\t while (i < n || carry) {\n\t var xi = i < x.length ? x[i] : 0;\n\t var yi = i < y.length ? y[i] : 0;\n\t var zi = carry + xi + yi;\n\t z.push(zi % base);\n\t carry = Math.floor(zi / base);\n\t i++;\n\t }\n\t return z;\n\t}\n\n\t// Returns a*x, where x is an array of decimal digits and a is an ordinary\n\t// JavaScript number. base is the number base of the array x.\n\tfunction multiplyByNumber(num, x, base) {\n\t if (num < 0) return null;\n\t if (num == 0) return [];\n\n\t var result = [];\n\t var power = x;\n\t while (true) {\n\t if (num & 1) {\n\t result = add(result, power, base);\n\t }\n\t num = num >> 1;\n\t if (num === 0) break;\n\t power = add(power, power, base);\n\t }\n\n\t return result;\n\t}\n\n\tfunction parseToDigitsArray(str, base) {\n\t var digits = str.split('');\n\t var ary = [];\n\t for (var i = digits.length - 1; i >= 0; i--) {\n\t var n = parseInt(digits[i], base);\n\t if (isNaN(n)) return null;\n\t ary.push(n);\n\t }\n\t return ary;\n\t}\n\n\tfunction convertBase(str, fromBase, toBase) {\n\t var digits = parseToDigitsArray(str, fromBase);\n\t if (digits === null) return null;\n\n\t var outArray = [];\n\t var power = [1];\n\t for (var i = 0; i < digits.length; i++) {\n\t // invariant: at this point, fromBase^i = power\n\t if (digits[i]) {\n\t outArray = add(outArray, multiplyByNumber(digits[i], power, toBase), toBase);\n\t }\n\t power = multiplyByNumber(fromBase, power, toBase);\n\t }\n\n\t var out = '';\n\t for (var i = outArray.length - 1; i >= 0; i--) {\n\t out += outArray[i].toString(toBase);\n\t }\n\t if (out === '') {\n\t out = '0';\n\t }\n\t return out;\n\t}\n\n\tfunction decToHex(decStr, opts) {\n\t var hidePrefix = opts && opts.prefix === false;\n\t var hex = convertBase(decStr, 10, 16);\n\t return hex ? (hidePrefix ? hex : '0x' + hex) : null;\n\t}\n\n\tfunction hexToDec(hexStr) {\n\t if (hexStr.substring(0, 2) === '0x') hexStr = hexStr.substring(2);\n\t hexStr = hexStr.toLowerCase();\n\t return convertBase(hexStr, 16, 10);\n\t}\n\n\thex2dec = {\n\t hexToDec: hexToDec,\n\t decToHex: decToHex\n\t};\n\treturn hex2dec;\n}\n\nvar hex2decExports = requireHex2dec();\n\nfunction c2s(s) {\n return splitCamel(s).map((x) => x.toUpperCase()).join(\"_\");\n}\nfunction c2t(s) {\n return s[0].toUpperCase() + s.slice(1);\n}\nfunction splitCamel(s) {\n let wasLo = false;\n return s.split(\"\").reduce((a, c) => {\n const lo = c.toUpperCase() !== c;\n const up = c.toLowerCase() !== c;\n if (a.length === 0 || wasLo && up) {\n a.push(c);\n } else {\n const i = a.length - 1;\n a[i] = a[i] + c;\n }\n wasLo = lo;\n return a;\n }, []);\n}\nfunction hexToBigInt(hexString) {\n return BigInt(hex2decExports.hexToDec(hexString));\n}\n\nfunction compareCodeOrder(a, b) {\n return a.codeOrder - b.codeOrder;\n}\nfunction getConcreteListType(ctx, type) {\n if (!type._isList) {\n return getJsType(ctx, type, false);\n }\n const { elementType } = type.list;\n const elementTypeWhich = elementType.which();\n if (elementTypeWhich === Type.LIST) {\n return `$.PointerList(${getConcreteListType(ctx, elementType)})`;\n } else if (elementTypeWhich === Type.STRUCT) {\n const structNode = lookupNode(ctx, elementType.struct.typeId);\n if (structNode.struct.preferredListEncoding !== ElementSize.INLINE_COMPOSITE) {\n throw new Error(GEN_FIELD_NON_INLINE_STRUCT_LIST);\n }\n return `$.CompositeList(${getJsType(ctx, elementType, false)})`;\n }\n return ConcreteListType[elementTypeWhich];\n}\nfunction getDisplayNamePrefix(node) {\n return node.displayName.slice(node.displayNamePrefixLength);\n}\nfunction getFullClassName(node) {\n return node.displayName.split(\":\")[1].split(\".\").map((s) => c2t(s)).join(\"_\");\n}\nfunction getJsType(ctx, type, constructor) {\n const whichType = type.which();\n switch (whichType) {\n case Type.ANY_POINTER: {\n return \"$.Pointer\";\n }\n case Type.BOOL: {\n return \"boolean\";\n }\n case Type.DATA: {\n return \"$.Data\";\n }\n case Type.ENUM: {\n return getFullClassName(lookupNode(ctx, type.enum.typeId));\n }\n case Type.FLOAT32:\n case Type.FLOAT64:\n case Type.INT16:\n case Type.INT32:\n case Type.INT8:\n case Type.UINT16:\n case Type.UINT32:\n case Type.UINT8: {\n return \"number\";\n }\n case Type.UINT64:\n case Type.INT64: {\n return \"bigint\";\n }\n case Type.INTERFACE: {\n return getFullClassName(lookupNode(ctx, type.interface.typeId));\n }\n case Type.LIST: {\n return `$.List${constructor ? \"Ctor\" : \"\"}<${getJsType(ctx, type.list.elementType, false)}>`;\n }\n case Type.STRUCT: {\n const c = getFullClassName(lookupNode(ctx, type.struct.typeId));\n return constructor ? `$.StructCtor<${c}>` : c;\n }\n case Type.TEXT: {\n return \"string\";\n }\n case Type.VOID: {\n return \"$.Void\";\n }\n default: {\n throw new Error(format(GEN_UNKNOWN_TYPE, whichType));\n }\n }\n}\nfunction getUnnamedUnionFields(node) {\n return node.struct.fields.filter(\n (field) => field.discriminantValue !== Field.NO_DISCRIMINANT\n );\n}\nfunction hasNode(ctx, lookup) {\n const id = typeof lookup === \"bigint\" ? lookup : lookup.id;\n return ctx.nodes.some((n) => n.id === id);\n}\nfunction loadRequestedFile(req, file) {\n const ctx = new CodeGeneratorFileContext(req, file);\n const schema2 = lookupNode(ctx, file.id);\n ctx.tsPath = schema2.displayName.replace(/\\.capnp$/, \"\") + \".ts\";\n return ctx;\n}\nfunction lookupNode(ctx, lookup) {\n const id = typeof lookup === \"bigint\" ? lookup : lookup.id;\n const node = ctx.nodes.find((n) => n.id === id);\n if (node === undefined) {\n throw new Error(format(GEN_NODE_LOOKUP_FAIL, id));\n }\n return node;\n}\nfunction lookupNodeSourceInfo(ctx, lookup) {\n const id = typeof lookup === \"bigint\" ? lookup : lookup.id;\n return ctx.req.sourceInfo.find((s) => s.id === id);\n}\nfunction needsConcreteListClass(field) {\n if (!field._isSlot) {\n return false;\n }\n const slotType = field.slot.type;\n if (!slotType._isList) {\n return false;\n }\n const { elementType } = slotType.list;\n return elementType._isStruct || elementType._isList;\n}\n\nfunction createBigInt(value) {\n let v = value.toString(16);\n let sign = \"\";\n if (v[0] === \"-\") {\n v = v.slice(1);\n sign = \"-\";\n }\n return `${sign}BigInt(\"0x${v}\")`;\n}\nfunction extractJSDocs(sourceInfo) {\n const docComment = sourceInfo?.docComment;\n if (!docComment) {\n return \"\";\n }\n return \"/**\\n\" + docComment.toString().split(\"\\n\").map((l) => `* ${l}`).join(\"\\n\") + \"\\n*/\";\n}\n\nfunction generateEnumNode(ctx, className, parentNode, fields) {\n const fieldIndexInCodeOrder = fields.map(({ codeOrder }, fieldIndex) => ({ fieldIndex, codeOrder })).sort(compareCodeOrder).map(({ fieldIndex }) => fieldIndex);\n const sourceInfo = lookupNodeSourceInfo(ctx, parentNode);\n const propInits = fieldIndexInCodeOrder.map((index) => {\n const field = fields[index];\n const docComment = extractJSDocs(sourceInfo?.members.at(index));\n const key = c2s(field.name);\n const val = field.discriminantValue || index;\n return `\n ${docComment}\n ${key}: ${val}`;\n });\n ctx.codeParts.push(`\n export const ${className} = {\n ${propInits.join(\",\\n\")}\n } as const;\n\n export type ${className} = (typeof ${className})[keyof typeof ${className}];\n `);\n}\n\nfunction generateInterfaceClasses(ctx, node) {\n generateMethodStructs(ctx, node);\n generateClient(ctx, node);\n generateServer(ctx, node);\n}\nfunction generateMethodStructs(ctx, node) {\n for (const method of node.interface.methods) {\n const paramNode = lookupNode(ctx, method.paramStructType);\n const resultNode = lookupNode(ctx, method.resultStructType);\n generateNode(ctx, paramNode);\n generateNode(ctx, resultNode);\n generateResultPromise(ctx, resultNode);\n }\n}\nfunction generateServer(ctx, node) {\n const fullClassName = getFullClassName(node);\n const serverName = `${fullClassName}$Server`;\n const serverTargetName = `${serverName}$Target`;\n const clientName = `${fullClassName}$Client`;\n const methodSignatures = node.interface.methods.map((method) => {\n const paramTypeName = getFullClassName(\n lookupNode(ctx, method.paramStructType)\n );\n const resultTypeName = getFullClassName(\n lookupNode(ctx, method.resultStructType)\n );\n return `${method.name}(params: ${paramTypeName}, results: ${resultTypeName}): Promise<void>;`;\n }).join(\"\\n\");\n ctx.codeParts.push(`\n export interface ${serverTargetName} {\n ${methodSignatures}\n }`);\n const members = [];\n members.push(`public override readonly target: ${serverTargetName};`);\n const codeServerMethods = [];\n let index = 0;\n for (const method of node.interface.methods) {\n codeServerMethods.push(`{\n ...${clientName}.methods[${index}],\n impl: target.${method.name}\n }`);\n index++;\n }\n members.push(`\n constructor(target: ${serverTargetName}) {\n super(target, [\n ${codeServerMethods.join(\",\\n\")}\n ]);\n this.target = target;\n }\n client(): ${clientName} {\n return new ${clientName}(this);\n }\n `);\n ctx.codeParts.push(`\n export class ${serverName} extends $.Server {\n ${members.join(\"\\n\")}\n }\n `);\n}\nfunction generateClient(ctx, node) {\n const fullClassName = getFullClassName(node);\n const clientName = `${fullClassName}$Client`;\n const members = [];\n members.push(`\n client: $.Client;\n static readonly interfaceId: bigint = ${createBigInt(node.id)};\n constructor(client: $.Client) {\n this.client = client;\n }\n `);\n const methods = [];\n const methodDefs = [];\n const methodDefTypes = [];\n for (let index = 0; index < node.interface.methods.length; index++) {\n generateClientMethod(\n ctx,\n node,\n clientName,\n methods,\n methodDefs,\n methodDefTypes,\n index\n );\n }\n members.push(`\n static readonly methods:[\n ${methodDefTypes.join(\",\\n\")}\n ] = [\n ${methodDefs.join(\",\\n\")}\n ];\n ${methods.join(\"\\n\")}\n `);\n ctx.codeParts.push(`\n export class ${clientName} {\n ${members.join(\"\\n\")}\n }\n $.Registry.register(${clientName}.interfaceId, ${clientName});\n `);\n}\nfunction generateResultPromise(ctx, node) {\n const nodeId = node.id;\n if (ctx.generatedResultsPromiseIds.has(nodeId)) {\n return;\n }\n ctx.generatedResultsPromiseIds.add(nodeId);\n const resultsClassName = getFullClassName(node);\n const fullClassName = `${resultsClassName}$Promise`;\n const members = [];\n members.push(`\n pipeline: $.Pipeline<any, any, ${resultsClassName}>;\n constructor(pipeline: $.Pipeline<any, any, ${resultsClassName}>) {\n this.pipeline = pipeline;\n }\n `);\n const { struct } = node;\n const fields = struct.fields.toArray().sort(compareCodeOrder);\n const generatePromiseFieldMethod = (field) => {\n let jsType;\n let isInterface = false;\n let slot;\n if (field._isSlot) {\n slot = field.slot;\n const slotType = slot.type;\n if (slotType.which() !== Type.INTERFACE) {\n return;\n }\n isInterface = true;\n jsType = getJsType(ctx, slotType, false);\n } else if (field._isGroup) {\n return;\n } else {\n throw new Error(format(GEN_UNKNOWN_STRUCT_FIELD, field.which()));\n }\n const promisedJsType = jsType;\n if (isInterface) {\n jsType = `${jsType}$Client`;\n }\n const { name } = field;\n const properName = c2t(name);\n members.push(`\n get${properName}(): ${jsType} {\n return new ${jsType}(this.pipeline.getPipeline(${promisedJsType}, ${slot.offset}).client());\n }\n `);\n };\n for (const field of fields) {\n generatePromiseFieldMethod(field);\n }\n members.push(`\n async promise(): Promise<${resultsClassName}> {\n return await this.pipeline.struct();\n }\n `);\n ctx.codeParts.push(`\n export class ${fullClassName} {\n ${members.join(\"\\n\")}\n }\n `);\n}\nfunction generateClientMethod(ctx, node, clientName, methodsCode, methodDefs, methodDefTypes, index) {\n const method = node.interface.methods[index];\n const { name } = method;\n const paramTypeName = getFullClassName(\n lookupNode(ctx, method.paramStructType)\n );\n const resultTypeName = getFullClassName(\n lookupNode(ctx, method.resultStructType)\n );\n methodDefTypes.push(`$.Method<${paramTypeName}, ${resultTypeName}>`);\n methodDefs.push(`{\n ParamsClass: ${paramTypeName},\n ResultsClass: ${resultTypeName},\n interfaceId: ${clientName}.interfaceId,\n methodId: ${index},\n interfaceName: \"${node.displayName}\",\n methodName: \"${method.name}\"\n }`);\n const docComment = extractJSDocs(\n lookupNodeSourceInfo(ctx, node)?.members.at(index)\n );\n methodsCode.push(`\n ${docComment}\n ${name}(paramsFunc?: (params: ${paramTypeName}) => void): ${resultTypeName}$Promise {\n const answer = this.client.call({\n method: ${clientName}.methods[${index}],\n paramsFunc: paramsFunc\n });\n const pipeline = new $.Pipeline(${resultTypeName}, answer);\n return new ${resultTypeName}$Promise(pipeline);\n }\n `);\n}\n\nfunction generateStructNode(ctx, node) {\n const displayNamePrefix = getDisplayNamePrefix(node);\n const fullClassName = getFullClassName(node);\n const nestedNodes = node.nestedNodes.map(({ id }) => lookupNode(ctx, id)).filter((node2) => !node2._isConst && !node2._isAnnotation);\n const nodeId = node.id;\n const nodeIdHex = nodeId.toString(16);\n const unionFields = getUnnamedUnionFields(node);\n const { struct } = node;\n const { dataWordCount, discriminantCount, discriminantOffset, pointerCount } = struct;\n const dataByteLength = dataWordCount * 8;\n const fields = struct.fields.toArray();\n const fieldIndexInCodeOrder = fields.map(({ codeOrder }, fieldIndex) => ({ fieldIndex, codeOrder })).sort(compareCodeOrder).map(({ fieldIndex }) => fieldIndex);\n const concreteLists = fields.filter((field) => needsConcreteListClass(field)).sort(compareCodeOrder);\n const consts = ctx.nodes.filter(\n (node2) => node2.scopeId === nodeId && node2._isConst\n );\n const hasUnnamedUnion = discriminantCount !== 0;\n if (hasUnnamedUnion) {\n generateEnumNode(ctx, fullClassName + \"_Which\", node, unionFields);\n }\n const members = [];\n members.push(\n ...consts.map((node2) => {\n const name = c2s(getDisplayNamePrefix(node2));\n const value = createValue(node2.const.value);\n return `static readonly ${name} = ${value}`;\n }),\n ...unionFields.sort(compareCodeOrder).map((field) => createUnionConstProperty(fullClassName, field)),\n ...nestedNodes.map((node2) => createNestedNodeProperty(node2))\n );\n const defaultValues = [];\n for (const index of fieldIndexInCodeOrder) {\n const field = fields[index];\n if (field._isSlot && field.slot.hadExplicitDefault && field.slot.type.which() !== Type.VOID) {\n defaultValues.push(generateDefaultValue(field));\n }\n }\n members.push(\n `\n public static override readonly _capnp = {\n displayName: \"${displayNamePrefix}\",\n id: \"${nodeIdHex}\",\n size: new $.ObjectSize(${dataByteLength}, ${pointerCount}),\n ${defaultValues.join(\",\")}\n }`,\n ...concreteLists.map((field) => createConcreteListProperty(ctx, field))\n );\n for (const index of fieldIndexInCodeOrder) {\n const field = fields[index];\n generateStructFieldMethods(ctx, members, node, field, index);\n }\n members.push(\n `public override toString(): string { return \"${fullClassName}_\" + super.toString(); }`\n );\n if (hasUnnamedUnion) {\n members.push(`\n which(): ${fullClassName}_Which {\n return $.utils.getUint16(${discriminantOffset * 2}, this) as ${fullClassName}_Which;\n }\n `);\n }\n const docComment = extractJSDocs(lookupNodeSourceInfo(ctx, node));\n const classCode = `\n ${docComment}\n export class ${fullClassName} extends $.Struct {\n ${members.join(\"\\n\")}\n }`;\n ctx.codeParts.push(classCode);\n ctx.concreteLists.push(\n ...concreteLists.map((field) => [\n fullClassName,\n field\n ])\n );\n}\nfunction generateStructFieldMethods(ctx, members, node, field, fieldIndex) {\n let jsType;\n let whichType;\n if (field._isSlot) {\n const slotType = field.slot.type;\n jsType = getJsType(ctx, slotType, false);\n whichType = slotType.which();\n } else if (field._isGroup) {\n jsType = getFullClassName(lookupNode(ctx, field.group.typeId));\n whichType = \"group\";\n } else {\n throw new Error(format(GEN_UNKNOWN_STRUCT_FIELD, field.which()));\n }\n const isInterface = whichType === Type.INTERFACE;\n if (isInterface) {\n jsType = `${jsType}$Client`;\n }\n const { discriminantOffset } = node.struct;\n const { name } = field;\n const accessorName = name === \"constructor\" ? \"$constructor\" : name;\n const capitalizedName = c2t(name);\n const { discriminantValue } = field;\n const fullClassName = getFullClassName(node);\n const hadExplicitDefault = field._isSlot && field.slot.hadExplicitDefault;\n const maybeDefaultArg = hadExplicitDefault ? `, ${fullClassName}._capnp.default${capitalizedName}` : \"\";\n const union = discriminantValue !== Field.NO_DISCRIMINANT;\n const offset = field._isSlot ? field.slot.offset : 0;\n let adopt = false;\n let disown = false;\n let has = false;\n let init;\n let get;\n let set;\n switch (whichType) {\n case Type.ANY_POINTER: {\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getPointer(${offset}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, ${get})`;\n break;\n }\n case Type.BOOL:\n case Type.ENUM:\n case Type.FLOAT32:\n case Type.FLOAT64:\n case Type.INT16:\n case Type.INT32:\n case Type.INT64:\n case Type.INT8:\n case Type.UINT16:\n case Type.UINT32:\n case Type.UINT64:\n case Type.UINT8: {\n const { byteLength, getter, setter } = Primitives[whichType];\n const byteOffset = offset * byteLength;\n get = `$.utils.${getter}(${byteOffset}, this${maybeDefaultArg})`;\n set = `$.utils.${setter}(${byteOffset}, value, this${maybeDefaultArg})`;\n if (whichType === Type.ENUM) {\n get = `${get} as ${jsType}`;\n }\n break;\n }\n case Type.DATA: {\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getData(${offset}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;\n init = `$.utils.initData(${offset}, length, this)`;\n break;\n }\n case Type.INTERFACE: {\n get = `new ${jsType}($.utils.getInterfaceClientOrNullAt(${offset}, this))`;\n set = `$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(${offset}, this))`;\n break;\n }\n case Type.LIST: {\n const elementType = field.slot.type.list.elementType.which();\n let listClass = ConcreteListType[elementType];\n if (elementType === Type.LIST || elementType === Type.STRUCT) {\n listClass = `${fullClassName}._${capitalizedName}`;\n } else if (listClass === undefined) {\n throw new Error(\n format(GEN_UNSUPPORTED_LIST_ELEMENT_TYPE, elementType)\n );\n }\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getList(${offset}, ${listClass}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;\n init = `$.utils.initList(${offset}, ${listClass}, length, this)`;\n if (elementType === Type.ENUM) {\n get = `${get} as ${jsType}`;\n init = `${init} as ${jsType}`;\n }\n break;\n }\n case Type.STRUCT: {\n adopt = true;\n disown = true;\n has = true;\n get = `$.utils.getStruct(${offset}, ${jsType}, this${maybeDefaultArg})`;\n set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;\n init = `$.utils.initStructAt(${offset}, ${jsType}, this)`;\n break;\n }\n case Type.TEXT: {\n get = `$.utils.getText(${offset}, this${maybeDefaultArg})`;\n set = `$.utils.setText(${offset}, value, this)`;\n break;\n }\n case Type.VOID: {\n break;\n }\n case \"group\": {\n if (hadExplicitDefault) {\n throw new Error(format(GEN_EXPLICIT_DEFAULT_NON_PRIMITIVE, \"group\"));\n }\n get = `$.utils.getAs(${jsType}, this)`;\n init = get;\n break;\n }\n }\n if (adopt) {\n members.push(`\n _adopt${capitalizedName}(value: $.Orphan<${jsType}>): void {\n ${union ? `$.utils.setUint16(${discriminantOffset * 2}, ${discriminantValue}, this);` : \"\"}\n $.utils.adopt(value, $.utils.getPointer(${offset}, this));\n }\n `);\n }\n if (disown) {\n members.push(`\n _disown${capitalizedName}(): $.Orphan<${jsType}> {\n return $.utils.disown(this.${name === \"constructor\" ? `$${name}` : name});\n }\n `);\n }\n if (get) {\n const docComment = extractJSDocs(\n lookupNodeSourceInfo(ctx, node)?.members.at(fieldIndex)\n );\n members.push(`\n ${docComment}\n get ${accessorName}(): ${jsType} {\n ${union ? `$.utils.testWhich(${JSON.stringify(name)}, $.utils.getUint16(${discriminantOffset * 2}, this), ${discriminantValue}, this);` : \"\"}\n return ${get};\n }\n `);\n }\n if (has) {\n members.push(`\n _has${capitalizedName}(): boolean {\n return !$.utils.isNull($.utils.getPointer(${offset}, this));\n }\n `);\n }\n if (init) {\n const params = whichType === Type.DATA || whichType === Type.LIST ? `length: number` : \"\";\n members.push(`\n _init${capitalizedName}(${params}): ${jsType} {\n ${union ? `$.utils.setUint16(${discriminantOffset * 2}, ${discriminantValue}, this);` : \"\"}\n return ${init};\n }\n `);\n }\n if (union) {\n members.push(`\n get _is${capitalizedName}(): boolean {\n return $.utils.getUint16(${discriminantOffset * 2}, this) === ${discriminantValue};\n }\n `);\n }\n if (set || union) {\n const param = set ? `value: ${jsType}` : `_: true`;\n members.push(`\n set ${accessorName}(${param}) {\n ${union ? `$.utils.setUint16(${discriminantOffset * 2}, ${discriminantValue}, this);` : \"\"}\n ${set ? `${set};` : \"\"}\n }\n `);\n }\n}\nfunction generateDefaultValue(field) {\n const { name, slot } = field;\n const whichSlotType = slot.type.which();\n const primitive = Primitives[whichSlotType];\n let initializer;\n switch (whichSlotType) {\n case Type_Which.ANY_POINTER:\n case Type_Which.DATA:\n case Type_Which.LIST:\n case Type_Which.STRUCT:\n case Type_Which.INTERFACE: {\n initializer = createValue(slot.defaultValue);\n break;\n }\n case Type_Which.TEXT: {\n initializer = JSON.stringify(slot.defaultValue.text);\n break;\n }\n case Type_Which.BOOL: {\n const value = createValue(slot.defaultValue);\n const bitOffset = slot.offset % 8;\n initializer = `$.${primitive.mask}(${value}, ${bitOffset})`;\n break;\n }\n case Type_Which.ENUM:\n case Type_Which.FLOAT32:\n case Type_Which.FLOAT64:\n case Type_Which.INT16:\n case Type_Which.INT32:\n case Type_Which.INT64:\n case Type_Which.INT8:\n case Type_Which.UINT16:\n case Type_Which.UINT32:\n case Type_Which.UINT64:\n case Type_Which.UINT8: {\n const value = createValue(slot.defaultValue);\n initializer = `$.${primitive.mask}(${value})`;\n break;\n }\n default: {\n throw new Error(\n format(\n GEN_UNKNOWN_DEFAULT,\n whichSlotType\n )\n );\n }\n }\n return `default${c2t(name)}: ${initializer}`;\n}\nfunction createConcreteListProperty(ctx, field) {\n const name = `_${c2t(field.name)}`;\n const type = getJsType(ctx, field.slot.type, true);\n return `static ${name}: ${type};`;\n}\nfunction createUnionConstProperty(fullClassName, field) {\n const name = c2s(field.name);\n const initializer = `${fullClassName}_Which.${name}`;\n return `static readonly ${name} = ${initializer};`;\n}\nfunction createValue(value) {\n let p;\n switch (value.which()) {\n case Value.BOOL: {\n return value.bool ? `true` : `false`;\n }\n case Value.ENUM: {\n return String(value.enum);\n }\n case Value.FLOAT32: {\n return String(value.float32);\n }\n case Value.FLOAT64: {\n return String(value.float64);\n }\n case Value.INT8: {\n return String(value.int8);\n }\n case Value.INT16: {\n return String(value.int16);\n }\n case Value.INT32: {\n return String(value.int32);\n }\n case Value.INT64: {\n return createBigInt(value.int64);\n }\n case Value.UINT8: {\n return String(value.uint8);\n }\n case Value.UINT16: {\n return String(value.uint16);\n }\n case Value.UINT32: {\n return String(value.uint32);\n }\n case Value.UINT64: {\n return createBigInt(value.uint64);\n }\n case Value.TEXT: {\n return JSON.stringify(value.text);\n }\n case Value.VOID: {\n return \"undefined\";\n }\n case Value.ANY_POINTER: {\n p = value.anyPointer;\n break;\n }\n case Value.DATA: {\n p = value.data;\n break;\n }\n case Value.LIST: {\n p = value.list;\n break;\n }\n case Value.STRUCT: {\n p = value.struct;\n break;\n }\n case Value.INTERFACE: {\n testWhich(\"interface\", getUint16(0, value), 17, value);\n p = getPointer(0, value);\n break;\n }\n default: {\n throw new Error(format(GEN_SERIALIZE_UNKNOWN_VALUE, value.which()));\n }\n }\n const message = new Message();\n message.setRoot(p);\n const buf = new Uint8Array(message.toPackedArrayBuffer());\n const values = [];\n for (let i = 0; i < buf.byteLength; i++) {\n values.push(`0x${pad(buf[i].toString(16), 2)}`);\n }\n return `$.readRawPointer(new Uint8Array([${values.join(\",\")}]).buffer)`;\n}\nfunction createNestedNodeProperty(node) {\n const name = getDisplayNamePrefix(node);\n const initializer = getFullClassName(node);\n return `static readonly ${name} = ${initializer};`;\n}\n\nfunction generateInterfaceNode(ctx, node) {\n const displayNamePrefix = getDisplayNamePrefix(node);\n const fullClassName = getFullClassName(node);\n const nestedNodes = node.nestedNodes.map((n) => lookupNode(ctx, n)).filter((n) => !n._isConst && !n._isAnnotation);\n const nodeId = node.id;\n const nodeIdHex = nodeId.toString(16);\n const consts = ctx.nodes.filter((n) => n.scopeId === nodeId && n._isConst);\n const members = [];\n members.push(\n ...consts.map((node2) => {\n const name = c2s(getDisplayNamePrefix(node2));\n const value = createValue(node2.const.value);\n return `static readonly ${name} = ${value}`;\n }),\n ...nestedNodes.map((node2) => createNestedNodeProperty(node2)),\n `static readonly Client = ${fullClassName}$Client;\n static readonly Server = ${fullClassName}$Server;\n public static override readonly _capnp = {\n displayName: \"${displayNamePrefix}\",\n id: \"${nodeIdHex}\",\n size: new $.ObjectSize(0, 0),\n }\n public override toString(): string { return \"${fullClassName}_\" + super.toString(); }`\n );\n const docComment = extractJSDocs(lookupNodeSourceInfo(ctx, node));\n const classCode = `\n ${docComment}\n export class ${fullClassName} extends $.Interface {\n ${members.join(\"\\n\")}\n }`;\n generateInterfaceClasses(ctx, node);\n ctx.codeParts.push(classCode);\n}\n\nfunction generateNode(ctx, node) {\n const nodeId = node.id;\n const nodeIdHex = nodeId.toString(16);\n if (ctx.generatedNodeIds.has(nodeIdHex)) {\n return;\n }\n ctx.generatedNodeIds.add(nodeIdHex);\n const nestedNodes = node.nestedNodes.map((node2) => lookupNode(ctx, node2));\n for (const nestedNode of nestedNodes) {\n generateNode(ctx, nestedNode);\n }\n const groupNodes = ctx.nodes.filter(\n (node2) => node2.scopeId === nodeId && node2._isStruct && node2.struct.isGroup\n );\n for (const groupNode of groupNodes) {\n generateNode(ctx, groupNode);\n }\n const nodeType = node.which();\n switch (nodeType) {\n case Node.STRUCT: {\n generateStructNode(ctx, node);\n break;\n }\n case Node.CONST: {\n break;\n }\n case Node.ENUM: {\n generateEnumNode(\n ctx,\n getFullClassName(node),\n node,\n node.enum.enumerants.toArray()\n );\n break;\n }\n case Node.INTERFACE: {\n generateInterfaceNode(ctx, node);\n break;\n }\n case Node.ANNOTATION: {\n break;\n }\n // case s.Node.FILE:\n default: {\n throw new Error(\n format(\n GEN_NODE_UNKNOWN_TYPE,\n nodeType\n /* s.Node_Which[whichNode] */\n )\n );\n }\n }\n}\nclass CodeGeneratorContext {\n files = [];\n}\nclass CodeGeneratorFileContext {\n constructor(req, file) {\n this.req = req;\n this.file = file;\n this.nodes = req.nodes.toArray();\n this.imports = file.imports.toArray();\n }\n // inputs\n nodes;\n imports;\n // outputs\n concreteLists = [];\n generatedNodeIds = /* @__PURE__ */ new Set();\n generatedResultsPromiseIds = /* @__PURE__ */ new Set();\n tsPath = \"\";\n codeParts = [];\n toString() {\n return this.file?.filename ?? \"CodeGeneratorFileContext()\";\n }\n}\n\nfunction generateFileId(ctx) {\n ctx.codeParts.push(\n `export const _capnpFileId = BigInt(\"0x${ctx.file.id.toString(16)}\");`\n );\n}\n\nfunction generateConcreteListInitializer(ctx, fullClassName, field) {\n const name = `_${c2t(field.name)}`;\n const type = getConcreteListType(ctx, field.slot.type);\n ctx.codeParts.push(`${fullClassName}.${name} = ${type};`);\n}\n\nfunction generateCapnpImport(ctx) {\n const fileNode = lookupNode(ctx, ctx.file);\n const tsFileId = hexToBigInt(TS_FILE_ID);\n const tsAnnotationFile = ctx.nodes.find((n) => n.id === tsFileId);\n const tsImportPathAnnotation = tsAnnotationFile?.nestedNodes.find(\n (n) => n.name === \"importPath\"\n );\n const importAnnotation = tsImportPathAnnotation && fileNode.annotations.find((a) => a.id === tsImportPathAnnotation.id);\n const importPath = importAnnotation === undefined ? \"@stryke/capnp\" : importAnnotation.value.text;\n ctx.codeParts.push(`import * as $ from '${importPath}';`);\n}\nfunction generateNestedImports(ctx) {\n for (const imp of ctx.imports) {\n const { name } = imp;\n let importPath;\n if (name.startsWith(\"/capnp/\")) {\n importPath = `@stryke/capnp/schemas/${name.slice(7).replace(/\\.capnp$/, \"\")}`;\n } else {\n importPath = name.replace(/\\.capnp$/, \"\");\n if (importPath[0] !== \".\") {\n importPath = `./${importPath}`;\n }\n }\n const importNode = lookupNode(ctx, imp);\n const imports = getImportNodes(ctx, importNode).flatMap((node) => {\n const fullClassName = getFullClassName(node);\n if (node._isInterface) {\n return [fullClassName, `${fullClassName}$Client`];\n }\n return fullClassName;\n }).sort().join(\", \");\n if (imports.length === 0) {\n continue;\n }\n ctx.codeParts.push(`import { ${imports} } from \"${importPath}\";`);\n }\n}\nfunction getImportNodes(ctx, node, visitedIds = /* @__PURE__ */ new Set()) {\n visitedIds.add(node.id);\n const nestedNodes = node.nestedNodes.filter(({ id }) => hasNode(ctx, id));\n const newNestedNodes = nestedNodes.filter(({ id }) => !visitedIds.has(id));\n const nodes = newNestedNodes.map(({ id }) => lookupNode(ctx, id)).filter((node2) => node2._isStruct || node2._isEnum || node2._isInterface);\n return nodes.concat(\n nodes.flatMap((node2) => getImportNodes(ctx, node2, visitedIds))\n );\n}\n\nasync function compileAll(codeGenRequest, opts) {\n const req = new Message(codeGenRequest, false).getRoot(\n CodeGeneratorRequest\n );\n\n const ctx = new CodeGeneratorContext();\n ctx.files = req.requestedFiles.map((file) => loadRequestedFile(req, file));\n if (ctx.files.length === 0) {\n throw new Error(GEN_NO_FILES);\n } \n\n const files = new Map(\n ctx.files.map((file) => [file.tsPath, compileFile(file)])\n );\n if (files.size === 0) {\n throw new Error(GEN_NO_FILES);\n } \n\n if (opts?.dts === true || opts?.js === true) {\n tsCompile(files, opts?.dts === true, opts?.js === true, opts?.tsconfig);\n }\n\n if (!opts?.ts) {\n for (const [fileName] of files) {\n if (fileName.endsWith(\".ts\") && !fileName.endsWith(\".d.ts\")) {\n files.delete(fileName);\n }\n }\n }\n\n return {\n ctx,\n files\n };\n}\n\nfunction compileFile(ctx) {\n generateCapnpImport(ctx);\n generateNestedImports(ctx);\n generateFileId(ctx);\n const nestedNodes = lookupNode(ctx, ctx.file).nestedNodes.map(\n (n) => lookupNode(ctx, n)\n );\n for (const node of nestedNodes) {\n generateNode(ctx, node);\n }\n for (const [fullClassName, field] of ctx.concreteLists) {\n generateConcreteListInitializer(ctx, fullClassName, field);\n }\n const sourceFile = ts.createSourceFile(\n ctx.tsPath,\n ctx.codeParts.map((p) => p.toString()).join(\"\"),\n ts.ScriptTarget.Latest,\n false,\n ts.ScriptKind.TS\n );\n return SOURCE_COMMENT + ts.createPrinter().printFile(sourceFile);\n}\n\nfunction tsCompile(files, dts, js, tsconfig) {\n if (!dts && !js) {\n return;\n }\n const compileOptions = {\n moduleResolution: ts.ModuleResolutionKind.Bundler,\n target: ts.ScriptTarget.ESNext,\n strict: true,\n ...tsconfig,\n noEmitOnError: false,\n noFallthroughCasesInSwitch: true,\n preserveConstEnums: true,\n noImplicitReturns: true,\n noUnusedLocals: false,\n noUnusedParameters: false,\n removeComments: false,\n skipLibCheck: true,\n sourceMap: false,\n emitDeclarationOnly: dts && !js,\n declaration: dts\n };\n const compilerHost = ts.createCompilerHost(compileOptions);\n compilerHost.writeFile = (fileName, declaration) => {\n files.set(fileName, declaration);\n };\n const _readFile = compilerHost.readFile;\n compilerHost.readFile = (filename) => {\n if (files.has(filename)) {\n return files.get(filename);\n }\n return _readFile(filename);\n };\n const program = ts.createProgram(\n [...files.keys()],\n compileOptions,\n compilerHost\n );\n const emitResult = program.emit();\n const allDiagnostics = [\n ...ts.getPreEmitDiagnostics(program),\n ...emitResult.diagnostics\n ];\n if (allDiagnostics.length > 0) {\n for (const diagnostic of allDiagnostics) {\n const message = ts.flattenDiagnosticMessageText(\n diagnostic.messageText,\n \"\\n\"\n );\n if (diagnostic.file && diagnostic.start) {\n const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);\n console.log(\n `${diagnostic.file.fileName}:${line + 1}:${character + 1} ${message}`\n );\n } else {\n console.log(`==> ${message}`);\n }\n }\n throw new Error(GEN_TS_EMIT_FAILED);\n }\n}\n\nexport { compileAll as c };\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Arrayable } from \"@stryke/types/array\";\nimport type { Nullable } from \"@stryke/types/utilities\";\n\n/**\n * Convert `Arrayable<T>` to `Array<T>`\n *\n * @param array - The `Arrayable<T>` to convert\n * @returns An `Array<T>` containing the elements of the input\n */\nexport function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T> {\n array = array ?? [];\n return Array.isArray(array) ? array : [array];\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n writeFatal,\n writeWarning\n} from \"@storm-software/config-tools/logger/console\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { findFilePath, relativePath } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport type { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport type { ParsedCommandLine } from \"typescript\";\nimport { parseJsonConfigFileContent, sys } from \"typescript\";\nimport type { CapnpcOptions, CapnpcResolvedOptions } from \"./types.js\";\n\n/**\n * Resolves the options for the Cap'n Proto compiler.\n *\n * @param options - The options to resolve\n * @returns The resolved options\n */\nexport async function resolveOptions(\n options: Omit<CapnpcOptions, \"workspaceRoot\" | \"projectRoot\"> &\n Required<Pick<CapnpcOptions, \"workspaceRoot\" | \"projectRoot\">>\n): Promise<CapnpcResolvedOptions | null> {\n const tsconfigPath = options.tsconfigPath\n ? options.tsconfigPath\n .replace(\"{projectRoot}\", options.projectRoot)\n .replace(\"{workspaceRoot}\", options.workspaceRoot)\n : joinPaths(options.projectRoot, \"tsconfig.json\");\n const schemas = toArray(\n options.schemas\n ? options.schemas\n : joinPaths(options.projectRoot, \"schemas/**/*.capnp\")\n )\n .filter(Boolean)\n .map(schema =>\n schema\n .replace(\"{projectRoot}\", options.projectRoot)\n .replace(\"{workspaceRoot}\", options.workspaceRoot)\n );\n\n let resolvedTsconfig!: ParsedCommandLine;\n if (options.tsconfig) {\n resolvedTsconfig = options.tsconfig;\n } else {\n if (!tsconfigPath || !existsSync(tsconfigPath)) {\n const errorMessage = tsconfigPath\n ? `✖ The specified TypeScript configuration file \"${tsconfigPath}\" does not exist. Please provide a valid path.`\n : \"✖ The specified TypeScript configuration file does not exist. Please provide a valid path.\";\n writeFatal(errorMessage, { logLevel: \"all\" });\n\n throw new Error(errorMessage);\n }\n\n const tsconfigFile = await readJsonFile<TsConfigJson>(tsconfigPath);\n resolvedTsconfig = parseJsonConfigFileContent(\n tsconfigFile,\n sys,\n findFilePath(tsconfigPath)\n );\n if (!resolvedTsconfig) {\n const errorMessage = `✖ The specified TypeScript configuration file \"${tsconfigPath}\" is invalid. Please provide a valid configuration.`;\n writeFatal(errorMessage, { logLevel: \"all\" });\n\n throw new Error(errorMessage);\n }\n\n resolvedTsconfig.options.configFilePath = tsconfigPath;\n resolvedTsconfig.options.noImplicitOverride = false;\n resolvedTsconfig.options.noUnusedLocals = false;\n resolvedTsconfig.options.noUnusedParameters = false;\n }\n\n const resolvedSchemas = [] as string[];\n for (const schema of schemas) {\n let formattedSchema = schema;\n if (!schema.endsWith(\".capnp\") && !schema.includes(\"*\")) {\n formattedSchema = `${schema.replace(/\\/$/g, \"\")}/*.capnp`;\n }\n\n resolvedSchemas.push(...(await listFiles(formattedSchema)));\n }\n\n if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {\n writeWarning(\n `✖ No Cap'n Proto schema files found in the specified source paths: ${schemas.join(\n \", \"\n )}. As a result, the Cap'n Proto compiler will not be able to generate any output files. Please ensure that the paths are correct and contain .capnp files.`,\n { logLevel: \"all\" }\n );\n\n return null;\n }\n\n const output = options.output\n ? options.output\n .replace(\"{projectRoot}\", options.projectRoot)\n .replace(\"{workspaceRoot}\", options.workspaceRoot)\n : joinPaths(\n options.projectRoot,\n relativePath(\n tsconfigPath ? findFilePath(tsconfigPath) : options.projectRoot,\n joinPaths(\n options.workspaceRoot,\n resolvedSchemas[0].endsWith(\".capnp\")\n ? findFilePath(resolvedSchemas[0])\n : resolvedSchemas[0]\n )\n )\n );\n resolvedTsconfig.options.outDir = output;\n\n return {\n ...options,\n importPath: options.importPath\n ? options.importPath.split(\",\").map(dir => dir.trim())\n : [],\n workspaceRoot: options.workspaceRoot,\n projectRoot: options.projectRoot,\n schemas: resolvedSchemas,\n output,\n js: options.js === true,\n ts: options.noTs !== true,\n dts: options.dts ?? options.noDts !== true,\n tsconfig: resolvedTsconfig\n };\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { writeWarning } from \"@storm-software/config-tools/logger/console\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { compileAll } from \"capnp-es/compiler\";\nimport defu from \"defu\";\nimport { Buffer } from \"node:buffer\";\nimport { exec } from \"node:child_process\";\nimport { resolveOptions } from \"./helpers.js\";\nimport type {\n CapnpcOptions,\n CapnpcResolvedOptions,\n CapnpcResult\n} from \"./types.js\";\n\n/**\n * Compiles Cap'n Proto schemas into TypeScript files.\n *\n * @param options - The options for the compilation process.\n * @returns A promise that resolves to the compilation result.\n */\nexport async function capnpc(\n options: CapnpcResolvedOptions\n): Promise<CapnpcResult> {\n const { output, tsconfig, schemas = [], tty } = options;\n\n let dataBuf: Buffer = Buffer.alloc(0);\n if (tty) {\n const chunks: Buffer[] = [];\n process.stdin.on(\"data\", (chunk: Buffer) => {\n chunks.push(chunk);\n });\n\n await new Promise(resolve => {\n process.stdin.on(\"end\", resolve);\n });\n\n const reqBuffer = Buffer.alloc(\n chunks.reduce((l, chunk) => l + chunk.byteLength, 0)\n );\n\n let i = 0;\n for (const chunk of chunks) {\n chunk.copy(reqBuffer, i);\n i += chunk.byteLength;\n }\n\n dataBuf = reqBuffer;\n }\n\n if (dataBuf.byteLength === 0) {\n const opts: string[] = [];\n\n if (output && existsSync(output)) {\n opts.push(`-o-:${output}`);\n } else {\n if (output && !existsSync(output)) {\n writeWarning(\n `Output directory \"${output}\" does not exist, will write to schema path...`\n );\n }\n\n opts.push(\"-o-\");\n }\n\n dataBuf = await new Promise<Buffer>(resolve => {\n exec(\n `capnpc ${opts.join(\" \")} ${schemas.join(\" \")}`,\n { encoding: \"buffer\" },\n (error, stdout, stderr) => {\n if (stderr.length > 0) {\n process.stderr.write(stderr);\n }\n if (error) {\n throw error;\n }\n resolve(stdout);\n }\n );\n });\n }\n\n return compileAll(dataBuf, {\n ts: options.ts ?? true,\n js: false,\n dts: false,\n tsconfig: tsconfig.options\n });\n}\n\n/**\n * Compiles Cap'n Proto schemas into TypeScript files.\n *\n * @param dataBuf - The buffer containing the Cap'n Proto schema data.\n * @param options - The options for the compilation process.\n * @returns A promise that resolves to the compilation result.\n */\nexport async function compile(dataBuf: Buffer, options: CapnpcOptions) {\n const resolvedOptions = await resolveOptions(\n options as Parameters<typeof resolveOptions>[0]\n );\n if (!resolvedOptions) {\n writeWarning(\n \"✖ Unable to resolve Cap'n Proto compiler options - the program will terminate\",\n { logLevel: \"all\" }\n );\n return;\n }\n\n return compileAll(\n dataBuf,\n defu(\n {\n tsconfig: resolvedOptions.tsconfig.options\n },\n resolvedOptions,\n {\n ts: true,\n js: false,\n dts: false\n }\n )\n );\n}\n","#!/usr/bin/env node\n/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n writeFatal,\n writeInfo,\n writeSuccess,\n writeWarning\n} from \"@storm-software/config-tools/logger/console\";\nimport {\n exitWithError,\n exitWithSuccess,\n findWorkspaceRootSafe,\n handleProcess\n} from \"@storm-software/config-tools/utilities\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { findFilePath } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { Command } from \"commander\";\nimport { writeFile } from \"node:fs/promises\";\nimport { capnpc } from \"../src/compile.js\";\nimport { resolveOptions } from \"../src/helpers.js\";\nimport type { CapnpcCLIOptions } from \"../src/types.js\";\n\nconst compileAction =\n (workspaceRoot: string) => async (options: CapnpcCLIOptions) => {\n if (!options.projectRoot) {\n throw new Error(\n \"✖ The project root directory must be specified using the -p or --project-root option.\"\n );\n }\n\n const resolvedOptions = await resolveOptions({\n workspaceRoot,\n ...options,\n tsconfig: undefined,\n tsconfigPath: options.tsconfig,\n schemas: options.schema\n } as Parameters<typeof resolveOptions>[0]);\n if (!resolvedOptions) {\n writeWarning(\n \"✖ Unable to resolve Cap'n Proto compiler options - the program will terminate\",\n { logLevel: \"all\" }\n );\n return;\n }\n\n writeInfo(\n `📦 Storm Cap'n Proto Compiler will output ${\n resolvedOptions.ts ? \"TypeScript code\" : \"\"\n }${\n resolvedOptions.js\n ? resolvedOptions.ts\n ? \", JavaScript code\"\n : \"JavaScript code\"\n : \"\"\n }${\n resolvedOptions.dts\n ? resolvedOptions.ts || resolvedOptions.js\n ? \", TypeScript declarations\"\n : \"TypeScript declarations\"\n : \"\"\n } files from schemas at ${\n options.schema\n ? options.schema\n .replace(\"{projectRoot}\", resolvedOptions.projectRoot)\n .replace(\"{workspaceRoot}\", resolvedOptions.workspaceRoot)\n : resolvedOptions.projectRoot\n } to ${resolvedOptions.tsconfig.options.outDir}...`,\n {\n logLevel: \"all\"\n }\n );\n\n const result = await capnpc(resolvedOptions);\n if (result.files.size === 0) {\n writeWarning(\n \"⚠️ No files were generated. Please check your schema files.\",\n {\n logLevel: \"all\"\n }\n );\n return;\n }\n\n writeInfo(`📋 Writing ${result.files.size} generated files to disk...`, {\n logLevel: \"all\"\n });\n\n for (const [fileName, content] of result.files) {\n let filePath = fileName;\n if (!existsSync(findFilePath(filePath))) {\n const fullPath = `/${filePath}`;\n if (existsSync(findFilePath(fullPath))) {\n filePath = fullPath;\n }\n }\n\n if (options.output) {\n filePath = joinPaths(options.output, fileName);\n if (!existsSync(findFilePath(options.output))) {\n writeWarning(\n `Output directory \"${findFilePath(options.output)}\" does not exist, it will be created...`\n );\n // await createDirectory(\n // replacePath(findFilePath(options.output), getWorkspaceRoot())\n // );\n }\n }\n\n await writeFile(\n filePath,\n // https://github.com/microsoft/TypeScript/issues/54632\n content.replace(/^\\s+/gm, match => \" \".repeat(match.length / 2))\n );\n }\n\n writeSuccess(\"⚡ Storm Cap'n Proto Compiler completed successfully.\", {\n logLevel: \"all\"\n });\n };\n\nexport function createProgram() {\n writeInfo(\"⚡ Running Storm Cap'n Proto Compiler Tools\", { logLevel: \"all\" });\n\n const root = findWorkspaceRootSafe(process.cwd());\n process.env.STORM_WORKSPACE_ROOT ??= root;\n process.env.NX_WORKSPACE_ROOT_PATH ??= root;\n if (root) {\n process.chdir(root);\n }\n\n const program = new Command();\n program\n .name(\"storm-capnpc\")\n .description(\"Run the Storm Cap'n Proto compiler\")\n .version(\"1.0.0\", \"-v --version\", \"display CLI version\");\n\n program\n .command(\"compile\", { isDefault: true })\n .option(\n \"-p --project-root <path>\",\n \"The path to the project root directory\"\n )\n .option(\n \"-s --schema <path>\",\n \"The directory (or a glob to the directory) containing the Cap'n Proto schema files to compile (default: current working directory)\"\n )\n .option(\n \"-o --output <path>\",\n \"The directory to output the generated files to\"\n )\n .option(\n \"--tsconfig <path>\",\n \"The path to the TypeScript configuration file to use for compilation\"\n )\n .option(\n \"--skip-generating-id\",\n \"Skip generating a new 64-bit unique ID for use in a Cap'n Proto schema\"\n )\n .option(\n \"--no-standard-imports\",\n \"Skip adding default import paths; use only those specified by -I\"\n )\n .option(\"--no-ts\", \"An indicator to disable generation of TypeScript files\")\n .option(\"--js\", \"An indicator to generate JavaScript files\")\n .option(\"--dts\", \"An indicator to generate TypeScript declaration files\")\n .option(\n \"--no-dts\",\n \"An indicator to disable generation of TypeScript declaration files\"\n )\n .option(\n \"-w --workspace-root <path>\",\n \"The path to the workspace root directory\",\n root || process.cwd()\n )\n .option(\"--tty\", \"An indicator to enable TTY mode for the compiler\")\n .action(compileAction(root!));\n\n return program;\n}\n\nvoid (async () => {\n try {\n handleProcess();\n\n const program = createProgram();\n await program.parseAsync(process.argv);\n\n exitWithSuccess();\n } catch (error) {\n writeFatal(\n `✖ A fatal error occurred while running the Storm Cap'n Proto compiler tool:\n${(error as Error)?.message ? ((error as Error)?.name ? `[${(error as Error).name}]: ${(error as Error).message}` : (error as Error).message) : JSON.stringify(error)}${\n (error as Error)?.stack\n ? `\n\nStack Trace: ${(error as Error).stack}`\n : \"\"\n }`,\n { logLevel: \"all\" }\n );\n\n exitWithError();\n }\n})();\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"mappings":";0oCACI,GAAuB,CACzB,MAAO,CACL,WAAY,UACZ,WAAY,UACZ,MAAO,UACP,UAAW,UACX,KAAM,UACN,QAAS,UACT,KAAM,UACN,QAAS,UACT,OAAQ,UACR,MAAO,UACP,KAAM,UACN,SAAU,UACV,SAAU,UACV,SAAU,CAAC,UAAW,UAAW,UAA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