v3.22.0.1
Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Cash flows from operating activities      
Net loss $ (487,955) $ (944,839) $ (1,033,660)
Adjustments to reconcile net loss to net cash provided by (used in) operating activities:      
Depreciation and amortization 119,141 86,744 87,245
Stock-based compensation 1,092,135 770,182 686,013
Amortization of debt discount and issuance costs 4,311 81,401 17,797
(Gains) losses on debt and equity securities, net (289,052) (10,250) (18,982)
Induced conversion expense related to convertible notes 41,538    
Gain on divestiture     (39,883)
Other 8,643 2,963 (10,084)
Change in operating assets and liabilities, net of effect of acquisitions:      
Accounts receivable, net of allowance (332,967) (255,818) (147,862)
Prepaid expenses and other current assets (26,607) (14,587) (9,849)
Operating lease right-of-use assets 47,258 38,940 58,199
Other assets (10,916) (11,442) 1,169
Accounts payable 53,579 20,374 20,674
Accrued expenses and other current liabilities 117,092 108,601 146,063
Operating lease liabilities (49,294) (49,730) (60,844)
Other liabilities 5,974 9,817 (954)
Net cash provided by (used in) operating activities 292,880 (167,644) (304,958)
Cash flows from investing activities      
Purchases of property and equipment (69,875) (57,832) (36,478)
Purchases of strategic investments (41,160) (111,586) (5,481)
Cash paid for acquisitions, net of cash acquired (310,915) (168,850) (77,119)
Proceeds from divestiture, net     73,796
Purchases of marketable securities (2,438,983) (3,524,599) (2,477,388)
Sales of marketable securities 379,555 389,974 184,179
Maturities of marketable securities 2,536,725 2,737,523 1,608,854
Other 34,880 5,506 1,029
Net cash provided by (used in) investing activities 90,227 (729,864) (728,608)
Cash flows from financing activities      
Proceeds from issuance of convertible notes, net of issuance costs 1,137,227 988,582 1,251,411
Purchase of capped calls (86,825) (100,000) (102,086)
Proceeds from the exercise of stock options 14,671 34,209 16,527
Net cash provided by financing activities 1,065,073 922,791 1,165,852
Change in cash, cash equivalents, and restricted cash 1,448,180 25,283 132,286
Cash, cash equivalents, and restricted cash, beginning of period 546,543 521,260 388,974
Cash, cash equivalents, and restricted cash, end of period 1,994,723 546,543 521,260
Supplemental disclosures      
Cash paid for income taxes, net 25,333 3,692 156
Cash paid for interest 10,887 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 $ 6,498 $ 2,732 $ (6,027)