Democrats near US spending deal: Pelosi