Condensed Consolidated Statements of Redeemable Convertible and Convertible Preferred Stock and Stockholders' Equity (Deficit) - USD ($) $ in Thousands | Total | Cumulative effect of Accounting Changes [Member] | Series H-1 Convertible Preferred Stock [Member] | Series F Convertible Stock [Member] | Series D Convertible Stock [Member] | Common Stock [Member] | Common Stock [Member]Series H-1 Convertible Preferred Stock [Member] | Common Stock [Member]Series F Convertible Stock [Member] | Common Stock [Member]Series D Convertible Stock [Member] | Additional Paid-in Capital [Member] | Additional Paid-in Capital [Member]Cumulative effect of Accounting Changes [Member] | Additional Paid-in Capital [Member]Series H-1 Convertible Preferred Stock [Member] | Additional Paid-in Capital [Member]Series F Convertible Stock [Member] | Additional Paid-in Capital [Member]Series D Convertible Stock [Member] | Treasury Stock [Member] | Accumulated Other Comprehensive Income (Loss) [Member] | Retained Earnings [Member] | Retained Earnings [Member]Cumulative effect of Accounting Changes [Member] | Redeemable Convertible Preferred Stock [Member] | Redeemable Convertible Preferred Stock [Member]Series H Redeemable Convertible Preferred Stock [Member] | Redeemable Convertible Preferred Stock [Member]Common Stock [Member] | Redeemable Convertible Preferred Stock [Member]Additional Paid-in Capital [Member] | Nonredeemable Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series H-1 Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series K Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series H Redeemable Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series F Convertible Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series D Convertible Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Common Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Additional Paid-in Capital [Member] |
Temporary equity, beginning period, Shares at Dec. 31, 2018 | | | | | | | | | | | | | | | | | | | 25,947,422 | | | | 742,813,372 | | | | | | | |
Temporary equity, beginning period at Dec. 31, 2018 | | | | | | | | | | | | | | | | | | | $ 172,163 | | | | $ 2,087,560 | | | | | | | |
Balance at beginning period, Shares at Dec. 31, 2018 | | | | | | 549,367,691 | | | | | | | | | | | | | | | | | | | | | | | | |
Balance at beginning period at Dec. 31, 2018 | $ (1,751,428) | $ 12,525 | | | | $ 570 | | | | $ 1,627,737 | $ (34) | | | | $ (148,621) | $ 762 | $ (3,231,876) | $ 12,559 | | | | | | | | | | | | |
Balance at beginning period, treasury shares at Dec. 31, 2018 | | | | | | | | | | | | | | | 20,636,798 | | | | | | | | | | | | | | | |
Repurchase of common stock, held in treasury, Shares | | | | | | (1,448,687) | | | | | | | | | 1,448,687 | | | | | | | | | | | | | | | |
Repurchase of common stock, held in treasury | (7,073) | | | | | | | | | | | | | | $ (7,073) | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | | | | | | 8,892,352 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options | 9,337 | | | | | $ 9 | | | | 9,328 | | | | | | | | | | | | | | | | | | | | |
Conversion of convertible preferred stock to common stock, Shares | | | | | | | | 10,078 | 30,000 | | | | | | | | | | | | | | | | | | (10,078) | (30,000) | | |
Conversion of convertible preferred stock to common stock | | | | $ 20 | $ 24 | | | | | | | | $ 20 | $ 24 | | | | | | | | | | | | | $ (20) | $ (24) | | |
Issuance of Series H redeemable convertible preferred stock upon exercise of warrants, Shares | | | | | | | | | | | | | | | | | | | | 2,949,002 | | | | | | | | | | |
Issuance of Series H redeemable convertible preferred stock upon exercise of warrants | | | | | | | | | | | | | | | | | | | | $ 26,069 | | | | | | | | | | |
Issuance of convertible preferred stock, Shares | | | | | | | | | | | | | | | | | | | | 1,068,376 | | | | | | | | 1,097,094 | | |
Issuance of convertible preferred stock | | | | | | | | | | | | | | | | | | | | $ 7,500 | | | | | | | | $ 7,375 | | |
Reclassification of redeemable convertible preferred stock into convertible preferred stock upon expiration of redemption option, Shares | | | | | | | | | | | | | | | | | | | | (2,015,798) | | | | | | 2,015,798 | | | | |
Reclassification of redeemable convertible preferred stock into convertible preferred stock upon expiration of redemption option | | | | | | | | | | | | | | | | | | | | $ (4,163) | | | | | | $ 4,163 | | | | |
Sale of common stock, held in treasury | 100,000 | | | | | | | | | (20,928) | | | | | $ 120,928 | | | | | | | | | | | | | | | |
Redemption of redeemable convertible preferred stock, Shares | | | | | | | | | | | | | | | | | | | | (23,931,624) | | | | | | | | | | |
Redemption of redeemable convertible preferred stock | | | | | | | | | | | | | | | | | | | | $ (168,000) | | | | | | | | | | |
Sale of common stock, held in treasury, Shares | | | | | | 16,583,747 | | | | | | | | | (16,583,747) | | | | | | | | | | | | | | | |
Other comprehensive income | (470) | | | | | | | | | | | | | | | (470) | | | | | | | | | | | | | | |
Stock-based compensation | 164,794 | | | | | | | | | 164,794 | | | | | | | | | | | | | | | | | | | | |
Balance at end of period, Shares at Sep. 30, 2019 | | | | | | 573,435,181 | | | | | | | | | | | | | | | | | | | | | | | | |
Net loss | (420,319) | | | | | | | | | | | | | | | | (420,319) | | | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2019 | (1,892,590) | | | | | $ 579 | | | | 1,780,941 | | | | | $ (34,766) | 292 | (3,639,636) | | | | | | | | | | | | | |
Temporary equity, ending period, Shares at Sep. 30, 2019 | | | | | | | | | | | | | | | | | | | 4,017,378 | | | | 745,886,186 | | | | | | | |
Temporary equity, ending period at Sep. 30, 2019 | | | | | | | | | | | | | | | | | | | $ 33,569 | | | | $ 2,099,054 | | | | | | | |
Balance at end of period, treasury shares at Sep. 30, 2019 | | | | | | | | | | | | | | | 5,501,738 | | | | | | | | | | | | | | | |
Temporary equity, beginning period, Shares at Jun. 30, 2019 | | | | | | | | | | | | | | | | | | | 23,931,624 | | | | 745,886,186 | | | | | | | |
Temporary equity, beginning period at Jun. 30, 2019 | | | | | | | | | | | | | | | | | | | | | | | $ 2,099,054 | | | | | | | |
Balance at beginning period, Shares at Jun. 30, 2019 | | | | | | 571,702,167 | | | | | | | | | | | | | | | | | | | | | | | | |
Balance at beginning period at Jun. 30, 2019 | (1,800,409) | | | | | $ 577 | | | | 1,727,804 | | | | | $ (34,439) | 5,425 | (3,499,776) | | | | | | | | | | | | | |
Balance at beginning period, treasury shares at Jun. 30, 2019 | | | | | | | | | | | | | | | 5,435,072 | | | | | | | | | | | | | | | |
Repurchase of common stock, held in treasury, Shares | | | | | | (66,666) | | | | | | | | | 66,666 | | | | | | | | | | | | | | | |
Repurchase of common stock, held in treasury | (327) | | | | | | | | | | | | | | $ (327) | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | | | | | | 1,799,680 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options | 1,376 | | | | | $ 2 | | | | 1,374 | | | | | | | | | | | | | | | | | | | | |
Issuance of Series H redeemable convertible preferred stock upon exercise of warrants, Shares | | | | | | | | | | | | | | | | | | | | 2,949,002 | | | | | | | | | | |
Issuance of Series H redeemable convertible preferred stock upon exercise of warrants | | | | | | | | | | | | | | | | | | | | $ 26,069 | | | | | | | | | | |
Issuance of convertible preferred stock, Shares | | | | | | | | | | | | | | | | | | | | 1,068,376 | | | | | | | | | | |
Issuance of convertible preferred stock | | | | | | | | | | | | | | | | | | | | $ 7,500 | | | | | | | | | | |
Redemption of redeemable convertible preferred stock, Shares | | | | | | | | | | | | | | | | | | | | (23,931,624) | | | | | | | | | | |
Other comprehensive income | (5,133) | | | | | | | | | | | | | | | (5,133) | | | | | | | | | | | | | | |
Stock-based compensation | 51,763 | | | | | | | | | 51,763 | | | | | | | | | | | | | | | | | | | | |
Balance at end of period, Shares at Sep. 30, 2019 | | | | | | 573,435,181 | | | | | | | | | | | | | | | | | | | | | | | | |
Net loss | (139,860) | | | | | | | | | | | | | | | | (139,860) | | | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2019 | (1,892,590) | | | | | $ 579 | | | | 1,780,941 | | | | | $ (34,766) | 292 | (3,639,636) | | | | | | | | | | | | | |
Temporary equity, ending period, Shares at Sep. 30, 2019 | | | | | | | | | | | | | | | | | | | 4,017,378 | | | | 745,886,186 | | | | | | | |
Temporary equity, ending period at Sep. 30, 2019 | | | | | | | | | | | | | | | | | | | $ 33,569 | | | | $ 2,099,054 | | | | | | | |
Balance at end of period, treasury shares at Sep. 30, 2019 | | | | | | | | | | | | | | | 5,501,738 | | | | | | | | | | | | | | | |
Temporary equity, beginning period, Shares at Dec. 31, 2019 | | | | | | | | | | | | | | | | | | | 4,017,378 | | | | 742,839,990 | | | | | | | |
Temporary equity, beginning period at Dec. 31, 2019 | | | | | | | | | | | | | | | | | | | $ 33,569 | | | | $ 2,093,662 | | | | | | | |
Balance at beginning period, Shares at Dec. 31, 2019 | | | | | | 581,497,116 | | | | | | | | | | | | | | | | | | | | | | | | |
Balance at beginning period at Dec. 31, 2019 | $ (1,980,642) | | | | | $ 588 | | | | 1,857,331 | | | | | $ (38,895) | (703) | (3,798,963) | | | | | | | | | | | | | |
Balance at beginning period, treasury shares at Dec. 31, 2019 | 6,392,571 | | | | | | | | | | | | | | 6,392,571 | | | | | | | | | | | | | | | |
Repurchase of common stock, held in treasury, Shares | | | | | | (808,201) | | | | | | | | | 808,201 | | | | | | | | | | | | | | | |
Repurchase of common stock, held in treasury | $ (3,777) | | | | | | | | | | | | | | $ (3,777) | | | | | | | | | | | | | | | |
Issuance of common stock upon settlement of restricted stock units ("RSUs"), Shares | | | | | | 68,149,214 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock upon settlement of restricted stock units ("RSUs") | | | | | | $ 68 | | | | (68) | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | 69,444,099 | | | | | 69,444,099 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options | $ 116,030 | | | | | $ 69 | | | | 115,961 | | | | | | | | | | | | | | | | | | | | |
Retirement of treasury stock, Shares | | | | | | | | | | | | | | | (7,200,772) | | | | | | | | | | | | | | | |
Retirement of treasury stock | | | | | | $ (7) | | | | (42,665) | | | | | $ 42,672 | | | | | | | | | | | | | | | |
Conversion of convertible preferred stock to common stock, Shares | | | | | | | 28,490 | | | | | | | | | | | | (4,017,378) | | 4,017,378 | | (745,312,799) | (28,490) | | | | | 793,725,807 | |
Conversion of redeemable convertible preferred stock to common stock | 33,569 | | | | | | | | | | | | | | | | | | $ (33,569) | | $ 4 | $ 33,565 | | | | | | | | |
Conversion of convertible preferred stock to common stock | 2,105,319 | | | | | | | | | | | | | | | | | | | | | | $ (2,105,319) | | | | | | $ 794 | $ 2,104,525 |
Conversion of convertible preferred stock to common stock | | | $ 100 | | | | | | | | | $ 100 | | | | | | | | | | | | $ (100) | | | | | | |
Issuance of common stock upon net exercise of common stock warrants, Shares | | | | | | 7,631,329 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants | | | | | | $ 8 | | | | (8) | | | | | | | | | | | | | | | | | | | | |
Stock issued during period, Shares | | | | | | 206,500,523 | | | | | | | | | | | | | | | | | | | 121,265 | | | | | |
Stock issued during period | 942,529 | | | | | $ 207 | | | | 942,322 | | | | | | | | | | | | | | | $ 947 | | | | | |
Issuance of convertible preferred stock, Shares | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2,380,034 | | |
Issuance of convertible preferred stock | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 10,810 | | |
Conversion of preferred stock warrants to common stock warrants | 31,007 | | | | | | | | | 31,007 | | | | | | | | | | | | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Value) | (205) | | | | | $ (4) | | | | (201) | | | | | | | | | | | | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Shares) | | | | | | (3,500,000) | | | | | | | | | | | | | | | | | | | | | | | | |
Other comprehensive income | 1,871 | | | | | | | | | | | | | | | 1,871 | | | | | | | | | | | | | | |
Stock-based compensation | 1,024,000 | | | | | | | | | 1,024,000 | | | | | | | | | | | | | | | | | | | | |
Balance at end of period, Shares at Sep. 30, 2020 | | | | | | 1,726,685,755 | | | | | | | | | | | | | | | | | | | | | | | | |
Net loss | (1,018,048) | | | | | | | | | | | | | | | | (1,018,048) | | | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2020 | $ 1,251,753 | | | | | $ 1,727 | | | | 6,065,869 | | | | | | 1,168 | (4,817,011) | | | | | | | | | | | | | |
Temporary equity, ending period, Shares at Sep. 30, 2020 | | | | | | | | | | | | | | | | | | | 0 | | | | 0 | | | | | | | |
Balance at end of period, treasury shares at Sep. 30, 2020 | 0 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Temporary equity, beginning period, Shares at Jun. 30, 2020 | | | | | | | | | | | | | | | | | | | 4,017,378 | | | | 742,932,765 | | | | | | | |
Temporary equity, beginning period at Jun. 30, 2020 | | | | | | | | | | | | | | | | | | | $ 33,569 | | | | $ 2,094,509 | | | | | | | |
Balance at beginning period, Shares at Jun. 30, 2020 | | | | | | 736,634,601 | | | | | | | | | | | | | | | | | | | | | | | | |
Balance at beginning period at Jun. 30, 2020 | $ (1,398,701) | | | | | $ 737 | | | | 2,563,354 | | | | | | 900 | (3,963,692) | | | | | | | | | | | | | |
Issuance of common stock upon settlement of restricted stock units ("RSUs"), Shares | | | | | | 68,149,214 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock upon settlement of restricted stock units ("RSUs") | | | | | | $ 68 | | | | (68) | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | | | | | | 31,747,857 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock from the exercise of stock options | 87,207 | | | | | $ 32 | | | | 87,175 | | | | | | | | | | | | | | | | | | | | |
Conversion of convertible preferred stock to common stock, Shares | | | | | | | | | | | | | | | | | | | (4,017,378) | | 4,017,378 | | (745,312,799) | | | | | | 793,725,807 | |
Conversion of redeemable convertible preferred stock to common stock | 33,569 | | | | | | | | | | | | | | | | | | $ (33,569) | | $ 4 | $ 33,565 | | | | | | | | |
Conversion of convertible preferred stock to common stock | 2,105,319 | | | | | | | | | | | | | | | | | | | | | | $ (2,105,319) | | | | | | $ 794 | $ 2,104,525 |
Issuance of common stock upon net exercise of common stock warrants, Shares | | | | | | 7,631,329 | | | | | | | | | | | | | | | | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants | | | | | | $ 8 | | | | (8) | | | | | | | | | | | | | | | | | | | | |
Stock issued during period, Shares | | | | | | 88,279,569 | | | | | | | | | | | | | | | | | | | | | | | | |
Stock issued during period | 404,679 | | | | | $ 88 | | | | 404,591 | | | | | | | | | | | | | | | | | | | | |
Issuance of convertible preferred stock, Shares | | | | | | | | | | | | | | | | | | | | | | | 2,380,034 | | | | | | | |
Issuance of convertible preferred stock | | | | | | | | | | | | | | | | | | | | | | | $ 10,810 | | | | | | | |
Conversion of preferred stock warrants to common stock warrants | 31,007 | | | | | | | | | 31,007 | | | | | | | | | | | | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Value) | (205) | | | | | $ (4) | | | | (201) | | | | | | | | | | | | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Shares) | | | | | | (3,500,000) | | | | | | | | | | | | | | | | | | | | | | | | |
Other comprehensive income | 268 | | | | | | | | | | | | | | | 268 | | | | | | | | | | | | | | |
Stock-based compensation | 841,929 | | | | | | | | | 841,929 | | | | | | | | | | | | | | | | | | | | |
Balance at end of period, Shares at Sep. 30, 2020 | | | | | | 1,726,685,755 | | | | | | | | | | | | | | | | | | | | | | | | |
Net loss | (853,319) | | | | | | | | | | | | | | | | (853,319) | | | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2020 | $ 1,251,753 | | | | | $ 1,727 | | | | $ 6,065,869 | | | | | | $ 1,168 | $ (4,817,011) | | | | | | | | | | | | | |
Temporary equity, ending period, Shares at Sep. 30, 2020 | | | | | | | | | | | | | | | | | | | 0 | | | | 0 | | | | | | | |
Balance at end of period, treasury shares at Sep. 30, 2020 | 0 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |