I have followed the guide for Deploying Mermaid here:
Deploying Mermaid
https://mermaid-js.github.io/mermaid/#/?id=deploying-mermaid
Using it on codepen works direc