German Chancellor Angela Merkel says the European Union will work until the very last hour to avoid a no-deal Brexit.