In the domain $$-1 \leq x \leq 1,$$ the minimum value of the function $f(x)=x^2-16x-2a$ is $$-31.$$ What is the value of $$a?$$