v3.20.4
Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2020
Dec. 31, 2019
Dec. 31, 2018
Cash flows from operating activities      
Net loss $ (944,839) $ (1,033,660) $ (1,255,911)
Adjustments to reconcile net loss to net cash used in operating activities:      
Depreciation and amortization 86,744 87,245 91,648
Stock-based compensation 770,182 686,013 538,211
Deferred income taxes (6,326) (491) (383)
Gain on divestiture   (39,883)  
Amortization of debt discount and issuance costs 81,401 17,797  
Lease exit charges     33,033
Other (961) (28,575) (903)
Change in operating assets and liabilities, net of effect of acquisitions:      
Accounts receivable, net of allowance (255,818) (147,862) (77,506)
Prepaid expenses and other current assets (14,587) (9,849) 1,594
Operating lease right-of-use assets 38,940 58,199  
Other assets (11,442) 1,169 21,785
Accounts payable 20,374 20,674 (33,532)
Accrued expenses and other current liabilities 108,601 146,063 (14,325)
Operating lease liabilities (49,730) (60,844)  
Other liabilities 9,817 (954) 6,365
Net cash used in operating activities (167,644) (304,958) (689,924)
Cash flows from investing activities      
Purchases of property and equipment (57,832) (36,478) (120,242)
Proceeds from divestiture, net   73,796  
Cash paid for acquisitions, net of cash acquired (168,850) (77,119) (815)
Non-marketable investments (111,586) (5,481) (22,495)
Purchases of marketable securities (3,524,599) (2,477,388) (1,653,918)
Sales of marketable securities 389,974 184,179 45,007
Maturities of marketable securities 2,737,523 1,608,854 2,438,206
Other 5,506 1,029 8,711
Net cash provided by (used in) investing activities (729,864) (728,608) 694,454
Cash flows from financing activities      
Proceeds from issuance of convertible notes, net of issuance costs 988,582 1,251,411  
Purchase of capped calls (100,000) (102,086)  
Proceeds from the exercise of stock options 34,209 16,527 47,988
Stock repurchases from employees for tax withholdings     (551)
Net cash provided by financing activities 922,791 1,165,852 47,437
Change in cash, cash equivalents, and restricted cash 25,283 132,286 51,967
Cash, cash equivalents, and restricted cash, beginning of period 521,260 388,974 337,007
Cash, cash equivalents, and restricted cash, end of period 546,543 521,260 388,974
Supplemental disclosures      
Cash paid for income taxes, net 3,692 156 3,598
Cash paid for interest 12,019 1,546  
Supplemental disclosures of non-cash activities      
Net change in accounts payable and accrued expenses and other current liabilities related to property and equipment additions $ 2,732 $ (6,027) $ (7,764)