ANSI-compatible terminal emulator in Javascript