(a) If the prosecution or defense establishes by affidavit or other evidence that the testimony of a person is material in a criminal proceeding, and that it may be impracticable to secure the presence of the person by subpoena, a judicial officer may order the arrest of the person and consider the release or detention of the person under the provisions of AS 12.30.011.
(b) A material witness may not be detained because of inability to comply with any condition of release if the testimony of the witness can adequately be secured by deposition, unless further detention is necessary to prevent a failure of justice.
(c) Release of a material witness under (a) of this section may be delayed for a reasonable period of time for the deposition of the witness to be taken.