Suppression and azimuthal anisotropy of prompt and nonprompt J/psi production in PbPb collisions at root S-NN=2.76 TeV