Identify whether the bolded section of this sentence is a clause or a phrase.

Dorothy asked for a glass of water, having invited herself in.
Bolded: having invited herself in.

A. phrase
B. clause