v3.24.2
Long-term Debt - Convertible Senior Notes - Additional Information (Details)
$ / shares in Units, $ in Thousands
1 Months Ended 6 Months Ended
Dec. 11, 2019
Jun. 30, 2022
USD ($)
Nov. 30, 2021
USD ($)
Dec. 31, 2019
Days
$ / shares
Jun. 30, 2024
USD ($)
Days
$ / shares
Dec. 31, 2023
USD ($)
Debt Instrument [Line Items]            
Aggregate principal amount         $ 118,400  
Debt instrument, threshold trading days | Days         5  
Number of business day | Days         5  
Long-term debt         $ 0 $ 281,855
Additional paid in capital         (504,206) (463,900)
Accumulated deficit         $ 386,844 430,151
Closing price of common stock | $ / shares         $ 156.77  
2019 Convertible Senior Notes due 2026            
Debt Instrument [Line Items]            
Cap price of the capped call transactions | $ / shares       $ 54.2    
Capped call transactions expiration consecutive days | Days       40    
Capped call transaction expiring date Dec. 11, 2026          
2019 Convertible Senior Notes due 2026 | 2019 Note Repurchase            
Debt Instrument [Line Items]            
Payment of 2019 Notes   $ 17,600 $ 183,600      
Repurchase of debt principal amount   $ 9,900 $ 76,400      
2021 Convertible Senior Notes due 2027            
Debt Instrument [Line Items]            
Debt instrument, maturity date     May 15, 2027      
Net proceeds from issuing notes     $ 278,400      
Accrued interest         $ 400 400
Unamortized debt issuance costs         4,830 5,645
2021 Convertible Promissory Notes due 2027            
Debt Instrument [Line Items]            
Aggregate principal amount     $ 287,500      
Debt instrument, maturity date     May 15, 2027      
2021 Convertible Promissory Notes due 2027 | Level 2            
Debt Instrument [Line Items]            
Estimated fair value         $ 446,200 $ 314,000
Convertible Senior Notes            
Debt Instrument [Line Items]            
Debt instrument, threshold consecutive trading days | Days         30  
Debt instrument, threshold percentage of stock price trigger         130.00%  
Debt instrument, terms of conversion feature         Regardless of the foregoing circumstances, holders may convert all or any portion of the 2021 Notes, in increments of $1,000 principal amount, on or after February 15, 2027, until the close of business on the second scheduled trading day immediately preceding the maturity date.  
Percentage of repurchase price of principal amount         100.00%  
Convertible Senior Notes | Minimum            
Debt Instrument [Line Items]            
Debt instrument, threshold trading days | Days         20  
Convertible Senior Notes | Maximum            
Debt Instrument [Line Items]            
Debt instrument, threshold percentage of stock price trigger         98.00%