refract JS