Summary of Significant Accounting Policies | 2. Basis of presentation Use of estimates Foreign currency translation Unrealized gains and losses that arise from exchange rate fluctuations on transactions denominated in a currency other than the functional currency, primarily gains and losses on intercompany loans, are included in the consolidated statements of operations as a component of other income, net. For the year ended December 31, 2017, the Company reported a net foreign currency transaction gain of $1.0 million and for the years ended December 31, 2016 and 2015, the Company reported net foreign currency transaction losses of $0.4 million and $0.2 million, respectively. Cash, cash equivalents and short-term investments Concentration of credit risk and significant customers Accounts receivable Inventory Long lived assets Intangible assets Fair value of financial instruments Level 1: Unadjusted quoted prices in active markets that are accessible at the measurement date for identical, unrestricted assets or liabilities; Level 2: Quoted prices for similar assets and liabilities in active markets, quoted prices in markets that are not active, or inputs which are observable, either directly or indirectly, for substantially the full term of the asset or liability; and Level 3: Prices or valuation techniques that require inputs that are both significant to the fair value measurement and unobservable (i.e., supported by little or no market activity). Revenue recognition Shipping and handling costs Advertising costs Income taxes for federal tax purposes. However, the Company is still analyzing certain aspects of the Act and refining calculations, which could potentially affect the measurement of these balances or give rise to new deferred tax amounts. The provisional amount recorded related to the remeasurement of the deferred tax balance was $25.2 million, which was fully offset by a decrease in the valuation allowance. Research and development expenses Stock‑based compensation The Company recognizes compensation expense for all stock-based awards granted to employees and nonemployees, including members of its board of directors. The fair value of stock option awards is estimated at the grant date using the Black-Scholes option pricing model, and the portion that is ultimately expected to vest is recognized as compensation cost over the requisite service period using the straight-line method. The determination of the fair value-based measurement of stock options on the date of grant using an option pricing model is affected by the determination of the fair value of the underlying stock as well as assumptions regarding a number of highly complex and subjective variables. These variables include, but are not limited to, the Company’s stock price volatility over the expected term of the grants, and actual and projected employee stock option exercise behaviors. In the future, as additional empirical evidence regarding these estimates becomes available, the Company may change or refine its approach of deriving them, and these changes could impact the fair value-based measurement of stock options granted in the future. Changes in the fair value-based measurement of stock awards could materially impact the Company’s operating results. The fair values of stock option awards made to nonemployees are remeasured at each reporting period using the Black-Scholes option pricing model. Compensation expense for these stock option awards is determined by applying the remeasured fair values to the shares that have vested during a period. The fair value of restricted stock unit (RSU) awards made to employees and nonemployees is equal to the closing market price of the Company’s common stock on the grant date. Comprehensive (loss) income Net (loss) income per share As of December 31, Numerator: Net (loss) income - basic $ (92) $ 4,522 $ (37,241) Denominator: Weighted average number of common shares outstanding - basic 34,381 32,928 17,474 Common stock equivalents from outstanding common stock options - 3,514 - Common stock equivalents for ESPP - 16 - Common stock equivalents from outstanding common stock warrants - 1 - Weighted average number of common shares outstanding - diluted 34,381 36,459 17,474 Basic net (loss) income per share $ $ 0.14 $ (2.13) Diluted net (loss) income per share $ $ 0.12 $ (2.13) As of December 31, Stock options outstanding 5,689 1,099 5,701 Employee stock purchase plan 28 — 89 Common stock warrants outstanding — — 6 5,717 1,099 5,796 Recently adopted accounting pronouncements In March 2016, the Financial Accounting Standards Board (FASB) issued Accounting Standards Update (ASU) No. 2016-09 , Compensation – Stock Compensation (Topic 718): Improvements to Employee Share-Based Payment Accounting (ASU 2016-09), which modifies certain aspects of the accounting for share-based payment transactions, including income taxes, classification of awards, and classification in the statement of cash flows. The amendments are intended to improve the accounting for employee share-based payments and affect all organizations that issue share-based payment awards to their employees. Several aspects of the accounting for share-based payment award transactions are simplified, including: (a) income tax consequences; (b) classification of awards as either equity or liabilities; and (c) classification on the statement of cash flows. The amendments were effective for annual periods beginning after December 15, 2016, and interim periods within those annual periods and the Company adopted ASU 2016-09 in its first quarter 2017. As a result of the prospective adoption of ASU 2016-09 on January 1, 2017, excess tax benefits of $13.1 million were recorded to the Company’s net operating loss carryover resulting in an increase in the Company’s deferred tax assets with an identical increase in the associated valuation allowance, and no prior periods have been adjusted. Recently issued accounting pronouncements not yet adopted In May 2014, the FASB issued guidance in ASU 2014-09 which was codified in Accounting Standards Codification (ASC) 606, Revenue Recognition – Revenue from Contracts with Customers (ASC 606). ASC 606 provides a single comprehensive model for entities to use in accounting for revenue arising from contracts with customers, and is principles-based, such that revenue is recognized to depict the transfer of goods or services to customers in an amount that reflects the consideration to which the entity expects to be entitled in exchange for those goods or services. ASU 2015-14 deferred the effective date of ASC 606 to annual reporting periods beginning after December 15, 2017 (including interim periods within those periods) and while early adoption is permitted, the Company adopted ASC 606 on January 1, 2018. Companies are required to apply ASC 606 retrospectively; however, companies may use either a full retrospective or a modified retrospective approach when adopting the standard. The Company will be using the modified retrospective approach, and adoption of ASC 606 will not result in a cumulative catch-up adjustment to the opening balance sheet of retained earnings at the effective date. The Company has performed an analysis and does not believe adoption of the standard will have a material impact on its consolidated financial statements with the exception of enhanced disclosure requirements required by ASC 606. In the analysis, the Company has concluded it generally has one performance obligation, the transaction price is not impacted by any variable consideration or other factors noted in ASC 606, except for offering a right of return, and the Company’s performance obligations are generally satisfied when products are shipped. In February 2016, the FASB issued ASU No. 2016-02, Leases (Topic 842). The ASU requires management to recognize almost all leases with a term greater than one year as a right-of-use asset and corresponding liability, measured at the present value of the lease payments. The new standard must be adopted using the modified retrospective approach and will be effective for the Company starting in the first quarter of 2019. Early adoption is permitted. The Company is currently evaluating the impact this guidance will have on its consolidated financial statements; however, the Company anticipates recognition of additional assets and corresponding liabilities on its consolidated financial statements. In November 2016, the FASB issued ASU No. 2016-18, Statement of Cash Flows (Topic 230): Restricted Cash (ASC 2016-18), which enhances and clarifies the guidance on the classification and presentation of restricted cash in the statement of cash flows. ASU 2016-18 was effective for the Company starting January 1, 2018. Currently, the Company's restricted cash balance is not significant and the Company does not expect the adoption of the guidance will have a material impact on its consolidated financial statements. In January 2017, the FASB issued ASU No. 2017-01, Business Combinations (Topic 805): Clarifying the Definition of a Business (ASU 2017-01), clarifying the definition of a business. The amendments are intended to help companies evaluate whether transactions should be accounted for as acquisitions (or disposals) of assets or businesses. When substantially all of the fair value of gross assets acquired is concentrated in a single asset (or a group of similar assets), the assets acquired would not represent a business. This introduces an initial required screening that, if met, eliminates the need for further assessment. To be considered a business, an acquisition would have to include an input and a substantive process that together significantly contribute to the ability to create outputs. To be a business without outputs, there will need to be an organized workforce. The ASU also narrows the definition of the term “outputs” to be consistent with how it is described in ASC 606, Revenue Recognition - Revenue from Contracts with Customers . The amendments are effective for annual periods beginning after December 15, 2017, including interim periods within those periods with early adoption permitted. The Company does not expect the adoption of the guidance will have a material impact on its consolidated financial statements. |