Ported mech_cost.js to EntryEffort TypeScript class. Demo uses it.