Origin of reactivity, regioselectivity, and periselectivity in 1,3-dipolar cycloadditions