| 248 | const s2 = f.createInterface({ input: t2, output: u3, prompt: "", tabSize: 1 }); |
| 249 | f.emitKeypressEvents(t2, s2), t2.isTTY && t2.setRawMode(true); |
| 250 | const C5 = (D5, { name: i3 }) => { |
| 251 | if (String(D5) === "" && process.exit(0), !F5) return; |
| 252 | let n2 = i3 === "return" ? 0 : -1, E4 = i3 === "return" ? -1 : 0; |
| 253 | f.moveCursor(u3, n2, E4, () => { |
| 254 | f.clearLine(u3, 1, () => { |
| 255 | t2.once("keypress", C5); |
| 256 | }); |
| 257 | }); |
| 258 | }; |
| 259 | return e3 && process.stdout.write(import_sisteransi.cursor.hide), t2.once("keypress", C5), () => { |
| 260 | t2.off("keypress", C5), e3 && process.stdout.write(import_sisteransi.cursor.show), t2.isTTY && !PD && t2.setRawMode(false), s2.terminal = false, s2.close(); |
| 261 | }; |