Hydrometallurgical recycling of rare earth elements from secondary resources