v3.22.2
Description of Business and Summary of Significant Accounting Policies - Additional Information (Details) - USD ($)
$ in Thousands
6 Months Ended
Jun. 30, 2022
Dec. 31, 2021
Jan. 01, 2021
Description Of Business And Summary Of Significant Accounting Policies [Line Items]      
Accumulated deficit $ (9,066,157) $ (8,284,466)  
Additional paid-in capital 12,529,743 12,069,097  
Convertible senior notes, net $ 3,739,092 $ 2,253,087  
Accounting Standards Update 2022-03      
Description Of Business And Summary Of Significant Accounting Policies [Line Items]      
Change in accounting principle, accounting standards update, adopted [true false] true    
Change in accounting principle, accounting standards update, adoption date Apr. 01, 2022    
Change in accounting principle, accounting standards update, immaterial effect [true false] true    
Accounting Standards Update 2021-10      
Description Of Business And Summary Of Significant Accounting Policies [Line Items]      
Change in accounting principle, accounting standards update, adopted [true false] true    
Change in accounting principle, accounting standards update, adoption date Jan. 01, 2022    
Change in accounting principle, accounting standards update, immaterial effect [true false] true    
Accounting Standards Update 2021-08      
Description Of Business And Summary Of Significant Accounting Policies [Line Items]      
Change in accounting principle, accounting standards update, adopted [true false] true    
Change in accounting principle, accounting standards update, adoption date Jan. 01, 2022    
Change in accounting principle, accounting standards update, immaterial effect [true false] true    
Accounting Standards Update 2020-06      
Description Of Business And Summary Of Significant Accounting Policies [Line Items]      
Change in accounting principle, accounting standards update, adoption date Jan. 01, 2021    
Change in accounting principle, accounting standards update, early adoption [true false] true    
Change in accounting principle, accounting standards update, transition option elected us-gaap:AccountingStandardsUpdate202006RetrospectiveMember    
Accounting Standards Update 2020-06 | Revision of Prior Period, Accounting Standards Update, Adjustment      
Description Of Business And Summary Of Significant Accounting Policies [Line Items]      
Accumulated deficit     $ (95,000)
Additional paid-in capital     664,000
Convertible senior notes, net     $ 569,000