I'm having some trouble trying to create the following diagram using tikzcd.yichuanshen.de:

My document header is
\documentclass[12pt,openright,oneside,a4paper,english,brazil]{abntex2}
\usepackage[utf8]{inputenc}
\usepackage{tikz-cd}
The site has generated the following code:
\begin{tikzcd}
n_1 \arrow[rr, "R"] \arrow[rd, "at"'] & & n_2 \\
& f_1 \arrow[ru, "at^{-1}"'] \arrow["S"', loop, distance=2em, in=305, out=235] &
\end{tikzcd}
I'm getting this result with several error messages:
Any ideas on what's the problem?

\shorthandoff{"}before the footnote and\shorthandon{"}after. – mbert Nov 05 '22 at 20:42