The gunman in the assassination attempt of former US president Donald Trump searched online for events of both Mr Trump and President Joe Biden and saw the Pennsylvania campaign rally where he opened fire last month as a “target of opportunity,” a senior FBI official has said.