Does this distribution belong to exponential family and does its support depend on $p?$ I have this bivariate distribution and I would like to tell if it is in the exponential family:
$$f(y_{i},d_{i}|\theta_{1}\,\theta_{2}\,p)=\left(\left(\frac{1}{\theta_{1}}\right)\exp\left(\frac{-y_{i}}{\theta_{1}}\right)\right)^{d_{i}}p^{d_{i}}\left(\left(\frac{1}{\theta_{2}}\right)\exp\left(\frac{-y_{i}}{\theta_{2}}\right)\right)^{1-d_{i}}(1-p)^{1-d_{i}}$$
with $p \in [0,1]; ~d_{i}\in\{0,1\}$ and $y_{i}\in(0,\infty).$
My claim is that this distribution is not a part of the exponential family because its support depends on the parameter $p.$ For example, if $p=0, $ then only pairs $(y_{i},0)$ are supported, but the solutions states that this distribution is an member of the exponential family. I am not sure where my misunderstanding is. Any explanation would be appreciated.

As @whuber says, what you describe is a mixture model.
It looks like $Y \mid D=1 \sim \text{Exp}(\text{mean}=\theta_1)$ and $Y\mid D=0 \sim \text{Exp}(\text{mean}=\theta_2)$, where $D \sim \text{Bernoulli}(p)$.
In other words, $Y\sim \text{Exp}(\text{mean}=\theta_1)$ with probability $p$ and $Y\sim \text{Exp}(\text{mean}=\theta_2)$ with probability $1-p$.
For $\theta_1,\theta_2>0$ and $p\in [0,1]$, likelihood function given the data $(y,d)$ is
$$L(\theta_1,\theta_2,p)=\left\{p\frac1{\theta_1}e^{-y/\theta_1}\right\}^d\left\{(1-p)\frac1{\theta_2}e^{-y/\theta_2}\right\}^{1-d} \quad,\, y\ge 0,\,d\in\{0,1\}$$
Or,
$$L(\boldsymbol\theta)=\exp\left\{d\left(\ln \left(\frac p{\theta_1}\right)-\frac{y}{\theta_1}\right)+(1-d)\left(\ln \left(\frac {1-p}{\theta_2}\right)-\frac{y}{\theta_2}\right)\right\}$$
This can be written in the form
$$L(\boldsymbol\theta)=\exp\left\{\eta(\boldsymbol\theta)'T(y,d)-A(\boldsymbol\theta)\right\}\,,$$
where $\eta(\boldsymbol\theta)=\left(\ln\left(\frac{p\theta_2}{(1-p)\theta_1}\right),\frac1{\theta_2}-\frac1{\theta_1},-\frac1{\theta_2}\right)$,  $T(y,d)=(d,dy,y)$ and $A(\boldsymbol\theta)=\ln\left(\frac{\theta_2}{1-p}\right)$.
Note that the support of the distribution is $\mathbb R_{\ge 0}\times \{0,1\}$, which does not depend on any parameter. So looks to me this is very much a member of exponential family.
