Are you expecting that code to be maintainable? It looks like it's been run through a minifier...
I even did a C version https://github.com/serprex/Crumb/blob/master/Crumb.c which is a pretty boring implementation besides
while(p>q?(j=d==b?:i*q/p,i++<p):(i=c==a?:j*p/q,j++<q))