@agiflowai/agent-cli 0.2.13 → 0.2.15

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/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { bx as z, bn as H, by as P, bo as M } from "./index-988rqE3P.mjs";
2
+ import { bx as z, bn as H, by as P, bo as M } from "./index-BzNCFVFX.mjs";
3
3
  import Q from "node:events";
4
4
  import X from "node:child_process";
5
5
  import Z from "node:path";
package/dist/daemon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as i, Fragment as F } from "react/jsx-runtime";
2
- import { bj as f, bk as V, bl as Y, bm as $, bn as S, bo as D, bp as X, bq as H, br as J, bs as Z, bt as ee, bu as re, bv as ne, bw as oe } from "./index-988rqE3P.mjs";
2
+ import { bj as f, bk as V, bl as Y, bm as $, bn as S, bo as D, bp as X, bq as H, br as J, bs as Z, bt as ee, bu as re, bv as ne, bw as oe } from "./index-BzNCFVFX.mjs";
3
3
  import { useQueryClient as ie, useQuery as te, useMutation as M, QueryClientProvider as ce, QueryClient as le } from "@tanstack/react-query";
4
4
  import { useDispatch as de, useSelector as u, shallowEqual as ae, Provider as se } from "react-redux";
5
5
  import P, { useRef as L, useEffect as _, useState as C, useCallback as ue, useMemo as he } from "react";
