High performance hierarchical finite state machine library for JavaScript