WASHINGTON — The gunman in the assassination attempt of former President Donald Trump searched online for events of both 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 said Wednesday.