Nutritional and Life-History Determinants of Resource Allocation in Holometabolous Insects