JS Auto Cast Foundry