Term Loan - Additional Information (Details) | Dec. 20, 2019USD ($) | Jun. 14, 2018USD ($) | Nov. 08, 2017USD ($) | Nov. 03, 2017USD ($) | Mar. 31, 2017USD ($)TermLoan | Dec. 31, 2019USD ($) | Dec. 31, 2018USD ($) | Dec. 31, 2017USD ($) | Oct. 09, 2019USD ($) |
Debt Instrument [Line Items] | | | | | | | | | |
Proceeds from long-term debt | | | | | | $ 75,000,000 | $ 60,000,000 | $ 20,000,000 | |
Loss on extinguishment of debt | | | | | | | $ 1,007,000 | | |
Debt instrument, effective interest rate before debt issuance costs and final exit fee | | | | | | 10.29% | | | |
Debt instrument, effective interest rate including debt issuance costs and final exit fee | | | | | | 12.17% | | | |
Loan And Security Agreement | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Number of term loans | TermLoan | | | | | 2 | | | | |
Loan And Security Agreement | Term Loans | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | | | | $ 35,000,000 | | | | |
Loan And Security Agreement | Term Loan A | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | | | $ 20,000,000 | 20,000,000 | | | | |
Proceeds from long-term debt | | | | | 20,000,000 | | | | |
Loan And Security Agreement | Term Loan B | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | | | | $ 15,000,000 | | | | |
Amended Loan Agreement | Term Loan B | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument, interest only period | | | | 6 months | | | | | |
Payment of amendment fee | | | $ 300,000 | | | | | | |
Amended Loan Agreement | Term Loan B | Sole Discretion | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | | | $ 20,000,000 | | | | | |
Amended Loan Agreement | Term Loan B | Achievement of One of Two Milestones | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | | | $ 25,000,000 | | | | | |
Amended Loan Agreement | Term Loan B | If Term B Loan is Drawn | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument, interest only period | | | | 12 months | | | | | |
Amended and Restated Loan and Security Agreement | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Loss on extinguishment of debt | | $ 1,000,000 | | | | | | | |
Amended and Restated Loan and Security Agreement | Term Loans | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument, payment terms | | | | | | All outstanding Term Loans will mature on June 1, 2023. The Company will make interest-only payments for 36 months through June 1, 2021. The interest-only payment period will be followed by 24 equal monthly payments of principal and interest payments. | | | |
Debt instrument, maturity date | | | | | | Jun. 1, 2023 | | | |
Debt instrument, interest rate terms | | | | | | The Term Loans will bear interest at a floating per annum rate calculated as 7.79% plus the greater of the 30-day United States Dollar LIBOR rate reported in The Wall Street Journal on the last business day of the month that immediately precedes the month in which the interest will accrue or 1.91%, with a minimum rate of 9.7% and maximum rate of 12.29%. | | | |
Debt instrument, annual interest rate | | | | | | 7.79% | | | |
Debt instrument, basis spread on variable rate | | | | | | 1.91% | | | |
Amended and Restated Loan and Security Agreement | Term Loans | Minimum | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument, annual interest rate | | | | | | 9.70% | | | |
Amended and Restated Loan and Security Agreement | Term Loans | Maximum | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument, annual interest rate | | | | | | 12.29% | | | |
Amended and Restated Loan and Security Agreement | Term Loan A | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | 80,000,000 | | | | | | | |
Proceeds from long-term debt | | 60,000,000 | | | | | | | |
Debt instrument, prepayment terms | | | | | | Under the Term A Loan, the Company has the option to prepay all, but not less than all, of the borrowed amounts, provided that the Company will be obligated to pay a prepayment fee equal to (a) the aggregate amount of interest that the Company would have paid through the maturity date if prepayment is made on or before the first anniversary of the applicable funding date of the Term Loan, (b) 4.0% of the outstanding principal balance of the applicable Term Loan if prepayment is made after the first anniversary date and on or before the second anniversary of the applicable funding date, (c) 3.0% of the outstanding principal balance of the applicable Term Loan if prepayment is made after second anniversary date and on or before the third anniversary of the applicable funding date, or (d) 1.5% of the outstanding principal balance of the applicable Term Loan if prepayment is made after the third anniversary date and on or before the fourth anniversary of the applicable funding date | | | |
Debt instrument final exit fee payment percentage | | | | | | 6.50% | | | |
Amended and Restated Loan and Security Agreement | Term Loan A | Loan Prepayment After First Anniversary | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument prepayment fee percentage | | | | | | 4.00% | | | |
Amended and Restated Loan and Security Agreement | Term Loan A | Loan Prepayment After Second Anniversary | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument prepayment fee percentage | | | | | | 3.00% | | | |
Amended and Restated Loan and Security Agreement | Term Loan A | Loan Prepayment After Third Anniversary | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument prepayment fee percentage | | | | | | 1.50% | | | |
Amended and Restated Loan and Security Agreement | Term Loan B | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | $ 45,000,000 | | | | | | | |
Debt instrument, possible borrowing date | | | | | | Oct. 14, 2019 | | | |
Current borrowing capacity | | | | | | | | | $ 45,000,000 |
Debt instrument, interest only payments period | | | | | | 36 months through June 1, 2021 | | | |
Debt instrument, prepayment terms | | | | | | Under the Term B Loan, the Company will be obligated to pay a prepayment fee equal to (a) 4.0% of the outstanding principal balance of the applicable Term B Loan if prepayment is made on or before the first anniversary of the applicable funding date of the Term Loan, (b) 3.0% of the outstanding principal balance of the applicable Term B Loan if prepayment is made after the first anniversary date and on or before the second anniversary of the applicable funding date, (c) 1.50% of the outstanding principal balance of the applicable Term B Loan if prepayment is made after second anniversary date and on or before the third anniversary of the applicable funding date, and (d) 0.0% of the outstanding principal balance of the applicable Term B Loan if prepayment is made after the third anniversary date of the funding date and prior to the maturity date | | | |
Debt instrument final exit fee payment percentage | | | | | | 2.00% | | | |
Amended and Restated Loan and Security Agreement | Term Loan B | Loan Prepayment After First Anniversary | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument prepayment fee percentage | | | | | | 3.00% | | | |
Amended and Restated Loan and Security Agreement | Term Loan B | Loan Prepayment After Second Anniversary | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument prepayment fee percentage | | | | | | 1.50% | | | |
Amended and Restated Loan and Security Agreement | Term Loan B | Loan Prepayment After Third Anniversary | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument prepayment fee percentage | | | | | | 0.00% | | | |
Amended and Restated Loan and Security Agreement | Term Loan B | Loan Prepayment After First Anniversary | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Debt instrument prepayment fee percentage | | | | | | 4.00% | | | |
Amended Restated Loan Agreement | Term Loan B | | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | | |
Maximum borrowing capacity | | | | | | | | | $ 75,000,000 |
Proceeds from long-term debt | $ 75,000,000 | | | | | | | | |