Safety-Critical Control with Input Delay in Dynamic Environment