**Note**

This is copied from the Alertify project, with some modifications to support selecting from a list of options.

Let's treat this as an external library and not code review.