Stereoselectivity of 1,3-dipolar cycloadditions

How do the 1,3-dipolar cycloadditions follow the *endo* rule as in the reaction below, where the *anti* diastereoisomer is formed predominantly?


![enter image description here](https://i.stack.imgur.com/DWhsc.gif)