@@ -1,4 +1,4 @@
1
- import { A as a, a as t, b as n, c as S, d as m, e as o, f as E, g as c, h as A, i as g, j as h, k as v, l as i, m as u, n as r, o as R, p, q as D, r as T, s as M, t as q, u as d, v as O, w as k, x as N, y as _, z as C, B as P, C as l, D as I, E as G, F as U, G as f, H as L, I as Y, J as B, K as V, L as x, M as y, N as z, O as b, P as j, Q as w, R as F, S as H, T as J, U as K, V as Q, W, X, Y as Z, Z as $, _ as ee, $ as se, a0 as ae, a1 as te, a2 as ne, a3 as Se } from "./index-988rqE3P.mjs";
1
+ import { A as a, a as t, b as n, c as S, d as m, e as o, f as E, g as c, h as A, i as g, j as h, k as v, l as i, m as u, n as r, o as R, p, q as D, r as T, s as M, t as q, u as d, v as O, w as k, x as N, y as _, z as C, B as P, C as l, D as I, E as G, F as U, G as f, H as L, I as Y, J as B, K as V, L as x, M as y, N as z, O as b, P as j, Q as w, R as F, S as H, T as J, U as K, V as Q, W, X, Y as Z, Z as $, _ as ee, $ as se, a0 as ae, a1 as te, a2 as ne, a3 as Se } from "./index-BzNCFVFX.mjs";
2
2
  export {
3
3
  a as AGENT_EVENT_TYPES,
4
4
  t as AGENT_STATUS,
@@ -59,4 +59,4 @@ export {
59
59
  ne as OutputStreamSchema,
60
60
  Se as TraceIdSchema
61
61
  };
62
- //# sourceMappingURL=index-C9K_GPuD.mjs.map
62
+ //# sourceMappingURL=index-BFZ1d1zd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BFZ1d1zd.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -26,28 +26,28 @@ l || o.cwd;
26
26
  const S = (r) => M ? "\x1BPtmux;" + r.replaceAll("\x1B", "\x1B\x1B") + "\x1B\\" : r, v = f + "2J", N = () => {
27
27
  if (l || !I)
28
28
  return !1;
29
- const r = O.release().split("."), e = Number(r[0]), n = Number(r[2] ?? 0);
30
- return e < 10 || e === 10 && n < 10586;
29
+ const r = O.release().split("."), e = Number(r[0]), t = Number(r[2] ?? 0);
30
+ return e < 10 || e === 10 && t < 10586;
31
31
  };
32
32
  N() ? `${v}${f}` : `${v}${f}${f}`;
33
33
  const j = (r, e) => {
34
- const n = S(`${g}8${c}${c}${e}${k}`), t = S(`${g}8${c}${c}${k}`);
35
- return n + r + t;
34
+ const t = S(`${g}8${c}${c}${e}${k}`), n = S(`${g}8${c}${c}${k}`);
35
+ return t + r + n;
36
36
  };
37
37
  function i(r, e = A.argv) {
38
- const n = r.startsWith("-") ? "" : r.length === 1 ? "-" : "--", t = e.indexOf(n + r), u = e.indexOf("--");
39
- return t !== -1 && (u === -1 || t < u);
38
+ const t = r.startsWith("-") ? "" : r.length === 1 ? "-" : "--", n = e.indexOf(t + r), u = e.indexOf("--");
39
+ return n !== -1 && (u === -1 || n < u);
40
40
  }
41
41
  function w(r = "") {
42
42
  if (/^\d{3,4}$/.test(r)) {
43
- const n = /(\d{1,2})(\d{2})/.exec(r) ?? [];
43
+ const t = /(\d{1,2})(\d{2})/.exec(r) ?? [];
44
44
  return {
45
45
  major: 0,
46
- minor: Number.parseInt(n[1], 10),
47
- patch: Number.parseInt(n[2], 10)
46
+ minor: Number.parseInt(t[1], 10),
47
+ patch: Number.parseInt(t[2], 10)
48
48
  };
49
49
  }
50
- const e = (r ?? "").split(".").map((n) => Number.parseInt(n, 10));
50
+ const e = (r ?? "").split(".").map((t) => Number.parseInt(t, 10));
51
51
  return {
52
52
  major: e[0],
53
53
  minor: e[1],
@@ -57,8 +57,8 @@ function w(r = "") {
57
57
  function E(r) {
58
58
  const {
59
59
  CI: e,
60
- CURSOR_TRACE_ID: n,
61
- FORCE_HYPERLINK: t,
60
+ CURSOR_TRACE_ID: t,
61
+ FORCE_HYPERLINK: n,
62
62
  NETLIFY: u,
63
63
  TEAMCITY_VERSION: R,
64
64
  TERM_PROGRAM: b,
@@ -66,8 +66,8 @@ function E(r) {
66
66
  VTE_VERSION: m,
67
67
  TERM: $
68
68
  } = o.env;
69
- if (t)
70
- return !(t.length > 0 && Number.parseInt(t, 10) === 0);
69
+ if (n)
70
+ return !(n.length > 0 && Number.parseInt(n, 10) === 0);
71
71
  if (i("no-hyperlink") || i("no-hyperlinks") || i("hyperlink=false") || i("hyperlink=never"))
72
72
  return !1;
73
73
  if (i("hyperlink=true") || i("hyperlink=always") || u)
@@ -86,9 +86,11 @@ function E(r) {
86
86
  case "WezTerm":
87
87
  return /^0-unstable-\d{4}-\d{2}-\d{2}$/.test(p) ? p.slice(11) >= "2020-06-20" : s.major >= 20200620;
88
88
  case "vscode":
89
- return n ? !0 : s.major > 1 || s.major === 1 && s.minor >= 72;
89
+ return t ? !0 : s.major > 1 || s.major === 1 && s.minor >= 72;
90
90
  case "ghostty":
91
91
  return !0;
92
+ case "zed":
93
+ return !0;
92
94
  }
93
95
  }
94
96
  if (m) {
@@ -109,14 +111,14 @@ const h = {
109
111
  stdout: E(o.stdout),
110
112
  stderr: E(o.stderr)
111
113
  };
112
- function a(r, e, { target: n = "stdout", ...t } = {}) {
113
- return h[n] ? j(r, e) : t.fallback === !1 ? r : typeof t.fallback == "function" ? t.fallback(r, e) : `${r} ${e}`;
114
+ function a(r, e, { target: t = "stdout", ...n } = {}) {
115
+ return h[t] ? j(r, e) : n.fallback === !1 ? r : typeof n.fallback == "function" ? n.fallback(r, e) : `${r} ${e}`;
114
116
  }
115
117
  a.isSupported = h.stdout;
116
- a.stderr = (r, e, n = {}) => a(r, e, { target: "stderr", ...n });
118
+ a.stderr = (r, e, t = {}) => a(r, e, { target: "stderr", ...t });
117
119
  a.stderr.isSupported = h.stderr;
118
- const V = ({ children: r, url: e, fallback: n = !0 }) => T(y, { transform: (t) => a(t, e, { fallback: n }), children: T(W, { children: r }) });
120
+ const V = ({ children: r, url: e, fallback: t = !0 }) => T(y, { transform: (n) => a(n, e, { fallback: t }), children: T(W, { children: r }) });
119
121
  export {
120
122
  V as default
121
123
  };
122
- //# sourceMappingURL=index-BQL-MgGG.mjs.map
124
+ //# sourceMappingURL=index-BxTdyWuL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BQL-MgGG.mjs","sources":["../../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js","../../../node_modules/.pnpm/ansi-escapes@7.2.0/node_modules/ansi-escapes/base.js","../../../node_modules/.pnpm/has-flag@5.0.1/node_modules/has-flag/index.js","../../../node_modules/.pnpm/supports-hyperlinks@4.3.0/node_modules/supports-hyperlinks/index.js","../../../node_modules/.pnpm/terminal-link@5.0.0/node_modules/terminal-link/index.js","../../../node_modules/.pnpm/ink-link@5.0.0_ink@6.5.0_@types+react@19.1.9_react@19.2.0_/node_modules/ink-link/dist/index.js"],"sourcesContent":["/* globals WorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, ServiceWorkerGlobalScope */\n\nexport const isBrowser = globalThis.window?.document !== undefined;\n\nexport const isNode = globalThis.process?.versions?.node !== undefined;\n\nexport const isBun = globalThis.process?.versions?.bun !== undefined;\n\nexport const isDeno = globalThis.Deno?.version?.deno !== undefined;\n\nexport const isElectron = globalThis.process?.versions?.electron !== undefined;\n\nexport const isJsDom = globalThis.navigator?.userAgent?.includes('jsdom') === true;\n\nexport const isWebWorker = typeof WorkerGlobalScope !== 'undefined' && globalThis instanceof WorkerGlobalScope;\n\nexport const isDedicatedWorker = typeof DedicatedWorkerGlobalScope !== 'undefined' && globalThis instanceof DedicatedWorkerGlobalScope;\n\nexport const isSharedWorker = typeof SharedWorkerGlobalScope !== 'undefined' && globalThis instanceof SharedWorkerGlobalScope;\n\nexport const isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && globalThis instanceof ServiceWorkerGlobalScope;\n\n// Note: I'm intentionally not DRYing up the other variables to keep them \"lazy\".\nconst platform = globalThis.navigator?.userAgentData?.platform;\n\nexport const isMacOs = platform === 'macOS'\n\t|| globalThis.navigator?.platform === 'MacIntel' // Even on Apple silicon Macs.\n\t|| globalThis.navigator?.userAgent?.includes(' Mac ') === true\n\t|| globalThis.process?.platform === 'darwin';\n\nexport const isWindows = platform === 'Windows'\n\t|| globalThis.navigator?.platform === 'Win32'\n\t|| globalThis.process?.platform === 'win32';\n\nexport const isLinux = platform === 'Linux'\n\t|| globalThis.navigator?.platform?.startsWith('Linux') === true\n\t|| globalThis.navigator?.userAgent?.includes(' Linux ') === true\n\t|| globalThis.process?.platform === 'linux';\n\nexport const isIos = platform === 'iOS'\n\t|| (globalThis.navigator?.platform === 'MacIntel' && globalThis.navigator?.maxTouchPoints > 1)\n\t|| /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);\n\nexport const isAndroid = platform === 'Android'\n\t|| globalThis.navigator?.platform === 'Android'\n\t|| globalThis.navigator?.userAgent?.includes(' Android ') === true\n\t|| globalThis.process?.platform === 'android';\n","import process from 'node:process';\nimport os from 'node:os';\nimport {isBrowser} from 'environment';\n\nconst ESC = '\\u001B[';\nconst OSC = '\\u001B]';\nconst BEL = '\\u0007';\nconst SEP = ';';\n\nconst isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === 'Apple_Terminal';\nconst isWindows = !isBrowser && process.platform === 'win32';\nconst isTmux = !isBrowser && (process.env.TERM?.startsWith('screen') || process.env.TERM?.startsWith('tmux') || process.env.TMUX !== undefined);\n\nconst cwdFunction = isBrowser ? () => {\n\tthrow new Error('`process.cwd()` only works in Node.js, not the browser.');\n} : process.cwd;\n\nconst wrapOsc = sequence => {\n\tif (isTmux) {\n\t\t// Tmux requires OSC sequences to be wrapped with DCS tmux; <sequence> ST\n\t\t// and all ESCs in <sequence> to be replaced with ESC ESC.\n\t\t// It only accepts ESC backslash for ST.\n\t\treturn '\\u001BPtmux;' + sequence.replaceAll('\\u001B', '\\u001B\\u001B') + '\\u001B\\\\';\n\t}\n\n\treturn sequence;\n};\n\nexport const cursorTo = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tif (typeof y !== 'number') {\n\t\treturn ESC + (x + 1) + 'G';\n\t}\n\n\treturn ESC + (y + 1) + SEP + (x + 1) + 'H';\n};\n\nexport const cursorMove = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tlet returnValue = '';\n\n\tif (x < 0) {\n\t\treturnValue += ESC + (-x) + 'D';\n\t} else if (x > 0) {\n\t\treturnValue += ESC + x + 'C';\n\t}\n\n\tif (y < 0) {\n\t\treturnValue += ESC + (-y) + 'A';\n\t} else if (y > 0) {\n\t\treturnValue += ESC + y + 'B';\n\t}\n\n\treturn returnValue;\n};\n\nexport const cursorUp = (count = 1) => ESC + count + 'A';\nexport const cursorDown = (count = 1) => ESC + count + 'B';\nexport const cursorForward = (count = 1) => ESC + count + 'C';\nexport const cursorBackward = (count = 1) => ESC + count + 'D';\n\nexport const cursorLeft = ESC + 'G';\nexport const cursorSavePosition = isTerminalApp ? '\\u001B7' : ESC + 's';\nexport const cursorRestorePosition = isTerminalApp ? '\\u001B8' : ESC + 'u';\nexport const cursorGetPosition = ESC + '6n';\nexport const cursorNextLine = ESC + 'E';\nexport const cursorPrevLine = ESC + 'F';\nexport const cursorHide = ESC + '?25l';\nexport const cursorShow = ESC + '?25h';\n\nexport const eraseLines = count => {\n\tlet clear = '';\n\n\tfor (let i = 0; i < count; i++) {\n\t\tclear += eraseLine + (i < count - 1 ? cursorUp() : '');\n\t}\n\n\tif (count) {\n\t\tclear += cursorLeft;\n\t}\n\n\treturn clear;\n};\n\nexport const eraseEndLine = ESC + 'K';\nexport const eraseStartLine = ESC + '1K';\nexport const eraseLine = ESC + '2K';\nexport const eraseDown = ESC + 'J';\nexport const eraseUp = ESC + '1J';\nexport const eraseScreen = ESC + '2J';\nexport const scrollUp = ESC + 'S';\nexport const scrollDown = ESC + 'T';\n\nexport const clearScreen = '\\u001Bc';\n\nexport const clearViewport = `${eraseScreen}${ESC}H`;\n\nconst isOldWindows = () => {\n\tif (isBrowser || !isWindows) {\n\t\treturn false;\n\t}\n\n\tconst parts = os.release().split('.');\n\tconst major = Number(parts[0]);\n\tconst build = Number(parts[2] ?? 0);\n\n\tif (major < 10) {\n\t\treturn true;\n\t}\n\n\tif (major === 10 && build < 10_586) {\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nexport const clearTerminal = isOldWindows()\n\t? `${eraseScreen}${ESC}0f`\n\t// 1. Erases the screen (Only done in case `2` is not supported)\n\t// 2. Erases the whole screen including scrollback buffer\n\t// 3. Moves cursor to the top-left position\n\t// More info: https://www.real-world-systems.com/docs/ANSIcode.html\n\t: `${eraseScreen}${ESC}3J${ESC}H`;\n\nexport const enterAlternativeScreen = ESC + '?1049h';\nexport const exitAlternativeScreen = ESC + '?1049l';\n\nexport const beep = BEL;\n\nexport const link = (text, url) => {\n\tconst openLink = wrapOsc(`${OSC}8${SEP}${SEP}${url}${BEL}`);\n\tconst closeLink = wrapOsc(`${OSC}8${SEP}${SEP}${BEL}`);\n\treturn openLink + text + closeLink;\n};\n\nexport const image = (data, options = {}) => {\n\tlet returnValue = `${OSC}1337;File=inline=1`;\n\n\tif (options.width) {\n\t\treturnValue += `;width=${options.width}`;\n\t}\n\n\tif (options.height) {\n\t\treturnValue += `;height=${options.height}`;\n\t}\n\n\tif (options.preserveAspectRatio === false) {\n\t\treturnValue += ';preserveAspectRatio=0';\n\t}\n\n\tconst imageBuffer = Buffer.from(data);\n\n\t// `size` is optional in the spec, but xterm.js requires it.\n\treturn wrapOsc(returnValue + `;size=${imageBuffer.byteLength}` + ':' + imageBuffer.toString('base64') + BEL);\n};\n\nexport const iTerm = {\n\tsetCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}50;CurrentDir=${cwd}${BEL}`),\n\n\tannotation(message, options = {}) {\n\t\tlet returnValue = `${OSC}1337;`;\n\n\t\tconst hasX = options.x !== undefined;\n\t\tconst hasY = options.y !== undefined;\n\t\tif ((hasX || hasY) && !(hasX && hasY && options.length !== undefined)) {\n\t\t\tthrow new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');\n\t\t}\n\n\t\tmessage = message.replaceAll('|', '');\n\n\t\treturnValue += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';\n\n\t\tif (options.length > 0) {\n\t\t\treturnValue += (\n\t\t\t\thasX\n\t\t\t\t\t? [message, options.length, options.x, options.y]\n\t\t\t\t\t: [options.length, message]\n\t\t\t).join('|');\n\t\t} else {\n\t\t\treturnValue += message;\n\t\t}\n\n\t\treturn wrapOsc(returnValue + BEL);\n\t},\n};\n\nexport const ConEmu = {\n\tsetCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}9;9;${cwd}${BEL}`),\n};\n\nexport const setCwd = (cwd = cwdFunction()) => iTerm.setCwd(cwd) + ConEmu.setCwd(cwd);\n","import process from 'process'; // eslint-disable-line node/prefer-global/process\n\nexport default function hasFlag(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","import process from 'node:process';\nimport {createSupportsColor} from 'supports-color';\nimport hasFlag from 'has-flag';\n\nfunction parseVersion(versionString = '') {\n\tif (/^\\d{3,4}$/.test(versionString)) {\n\t\t// Env var doesn't always use dots. example: 4601 => 46.1.0\n\t\tconst match = /(\\d{1,2})(\\d{2})/.exec(versionString) ?? [];\n\t\treturn {\n\t\t\tmajor: 0,\n\t\t\tminor: Number.parseInt(match[1], 10),\n\t\t\tpatch: Number.parseInt(match[2], 10),\n\t\t};\n\t}\n\n\tconst versions = (versionString ?? '').split('.').map(n => Number.parseInt(n, 10));\n\treturn {\n\t\tmajor: versions[0],\n\t\tminor: versions[1],\n\t\tpatch: versions[2],\n\t};\n}\n\n// eslint-disable-next-line complexity\nexport function createSupportsHyperlinks(stream) {\n\tconst {\n\t\tCI,\n\t\tCURSOR_TRACE_ID,\n\t\tFORCE_HYPERLINK,\n\t\tNETLIFY,\n\t\tTEAMCITY_VERSION,\n\t\tTERM_PROGRAM,\n\t\tTERM_PROGRAM_VERSION,\n\t\tVTE_VERSION,\n\t\tTERM,\n\t} = process.env;\n\n\tif (FORCE_HYPERLINK) {\n\t\treturn !(FORCE_HYPERLINK.length > 0 && Number.parseInt(FORCE_HYPERLINK, 10) === 0);\n\t}\n\n\tif (hasFlag('no-hyperlink') || hasFlag('no-hyperlinks') || hasFlag('hyperlink=false') || hasFlag('hyperlink=never')) {\n\t\treturn false;\n\t}\n\n\tif (hasFlag('hyperlink=true') || hasFlag('hyperlink=always')) {\n\t\treturn true;\n\t}\n\n\t// Netlify does not run a TTY, it does not need `supportsColor` check\n\tif (NETLIFY) {\n\t\treturn true;\n\t}\n\n\t// If they specify no colors, they probably don't want hyperlinks.\n\tif (!createSupportsColor(stream)) {\n\t\treturn false;\n\t}\n\n\tif (stream && !stream.isTTY) {\n\t\treturn false;\n\t}\n\n\t// Windows Terminal\n\tif ('WT_SESSION' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn false;\n\t}\n\n\tif (CI) {\n\t\treturn false;\n\t}\n\n\tif (TEAMCITY_VERSION) {\n\t\treturn false;\n\t}\n\n\tif (TERM_PROGRAM) {\n\t\tconst version = parseVersion(TERM_PROGRAM_VERSION);\n\n\t\tswitch (TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\tif (version.major === 3) {\n\t\t\t\t\treturn version.minor >= 1;\n\t\t\t\t}\n\n\t\t\t\treturn version.major > 3;\n\t\t\t}\n\n\t\t\tcase 'WezTerm': {\n\t\t\t\t// WezTerm packaged by Nix uses their own version scheme.\n\t\t\t\tif (/^0-unstable-\\d{4}-\\d{2}-\\d{2}$/.test(TERM_PROGRAM_VERSION)) {\n\t\t\t\t\tconst date = TERM_PROGRAM_VERSION.slice('0-unstable-'.length);\n\t\t\t\t\treturn date >= '2020-06-20';\n\t\t\t\t}\n\n\t\t\t\t// This number is a date and reads better grouped as such.\n\t\t\t\t// eslint-disable-next-line unicorn/numeric-separators-style\n\t\t\t\treturn version.major >= 2020_06_20;\n\t\t\t}\n\n\t\t\tcase 'vscode': {\n\t\t\t\t// Cursor forked VS Code and supports hyperlinks in 0.x.x\n\t\t\t\tif (CURSOR_TRACE_ID) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-mixed-operators\n\t\t\t\treturn version.major > 1 || version.major === 1 && version.minor >= 72;\n\t\t\t}\n\n\t\t\tcase 'ghostty': {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (VTE_VERSION) {\n\t\t// 0.50.0 was supposed to support hyperlinks, but throws a segfault\n\t\tif (VTE_VERSION === '0.50.0') {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst version = parseVersion(VTE_VERSION);\n\t\treturn version.major > 0 || version.minor >= 50;\n\t}\n\n\tswitch (TERM) {\n\t\tcase 'alacritty': {\n\t\t\t// Support added in v0.11 (2022-10-13)\n\t\t\treturn true;\n\t\t}\n\n\t\tcase 'xterm-kitty': {\n\t\t\treturn true;\n\t\t}\n\t\t// No default\n\t}\n\n\treturn false;\n}\n\nconst supportsHyperlinks = {\n\tstdout: createSupportsHyperlinks(process.stdout),\n\tstderr: createSupportsHyperlinks(process.stderr),\n};\n\nexport default supportsHyperlinks;\n","import ansiEscapes from 'ansi-escapes';\nimport supportsHyperlinks from 'supports-hyperlinks';\n\nexport default function terminalLink(text, url, {target = 'stdout', ...options} = {}) {\n\tif (!supportsHyperlinks[target]) {\n\t\t// If the fallback has been explicitly disabled, don't modify the text itself.\n\t\tif (options.fallback === false) {\n\t\t\treturn text;\n\t\t}\n\n\t\tif (typeof options.fallback === 'function') {\n\t\t\treturn options.fallback(text, url);\n\t\t}\n\n\t\t// Use raw URL bounded by whitespace for maximum compatibility.\n\t\t// Most terminal linkifiers only guarantee correct detection when URLs are\n\t\t// delimited by whitespace. No brackets, quotes, or special characters that\n\t\t// could interfere with URL detection or be included in the linked text.\n\t\treturn `${text} ${url}`;\n\t}\n\n\treturn ansiEscapes.link(text, url);\n}\n\nterminalLink.isSupported = supportsHyperlinks.stdout;\nterminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, {target: 'stderr', ...options});\nterminalLink.stderr.isSupported = supportsHyperlinks.stderr;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Transform, Text } from 'ink';\nimport terminalLink from 'terminal-link';\n/**\nAn Ink component that creates clickable links in the terminal.\n\n[Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)\n\nFor unsupported terminals, the link will be printed after the text: `My website https://sindresorhus.com`.\n\n@example\n```\nimport React from 'react';\nimport {render, Color} from 'ink';\nimport Link from 'ink-link';\n\nrender(\n <Link url=\"https://sindresorhus.com\">\n My <Color cyan>Website</Color>\n </Link>\n);\n```\n*/\nconst Link = ({ children, url, fallback = true }) => (_jsx(Transform, { transform: children => terminalLink(children, url, { fallback }), children: _jsx(Text, { children: children }) }));\nexport default Link;\n"],"names":["isBrowser","platform","ESC","OSC","BEL","SEP","process","isWindows","isTmux","wrapOsc","sequence","eraseScreen","isOldWindows","parts","os","major","build","link","text","url","openLink","closeLink","hasFlag","flag","argv","prefix","position","terminatorPosition","parseVersion","versionString","match","versions","createSupportsHyperlinks","stream","CI","CURSOR_TRACE_ID","FORCE_HYPERLINK","NETLIFY","TEAMCITY_VERSION","TERM_PROGRAM","TERM_PROGRAM_VERSION","VTE_VERSION","TERM","createSupportsColor","version","supportsHyperlinks","terminalLink","target","options","ansiEscapes.link","Link","children","fallback","_jsx","Transform","Text"],"mappings":";;;;;;AAEO,MAAMA,IAAY,WAAW,QAAQ,aAAa;AAEnC,WAAW,SAAS,UAAU;AAE/B,WAAW,SAAS,UAAU;AAE7B,WAAW,MAAM,SAAS;AAEtB,WAAW,SAAS,UAAU;AAEjC,WAAW,WAAW,WAAW,SAAS,OAAO;AAE7C,OAAO,oBAAsB,OAAe,sBAAsB;AAE5D,OAAO,6BAA+B,OAAe,sBAAsB;AAE9E,OAAO,0BAA4B,OAAe,sBAAsB;AAEvE,OAAO,2BAA6B,OAAe,sBAAsB;AAGxG,MAAMC,IAAW,WAAW,WAAW,eAAe;AAE/BA,MAAa,WAChC,WAAW,WAAW,aAAa,cACnC,WAAW,WAAW,WAAW,SAAS,OAAO,MAAM,MACvD,WAAW,SAAS;AAECA,MAAa,aAClC,WAAW,WAAW,aAAa,WACnC,WAAW,SAAS;AAEDA,MAAa,WAChC,WAAW,WAAW,UAAU,WAAW,OAAO,MAAM,MACxD,WAAW,WAAW,WAAW,SAAS,SAAS,MAAM,MACzD,W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,EAAC,QAAQ,UAAU,GAAG6B,EAAO,CAAC;AACzGF,EAAa,OAAO,cAAcD,EAAmB;ACHhD,MAACK,IAAO,CAAC,EAAE,UAAAC,GAAU,KAAAhC,GAAK,UAAAiC,IAAW,GAAI,MAAQC,EAAKC,GAAW,EAAE,WAAW,CAAAH,MAAYL,EAAaK,GAAUhC,GAAK,EAAE,UAAAiC,EAAQ,CAAE,GAAG,UAAUC,EAAKE,GAAM,EAAE,UAAUJ,EAAQ,CAAE,EAAC,CAAE;","x_google_ignoreList":[0,1,2,3,4,5]}
1
+ {"version":3,"file":"index-BxTdyWuL.mjs","sources":["../../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js","../../../node_modules/.pnpm/ansi-escapes@7.2.0/node_modules/ansi-escapes/base.js","../../../node_modules/.pnpm/has-flag@5.0.1/node_modules/has-flag/index.js","../../../node_modules/.pnpm/supports-hyperlinks@4.4.0/node_modules/supports-hyperlinks/index.js","../../../node_modules/.pnpm/terminal-link@5.0.0/node_modules/terminal-link/index.js","../../../node_modules/.pnpm/ink-link@5.0.0_ink@6.6.0_@types+react@19.2.7_react@19.2.3_/node_modules/ink-link/dist/index.js"],"sourcesContent":["/* globals WorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, ServiceWorkerGlobalScope */\n\nexport const isBrowser = globalThis.window?.document !== undefined;\n\nexport const isNode = globalThis.process?.versions?.node !== undefined;\n\nexport const isBun = globalThis.process?.versions?.bun !== undefined;\n\nexport const isDeno = globalThis.Deno?.version?.deno !== undefined;\n\nexport const isElectron = globalThis.process?.versions?.electron !== undefined;\n\nexport const isJsDom = globalThis.navigator?.userAgent?.includes('jsdom') === true;\n\nexport const isWebWorker = typeof WorkerGlobalScope !== 'undefined' && globalThis instanceof WorkerGlobalScope;\n\nexport const isDedicatedWorker = typeof DedicatedWorkerGlobalScope !== 'undefined' && globalThis instanceof DedicatedWorkerGlobalScope;\n\nexport const isSharedWorker = typeof SharedWorkerGlobalScope !== 'undefined' && globalThis instanceof SharedWorkerGlobalScope;\n\nexport const isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && globalThis instanceof ServiceWorkerGlobalScope;\n\n// Note: I'm intentionally not DRYing up the other variables to keep them \"lazy\".\nconst platform = globalThis.navigator?.userAgentData?.platform;\n\nexport const isMacOs = platform === 'macOS'\n\t|| globalThis.navigator?.platform === 'MacIntel' // Even on Apple silicon Macs.\n\t|| globalThis.navigator?.userAgent?.includes(' Mac ') === true\n\t|| globalThis.process?.platform === 'darwin';\n\nexport const isWindows = platform === 'Windows'\n\t|| globalThis.navigator?.platform === 'Win32'\n\t|| globalThis.process?.platform === 'win32';\n\nexport const isLinux = platform === 'Linux'\n\t|| globalThis.navigator?.platform?.startsWith('Linux') === true\n\t|| globalThis.navigator?.userAgent?.includes(' Linux ') === true\n\t|| globalThis.process?.platform === 'linux';\n\nexport const isIos = platform === 'iOS'\n\t|| (globalThis.navigator?.platform === 'MacIntel' && globalThis.navigator?.maxTouchPoints > 1)\n\t|| /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);\n\nexport const isAndroid = platform === 'Android'\n\t|| globalThis.navigator?.platform === 'Android'\n\t|| globalThis.navigator?.userAgent?.includes(' Android ') === true\n\t|| globalThis.process?.platform === 'android';\n","import process from 'node:process';\nimport os from 'node:os';\nimport {isBrowser} from 'environment';\n\nconst ESC = '\\u001B[';\nconst OSC = '\\u001B]';\nconst BEL = '\\u0007';\nconst SEP = ';';\n\nconst isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === 'Apple_Terminal';\nconst isWindows = !isBrowser && process.platform === 'win32';\nconst isTmux = !isBrowser && (process.env.TERM?.startsWith('screen') || process.env.TERM?.startsWith('tmux') || process.env.TMUX !== undefined);\n\nconst cwdFunction = isBrowser ? () => {\n\tthrow new Error('`process.cwd()` only works in Node.js, not the browser.');\n} : process.cwd;\n\nconst wrapOsc = sequence => {\n\tif (isTmux) {\n\t\t// Tmux requires OSC sequences to be wrapped with DCS tmux; <sequence> ST\n\t\t// and all ESCs in <sequence> to be replaced with ESC ESC.\n\t\t// It only accepts ESC backslash for ST.\n\t\treturn '\\u001BPtmux;' + sequence.replaceAll('\\u001B', '\\u001B\\u001B') + '\\u001B\\\\';\n\t}\n\n\treturn sequence;\n};\n\nexport const cursorTo = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tif (typeof y !== 'number') {\n\t\treturn ESC + (x + 1) + 'G';\n\t}\n\n\treturn ESC + (y + 1) + SEP + (x + 1) + 'H';\n};\n\nexport const cursorMove = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tlet returnValue = '';\n\n\tif (x < 0) {\n\t\treturnValue += ESC + (-x) + 'D';\n\t} else if (x > 0) {\n\t\treturnValue += ESC + x + 'C';\n\t}\n\n\tif (y < 0) {\n\t\treturnValue += ESC + (-y) + 'A';\n\t} else if (y > 0) {\n\t\treturnValue += ESC + y + 'B';\n\t}\n\n\treturn returnValue;\n};\n\nexport const cursorUp = (count = 1) => ESC + count + 'A';\nexport const cursorDown = (count = 1) => ESC + count + 'B';\nexport const cursorForward = (count = 1) => ESC + count + 'C';\nexport const cursorBackward = (count = 1) => ESC + count + 'D';\n\nexport const cursorLeft = ESC + 'G';\nexport const cursorSavePosition = isTerminalApp ? '\\u001B7' : ESC + 's';\nexport const cursorRestorePosition = isTerminalApp ? '\\u001B8' : ESC + 'u';\nexport const cursorGetPosition = ESC + '6n';\nexport const cursorNextLine = ESC + 'E';\nexport const cursorPrevLine = ESC + 'F';\nexport const cursorHide = ESC + '?25l';\nexport const cursorShow = ESC + '?25h';\n\nexport const eraseLines = count => {\n\tlet clear = '';\n\n\tfor (let i = 0; i < count; i++) {\n\t\tclear += eraseLine + (i < count - 1 ? cursorUp() : '');\n\t}\n\n\tif (count) {\n\t\tclear += cursorLeft;\n\t}\n\n\treturn clear;\n};\n\nexport const eraseEndLine = ESC + 'K';\nexport const eraseStartLine = ESC + '1K';\nexport const eraseLine = ESC + '2K';\nexport const eraseDown = ESC + 'J';\nexport const eraseUp = ESC + '1J';\nexport const eraseScreen = ESC + '2J';\nexport const scrollUp = ESC + 'S';\nexport const scrollDown = ESC + 'T';\n\nexport const clearScreen = '\\u001Bc';\n\nexport const clearViewport = `${eraseScreen}${ESC}H`;\n\nconst isOldWindows = () => {\n\tif (isBrowser || !isWindows) {\n\t\treturn false;\n\t}\n\n\tconst parts = os.release().split('.');\n\tconst major = Number(parts[0]);\n\tconst build = Number(parts[2] ?? 0);\n\n\tif (major < 10) {\n\t\treturn true;\n\t}\n\n\tif (major === 10 && build < 10_586) {\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nexport const clearTerminal = isOldWindows()\n\t? `${eraseScreen}${ESC}0f`\n\t// 1. Erases the screen (Only done in case `2` is not supported)\n\t// 2. Erases the whole screen including scrollback buffer\n\t// 3. Moves cursor to the top-left position\n\t// More info: https://www.real-world-systems.com/docs/ANSIcode.html\n\t: `${eraseScreen}${ESC}3J${ESC}H`;\n\nexport const enterAlternativeScreen = ESC + '?1049h';\nexport const exitAlternativeScreen = ESC + '?1049l';\n\nexport const beep = BEL;\n\nexport const link = (text, url) => {\n\tconst openLink = wrapOsc(`${OSC}8${SEP}${SEP}${url}${BEL}`);\n\tconst closeLink = wrapOsc(`${OSC}8${SEP}${SEP}${BEL}`);\n\treturn openLink + text + closeLink;\n};\n\nexport const image = (data, options = {}) => {\n\tlet returnValue = `${OSC}1337;File=inline=1`;\n\n\tif (options.width) {\n\t\treturnValue += `;width=${options.width}`;\n\t}\n\n\tif (options.height) {\n\t\treturnValue += `;height=${options.height}`;\n\t}\n\n\tif (options.preserveAspectRatio === false) {\n\t\treturnValue += ';preserveAspectRatio=0';\n\t}\n\n\tconst imageBuffer = Buffer.from(data);\n\n\t// `size` is optional in the spec, but xterm.js requires it.\n\treturn wrapOsc(returnValue + `;size=${imageBuffer.byteLength}` + ':' + imageBuffer.toString('base64') + BEL);\n};\n\nexport const iTerm = {\n\tsetCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}50;CurrentDir=${cwd}${BEL}`),\n\n\tannotation(message, options = {}) {\n\t\tlet returnValue = `${OSC}1337;`;\n\n\t\tconst hasX = options.x !== undefined;\n\t\tconst hasY = options.y !== undefined;\n\t\tif ((hasX || hasY) && !(hasX && hasY && options.length !== undefined)) {\n\t\t\tthrow new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');\n\t\t}\n\n\t\tmessage = message.replaceAll('|', '');\n\n\t\treturnValue += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';\n\n\t\tif (options.length > 0) {\n\t\t\treturnValue += (\n\t\t\t\thasX\n\t\t\t\t\t? [message, options.length, options.x, options.y]\n\t\t\t\t\t: [options.length, message]\n\t\t\t).join('|');\n\t\t} else {\n\t\t\treturnValue += message;\n\t\t}\n\n\t\treturn wrapOsc(returnValue + BEL);\n\t},\n};\n\nexport const ConEmu = {\n\tsetCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}9;9;${cwd}${BEL}`),\n};\n\nexport const setCwd = (cwd = cwdFunction()) => iTerm.setCwd(cwd) + ConEmu.setCwd(cwd);\n","import process from 'process'; // eslint-disable-line node/prefer-global/process\n\nexport default function hasFlag(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","import process from 'node:process';\nimport {createSupportsColor} from 'supports-color';\nimport hasFlag from 'has-flag';\n\nfunction parseVersion(versionString = '') {\n\tif (/^\\d{3,4}$/.test(versionString)) {\n\t\t// Env var doesn't always use dots. example: 4601 => 46.1.0\n\t\tconst match = /(\\d{1,2})(\\d{2})/.exec(versionString) ?? [];\n\t\treturn {\n\t\t\tmajor: 0,\n\t\t\tminor: Number.parseInt(match[1], 10),\n\t\t\tpatch: Number.parseInt(match[2], 10),\n\t\t};\n\t}\n\n\tconst versions = (versionString ?? '').split('.').map(n => Number.parseInt(n, 10));\n\treturn {\n\t\tmajor: versions[0],\n\t\tminor: versions[1],\n\t\tpatch: versions[2],\n\t};\n}\n\n// eslint-disable-next-line complexity\nexport function createSupportsHyperlinks(stream) {\n\tconst {\n\t\tCI,\n\t\tCURSOR_TRACE_ID,\n\t\tFORCE_HYPERLINK,\n\t\tNETLIFY,\n\t\tTEAMCITY_VERSION,\n\t\tTERM_PROGRAM,\n\t\tTERM_PROGRAM_VERSION,\n\t\tVTE_VERSION,\n\t\tTERM,\n\t} = process.env;\n\n\tif (FORCE_HYPERLINK) {\n\t\treturn !(FORCE_HYPERLINK.length > 0 && Number.parseInt(FORCE_HYPERLINK, 10) === 0);\n\t}\n\n\tif (hasFlag('no-hyperlink') || hasFlag('no-hyperlinks') || hasFlag('hyperlink=false') || hasFlag('hyperlink=never')) {\n\t\treturn false;\n\t}\n\n\tif (hasFlag('hyperlink=true') || hasFlag('hyperlink=always')) {\n\t\treturn true;\n\t}\n\n\t// Netlify does not run a TTY, it does not need `supportsColor` check\n\tif (NETLIFY) {\n\t\treturn true;\n\t}\n\n\t// If they specify no colors, they probably don't want hyperlinks.\n\tif (!createSupportsColor(stream)) {\n\t\treturn false;\n\t}\n\n\tif (stream && !stream.isTTY) {\n\t\treturn false;\n\t}\n\n\t// Windows Terminal\n\tif ('WT_SESSION' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn false;\n\t}\n\n\tif (CI) {\n\t\treturn false;\n\t}\n\n\tif (TEAMCITY_VERSION) {\n\t\treturn false;\n\t}\n\n\tif (TERM_PROGRAM) {\n\t\tconst version = parseVersion(TERM_PROGRAM_VERSION);\n\n\t\tswitch (TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\tif (version.major === 3) {\n\t\t\t\t\treturn version.minor >= 1;\n\t\t\t\t}\n\n\t\t\t\treturn version.major > 3;\n\t\t\t}\n\n\t\t\tcase 'WezTerm': {\n\t\t\t\t// WezTerm packaged by Nix uses their own version scheme.\n\t\t\t\tif (/^0-unstable-\\d{4}-\\d{2}-\\d{2}$/.test(TERM_PROGRAM_VERSION)) {\n\t\t\t\t\tconst date = TERM_PROGRAM_VERSION.slice('0-unstable-'.length);\n\t\t\t\t\treturn date >= '2020-06-20';\n\t\t\t\t}\n\n\t\t\t\t// This number is a date and reads better grouped as such.\n\t\t\t\t// eslint-disable-next-line unicorn/numeric-separators-style\n\t\t\t\treturn version.major >= 2020_06_20;\n\t\t\t}\n\n\t\t\tcase 'vscode': {\n\t\t\t\t// Cursor forked VS Code and supports hyperlinks in 0.x.x\n\t\t\t\tif (CURSOR_TRACE_ID) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line @stylistic/no-mixed-operators\n\t\t\t\treturn version.major > 1 || version.major === 1 && version.minor >= 72;\n\t\t\t}\n\n\t\t\tcase 'ghostty': {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcase 'zed': {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t// No default\n\t\t}\n\t}\n\n\tif (VTE_VERSION) {\n\t\t// 0.50.0 was supposed to support hyperlinks, but throws a segfault\n\t\tif (VTE_VERSION === '0.50.0') {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst version = parseVersion(VTE_VERSION);\n\t\treturn version.major > 0 || version.minor >= 50;\n\t}\n\n\tswitch (TERM) {\n\t\tcase 'alacritty': {\n\t\t\t// Support added in v0.11 (2022-10-13)\n\t\t\treturn true;\n\t\t}\n\n\t\tcase 'xterm-kitty': {\n\t\t\treturn true;\n\t\t}\n\t\t// No default\n\t}\n\n\treturn false;\n}\n\nconst supportsHyperlinks = {\n\tstdout: createSupportsHyperlinks(process.stdout),\n\tstderr: createSupportsHyperlinks(process.stderr),\n};\n\nexport default supportsHyperlinks;\n","import ansiEscapes from 'ansi-escapes';\nimport supportsHyperlinks from 'supports-hyperlinks';\n\nexport default function terminalLink(text, url, {target = 'stdout', ...options} = {}) {\n\tif (!supportsHyperlinks[target]) {\n\t\t// If the fallback has been explicitly disabled, don't modify the text itself.\n\t\tif (options.fallback === false) {\n\t\t\treturn text;\n\t\t}\n\n\t\tif (typeof options.fallback === 'function') {\n\t\t\treturn options.fallback(text, url);\n\t\t}\n\n\t\t// Use raw URL bounded by whitespace for maximum compatibility.\n\t\t// Most terminal linkifiers only guarantee correct detection when URLs are\n\t\t// delimited by whitespace. No brackets, quotes, or special characters that\n\t\t// could interfere with URL detection or be included in the linked text.\n\t\treturn `${text} ${url}`;\n\t}\n\n\treturn ansiEscapes.link(text, url);\n}\n\nterminalLink.isSupported = supportsHyperlinks.stdout;\nterminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, {target: 'stderr', ...options});\nterminalLink.stderr.isSupported = supportsHyperlinks.stderr;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Transform, Text } from 'ink';\nimport terminalLink from 'terminal-link';\n/**\nAn Ink component that creates clickable links in the terminal.\n\n[Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)\n\nFor unsupported terminals, the link will be printed after the text: `My website https://sindresorhus.com`.\n\n@example\n```\nimport React from 'react';\nimport {render, Color} from 'ink';\nimport Link from 'ink-link';\n\nrender(\n <Link url=\"https://sindresorhus.com\">\n My <Color cyan>Website</Color>\n </Link>\n);\n```\n*/\nconst Link = ({ children, url, fallback = true }) => (_jsx(Transform, { transform: children => terminalLink(children, url, { fallback }), children: _jsx(Text, { children: children }) }));\nexport default Link;\n"],"names":["isBrowser","platform","ESC","OSC","BEL","SEP","process","isWindows","isTmux","wrapOsc","sequence","eraseScreen","isOldWindows","parts","os","major","build","link","text","url","openLink","closeLink","hasFlag","flag","argv","prefix","position","terminatorPosition","parseVersion","versionString","match","versions","n","createSupportsHyperlinks","stream","CI","CURSOR_TRACE_ID","FORCE_HYPERLINK","NETLIFY","TEAMCITY_VERSION","TERM_PROGRAM","TERM_PROGRAM_VERSION","VTE_VERSION","TERM","createSupportsColor","version","supportsHyperlinks","terminalLink","target","options","ansiEscapes.link","Link","children","fallback","_jsx","Transform","Text"],"mappings":";;;;;;AAEO,MAAMA,IAAY,WAAW,QAAQ,aAAa;AAEnC,WAAW,SAAS,UAAU;AAE/B,WAAW,SAAS,UAAU;AAE7B,WAAW,MAAM,SAAS;AAEtB,WAAW,SAAS,UAAU;AAEjC,WAAW,WAAW,WAAW,SAAS,OAAO;AAE7C,OAAO,oBAAsB,OAAe,sBAAsB;AAE5D,OAAO,6BAA+B,OAAe,sBAAsB;AAE9E,OAAO,0BAA4B,OAAe,sBAAsB;AAEvE,OAAO,2BAA6B,OAAe,sBAAsB;AAGxG,MAAMC,IAAW,WAAW,WAAW,eAAe;AAE/BA,MAAa,WAChC,WAAW,WAAW,aAAa,cACnC,WAAW,WAAW,WAAW,SAAS,OAAO,MAAM,MACvD,WAAW,SAAS;AAECA,MAAa,aAClC,WAAW,WAAW,aAAa,WACnC,WAAW,SAAS;AAEDA,MAAa,WAChC,WAAW,WAAW,UAAU,WAAW,OAAO,MAAM,MACxD,WAAW,WAAW,WAAW,SAAS,SAAS,MAAM,MACzD,WAAW,SAAS;AAMCA,MAAa,aAClC,WAAW,WAAW,aAAa,aACnC,WAAW,WAAW,WAAW,SAAS,WAAW,MAAM,MAC3D,WAAW,SAAS;AC1CxB,MAAMC,IAAM,SACNC,IAAM,SACNC,IAAM,QACNC,IAAM;AAEU,CAACL,KAAaM,EAAQ,IAAI;AAChD,MAAMC,IAAY,CAACP,KAAaM,EAAQ,aAAa,SAC/CE,IAAS,CAACR,MAAcM,EAAQ,IAAI,MAAM,WAAW,QAAQ,KAAKA,EAAQ,IAAI,MAAM,WAAW,MAAM,KAAKA,EAAQ,IAAI,SAAS;AAEjHN,KAEhBM,EAAQ;AAEZ,MAAMG,IAAU,CAAAC,MACXF,IAII,eAAiBE,EAAS,W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